From bb0d1b21844102501144de36d3bfd7b236326e20 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Feb 2008 09:27:04 +0000 Subject: [PATCH] Updated gotomasses. -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 | 8 ++++---- .../goto/addons/gotomasses/events/class_DaemonEvent.inc | 8 +++++--- .../addons/gotomasses/events/class_DaemonEvent_halt.inc | 1 + .../addons/gotomasses/events/class_DaemonEvent_reboot.inc | 1 + .../gotomasses/events/class_DaemonEvent_reinstall.inc | 1 + .../addons/gotomasses/events/class_DaemonEvent_update.inc | 1 + .../addons/gotomasses/events/class_DaemonEvent_wakeup.inc | 5 +++-- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc index 2c7166680..eb34a8feb 100644 --- a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc @@ -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']." ".$display2; diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc index 9dfe8008a..76d1e5f2a 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc @@ -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'] = "".$this->s_Menu_Name.""; @@ -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); diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc index 0a55de1b2..9e0b37ce0 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc @@ -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"; } diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc index 152c5af37..b1fffc0f2 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc @@ -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"; } diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc index c977c004f..9d499762e 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc @@ -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"; diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc index 47c4ecf6e..e60a8e840 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc @@ -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"; } diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc index b70fa2880..9eaabdc35 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc @@ -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"; } -- 2.30.2