diff --git a/.gitignore b/.gitignore index 9e1c79b5..a75aa891 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /node_modules /.sass-cache /.idea/workspace.xml +/npm-debug.log diff --git a/app/network/forward/gateway/list/list.table.component.js b/app/network/forward/gateway/list/list.table.component.js index 221720c5..13e6dcf1 100755 --- a/app/network/forward/gateway/list/list.table.component.js +++ b/app/network/forward/gateway/list/list.table.component.js @@ -9,6 +9,8 @@ }, bindings: { showName: '=?', + showHealth: '=?', + showVersion: '=?', showHostname: '=?', showPortLimit: '=?', showActions: '=?', @@ -33,6 +35,8 @@ function init() { _.defaults(table, { showName: true, + showHealth: true, + showVersion: true, showHostname: true, showPortLimit: true, showActions: true, diff --git a/app/network/forward/gateway/list/list.table.pug b/app/network/forward/gateway/list/list.table.pug index 7811f647..145fd7b4 100755 --- a/app/network/forward/gateway/list/list.table.pug +++ b/app/network/forward/gateway/list/list.table.pug @@ -4,6 +4,12 @@ block headings th.sortable(ng-if="table.showName") span(translate="forward.gateway.list.heading.NAME") sort(col="name") + th.sortable(ng-if="table.showHealth") + span(translate="forward.gateway.list.heading.HEALTH") + sort(col="hostname") + th.sortable(ng-if="table.showVersion") + span(translate="forward.gateway.list.heading.VERSION") + sort(col="hostname") th.sortable(ng-if="table.showHostname") span(translate="forward.gateway.list.heading.HOSTNAME") sort(col="hostname") @@ -19,6 +25,19 @@ block columns ui-sref="app.network.forward.gateway.view({id: row.id})" ng-bind="row.name" ) + td( + ng-if="table.showHealth" + ng-class=`{ + 'text-success': row.status_health === 'OK', + 'text-warning': row.status_health === 'WARN', + 'text-danger': row.status_health === 'ERROR', + }` + translate="forward.gateway.status.{{row.status_health}}" + ) + td( + ng-if="table.showVersion" + ng-bind="row.current_semver" + ) td( ng-if="table.showHostname" ng-bind="row.hostname" diff --git a/resources/assets/lang/en/forward.json b/resources/assets/lang/en/forward.json index 549c1304..199bfb94 100755 --- a/resources/assets/lang/en/forward.json +++ b/resources/assets/lang/en/forward.json @@ -13,10 +13,17 @@ "DELETE": "Delete", "RESYNC": "Resync" }, + "status": { + "OK": "OK", + "WARN": "Warning", + "ERROR": "Error" + }, "list": { "TITLE": "Port Forwarding Gateways", "heading": { "NAME": "Name", + "HEALTH": "Health", + "VERSION": "Version", "HOSTNAME": "Hostname", "PORT-LIMIT": "Port Limit", "ACTIONS": "Actions"