From 6f37de6d29a2525281e8a6e624d74abdf6f389b2 Mon Sep 17 00:00:00 2001 From: Axolotle Date: Sat, 12 Sep 2020 17:11:13 +0200 Subject: [PATCH] add ToolFirewall view --- app/src/i18n/locales/en.json | 10 +- app/src/router/routes.js | 11 + app/src/scss/main.scss | 4 + app/src/views/tool/ToolFirewall.vue | 308 ++++++++++++++++++++++++++++ 4 files changed, 329 insertions(+), 4 deletions(-) create mode 100644 app/src/views/tool/ToolFirewall.vue diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index cb9b1c25..1a7bf9c0 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -47,6 +47,7 @@ "catalog": "Catalog", "check": "Check", "close": "Close", + "closed": "closed", "common": { "firstname": "First name", "lastname": "Last name" @@ -56,8 +57,8 @@ "confirm_app_default": "Are you sure you want to make this app default?", "confirm_change_maindomain": "Are you sure you want to change the main domain?", "confirm_delete": "Are you sure you want to delete {name}?", - "confirm_firewall_open": "Are you sure you want to open port %s? (protocol: %s, connection: %s)", - "confirm_firewall_close": "Are you sure you want to close port %s? (protocol: %s, connection: %s)", + "confirm_firewall_open": "Are you sure you want to open port {port} (protocol: {protocol}, connection: {connection})", + "confirm_firewall_close": "Are you sure you want to close port {port} (protocol: {protocol}, connection: {connection})", "confirm_install_custom_app": "WARNING! Installing 3rd party applications may compromise the integrity and security of your system. You should probably NOT install it unless you know what you are doing. Are you willing to take that risk?", "confirm_install_domain_root": "You will not be able to install any other app on %s. Continue?", "confirm_install_app_warning": "Warning: this application may work but is not well-integrated in YunoHost. Some features such as single sign-on and backup/restore might not be available.", @@ -125,8 +126,8 @@ "username_exists": "The user '{name}' already exists", "username_syntax": "Invalid username: Must be lower-case alphanumeric and underscore characters only", "domain_syntax": "Invalid domain name: Must be lower-case alphanumeric, dot and dash characters only", - "dynDomain_syntax": "Invalid domain name: Must be lower-case alphanumeric and dash characters only" - + "dynDomain_syntax": "Invalid domain name: Must be lower-case alphanumeric and dash characters only", + "firewall_port_already": "Port {port} is already {state} (protocol: {protocol}; connection: {connection})" }, "form_input_example": "Example: %s", "from_to": "from %s to %s", @@ -214,6 +215,7 @@ "only_working_apps": "Only working apps", "only_decent_quality_apps": "Only decent quality apps", "open": "Open", + "opened": "opened", "operations": "Operations", "orphaned": "Not maintained", "orphaned_details": "This app has not been maintained for quite some time. It may still be working, but won't receive any upgrade until somebody volunteers to take care of it. Feel free to contribute to revive it!", diff --git a/app/src/router/routes.js b/app/src/router/routes.js index 764cf0ce..018d13d3 100644 --- a/app/src/router/routes.js +++ b/app/src/router/routes.js @@ -219,6 +219,17 @@ const routes = [ { name: 'tool-migrations', trad: 'migrations' } ] } + }, + { + name: 'tool-firewall', + path: '/tools/firewall', + component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolFirewall'), + meta: { + breadcrumb: [ + { name: 'tool-list', trad: 'tools' }, + { name: 'tool-firewall', trad: 'firewall' } + ] + } } ] diff --git a/app/src/scss/main.scss b/app/src/scss/main.scss index 27f328bf..5140c2af 100644 --- a/app/src/scss/main.scss +++ b/app/src/scss/main.scss @@ -75,6 +75,10 @@ body { font-size: 1.75rem; } +.card-body { + padding: 1rem; +} + // collapse icon .not-collapsed .icon { transform: rotate(-90deg); diff --git a/app/src/views/tool/ToolFirewall.vue b/app/src/views/tool/ToolFirewall.vue new file mode 100644 index 00000000..cc63a04c --- /dev/null +++ b/app/src/views/tool/ToolFirewall.vue @@ -0,0 +1,308 @@ + + + + +