[icinga-checkins] icinga.org: icinga-web/mhein/default: * Fixed memory leak issue in objectgrid

git at icinga.org git at icinga.org
Fri Nov 18 17:58:31 CET 2011


Module: icinga-web
Branch: mhein/default
Commit: 58152f6b6d0d37be3a7070b9b44c9654e06a145f
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=58152f6b6d0d37be3a7070b9b44c9654e06a145f

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Fri Nov 18 13:54:23 2011 +0100

* Fixed memory leak issue in objectgrid

---

 .../Cronks/lib/js/Cronks/Tackle/ObjectGrid.js      |   10 +++++-----
 .../Tackle/Renderer/ServiceHealthRenderer.js       |    4 ++--
 .../Cronks/Tackle/Renderer/StatusColumnRenderer.js |    3 ++-
 .../Cronks/lib/js/Cronks/Tackle/ServicesSubGrid.js |    7 +++----
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronks/Tackle/ObjectGrid.js b/app/modules/Cronks/lib/js/Cronks/Tackle/ObjectGrid.js
index 6fdd0ae..5f7c4ef 100644
--- a/app/modules/Cronks/lib/js/Cronks/Tackle/ObjectGrid.js
+++ b/app/modules/Cronks/lib/js/Cronks/Tackle/ObjectGrid.js
@@ -193,7 +193,7 @@ Icinga.Cronks.Tackle.ObjectGrid = Ext.extend(Ext.grid.GridPanel, {
                 width: 25,
                 resizable: false,
                 sortable:true,
-                renderer: Icinga.Cronks.Tackle.Renderer.StatusColumnRenderer,
+               renderer: Icinga.Cronks.Tackle.Renderer.StatusColumnRenderer,
                 scope:this
             },{
                 header: _('Host'),
@@ -310,12 +310,12 @@ Icinga.Cronks.Tackle.ObjectGrid = Ext.extend(Ext.grid.GridPanel, {
                     scope:this
                 },
                 renderer: AppKit.renderer.ColumnComponentRenderer(this,{
-                    html: "%VALUE%",
+
                     border: false,
-                    record: "%RECORD%",
                     style: 'cursor: pointer',
                     listeners: {
                         render: function(c) {
+                            c.update(c.baseArgs.value);
                             c.getEl().on("click",function(el) {
                                 if(!c.getEl())
                                     return;
@@ -332,9 +332,9 @@ Icinga.Cronks.Tackle.ObjectGrid = Ext.extend(Ext.grid.GridPanel, {
                                         tag: 'div',
                                         children: [
                                             {tag: 'b', html: _('Long output')},
-                                            {tag: 'div', html: c.record.get('HOST_LONG_OUTPUT')},
+                                            {tag: 'div', html: c.baseArgs.record.get('HOST_LONG_OUTPUT')},
                                             {tag: 'b', html: _('<br/>Performance data')},
-                                            {tag: 'div', html: c.record.get('HOST_PERFDATA')},
+                                            {tag: 'div', html: c.baseArgs.record.get('HOST_PERFDATA')},
                                         ]
                                     });
                                     var height = Ext.util.TextMetrics.createInstance(c.getEl()).getHeight(html);
diff --git a/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/ServiceHealthRenderer.js b/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/ServiceHealthRenderer.js
index 6ca4b24..0fe1553 100644
--- a/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/ServiceHealthRenderer.js
+++ b/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/ServiceHealthRenderer.js
@@ -10,12 +10,12 @@ Ext.ns('Icinga.Cronks.Tackle.Renderer');
         var _this = this;
 
         var render = function (nrOfTry) {
-            nrOfTry = nrOfTry || 1;
+        /*    nrOfTry = nrOfTry || 1;
             if(!Ext.get(id)) {
                 render.defer(100,this,[nrOfTry+1]);
                 return false;
             }
-
+*/
             var cmp = new Ext.BoxComponent({
                 layout: 'fit',
                 tpl: new Ext.XTemplate(
diff --git a/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/StatusColumnRenderer.js b/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/StatusColumnRenderer.js
index 0240884..7508c14 100644
--- a/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/StatusColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/Cronks/Tackle/Renderer/StatusColumnRenderer.js
@@ -181,8 +181,9 @@ Ext.ns('Icinga.Cronks.Tackle.Renderer');
 
         var render = function (nrOfTry) {
             nrOfTry = nrOfTry || 1;
+
             if(!Ext.get(id)) {
-                render.defer(100,this,[nrOfTry+1]);
+                render.defer(400,this,[nrOfTry+1]);
                 return false;
             }
 
diff --git a/app/modules/Cronks/lib/js/Cronks/Tackle/ServicesSubGrid.js b/app/modules/Cronks/lib/js/Cronks/Tackle/ServicesSubGrid.js
index 8e3b841..ffa03bc 100644
--- a/app/modules/Cronks/lib/js/Cronks/Tackle/ServicesSubGrid.js
+++ b/app/modules/Cronks/lib/js/Cronks/Tackle/ServicesSubGrid.js
@@ -187,12 +187,11 @@ Icinga.Cronks.Tackle.ServicesSubGrid = Ext.extend(Ext.grid.GridPanel, {
                     scope:this
                 },
                 renderer: AppKit.renderer.ColumnComponentRenderer(this,{
-                    html: "%VALUE%",
                     border: false,
-                    record: "%RECORD%",
                     style: 'cursor: pointer',
                     listeners: {
                         render: function(c) {
+                            c.update(c.baseArgs.value);
                             c.getEl().on("click",function(el) {
                                 if(!c.getEl())
                                     return;
@@ -209,9 +208,9 @@ Icinga.Cronks.Tackle.ServicesSubGrid = Ext.extend(Ext.grid.GridPanel, {
                                         tag: 'div',
                                         children: [
                                             {tag: 'b', html: _('Long output')},
-                                            {tag: 'div', html: c.record.get('SERVICE_LONG_OUTPUT')},
+                                            {tag: 'div', html: c.baseArgs.record.get('SERVICE_LONG_OUTPUT')},
                                             {tag: 'b', html: _('<br/>Performance data')},
-                                            {tag: 'div', html: c.record.get('SERVICE_PERFDATA')},
+                                            {tag: 'div', html: c.baseArgs.record.get('SERVICE_PERFDATA')},
                                         ]
                                     });
                                     var height = Ext.util.TextMetrics.createInstance(c.getEl()).getHeight(html);





More information about the icinga-checkins mailing list