[icinga-checkins] icinga.org: icinga-web/master: * Added link to host in services (fixes #984 )

git at icinga.org git at icinga.org
Wed Jan 26 17:53:21 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Jan 26 17:52:15 2011 +0100

* Added link to host in services (fixes #984)
* Better link values for interlink templating

---

 .../Cronks/data/xml/grid/icinga-host-template.xml  |    2 +-
 .../data/xml/grid/icinga-service-template.xml      |   75 +++++++++++++++++++-
 2 files changed, 74 insertions(+), 3 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 9308466..0bf5afe 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
@@ -773,7 +773,7 @@
 	                		<parameter name="titlePrefix">Statehistory for</parameter>
 							<parameter name="targetTemplate">icinga-host-history-template</parameter>
 							<parameter name="filterMap">
-								<parameter name="host_name">host_name</parameter>
+								<parameter name="host_object_id">host_object_id</parameter>
 							</parameter>
 							<parameter name="labelField">host_name</parameter>
 	                	</parameter>
diff --git a/app/modules/Cronks/data/xml/grid/icinga-service-template.xml b/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
index e19d301..3026512 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
@@ -640,8 +640,8 @@
 							<parameter name="targetField">service_name</parameter>-->
 							
 							<parameter name="filterMap">
-								<parameter name="service_name">service_name</parameter>
-								<parameter name="host_name">host_name</parameter>
+								<parameter name="service_object_id">service_object_id</parameter>
+								<parameter name="host_object_id">host_object_id</parameter>
 							</parameter>
 							
 							<parameter name="labelField">service_name</parameter>
@@ -660,6 +660,77 @@
                 <parameter name="enabled">false</parameter>
             </order>
         </field>
+        
+        <field name="service_to_host_link">
+            <datasource>
+            	<parameter name="field">SERVICE_OBJECT_ID</parameter>
+            </datasource>
+            
+            <display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label"></parameter>
+
+                <parameter name="width">22</parameter>
+                
+                <!-- Config for the AJAX grid (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.Column) -->
+                <parameter name="Ext.grid.Column">
+                	<parameter name="menuDisabled">true</parameter>
+                	<parameter name="fixed">true</parameter>
+                </parameter>
+
+                <parameter name="jsFunc">
+                
+                	<parameter>
+	                	<parameter name="namespace">Cronk.grid.ColumnRenderer</parameter>
+	                	<parameter name="function">columnImage</parameter>
+	                	
+	                	<!-- renderer/gridevent[cellclick|celldblclick|...] -->
+	                	<parameter name="type">renderer</parameter>
+	                	
+	                	<parameter name="arguments">
+							<parameter name="image">images/icons/server.png</parameter>
+							<parameter name="css">x-icinga-grid-link</parameter>
+							<parameter name="attr">
+								<parameter name="qtip">Click here for the host</parameter>
+							</parameter>
+	                	</parameter>
+	                </parameter>
+	                
+					<parameter>
+	                	<parameter name="namespace">Cronk.grid.IcingaColumnRenderer</parameter>
+	                	<parameter name="function">subGrid</parameter>
+	                	
+	                	<!-- renderer/gridevent[cellclick|celldblclick|...] -->
+	                	<parameter name="type">cellclick</parameter>
+	                	
+	                	<parameter name="arguments">
+	                		<parameter name="idPrefix">serviceToHost</parameter>
+	                		<parameter name="titlePrefix">Host for service </parameter>
+							<parameter name="targetTemplate">icinga-host-template</parameter>
+							<!--<parameter name="sourceField">service_name</parameter>
+							<parameter name="targetField">service_name</parameter>-->
+							
+							<parameter name="filterMap">
+								<parameter name="host_object_id">host_object_id</parameter>
+							</parameter>
+							
+							<parameter name="labelField">service_name</parameter>
+	                	</parameter>
+	                </parameter>
+                
+                </parameter>
+                
+            </display>
+            
+            <filter>
+                <parameter name="enabled">false</parameter>
+            </filter>
+            
+            <order>
+                <parameter name="enabled">false</parameter>
+            </order>
+        </field>
+        
 <!--
 		Preliminary example for adding grapher icon integration
 		<field name="service_graph_link">





More information about the icinga-checkins mailing list