CLOUDSTACK-1974: cloudstack UI - Infrastructure menu - zone detail - public traffic type - IP Ranges tab - add new action "Release from account", "Add Account" for existing IP Ranges.

This commit is contained in:
Jessica Wang 2013-04-08 14:39:18 -07:00
parent d6ed8d7cb5
commit bf72a36ea8

View File

@ -588,7 +588,83 @@
}
});
}
}
},
/*
releaseFromAccount: {
label: 'Release from Account',
action: function(args) {
$.ajax({
url: createURL('releasePublicIpRange'),
data: {
id: args.context.multiRule[0].id
},
success: function(json) {
args.response.success({
notification: {
label: 'release from account',
poll: function(args) {
args.complete();
}
}
});
},
error: function(json) {
args.response.error(parseXMLHttpResponse(json));
}
});
}
},
addAccount: {
label: 'Add Account',
createForm: {
title: 'Add Account',
fields: {
account: { label: 'Account' },
domainid: {
label: 'Domain',
select: function(args) {
$.ajax({
url: createURL('listDomains'),
data: { listAll: true },
success: function(json) {
args.response.success({
data: $.map(json.listdomainsresponse.domain, function(domain) {
return {
id: domain.id,
description: domain.path
};
})
});
}
});
}
}
}
},
action: function(args) {
var data = {
id: args.context.multiRule[0].id
};
$.ajax({
url: createURL('dedicatePublicIpRange'),
data: data,
success: function(json) {
args.response.success({
notification: {
label: 'Add Account',
poll: function(args) {
args.complete();
}
}
});
},
error: function(json) {
args.response.error(parseXMLHttpResponse(json));
}
});
}
}
*/
},
dataProvider: function(args) {
$.ajax({