Skip to content

Commit

Permalink
Gateway versioning part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
cabloo committed Jun 2, 2020
1 parent 465a05f commit 612dfa1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/node_modules
/.sass-cache
/.idea/workspace.xml
/npm-debug.log
4 changes: 4 additions & 0 deletions app/network/forward/gateway/list/list.table.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
},
bindings: {
showName: '=?',
showHealth: '=?',
showVersion: '=?',
showHostname: '=?',
showPortLimit: '=?',
showActions: '=?',
Expand All @@ -33,6 +35,8 @@
function init() {
_.defaults(table, {
showName: true,
showHealth: true,
showVersion: true,
showHostname: true,
showPortLimit: true,
showActions: true,
Expand Down
19 changes: 19 additions & 0 deletions app/network/forward/gateway/list/list.table.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions resources/assets/lang/en/forward.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 612dfa1

Please sign in to comment.