[pve-devel] r6265 - pve-manager/pve2/www/manager

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jul 8 10:46:23 CEST 2011


Author: dietmar
Date: 2011-07-08 10:46:23 +0200 (Fri, 08 Jul 2011)
New Revision: 6265

Modified:
   pve-manager/pve2/www/manager/VNCConsole.js
Log:
make lint happy


Modified: pve-manager/pve2/www/manager/VNCConsole.js
===================================================================
--- pve-manager/pve2/www/manager/VNCConsole.js	2011-07-08 08:39:59 UTC (rev 6264)
+++ pve-manager/pve2/www/manager/VNCConsole.js	2011-07-08 08:46:23 UTC (rev 6265)
@@ -2,7 +2,7 @@
     //console.log("TESTINIT param1 " + appletid + " action " + action);
 
     return;
-
+/*
     var el = Ext.get(appletid);
     if (!el)
 	return;
@@ -16,6 +16,8 @@
     }
 
     //Ext.get('mytestid').remove();
+*/
+
 };
 
 Ext.define('PVE.VNCConsole', {
@@ -25,8 +27,9 @@
     initComponent : function() {
 	var me = this;
 
-	if (!me.url) 
+	if (!me.url) {
 	    throw "no url specified";
+	}
 
 	var myid = me.id + "-vncapp";
 
@@ -44,8 +47,9 @@
 	    //console.log("resize " + myid + " " + applet);
 	    
 	    // try again when dom element is available
-	    if (!(applet && Ext.isFunction(applet.getPreferredSize))) 
+	    if (!(applet && Ext.isFunction(applet.getPreferredSize))) {
 		return Ext.Function.defer(resize_window, 1000);
+	    }
 
 	    var tbar = me.getDockedItems("[dock=top]")[0];
 	    var tbh = tbar ? tbar.getHeight() : 0;
@@ -53,8 +57,8 @@
 	    var aw = ps.width;
 	    var ah = ps.height;
 
-	    if (aw < 640) aw = 640;
-	    if (ah < 400) ah = 400;
+	    if (aw < 640) { aw = 640; }
+	    if (ah < 400) { ah = 400; }
 
 	    var oh;
 	    var ow;
@@ -168,11 +172,13 @@
     initComponent : function() {
 	var me = this;
  
-	if (!me.nodename) 
+	if (!me.nodename) { 
 	    throw "no node name specified";
+	}
 
-	if (!me.vmid) 
+	if (!me.vmid) {
 	    throw "no VM ID specified";
+	}
 
 	var vm_command = function(cmd, reload_applet) {
 	    me.setLoading(true, true);
@@ -187,8 +193,9 @@
 		    Ext.Msg.alert('Error', response.htmlStatus);
 		},
 		success: function() {
-		    if (reload_applet) 
+		    if (reload_applet) {
 			Ext.Function.defer(me.reloadApplet, 1000, me);
+		    }
 		}
 	    });
 	};
@@ -205,8 +212,9 @@
 		handler: function() {
 		    var msg = "Do you really want to stop the VM?";
 		    Ext.Msg.confirm('Confirm', msg, function(btn) {
-			if (btn !== 'yes')
+			if (btn !== 'yes') {
 			    return;
+			}
 			vm_command("stop");
 		    }); 
 		}
@@ -216,8 +224,9 @@
 		handler: function() { 
 		    var msg = "Send CAD (Ctrl-Alt-Delete) to the VM?";
 		    Ext.Msg.confirm('Confirm', msg, function(btn) {
-			if (btn !== 'yes')
+			if (btn !== 'yes') {
 			    return;
+			}
 			vm_command("cad");
 		    });
 		}
@@ -227,8 +236,9 @@
 		handler: function() { 
 		    var msg = "Do you really want to reset the VM?";
 		    Ext.Msg.confirm('Confirm', msg, function(btn) {
-			if (btn !== 'yes')
+			if (btn !== 'yes') {
 			    return;
+			}
 			vm_command("reset");
 		    });
 		}
@@ -238,8 +248,9 @@
 		handler: function() {
 		    var msg = "Do you really want to shutdown the VM?";
 		    Ext.Msg.confirm('Confirm', msg, function(btn) {
-			if (btn !== 'yes')
+			if (btn !== 'yes') {
 			    return;
+			}
 			vm_command('shutdown');
 		    });
 		}			    
@@ -249,8 +260,9 @@
 		handler: function() {
 		    var msg = "Do you really want to suspend the VM?";
 		    Ext.Msg.confirm('Confirm', msg, function(btn) {
-			if (btn !== 'yes')
+			if (btn !== 'yes') {
 			    return;
+			}
 			vm_command("suspend");
 		    }); 
 		}
@@ -267,9 +279,9 @@
 		handler: function() { 
 		    var applet = Ext.getDom(me.appletID);
 		    applet.sendRefreshRequest();
- 		}
+		}
 	    },
- 	    {
+	    {
                 text: 'Reload',
                 handler: function () { 
 		    me.reloadApplet(); 
@@ -306,8 +318,9 @@
     initComponent : function() {
 	var me = this;
  
-	if (!me.nodename) 
+	if (!me.nodename) { 
 	    throw "no node name specified";
+	}
 
 	var tbar = [ 
            '->',
@@ -316,9 +329,9 @@
 		handler: function() { 
 		    var applet = Ext.getDom(me.appletID);
 		    applet.sendRefreshRequest();
- 		}
+		}
 	    },
- 	    {
+	    {
                 text: 'Reload',
                 handler: function () { me.reloadApplet(); }
 	    },
@@ -334,7 +347,7 @@
 		    nw.focus();
 		}
 	    }
- 	];
+	];
 
 	Ext.apply(me, {
 	    tbar: tbar,




More information about the pve-devel mailing list