[icinga-checkins] icinga.org: icinga-web/next: Icinga-web update 1.8 - Custom cronks don' t work anymore

git at icinga.org git at icinga.org
Mon Apr 8 14:40:11 CEST 2013


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Apr  8 14:38:12 2013 +0200

Icinga-web update 1.8 - Custom cronks don't work anymore

Created a build step to remove custom cronk layout. This fixes
layout problems before 1.8 to 1.8.

fixes #3431

---

 etc/build.xml                |    2 +-
 etc/lib/CronkStruct.php      |   13 +++++++++++++
 etc/lib/cronkUpgradeTask.php |    3 +--
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/etc/build.xml b/etc/build.xml
index 09bd181..2b269c9 100644
--- a/etc/build.xml
+++ b/etc/build.xml
@@ -154,7 +154,7 @@
         <delete file="/etc/cron.d/icingaCron"/>
     </target>
 
-    <target name="upgrade-cronk-to18">
+    <target name="drop-customcronk-layout">
         <taskdef name="upgradeCronkTo18" classname="etc.lib.cronkUpgradeTask"/>
         <upgradeCronkTo18 />
     </target>
diff --git a/etc/lib/CronkStruct.php b/etc/lib/CronkStruct.php
index 87c5297..ffcde93 100644
--- a/etc/lib/CronkStruct.php
+++ b/etc/lib/CronkStruct.php
@@ -244,6 +244,7 @@ class CronkStruct {
      * This is needed to use cronk below 1.8 with 1.8 event expander row
      *
      * @return bool
+     * @deprecated 1.8.3
      */
     public function upgradeEventSubFrame()
     {
@@ -307,6 +308,7 @@ class CronkStruct {
      * EXPERIMENTAL
      *
      * @return bool
+     * @deprecated 1.8.3
      */
     public function fixOldColumns()
     {
@@ -381,4 +383,15 @@ class CronkStruct {
 
         return false;
     }
+
+    /**
+     * Drop the layout state from custom cronks.
+     *
+     * Thanks to eric for this idea
+     */
+    public function dropLayoutState()
+    {
+        unset($this->json['colModel']);
+        unset($this->json['nativeState']);
+    }
 }
\ No newline at end of file
diff --git a/etc/lib/cronkUpgradeTask.php b/etc/lib/cronkUpgradeTask.php
index 52d3b3b..7322963 100644
--- a/etc/lib/cronkUpgradeTask.php
+++ b/etc/lib/cronkUpgradeTask.php
@@ -45,8 +45,7 @@ class cronkUpgradeTask extends agaviConsoleTask {
             $cronkStruct = new CronkStruct($cronk);
             $this->log('Testing cronk '. $cronkStruct->getName());
 
-            $cronkStruct->upgradeEventSubFrame();
-            $cronkStruct->fixOldColumns();
+            $cronkStruct->dropLayoutState();
 
             $update = $cronkStruct->persistToDatabase();
             if ($update) {





More information about the icinga-checkins mailing list