mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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
2c98ec461f
commit
ce8fe90aae
@ -2765,6 +2765,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));
|
||||
|
||||
@ -626,7 +626,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…
x
Reference in New Issue
Block a user