Skip to content

Commit 856f41b

Browse files
committed
System, secondary storage UI fixes
-Add state field ('resourcestate') to list view -Fix destroy action to have proper UI feedback
1 parent ea7ea4c commit 856f41b

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎client/WEB-INF/classes/resources/messages.properties‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#new labels (begin) **********************************************************************************************
2-
3-
2+
state.Enabled=Enabled
43
#new labels (end) ************************************************************************************************
54

65

‎ui/index.jsp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,7 @@
16171617

16181618
<script language="javascript">
16191619
dictionary = {
1620+
'state.Enabled': '<fmt:message key="state.Enabled"/>',
16201621
'label.system.wide.capacity': '<fmt:message key="label.system.wide.capacity"/>',
16211622
'label.management': '<fmt:message key="label.management"/>',
16221623
'label.guest': '<fmt:message key="label.guest"/>',

‎ui/scripts/system.js‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6321,7 +6321,18 @@
63216321
section: 'seconary-storage',
63226322
fields: {
63236323
name: { label: 'label.name' },
6324-
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
6324+
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
6325+
resourcestate: {
6326+
label: 'label.state',
6327+
indicator: {
6328+
'Enabled': 'on',
6329+
'Disabled': 'off',
6330+
'Destroyed': 'off'
6331+
},
6332+
converter: function(str) {
6333+
return 'state.' + str;
6334+
}
6335+
}
63256336
},
63266337

63276338
dataProvider: function(args) {
@@ -6410,7 +6421,7 @@
64106421
detailView: {
64116422
name: 'Secondary storage details',
64126423
actions: {
6413-
'delete': {
6424+
destroy: {
64146425
label: 'label.action.delete.secondary.storage' ,
64156426
messages: {
64166427
confirm: function(args) {
@@ -6426,12 +6437,12 @@
64266437
dataType: "json",
64276438
async: true,
64286439
success: function(json) {
6429-
args.response.success({data:{}});
6440+
args.response.success();
64306441
}
64316442
});
64326443
},
64336444
notification: {
6434-
poll: function(args) { args.complete(); }
6445+
poll: function(args) { args.complete({ data: { resourcestate: 'Destroyed' } }); }
64356446
}
64366447
}
64376448

@@ -7258,7 +7269,7 @@
72587269
var secondarystorageActionfilter = function(args) {
72597270
var jsonObj = args.context.item;
72607271
var allowedActions = [];
7261-
allowedActions.push("delete");
7272+
allowedActions.push("destroy");
72627273
return allowedActions;
72637274
}
72647275

0 commit comments

Comments
 (0)