[icinga-checkins] icinga.org: icinga-web/r1.7: Openproblem subgrid link fixes, patch applied - fixes 2932

git at icinga.org git at icinga.org
Fri Aug 3 10:58:07 CEST 2012


Module: icinga-web
Branch: r1.7
Commit: f512c3eec2a97a13509f2f962b18e5808a499506
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=f512c3eec2a97a13509f2f962b18e5808a499506

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Aug  3 10:56:38 2012 +0200

Openproblem subgrid link fixes, patch applied - fixes 2932

Thanks TG for elaborating.

---

 app/modules/Api/config/views/host.xml              |    2 +
 .../xml/grid/icinga-open-problems-template.xml     |   94 ++++++++++++++++++++
 2 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/app/modules/Api/config/views/host.xml b/app/modules/Api/config/views/host.xml
index 48d478e..c9d9bca 100644
--- a/app/modules/Api/config/views/host.xml
+++ b/app/modules/Api/config/views/host.xml
@@ -141,6 +141,8 @@
             <![CDATA[
             SELECT
                 o.object_id AS PROBLEMS_OBJECT_ID,
+                COALESCE(s.host_object_id, h.host_object_id) AS HOST_OBJECT_ID,
+                s.service_object_id AS SERVICE_OBJECT_ID,
                 i.instance_id AS INSTANCE_ID,
                 i.instance_name AS INSTANCE_NAME,
                 o.name1 AS HOST_NAME,
diff --git a/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml b/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
index 58ae08f..53e0962 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
@@ -251,6 +251,62 @@
             </order>
         </field>
 
+        <field name="host_object_id">
+            <datasource>
+                <parameter name="field">HOST_OBJECT_ID</parameter>
+            </datasource>
+
+            <display>
+                <parameter name="visible">false</parameter>
+                <parameter name="label">Host Id</parameter>
+            </display>
+
+            <filter>
+                <parameter name="enabled">true</parameter>
+
+                <!-- Filter configuration -->
+                <parameter name="type">extjs</parameter>
+                <parameter name="subtype">appkit.ext.filter.number</parameter>
+
+                <parameter name="no_operator">false</parameter>
+
+                <parameter name="field">HOST_OBJECT_ID</parameter>
+            </filter>
+
+            <order>
+                <parameter name="enabled">false</parameter>
+                <parameter name="default">false</parameter>
+            </order>
+        </field>
+
+        <field name="service_object_id">
+            <datasource>
+                <parameter name="field">SERVICE_OBJECT_ID</parameter>
+            </datasource>
+
+            <display>
+                <parameter name="visible">false</parameter>
+                <parameter name="label">Service Id</parameter>
+            </display>
+
+            <filter>
+                <parameter name="enabled">true</parameter>
+
+                <!-- Filter configuration -->
+                <parameter name="type">extjs</parameter>
+                <parameter name="subtype">appkit.ext.filter.number</parameter>
+
+                <parameter name="no_operator">false</parameter>
+
+                <parameter name="field">SERVICE_OBJECT_ID</parameter>
+            </filter>
+
+            <order>
+                <parameter name="enabled">false</parameter>
+                <parameter name="default">false</parameter>
+            </order>
+        </field>
+
         <field name="host_name">
             <datasource>
                 <parameter name="field">HOST_NAME</parameter>
@@ -327,6 +383,44 @@
             <display>
                 <parameter name="visible">true</parameter>
                 <parameter name="label">Service</parameter>
+
+                <parameter name="jsFunc">
+
+                    <parameter>
+                        <parameter name="namespace">Cronk.grid.ColumnRenderer</parameter>
+                        <parameter name="function">columnElement</parameter>
+
+                        <parameter name="type">renderer</parameter>
+
+                        <parameter name="arguments">
+                            <parameter name="css">x-icinga-grid-link</parameter>
+
+                            <parameter name="attr">
+                                <parameter name="ext:qtip">Click to view this service</parameter>
+                            </parameter>
+
+                        </parameter>
+                    </parameter>
+
+                    <parameter>
+                        <parameter name="namespace">Cronk.grid.IcingaColumnRenderer</parameter>
+                        <parameter name="function">subGrid</parameter>
+
+                        <parameter name="type">cellclick</parameter>
+
+                        <parameter name="arguments">
+                            <parameter name="idPrefix">singleService</parameter>
+                            <parameter name="titlePrefix">Service</parameter>
+                            <parameter name="targetTemplate">icinga-service-template</parameter>
+                            <parameter name="filterMap">
+                                <parameter name="service_object_id">service_object_id</parameter>
+                            </parameter>
+                            <parameter name="labelField">service_name</parameter>
+                        </parameter>
+                    </parameter>
+
+                </parameter>
+
             </display>
 
             <filter>





More information about the icinga-checkins mailing list