mirror of https://github.com/apache/cloudstack.git
Better network provider status UI handling
This commit is contained in:
parent
6dc4ae47db
commit
fc6c6fb5cb
|
|
@ -3701,7 +3701,7 @@ Dialogs*/
|
|||
background-position: -6px -459px;
|
||||
}
|
||||
|
||||
.zone-chart .resources.naas .system-main .network-providers li.shutdown .status {
|
||||
.zone-chart .resources.naas .system-main .network-providers li.disabled .status {
|
||||
background-position: -7px -495px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,13 +241,19 @@
|
|||
statusCheck: function(args) {
|
||||
return {
|
||||
virtualRouter: 'enabled',
|
||||
netscaler: 'disabled',
|
||||
f5: 'enabled',
|
||||
netscaler: 'not-configured',
|
||||
f5: 'disabled',
|
||||
srx: 'enabled',
|
||||
securityGroups: 'enabled'
|
||||
};
|
||||
},
|
||||
|
||||
statusLabels: {
|
||||
enabled: 'Enabled',
|
||||
'not-configured': 'Not setup',
|
||||
disabled: 'Disabled'
|
||||
},
|
||||
|
||||
types: {
|
||||
// Virtual router list view
|
||||
virtualRouter: {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@
|
|||
|
||||
$.each(naas.networkProviders.types, function(name, type) {
|
||||
var status = networkStatus[name];
|
||||
var statusLabel = naas.networkProviders.statusLabels ?
|
||||
naas.networkProviders.statusLabels[status] : {};
|
||||
|
||||
var $item = $('<li>').addClass('provider')
|
||||
.attr('rel', name)
|
||||
|
|
@ -83,7 +85,9 @@
|
|||
.appendTo($networkProviders)
|
||||
.append($('<div>').addClass('name').html(type.label))
|
||||
.append($('<div>').addClass('status')
|
||||
.append($('<span>').html(status)))
|
||||
.append($('<span>').html(
|
||||
statusLabel ? statusLabel : status
|
||||
)))
|
||||
.append($('<div>').addClass('view-all configure').html('Configure'));
|
||||
});
|
||||
|
||||
|
|
@ -348,7 +352,7 @@
|
|||
title: itemName + ' details',
|
||||
maximizeIfSelected: true,
|
||||
complete: function($newPanel) {
|
||||
if (status == 'disabled') {
|
||||
if (status == 'not-configured') {
|
||||
// Create form
|
||||
var formData = cloudStack.dialog.createForm({
|
||||
form: createForm,
|
||||
|
|
|
|||
Loading…
Reference in New Issue