mirror of https://github.com/apache/cloudstack.git
bug 7448: public network - implement delete IP Range.
This commit is contained in:
parent
712953156b
commit
6a57168a0c
|
|
@ -400,11 +400,32 @@
|
|||
</div>
|
||||
|
||||
<!-- IP Range template (begin) -->
|
||||
<div class="grid_container" id="iprange_template" style="display: none">
|
||||
<div class="grid_header">
|
||||
<div class="grid_container" id="iprange_template" style="display: none">
|
||||
<div class="grid_header">
|
||||
<div class="grid_header_title" id="grid_header_title">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_actionbox" id="iprange_action_link">
|
||||
<div class="grid_actionsdropdown_box" id="iprange_action_menu" style="display: none;">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="display: none; height: 18px;">
|
||||
<div class="gridheader_loader" id="icon">
|
||||
</div>
|
||||
<p id="description">
|
||||
Waiting …
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_rows" id="after_action_info_container" style="display:none">
|
||||
<div class="grid_row_cell" style="width: 90%; border: none;">
|
||||
<div class="row_celltitles">
|
||||
<strong id="after_action_info">Message will appear here</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ function publicNetworkJsonToIpAllocationTab() {
|
|||
}
|
||||
|
||||
function publicNetworkIprangeJsonToTemplate(jsonObj, $template) {
|
||||
$template.data("jsonObj", jsonObj);
|
||||
$template.attr("id", "publicNetworkIprange_" + jsonObj.id);
|
||||
|
||||
var ipRange = getIpRange(fromdb(jsonObj.startip), fromdb(jsonObj.endip));
|
||||
|
|
@ -191,6 +192,21 @@ function publicNetworkIprangeJsonToTemplate(jsonObj, $template) {
|
|||
$template.find("#vlan").text(jsonObj.vlan)
|
||||
$template.find("#startip").text(fromdb(jsonObj.startip));
|
||||
$template.find("#endip").text(fromdb(jsonObj.endip));
|
||||
|
||||
var $actionLink = $template.find("#iprange_action_link");
|
||||
$actionLink.bind("mouseover", function(event) {
|
||||
$(this).find("#iprange_action_menu").show();
|
||||
return false;
|
||||
});
|
||||
$actionLink.bind("mouseout", function(event) {
|
||||
$(this).find("#iprange_action_menu").hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
var $actionMenu = $actionLink.find("#iprange_action_menu");
|
||||
$actionMenu.find("#action_list").empty();
|
||||
|
||||
buildActionLinkForSubgridItem("Delete IP Range", publicNetworkIpRangeActionMap, $actionMenu, $template);
|
||||
}
|
||||
|
||||
function publicNetworkJsonToFirewallTab() {
|
||||
|
|
@ -420,6 +436,19 @@ function initAddIpRangeToPublicNetworkButton($button, $midmenuItem1) {
|
|||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
var publicNetworkIpRangeActionMap = {
|
||||
"Delete IP Range": {
|
||||
api: "deleteVlanIpRange",
|
||||
isAsyncJob: false,
|
||||
inProcessText: "Deleting IP Range....",
|
||||
afterActionSeccessFn: function(json, id, $subgridItem) {
|
||||
$subgridItem.slideUp("slow", function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
//***** Public Network (end) ******************************************************************************************************
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue