You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:51:58 UTC
[39/50] brooklyn-ui git commit: ensure AutoScaler has a policy ID,
so can suspend/remove it in web console,
and better feedback about such condition
ensure AutoScaler has a policy ID, so can suspend/remove it in web console, and better feedback about such condition
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/92e00dd8
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/92e00dd8
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/92e00dd8
Branch: refs/heads/0.4.0
Commit: 92e00dd8ff5985d46a8c91f01d12035ee2f848dc
Parents: b9e25d8
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Mon Aug 27 10:17:36 2012 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Aug 27 10:17:36 2012 +0100
----------------------------------------------------------------------
.../web-app/js/console/detail-tab/detail-tabs/policies.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/92e00dd8/usage/web-console/web-app/js/console/detail-tab/detail-tabs/policies.js
----------------------------------------------------------------------
diff --git a/usage/web-console/web-app/js/console/detail-tab/detail-tabs/policies.js b/usage/web-console/web-app/js/console/detail-tab/detail-tabs/policies.js
index 1a62de9..ad52393 100644
--- a/usage/web-console/web-app/js/console/detail-tab/detail-tabs/policies.js
+++ b/usage/web-console/web-app/js/console/detail-tab/detail-tabs/policies.js
@@ -37,7 +37,7 @@ Brooklyn.policies = (function(){
$('#policyName').empty();
var nameText = document.createElement("p");
if(policyName!=null){
- nameText.textContent = policyName;
+ nameText.textContent = policyName + " ("+policyId+")";
}
else{
nameText.textContent = 'The policy has no name';
@@ -80,6 +80,7 @@ Brooklyn.policies = (function(){
function executeAction(event){
var chosenAction = document.getElementById('policyAction').value;
if(chosenAction=='default'){ alert('You must choose an action to execute!'); }
+ else if(policyId==null){ alert('You must choose a policy!'); }
else{
if(confirm("Are you sure you wish to "+chosenAction+" this policy?")){
var dataMap = new Object();