From: hickert Date: Wed, 21 May 2008 14:01:18 +0000 (+0000) Subject: Added timestamp field to import X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=676fd2a1efa06f3b31cbfeae42814c702662dfcf;p=gosa.git Added timestamp field to import git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10988 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/addons/goto/class_goto_import_file.inc b/gosa-plugins/goto/addons/goto/class_goto_import_file.inc index 0333ddcd9..bc3e7563f 100644 --- a/gosa-plugins/goto/addons/goto/class_goto_import_file.inc +++ b/gosa-plugins/goto/addons/goto/class_goto_import_file.inc @@ -13,8 +13,8 @@ class goto_import_file extends plugin $this->daemon_events = DaemonEvent::get_event_types( SYSTEM_EVENT); $this->csv_fields = array( - "0" => "MAC", "1" => "HEADER", "2" => "OGROUP", - "3" => "BASE", "4" => "FQDN", "5" => "IP", "6" => "DHCP"); + "0"=>"TIMESTAMP","1" => "MAC", "2" => "HEADER", "3" => "OGROUP", + "4" => "BASE", "5" => "FQDN", "6" => "IP", "7" => "DHCP"); } @@ -107,6 +107,7 @@ class goto_import_file extends plugin /* Update values like fqdn a.s.o */ foreach($this->csv_fields as $name){ + if($name == "TIMESTAMP" && empty($event[$name])) continue; $object->set_value($name,$event[$name]); } diff --git a/gosa-plugins/goto/addons/goto/goto_import_file.tpl b/gosa-plugins/goto/addons/goto/goto_import_file.tpl index c3a1847c8..416be63d6 100644 --- a/gosa-plugins/goto/addons/goto/goto_import_file.tpl +++ b/gosa-plugins/goto/addons/goto/goto_import_file.tpl @@ -27,6 +27,7 @@
+ @@ -38,6 +39,7 @@ {foreach from=$info item=item key=key} {if $item.ERROR} + @@ -55,8 +57,8 @@ {else} {/if} - - + +
{t}Timestamp{/t} {t}Mac{/t} {t}Event{/t} {t}Object group{/t}
{$item.TIMESTAMP} {$item.MAC} {$item.HEADER} {$item.OGROUP}
{$item.MAC}{$item.TIMESTAMP}{$item.MAC} {$item.HEADER} {$item.OGROUP} {$item.BASE}