From db527555e151595d02afbc181e18671173bca59d Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 11 Jan 2012 14:22:48 -0800 Subject: [PATCH] bug 12910: cloudstack 3.0 new UI - stop router - add checkbox "Force stop" on dialog box. --- ui/scripts/system.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 6e276138c31..c1f8d31c25a 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -1534,7 +1534,18 @@ }, stop: { - label: 'Stop router', + label: 'Stop router', + createForm: { + title: 'Stop router', + desc: 'Please confirm that you want to stop this router', + fields: { + forced: { + label: 'Force stop', + isBoolean: true, + isChecked: false + } + } + }, messages: { confirm: function(args) { return 'Are you sure you want to stop router?'; @@ -1544,8 +1555,10 @@ } }, action: function(args) { + var array1 = []; + array1.push("&forced=" + (args.data.forced == "on")); $.ajax({ - url: createURL('stopRouter&id=' + args.context.routers[0].id), + url: createURL('stopRouter&id=' + args.context.routers[0].id + array1.join("")), dataType: 'json', async: true, success: function(json) {