mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
cloudStack - host page - add "force delete host" option on confirmation box.
This commit is contained in:
parent
f06ea553c9
commit
642b6012a4
@ -855,6 +855,26 @@ dictionary = {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Confirm to remove host (begin) -->
|
||||
<div id="dialog_confirmation_remove_host" title='<fmt:message key="label.confirmation"/>' style="display: none">
|
||||
<p>
|
||||
<fmt:message key="message.action.remove.host" />
|
||||
</p>
|
||||
<div class="dialog_formcontent" id="force_remove_host_container" style="display:none">
|
||||
<form action="#" method="post" id="form_acquire">
|
||||
<ol>
|
||||
<li style="padding-top:10px">
|
||||
<input type="checkbox" class="checkbox" id="force_remove_host" />
|
||||
<p style="color:red"><fmt:message key="force.remove" /></p>
|
||||
</li>
|
||||
<li>
|
||||
<p style="color:red"><fmt:message key="force.remove.host.warning" /></p>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Confirm to remove host (end) -->
|
||||
|
||||
<div id="hidden_container">
|
||||
<!-- advanced search popup (begin) -->
|
||||
|
||||
@ -49,7 +49,13 @@ function hostGetSearchParams() {
|
||||
function afterLoadHostJSP() {
|
||||
initDialog("dialog_add_host", 400);
|
||||
initDialog("dialog_update_os");
|
||||
|
||||
initDialog("dialog_confirmation_remove_host");
|
||||
|
||||
var $dialogRemoveHost = $("#dialog_confirmation_remove_host");
|
||||
if(isAdmin()) {
|
||||
$dialogRemoveHost.find("#force_remove_host_container").show();
|
||||
}
|
||||
|
||||
// switch between different tabs
|
||||
var tabArray = [$("#tab_details"), $("#tab_instance"), $("#tab_router"), $("#tab_systemvm"), $("#tab_statistics")];
|
||||
var tabContentArray = [$("#tab_content_details"), $("#tab_content_instance"), $("#tab_content_router"), $("#tab_content_systemvm"), $("#tab_content_statistics")];
|
||||
@ -656,13 +662,13 @@ function doForceReconnect($actionLink, $detailsTab, $midmenuItem1){
|
||||
function doRemoveHost($actionLink, $detailsTab, $midmenuItem1){
|
||||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
|
||||
$("#dialog_confirmation")
|
||||
.text(dictionary["message.action.remove.host"])
|
||||
$("#dialog_confirmation_remove_host")
|
||||
.dialog("option", "buttons", {
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
var id = jsonObj.id;
|
||||
var apiCommand = "command=deleteHost&id="+id;
|
||||
var id = jsonObj.id;
|
||||
var isForced = $("#dialog_confirmation_remove_host").find("#force_remove_host").attr("checked").toString();
|
||||
var apiCommand = "command=deleteHost&id="+id+"&forced="+isForced;
|
||||
doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $detailsTab);
|
||||
},
|
||||
"Cancel": function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user