[icinga-checkins] icinga.org: icinga-web/mhein/default: * Default namings and icons between tackle and grids

git at icinga.org git at icinga.org
Mon Nov 21 17:26:43 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Nov 21 17:25:44 2011 +0100

* Default namings and icons between tackle and grids
* Fixed bug in statusmap renderer for object name

---

 .../Cronks/data/xml/grid/icinga-host-template.xml  |    2 +-
 .../Cronks/Tackle/Filter/TackleMainFilterTbar.js   |    4 ++--
 app/modules/Cronks/lib/js/grid/GridPanel.js        |    2 +-
 .../js/grid/renderer/StatusMapColumnRenderer.js    |    7 ++++---
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
index 6e0bf6f..8751fda 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
@@ -955,7 +955,7 @@
                         <parameter name="type">cellclick</parameter>
                         
                         <parameter name="arguments">
-                            <parameter name="laola">True</parameter>
+                            <parameter name="hostname_field">host_name</parameter>
                         </parameter>
                     </parameter>
                 
diff --git a/app/modules/Cronks/lib/js/Cronks/Tackle/Filter/TackleMainFilterTbar.js b/app/modules/Cronks/lib/js/Cronks/Tackle/Filter/TackleMainFilterTbar.js
index d6ed764..6f8162c 100644
--- a/app/modules/Cronks/lib/js/Cronks/Tackle/Filter/TackleMainFilterTbar.js
+++ b/app/modules/Cronks/lib/js/Cronks/Tackle/Filter/TackleMainFilterTbar.js
@@ -150,7 +150,7 @@ Icinga.Cronks.Tackle.Filter.TackleMainFilterTbar = Ext.extend(Ext.Toolbar, {
         },{
             xtype: 'button',
             iconCls: 'icinga-icon-application-edit',
-            text: 'Options',
+            text: _('Settings'),
             menu: [{
                 text: _('Autorefresh'),
                 xtype: 'menucheckitem',
@@ -301,4 +301,4 @@ Icinga.Cronks.Tackle.Filter.TackleMainFilterTbar = Ext.extend(Ext.Toolbar, {
             }
         }];
     }
-});
\ No newline at end of file
+});
diff --git a/app/modules/Cronks/lib/js/grid/GridPanel.js b/app/modules/Cronks/lib/js/grid/GridPanel.js
index 19f7c6c..877a413 100755
--- a/app/modules/Cronks/lib/js/grid/GridPanel.js
+++ b/app/modules/Cronks/lib/js/grid/GridPanel.js
@@ -52,7 +52,7 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 				scope: this
 			}, {
 				text: _('Settings'),
-				iconCls: 'icinga-icon-cog',
+				iconCls: 'icinga-icon-application-edit',
 				toolTip: _('Grid settings'),
 				menu: {
 					items: [{
diff --git a/app/modules/Cronks/lib/js/grid/renderer/StatusMapColumnRenderer.js b/app/modules/Cronks/lib/js/grid/renderer/StatusMapColumnRenderer.js
index 4473792..46f3c70 100644
--- a/app/modules/Cronks/lib/js/grid/renderer/StatusMapColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/grid/renderer/StatusMapColumnRenderer.js
@@ -9,13 +9,13 @@ Cronk.grid.StatusmapColumnRenderer = {
 	hostToStatusmap : function(cfg) {
 		
 		var tabPanel = Ext.getCmp('cronk-tabs');
-		
 		return function(grid, rowIndex, colIndex, e) {
 			
 			var fieldName = grid.getColumnModel().getDataIndex(colIndex);
             if (fieldName == cfg.field) {
             	var record = grid.getStore().getAt(rowIndex);
             	var value = record.data[cfg.field];
+            	var hostname = record.data[cfg.hostname_field || 'host_name'] || '*NOT FOUND*';
 				var statusMap = Ext.getCmp(Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_ID);
 				
 				if (Ext.isEmpty(statusMap)) {
@@ -23,14 +23,15 @@ Cronk.grid.StatusmapColumnRenderer = {
 						id : Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_ID,
 						crname : Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_NAME,
 						closable : true,
-						iconCls : Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_ICON,
-						title : String.format(_('Statusmap {0} centered'), 'TEST_HOST')
+						iconCls : Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_ICON
 					}
 					
 					statusMap = Cronk.factory(newCronk);
 					tabPanel.add(statusMap);
 				}
 				
+				statusMap.setTitle(String.format('Map {0} centered', hostname));
+				
 				statusMap.on('activate', function(cronk) {
 					var map = Cronk.Registry.get(Cronk.grid.StatusmapColumnRenderer.CRONK_STATUSMAP_ID).local.statusmap;
 					map.centerNodeByObjectId(value);





More information about the icinga-checkins mailing list