diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc
index baf158da4d1f360e7c444cc4bf81fe44edd80d34..ce00d1e933577301547fc7a029cfb9ad56295512 100644 (file)
var $range = 25;
var $start = 0;
+ var $recently_removed = array();
+
function gotomasses(&$config, $dn= NULL)
{
/* Include config object */
}
+ /************
+ * Import CSV file
+ ************/
+
+ if($s_action == "import_file"){
+ $this->dialog = new goto_import_file($this->config,$this);
+ }
+
+ if(isset($_POST['import_abort'])){
+ $this->dialog = FALSE;
+ }
+
+
/************
* Handle Priority modifications
************/
$type = FALSE;
if(isset($this->entries[$id])){
$event = $this->entries[$s_entry];
- $this->dialog = new goto_log_view($this->config,$event,$this);
+ $this->dialog = new goto_log_view($this->config,"",$event,$this);
}
}
}
if($this->acl_is_removeable()){
$s.= "..|---|\n";
+ $s.= "..|<img src='images/lists/import.png' alt='' border='0' class='center'> "._("Import")."|import_file\n";
$s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'> "._("Remove")."|remove_multiple\n";
}
if(preg_match("/w/",$this->getacl(""))){
$s.= "..|---|\n";
- $s.= "..|<img src='images/status_start.png' alt='' border='0' class='center'> "._("Resume")."|resume_all\n";
- $s.= "..|<img src='images/status_pause.png' alt='' border='0' class='center'> "._("Pause")."|pause_all\n";
- $s.= "..|<img src='images/small_error.png' alt='' border='0' class='center'> "._("Abort")."|abort_process_all\n";
- $s.= "..|<img src='images/rocket.png' alt='' border='0' class='center'> "._("Execute")."|execute_process_all\n";
+ $s.= "..|<img alt='"._("Resume")."' src='images/status_start.png' border='0' class='center'> "._("Resume")."|resume_all\n";
+ $s.= "..|<img alt='"._("Pause")."' src='images/status_pause.png' border='0' class='center'> "._("Pause")."|pause_all\n";
+ $s.= "..|<img alt='"._("Abort")."' src='images/small_error.png' border='0' class='center'> "._("Abort")."|abort_process_all\n";
+ $s.= "..|<img alt='"._("Execute")."' src='images/rocket.png' border='0' class='center'> "._("Execute")."|execute_process_all\n";
}
$divlist->SetDropDownHeaderMenu($s);
*/
if(in_array($task['STATUS'],array("waiting"))){
$prio_actions.= "<input class='center' type='image' src='images/prio_increase.png'
- title='"._("Move up in execution queue")."' name='prio_up_".$key."'> ";
+ title='"._("Move up")."' name='prio_up_".$key."'> ";
$prio_actions.= "<input class='center' type='image' src='images/prio_decrease.png'
- title='"._("Move down in execution queue")."' name='prio_down_".$key."'> ";
+ title='"._("Move down")."' name='prio_down_".$key."'> ";
}
/* If WAITING add pause action
*/
if(in_array($task['STATUS'],array("paused","waiting"))){
$prio_actions.= "<input class='center' type='image' src='images/rocket.png'
- title='"._("Force execution now!")."' name='execute_process_".$key."'> ";
+ title='"._("Execute now")."' name='execute_process_".$key."'> ";
}
/* Add logview button, currently ever.
*/
if(TRUE){
$action .= "<input type='image' src='images/fai_hook.png' name='log_view_".$key."'
- class='center' alt='"._("Log view")."'> ";
+ class='center' title='"._("View logs")."' alt='"._("View logs")."'> ";
}
/* If PAUSED or WAITING add edit action
*/
if(in_array($task['STATUS'],array("waiting"))){
$action.= "<input type='image' src='images/lists/edit.png' name='edit_task_".$key."'
- class='center' alt='"._("Edit")."'>";
+ class='center' title='"._("Edit")."' alt='"._("Edit")."'>";
}
/* If PROCESSING add abort action
*/
if(in_array($task['STATUS'],array("processing")) && preg_match("/install/",$task['HEADERTAG'])){
- $action.= "<img src='images/empty.png'>";
+ $action.= "<img src='images/empty.png' alt=''>";
$action.= "<input class='center' type='image' src='images/small_error.png'
- title='"._("Abort execution")."' name='abort_process_".$key."'>";
+ title='"._("Abort job")."' name='abort_process_".$key."'>";
}
/* If WAITING or ERROR add remove action
*/
if( $this->acl_is_removeable() && in_array($task['STATUS'],array("waiting","error","processed"))){
$action.= "<input type='image' src='images/lists/trash.png' name='remove_task_".$key."'
- class='center' alt='"._("Remove")."'>";
+ class='center' title='"._("Remove")."' alt='"._("Remove")."'>";
}
if(in_array($task['STATUS'],array("processing")) && !preg_match("/install/",$task['HEADERTAG'])){
$action.= "<input type='image' src='images/lists/trash.png' name='remove_task_".$key."'
- class='center' alt='"._("Remove")."'>";
+ class='center' title='"._("Remove")."' alt='"._("Remove")."'>";
}
/* Create entry display name and tooltip */
/* Real percent */
} else {
if (preg_match('/install/', $task['HEADERTAG'])){
- $status = "<img src='progress.php?x=80&y=13&p=".$percent."' alt='".$percent." %'>";
+ $status = "<img src='progress.php?x=80&y=13&p=".$task['PROGRESS']."' alt=''
+ id='progress_".preg_replace("/:/","_",$task['MACADDRESS'])."'>";
} else {
$status = preg_replace('/ /', ' ', _("in progress"));
}
$tmp = new DaemonEvent_faireboot($this->config);
$tmp->add_targets($update_ids);
$tmp->set_type(TRIGGERED_EVENT);
+ $this->recently_removed = $update_ids;
+
if(!$this->o_queue->append($tmp)){
msg_dialog::display(_("Error"), sprintf(_("Cannot update queue entry: %s"),$id) , ERROR_DIALOG);
return(FALSE);
$this->entries = array();
foreach($entries as $entry){
+
+ /* Skip entries which will be removed within the next seconds */
+ if(isset($entry['MACADDRESS']) && in_array($entry['MACADDRESS'],$this->recently_removed)){
+ continue;
+ }
$this->entries[$entry['ID']]= $entry;
}
+ $this->recently_removed = array();
}