[icinga-checkins] icinga.org: icinga-web/cmaser/fixes: * Added fix to open a new iframe cronk and activate on click

git at icinga.org git at icinga.org
Fri Sep 3 12:10:01 CEST 2010


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Sep  1 14:02:08 2010 +0200

* Added fix to open a new iframe cronk and activate on click

---

 .../Cronks/data/xml/grid/icinga-host-template.xml  |   10 ++++++----
 .../System/ViewProc/js/IcingaColumnRenderer.js     |    8 ++++++--
 2 files changed, 12 insertions(+), 6 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 3d1d75b..cb5b61d 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
@@ -416,7 +416,7 @@
 
 
 <!--	Example for adding a iframe cronk that creates an url depending on db-variables
-		<field name="eventDB_link">
+	<field name="eventDB_link">
             <datasource>
             	<parameter name="field">HOST_NAME</parameter>
             </datasource>
@@ -459,7 +459,8 @@
 
 	                	<parameter name="arguments">
 	                		<parameter name="title">EventDB for {host_name}</parameter>
-	                		<parameter name="url">http://localhost/{host_name}/{host_object_id}</parameter>
+	                		<parameter name="url"><![CDATA[http://localhost/{host_name}/{host_object_id}]]></parameter>
+					<parameter name="activateOnClick">true</parameter>
 	                	</parameter>
 	                </parameter>
                 </parameter>
@@ -472,7 +473,8 @@
             <order>
                 <parameter name="enabled">false</parameter>
             </order>
-        </field>-->
+	</field>
+	END EXAMPLE -->
         <field name="host_info">
             <datasource>
             	<parameter name="field">HOST_NAME</parameter>
@@ -833,4 +835,4 @@
         
     </fields>
     
-</template>
\ No newline at end of file
+</template>
diff --git a/app/modules/Cronks/templates/System/ViewProc/js/IcingaColumnRenderer.js b/app/modules/Cronks/templates/System/ViewProc/js/IcingaColumnRenderer.js
index d528f0c..a4dcf10 100755
--- a/app/modules/Cronks/templates/System/ViewProc/js/IcingaColumnRenderer.js
+++ b/app/modules/Cronks/templates/System/ViewProc/js/IcingaColumnRenderer.js
@@ -105,7 +105,7 @@ Cronk.grid.IcingaColumnRenderer = {
 			var title = titleTpl.apply(data);
 			var tabPanel = Ext.getCmp("cronk-tabs");
 			AppKit.log(url);
-			tabPanel.add({
+			var cmp = tabPanel.add({
 				'xtype': 'cronk',
 				'title': title,
 				'crname': 'genericIFrame',
@@ -115,7 +115,11 @@ Cronk.grid.IcingaColumnRenderer = {
 				'closable':true
 			});
 			tabPanel.doLayout();
-			
+		
+			if (!Ext.isEmpty(cfg.activateOnClick) && cfg.activateOnClick) {
+				tabPanel.setActiveTab(cmp);
+			}
+				
 		}
 	}
 };





More information about the icinga-checkins mailing list