[icinga-checkins] icinga.org: icinga-web/master: JSHint fixes

git at icinga.org git at icinga.org
Mon Oct 8 10:21:38 CEST 2012


Module: icinga-web
Branch: master
Commit: d9c9c92c677ca672ce7073a9c06b21f926bba15b
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=d9c9c92c677ca672ce7073a9c06b21f926bba15b

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Sun Sep 30 13:53:15 2012 +0200

JSHint fixes

---

 .../Cronks/StatusMap/StatusMapDetailPanel.js       |   10 +++++---
 .../js/Icinga/Cronks/StatusMap/StatusMapPanel.js   |   23 ++++++++++---------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapDetailPanel.js b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapDetailPanel.js
index e18beb8..90120b0 100755
--- a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapDetailPanel.js
+++ b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapDetailPanel.js
@@ -1,5 +1,7 @@
+/*jshint curly: true */
+/*global Ext:true, AppKit:true, _:true, Cronk:true,Icinga:true*/
 Ext.ns("Icinga.Cronks").StatusMapDetailPanel = function(tpl) {
-    
+    "use strict";
     var dview = new Ext.DataView({
         tpl: tpl,
         style: 'padding: 5px',
@@ -35,7 +37,7 @@ Ext.ns("Icinga.Cronks").StatusMapDetailPanel = function(tpl) {
                 el.set({"ext:qtip":_("Click for hostgrid")});
             }
         }, this);
-    }
+    };
     dview.update = dview.update.createSequence(setupLinks,dview);
     
     
@@ -91,10 +93,10 @@ Ext.ns("Icinga.Cronks").StatusMapDetailPanel = function(tpl) {
         dview.update.apply(dview,arguments);
         openProblemsGrid.setHostId(node.HOST_ID);
         openProblemsGrid.getStore().load();
-    }
+    };
     
     this.getPanel = function() {
         return panel;
-    }
+    };
     
 };
\ No newline at end of file
diff --git a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
index a99a39a..53a880e 100755
--- a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
+++ b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
@@ -1,5 +1,6 @@
+/*jshint curly:true */
+/*global Ext:true,_:true,AppKit:true,_:true */
 (function() {
-
     "use strict";
     var tpl = new Ext.XTemplate(
         '<div class="statusmap_head" >',
@@ -53,9 +54,9 @@
         this.url = "";
         this.refreshTime = 5000;
         this.connection = "icinga";
-        this.detailPanel;
+        this.detailPanel = null;
         this.centerIsRoot = false;
-        this.init = {}
+        this.init = {};
         this.setup = function(cmp,cfg) {
             Ext.apply(this,cfg);
             this.parentCmp = cmp;
@@ -79,7 +80,7 @@
                 unstyled: true,
                 padding: 5
             });
-        }
+        };
         
         this.setCenterIsRoot = function(val,noLoad) {
             this.centerIsRoot = val;
@@ -87,12 +88,12 @@
                 this.sync();
                 this.parentCmp.ownerCt.fireEvent("graphChange");
             }
-        }
+        };
     
         this.setConnection = function(connection) {
-            this.connection = connection
+            this.connection = connection;
             this.parentCmp.ownerCt.fireEvent("graphChange");
-        }
+        };
         
         
         this.setNodeColor = function(node) {
@@ -136,7 +137,7 @@
                 display: 'visible',
                 cursor: 'pointer',
                 fontSize: "1.2em"
-            })
+            });
             if (node._depth <= 1) {
                 el.setStyle({
                     color: "#000000"
@@ -144,12 +145,12 @@
             } else if (node._depth <= 3) {
                 el.setStyle({
                     color : "#000000"
-                })
+                });
             } else {
                 el.setStyle("display","none");
             }
             var style = domElement.style;
-            var left = parseInt(style.left);  
+            var left = parseInt(style.left,10);  
             var w = domElement.offsetWidth;  
             style.left = (left - w / 2) + 'px';
             
@@ -167,7 +168,7 @@
                 this.tooltipWnd.setPagePosition(ev.getPageX(),ev.getPageY());
                 this.tooltipWnd.hide();
             },this);
-        }
+        };
         
         this.showNodeInfoIcons = function(domElement,node) {
             var el = new Ext.Element(domElement);





More information about the icinga-checkins mailing list