mirror of https://github.com/apache/cloudstack.git
CS-15863: cloudstack 3.0 UI - (1) extend multiEdit widget to be able to hide actions upon an each item's properties.
(2) IP Addresses page - load balancer listing - VM listing - hide destroy action for autoscale VM.
This commit is contained in:
parent
f1c77e84dd
commit
4b4d4555f3
|
|
@ -2610,6 +2610,11 @@
|
|||
success: function(data) {
|
||||
lbInstances = data.listloadbalancerruleinstancesresponse.loadbalancerruleinstance ?
|
||||
data.listloadbalancerruleinstancesresponse.loadbalancerruleinstance : [];
|
||||
|
||||
$(lbInstances).each(function() {
|
||||
if(this.name.indexOf('AutoScale-LB-') > -1) //autoscale VM is not allowed to be deleted manually. So, hide destroy button
|
||||
this._hideActions = ['destroy'];
|
||||
});
|
||||
},
|
||||
error: function(data) {
|
||||
args.response.error(parseXMLHttpResponse(data));
|
||||
|
|
|
|||
|
|
@ -622,7 +622,11 @@
|
|||
var $itemActions = $('<td>').addClass('actions item-actions');
|
||||
|
||||
$.each(itemActions, function(itemActionID, itemAction) {
|
||||
if (itemActionID == 'add') return true;
|
||||
if (itemActionID == 'add')
|
||||
return true;
|
||||
|
||||
if(item._hideActions != null && $.inArray(itemActionID, item._hideActions) > -1)
|
||||
return true;
|
||||
|
||||
var $itemAction = $('<div>').addClass('action').addClass(itemActionID);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue