mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-82 enable static nat button is not working in UI
This commit is contained in:
parent
5e3921519a
commit
8a008ecd16
@ -1430,34 +1430,33 @@
|
||||
listView: {
|
||||
filters: false,
|
||||
dataProvider: function(args) {
|
||||
var $listView = args.$listView;
|
||||
var data = {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
};
|
||||
|
||||
// See if tier is selected
|
||||
var $tierSelect = $listView.find('.tier-select select');
|
||||
|
||||
if ($tierSelect.size() && $tierSelect.val() != '-1') {
|
||||
data.networkid = $tierSelect.val();
|
||||
var $tierSelect = $(".ui-dialog-content").find('.tier-select select');
|
||||
|
||||
// if $tierSelect is not initialized, return; tierSelect() will refresh listView and come back here later
|
||||
if($tierSelect.size() == 0){
|
||||
args.response.success({ data: null });
|
||||
return;
|
||||
}
|
||||
|
||||
if('vpc' in args.context) {
|
||||
if($tierSelect.size() && $tierSelect.val() != '-1' ){
|
||||
data.networkid = $tierSelect.val();
|
||||
}
|
||||
$.extend(data, {
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
}
|
||||
else if('networks' in args.context) {
|
||||
$.extend(data, {
|
||||
networkid: args.context.networks[0].id
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({ data: null });
|
||||
return;
|
||||
}
|
||||
|
||||
if('vpc' in args.context) {
|
||||
$.extend(data, {
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
}
|
||||
else if('networks' in args.context) {
|
||||
$.extend(data, {
|
||||
networkid: args.context.networks[0].id
|
||||
});
|
||||
}
|
||||
|
||||
if (!args.context.projects) {
|
||||
$.extend(data, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user