Instances UI: Better start instance notification

-Don't show dialog if no password enabled on start -- inhibits
 'Start instance' dialog from appearing for every VM.

-Use standard dialog (not alert) for VM password notification


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/85ef5117
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/85ef5117
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/85ef5117

Branch: refs/heads/ui-multiple-pod-ranges
Commit: 85ef51170299533cce8c6793c68be69258da9fa7
Parents: 62fd911
Author: Brian Federle <[email protected]>
Authored: Thu Mar 21 13:25:49 2013 -0700
Committer: Brian Federle <[email protected]>
Committed: Thu Mar 21 13:26:03 2013 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85ef5117/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 787239d..1e3ce45 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -338,11 +338,12 @@
               notification: function(args) {
                 return 'label.action.start.instance';
               },                                                       
-                                                       complete: 
function(args) {                                                
+                                                       complete: 
function(args) {
                                                                
if(args.password != null) {
-                                                                       
alert('Password of the VM is ' + args.password);
+                                                                       return 
'Password of the VM is ' + args.password;
                                                                }
-                                                               return 
'label.action.start.instance';
+
+                                                               return false;
                                                        }                       
             },
             notification: {

Reply via email to