[icinga-checkins] icinga.org: icinga-web/mhein/default: * Service summary view

git at icinga.org git at icinga.org
Wed Oct 21 16:23:53 CEST 2009


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Oct 21 16:23:38 2009 +0200

* Service summary view

---

 app/config/cronks.xml                            |   11 +
 res/xml/icinga-hostgroup-summary-template.xml    |    4 +-
 res/xml/icinga-servicegroup-summary-template.xml |  218 ++++++++++++++++++++++
 3 files changed, 231 insertions(+), 2 deletions(-)

diff --git a/app/config/cronks.xml b/app/config/cronks.xml
index 21a1193..5a932f3 100644
--- a/app/config/cronks.xml
+++ b/app/config/cronks.xml
@@ -50,6 +50,17 @@
 			</parameter>
 		</parameter>
 
+		<parameter name="gridServicegroupSummary">
+			<parameter name="module">Cronks</parameter>
+			<parameter name="action">System.ViewProc</parameter>
+			<parameter name="hide">false</parameter>
+			<parameter name="description">Display service summary</parameter>
+			<parameter name="name">Servicegroups</parameter>
+			<parameter name="parameter">
+				<parameter name="template">icinga-servicegroup-summary-template</parameter>
+			</parameter>
+		</parameter>
+
 		<parameter name="gridHostView">
 			<parameter name="module">Cronks</parameter>
 			<parameter name="action">System.ViewProc</parameter>
diff --git a/res/xml/icinga-hostgroup-summary-template.xml b/res/xml/icinga-hostgroup-summary-template.xml
index 2e86975..72fd56d 100644
--- a/res/xml/icinga-hostgroup-summary-template.xml
+++ b/res/xml/icinga-hostgroup-summary-template.xml
@@ -6,8 +6,8 @@
     	knows what the template is doing
     -->
     <meta>
-        <parameter name="name">Default logviewer template</parameter>
-        <parameter name="description">Displays the process log</parameter>
+        <parameter name="name">Default hostgroup summary template</parameter>
+        <parameter name="description">Displays the summary of hostgroups</parameter>
         <parameter name="author">icinga-web developers</parameter>
     </meta>
     
diff --git a/res/xml/icinga-servicegroup-summary-template.xml b/res/xml/icinga-servicegroup-summary-template.xml
new file mode 100644
index 0000000..0c1402c
--- /dev/null
+++ b/res/xml/icinga-servicegroup-summary-template.xml
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<template>
+    
+    <!-- 
+    	Meta description of the templates, that anybody
+    	knows what the template is doing
+    -->
+    <meta>
+        <parameter name="name">Default servicegroup summary template</parameter>
+        <parameter name="description">Displays the summary of servicegroups</parameter>
+        <parameter name="author">icinga-web developers</parameter>
+    </meta>
+    
+    <!-- 
+    	Options for the template. Change layout and view style to fit the type you
+    	want to display
+    -->
+    <option>
+    	<!-- 
+    		Some layout modes:
+    			- default: full featured view
+    			- minimal: reduce space consumption (e.g. filters, pagers, ...)
+    	-->
+        <parameter name="mode">minimal</parameter>
+        <parameter name="layout">IcingaTemplateAjaxGridLayout</parameter>
+        
+        <!-- Special config for the EXTJS grid view (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridView) -->
+        <parameter name="Ext.grid.GridView">
+        	<parameter name="headersDisabled">true</parameter>
+        </parameter>
+        
+        <!-- Special config for the EXTJS grid panel (see http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel) -->
+        <!-- 
+        	!!! Attention: this options goes to the main grid panel, only change layout attributes, all other
+        	will corrupt the auto build of the GridPanel
+        -->
+        <!-- <parameter name="Ext.grid.GridPanel">
+        	<parameter name="disable">true</parameter>
+        	<parameter name="hidden">false</parameter>
+        </parameter> -->
+    </option>
+    
+    <!-- 
+    	What data to display? Define icinga data targets and countfields
+    -->
+    <datasource>
+        <parameter name="target">IcingaApi::TARGET_SERVICEGROUP_SUMMARY</parameter>
+        
+        <!-- Limit the result (LOAD) -->
+        <!-- <parameter name="limit">25</parameter> -->
+        
+        <!-- <parameter name="id">log_id</parameter> -->
+        
+        <!--
+        	If the countmode is 'simple' countfields will be ignored always! To use with a pager
+        	you have to use the 'field' mode to count all data independent from data
+        -->
+		<parameter name="countmode">simple</parameter>
+		
+		<!-- 
+			If the counting differs from data result you can specify a field to count
+		-->
+        <parameter name="countfields">
+        </parameter>
+        
+        <!-- Database group by -->
+        <parameter name="groupby">
+        	<parameter>SERVICEGROUP_ID</parameter>
+        	<parameter>SERVICEGROUP_NAME</parameter>
+        	<parameter>SERVICEGROUP_ALIAS</parameter>
+        	<parameter>SERVICE_CURRENT_STATE</parameter>
+        </parameter>
+    </datasource>
+    
+    <!-- 
+    	Paging record on its result
+    -->
+    <pager>
+    	<parameter name="enabled">false</parameter>
+    	<parameter name="size">25</parameter>
+    	<parameter name="start">0</parameter>
+    </pager>
+    
+    <grouping>
+    	<parameter name="enabled">true</parameter>
+    	<parameter name="field">servicegroup_name</parameter>
+    	
+    	<!-- GroupingView options (http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GroupingView) -->
+    	<parameter name="Ext.grid.GroupingView">
+    		<parameter name="hideGroupedColumn">true</parameter>
+    		<parameter name="startCollapsed">false</parameter>
+    	</parameter>
+    	
+    	<!-- Options for the store (http://www.extjs.com/deploy/dev/docs/?class=Ext.data.GroupingStore) -->
+    	<!-- <parameter name="Ext.data.GroupingStore">
+    		
+    	</parameter> -->
+    </grouping>
+    
+    <!--
+    	Field decleration: What to display and how
+    -->
+    <fields>
+    
+        <field name="servicegroup_id">
+        	<datasource>
+        		<parameter name="field">SERVICEGROUP_ID</parameter>
+        	</datasource>
+        	
+        	<display>
+                <parameter name="visible">false</parameter>
+                <parameter name="label">ID</parameter>
+            </display>
+            
+            <filter>
+                <parameter name="enabled">false</parameter>    
+            </filter>
+            
+            <order>
+                <parameter name="enabled">false</parameter>
+                <parameter name="default">false</parameter>
+            </order>
+        </field> 
+        
+		<field name="servicegroup_name">
+        	<datasource>
+        		<parameter name="field">SERVICEGROUP_NAME</parameter>
+        	</datasource>
+        	
+        	<display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label">Servicegroup</parameter>
+            </display>
+            
+            <filter>
+                <parameter name="enabled">false</parameter>    
+            </filter>
+            
+            <order>
+                <parameter name="enabled">true</parameter>
+                <parameter name="default">true</parameter>
+            </order>
+        </field>
+        
+        <field name="servicegroup_alias">
+        	<datasource>
+        		<parameter name="field">SERVICEGROUP_ALIAS</parameter>
+        	</datasource>
+        	
+        	<display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label">Alias</parameter>
+            </display>
+            
+            <filter>
+                <parameter name="enabled">false</parameter>    
+            </filter>
+            
+            <order>
+                <parameter name="enabled">true</parameter>
+                <parameter name="default">false</parameter>
+            </order>
+        </field> 
+        
+		<field name="host_status">
+        	<datasource>
+        		<parameter name="field">SERVICE_CURRENT_STATE</parameter>
+        	</datasource>
+        	
+            <display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label">Status</parameter>
+                <parameter name="width">200</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="fixed">true</parameter>
+                </parameter>
+                
+				<parameter name="userFunc">
+                	<parameter name="class">IcingaTemplateDisplayMonitoring</parameter>
+                	<parameter name="method">hostStatus</parameter>
+                </parameter>
+            </display>
+        	
+            <filter>
+                <parameter name="enabled">false</parameter>    
+            </filter>
+            
+            <order>
+                <parameter name="enabled">true</parameter>
+                <parameter name="default">true</parameter>
+            </order>
+        </field>
+        
+		<field name="host_status_count">
+        	<datasource>
+        		<parameter name="field">SERVICEGROUP_SUMMARY_COUNT</parameter>
+        	</datasource>
+        	
+        	<display>
+                <parameter name="visible">true</parameter>
+                <parameter name="label">Count</parameter>
+            </display>
+            
+            <filter>
+                <parameter name="enabled">false</parameter>    
+            </filter>
+            
+            <order>
+                <parameter name="enabled">false</parameter>
+                <parameter name="default">false</parameter>
+            </order>
+        </field>
+        
+    </fields>
+    
+</template>
\ No newline at end of file





More information about the icinga-checkins mailing list