mirror of https://github.com/apache/cloudstack.git
System, secondary storage UI fixes
-Add state field ('resourcestate') to list view
-Fix destroy action to have proper UI feedback
This commit is contained in:
parent
ea7ea4ce6f
commit
856f41bdf8
|
|
@ -1,6 +1,5 @@
|
|||
#new labels (begin) **********************************************************************************************
|
||||
|
||||
|
||||
state.Enabled=Enabled
|
||||
#new labels (end) ************************************************************************************************
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1617,6 +1617,7 @@
|
|||
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'state.Enabled': '<fmt:message key="state.Enabled"/>',
|
||||
'label.system.wide.capacity': '<fmt:message key="label.system.wide.capacity"/>',
|
||||
'label.management': '<fmt:message key="label.management"/>',
|
||||
'label.guest': '<fmt:message key="label.guest"/>',
|
||||
|
|
|
|||
|
|
@ -6321,7 +6321,18 @@
|
|||
section: 'seconary-storage',
|
||||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
|
||||
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
|
||||
resourcestate: {
|
||||
label: 'label.state',
|
||||
indicator: {
|
||||
'Enabled': 'on',
|
||||
'Disabled': 'off',
|
||||
'Destroyed': 'off'
|
||||
},
|
||||
converter: function(str) {
|
||||
return 'state.' + str;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -6410,7 +6421,7 @@
|
|||
detailView: {
|
||||
name: 'Secondary storage details',
|
||||
actions: {
|
||||
'delete': {
|
||||
destroy: {
|
||||
label: 'label.action.delete.secondary.storage' ,
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
|
|
@ -6426,12 +6437,12 @@
|
|||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
args.response.success({data:{}});
|
||||
args.response.success();
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) { args.complete(); }
|
||||
poll: function(args) { args.complete({ data: { resourcestate: 'Destroyed' } }); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7258,7 +7269,7 @@
|
|||
var secondarystorageActionfilter = function(args) {
|
||||
var jsonObj = args.context.item;
|
||||
var allowedActions = [];
|
||||
allowedActions.push("delete");
|
||||
allowedActions.push("destroy");
|
||||
return allowedActions;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue