From 6f12f97634f72039c8d6852c0237eed2d7a6e456 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 12 Feb 2020 15:49:28 +0500 Subject: [PATCH] UI: Minor fixes. --- src/ui/conf/zone/sources.json | 14 +++++++------- src/ui/conf/zone/types.json | 16 ++++++++-------- src/ui/form/prog/programswindow.cpp | 2 ++ src/ui/model/zonelistmodel.cpp | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/ui/conf/zone/sources.json b/src/ui/conf/zone/sources.json index d28ee3ba..3114e00e 100644 --- a/src/ui/conf/zone/sources.json +++ b/src/ui/conf/zone/sources.json @@ -1,11 +1,4 @@ [ - { - "code": "tasix", - "title": "TAS-IX Addresses", - "zoneType": "bgp", - "url": "http://mrlg.tas-ix.uz/index.cgi", - "formData": "router=cisco&pass1=&query=1&arg=" - }, { "code": "file", "title": "Addresses from Local File", @@ -19,5 +12,12 @@ "zoneType": "gen", "url": "https://iplists.firehol.org/files/firehol_level1.netset", "formData": "" + }, + { + "code": "tasix", + "title": "TAS-IX Addresses", + "zoneType": "bgp", + "url": "http://mrlg.tas-ix.uz/index.cgi", + "formData": "router=cisco&pass1=&query=1&arg=" } ] diff --git a/src/ui/conf/zone/types.json b/src/ui/conf/zone/types.json index dbc972f3..4358d098 100644 --- a/src/ui/conf/zone/types.json +++ b/src/ui/conf/zone/types.json @@ -1,12 +1,4 @@ [ - { - "code": "bgp", - "title": "BGP", - "description": "BGP table", - "sort": true, - "pattern": "^\\*\\D{2,5}(\\S+)", - "emptyNetMask": 24 - }, { "code": "gen", "title": "Generic", @@ -14,5 +6,13 @@ "sort": true, "pattern": "^\\D*(\\S+)", "emptyNetMask": 32 + }, + { + "code": "bgp", + "title": "BGP", + "description": "BGP table", + "sort": true, + "pattern": "^\\*\\D{2,5}(\\S+)", + "emptyNetMask": 24 } ] diff --git a/src/ui/form/prog/programswindow.cpp b/src/ui/form/prog/programswindow.cpp index 3a57d2da..75bf74dc 100644 --- a/src/ui/form/prog/programswindow.cpp +++ b/src/ui/form/prog/programswindow.cpp @@ -526,6 +526,8 @@ void ProgramsWindow::setupTableAppsChanged() const auto refreshTableAppsChanged = [&] { const int appIndex = appListCurrentIndex(); const bool appSelected = (appIndex >= 0); + m_actAllowApp->setEnabled(appSelected); + m_actBlockApp->setEnabled(appSelected); m_actEditApp->setEnabled(appSelected); m_actRemoveApp->setEnabled(appSelected); m_btAllowApp->setEnabled(appSelected); diff --git a/src/ui/model/zonelistmodel.cpp b/src/ui/model/zonelistmodel.cpp index 6c6b05ea..3b1e8a8a 100644 --- a/src/ui/model/zonelistmodel.cpp +++ b/src/ui/model/zonelistmodel.cpp @@ -64,7 +64,7 @@ QVariant ZoneListModel::data(const QModelIndex &index, int role) const const auto zoneRow = zoneRowAt(row); switch (column) { - case 0: return QString("(%1) %2") + case 0: return QString("%1) %2") .arg(QString::number(m_zoneRow.zoneId), zoneRow.zoneName); case 1: {