Code

Updated gotomasses.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 09:27:04 +0000 (09:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 09:27:04 +0000 (09:27 +0000)
-Updated Listing

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9158 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc

index 2c7166680de79aa8d3ca9af433e9969d5cd12b86..eb34a8feb560233df7a1ea0076aa411777aed15a 100644 (file)
@@ -128,8 +128,8 @@ class gotomasses extends plugin
       $type = FALSE;
       if(isset($this->entries[$id])){
         $event = $this->entries[$s_entry];
-        if(isset($this->events['BY_EDIT_ACTION'][$event['HEADERTAG']])){
-          $type = $this->events['BY_EDIT_ACTION'][$event['HEADERTAG']];
+        if(isset($this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']])){
+          $type = $this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']];
           $this->dialog = new $type['CLASS_NAME']($this->config,$event);
         }
       }
@@ -313,8 +313,8 @@ class gotomasses extends plugin
       /* Check if this event exists as Daemon class 
        * In this case, display a more accurate entry.
        */ 
-      if(isset($this->events['BY_EDIT_ACTION'][$task['HEADERTAG']]['s_Menu_Name'])){
-        $event_type = $this->events['BY_EDIT_ACTION'][$task['HEADERTAG']];
+      if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']]['s_Menu_Name'])){
+        $event_type = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
         $display2= $event_type['s_Menu_Name'];
         if(isset($event_type['ListImage']) && !empty($event_type['ListImage'])){
           $display2 = $event_type['ListImage']."&nbsp;".$display2;
index 9dfe8008ab62f2c38f45bf820a46d0ef4953e67f..76d1e5f2abb27199ed962947dcda86c9d9005b25 100644 (file)
@@ -42,6 +42,7 @@ class DaemonEvent
   protected $a_targets    = array();  // The list of assigned Targets (When newly created)
   protected $s_Schedule_Action = "";       // The deamon command name when newly created. (e.g. job_trigger_action_halt)
   protected $s_Trigger_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
+  protected $s_Queued_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
   protected $timestamp    = 0;        // Event execution time; 
   protected $id           = -1;       // The Table ID
   protected $status       = "unknown";// The current event status
@@ -322,7 +323,7 @@ class DaemonEvent
   {
     $data =array();
     $data['CLASS_NAME']         = get_class($this);
-    foreach(array("s_Menu_Name","s_Event_Name","s_Schedule_Action","s_Trigger_Action") as $attr){
+    foreach(array("s_Menu_Name","s_Event_Name","s_Queued_Action","s_Schedule_Action","s_Trigger_Action") as $attr){
       $data[$attr]  = $this->$attr;
     }
     $data['MenuImage']    = "<img src='".$this->s_Menu_Image."' alt='".$this->s_Menu_Name."' border='0' class='center'>";
@@ -354,8 +355,9 @@ class DaemonEvent
         $evt  = $tmp->get_event_info();
 
         $list['BY_CLASS'][$name]                      = $evt;
-        $list['BY_EDIT_ACTION'][$evt['s_Trigger_Action']]= $evt;
-        $list['BY_NEW_ACTION'] [$evt['s_Schedule_Action']] = $evt;
+        $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']]  = $evt;
+        $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
+        $list['BY_QUEUED_ACTION']   [$evt['s_Queued_Action']]   = $evt;
       }
     }
     return($list);
index 0a55de1b2e448b773fffd3b36d7d6eb3eef26259..9e0b37ce0fa575224cd76f784b0cd37d8690e5e2 100644 (file)
@@ -8,6 +8,7 @@ class DaemonEvent_halt extends DaemonEvent
     $this->s_Event_Name = _("Shutdown");
     $this->s_Schedule_Action = "job_trigger_action_halt";
     $this->s_Trigger_Action= "gosa_trigger_action_halt";
+    $this->s_Queued_Action= "trigger_action_halt";
     $this->s_Menu_Image = "images/status_stopped.png";
     $this->s_List_Image = "images/status_stopped.png";
   }
index 152c5af379c3d82643ae91393ea288dc5e5bc9e4..b1fffc0f24e2353ea39a54f0bd742c51412827a1 100644 (file)
@@ -9,6 +9,7 @@ class DaemonEvent_reboot extends DaemonEvent
     $this->s_Event_Name = _("Reboot a system"); 
     $this->s_Schedule_Action = "job_trigger_action_reboot";
     $this->s_Trigger_Action= "gosa_trigger_action_reboot";
+    $this->s_Queued_Action= "trigger_action_reboot";
     $this->s_Menu_Image = "images/list_reload.png";
     $this->s_List_Image = "images/list_reload.png";
   }
index c977c004fdb6e10358b27ca7fb36102b2fc23581..9d499762e0279af14f3fd16690fdb26473a0e510 100644 (file)
@@ -12,6 +12,7 @@ class DaemonEvent_reinstall extends DaemonEvent
     $this->s_Event_Name = _("Reinstall");
     $this->s_Schedule_Action = "job_trigger_action_reinstall";
     $this->s_Trigger_Action= "gosa_trigger_action_reinstall";
+    $this->s_Queued_Action= "trigger_action_reinstall";
     $this->s_Menu_Image = "images/fai_small.png";
     $this->s_List_Image = "images/fai_small.png";
   
index 47c4ecf6e91f3bf938809d807d9621a21ec1f8b1..e60a8e84082b5a66f8644b3fd064976d96f86130 100644 (file)
@@ -10,6 +10,7 @@ class DaemonEvent_update extends DaemonEvent
     $this->s_Event_Name = _("software update");
     $this->s_Schedule_Action = "job_trigger_action_update";
     $this->s_Trigger_Action= "gosa_trigger_action_update";
+    $this->s_Queued_Action= "trigger_action_update";
     $this->s_Menu_Image = "images/time.png";
     $this->s_List_Image = "images/time.png";
   }
index b70fa2880cf0204a172a3b23fbf92539053e6fa9..9eaabdc3539c1b516e64631105a3ca55a5aad49d 100644 (file)
@@ -7,8 +7,9 @@ class DaemonEvent_wakeup extends DaemonEvent
     DaemonEvent::__construct($config,$data);
     $this->s_Menu_Name  = _("Wake up"); 
     $this->s_Event_Name = _("Start a system"); 
-    $this->s_Schedule_Action = "job_trigger_action_wake";
-    $this->s_Trigger_Action= "gosa_trigger_action_wake";
+    $this->s_Schedule_Action= "job_trigger_action_wake";
+    $this->s_Trigger_Action = "gosa_trigger_action_wake";
+    $this->s_Queued_Action  = "trigger_action_wake";
     $this->s_Menu_Image = "images/status_running.png";
     $this->s_List_Image = "images/status_running.png";
   }