Skip to content

Commit fc6c6fb

Browse files
committed
Better network provider status UI handling
1 parent 6dc4ae4 commit fc6c6fb

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

ui/css/cloudstack3.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3701,7 +3701,7 @@ Dialogs*/
37013701
background-position: -6px -459px;
37023702
}
37033703

3704-
.zone-chart .resources.naas .system-main .network-providers li.shutdown .status {
3704+
.zone-chart .resources.naas .system-main .network-providers li.disabled .status {
37053705
background-position: -7px -495px;
37063706
}
37073707

ui/scripts-test/system.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,19 @@
241241
statusCheck: function(args) {
242242
return {
243243
virtualRouter: 'enabled',
244-
netscaler: 'disabled',
245-
f5: 'enabled',
244+
netscaler: 'not-configured',
245+
f5: 'disabled',
246246
srx: 'enabled',
247247
securityGroups: 'enabled'
248248
};
249249
},
250250

251+
statusLabels: {
252+
enabled: 'Enabled',
253+
'not-configured': 'Not setup',
254+
disabled: 'Disabled'
255+
},
256+
251257
types: {
252258
// Virtual router list view
253259
virtualRouter: {

ui/scripts/ui-custom/zoneChart.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575

7676
$.each(naas.networkProviders.types, function(name, type) {
7777
var status = networkStatus[name];
78+
var statusLabel = naas.networkProviders.statusLabels ?
79+
naas.networkProviders.statusLabels[status] : {};
7880

7981
var $item = $('<li>').addClass('provider')
8082
.attr('rel', name)
@@ -83,7 +85,9 @@
8385
.appendTo($networkProviders)
8486
.append($('<div>').addClass('name').html(type.label))
8587
.append($('<div>').addClass('status')
86-
.append($('<span>').html(status)))
88+
.append($('<span>').html(
89+
statusLabel ? statusLabel : status
90+
)))
8791
.append($('<div>').addClass('view-all configure').html('Configure'));
8892
});
8993

@@ -348,7 +352,7 @@
348352
title: itemName + ' details',
349353
maximizeIfSelected: true,
350354
complete: function($newPanel) {
351-
if (status == 'disabled') {
355+
if (status == 'not-configured') {
352356
// Create form
353357
var formData = cloudStack.dialog.createForm({
354358
form: createForm,

0 commit comments

Comments
 (0)