1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #2837: Force AR remove (#4591)

This commit is contained in:
Frederick Borges 2020-04-24 17:28:52 +02:00 committed by GitHub
parent 2922d1f40a
commit 8f60f6feca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -97,7 +97,7 @@ module OpenNebulaJSON
end
def rm_ar(params=Hash.new)
super(params['ar_id'])
super(params['ar_id'],params['force'])
end
def add_ar(params=Hash.new)

View File

@ -174,14 +174,15 @@ define(function(require) {
context.off("click", 'button#rm_ar_button');
context.on("click", 'button#rm_ar_button', function(){
var ar_id = $(this).attr('ar_id');
var checkbox_code = '<br><input type="checkbox" id="force_rm_ar"><label for="force_rm_ar">Force remove?</label>';
Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({
//header :
headerTabId: TAB_ID,
body : Locale.tr("This will delete all the addresses in this range"),
body : Locale.tr("This will delete all the addresses in this range") + checkbox_code,
//question :
submit : function(){
var obj = {ar_id: ar_id};
var force = $("#force_rm_ar").is(":checked");
var obj = {ar_id: ar_id, force: force};
Sunstone.runAction('Network.rm_ar',that.element.ID,obj);
return false;