mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:45:22 +00:00
UI: StatisticsPage: Add "Refresh" button.
This commit is contained in:
parent
0f5f60e030
commit
d050e5e7de
@ -56,6 +56,8 @@ signals:
|
||||
public slots:
|
||||
void clear();
|
||||
|
||||
void refresh() { beginResetModel(); endResetModel(); }
|
||||
|
||||
private:
|
||||
void updateRowCache(int row) const;
|
||||
|
||||
|
@ -9,6 +9,8 @@ BasePage {
|
||||
|
||||
readonly property LogManager logManager: fortManager.logManager
|
||||
readonly property AppBlockedModel appBlockedModel: logManager.appBlockedModel
|
||||
readonly property IpListModel ipListModel:
|
||||
appBlockedModel.ipListModel(currentAppPath)
|
||||
|
||||
readonly property string currentAppPath:
|
||||
(appListView.currentIndex >= 0 && appListView.currentItem)
|
||||
@ -95,7 +97,7 @@ BasePage {
|
||||
Layout.fillHeight: true
|
||||
spacing: 4
|
||||
|
||||
model: appBlockedModel.ipListModel(currentAppPath)
|
||||
model: ipListModel
|
||||
|
||||
delegate: Label {
|
||||
width: ipListView.width
|
||||
|
@ -10,6 +10,8 @@ BasePage {
|
||||
|
||||
readonly property LogManager logManager: fortManager.logManager
|
||||
readonly property AppStatModel appStatModel: logManager.appStatModel
|
||||
readonly property TrafListModel trafListModel:
|
||||
appStatModel.trafListModel(tabBar.currentIndex, appListView.currentIndex)
|
||||
|
||||
readonly property string currentAppPath:
|
||||
(appListView.currentIndex >= 0 && appListView.currentItem)
|
||||
@ -27,6 +29,13 @@ BasePage {
|
||||
spacing: 10
|
||||
|
||||
RowLayout {
|
||||
Button {
|
||||
enabled: appListView.currentIndex >= 0
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Refresh")
|
||||
onClicked: trafListModel.refresh()
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@ -137,8 +146,7 @@ BasePage {
|
||||
spacing: 4
|
||||
clip: true
|
||||
|
||||
model: appStatModel.trafListModel(
|
||||
tabBar.currentIndex, appListView.currentIndex)
|
||||
model: trafListModel
|
||||
|
||||
delegate: TrafRow {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user