Code

Added timestamp field to import
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 14:01:18 +0000 (14:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 14:01:18 +0000 (14:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10988 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/class_goto_import_file.inc
gosa-plugins/goto/addons/goto/goto_import_file.tpl

index 0333ddcd920e85734b8ed4143125314b594c084c..bc3e7563f53ec3dceef800eaae70228bbe89ff4d 100644 (file)
@@ -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]);
           }
 
index c3a1847c8d9391cd725ae297afe5b93e224001e0..416be63d69b6a1d05908375f47f959e99d057b7d 100644 (file)
@@ -27,6 +27,7 @@
                <div style='width:100%; height:300px; overflow: scroll;'>
                <table cellpadding="3" cellspacing="0" style='width:100%; background-color: #CCCCCC; border: solid 1px #CCCCCC;'>
                        <tr>
+                               <td><b>{t}Timestamp{/t}</b></td>
                                <td><b>{t}Mac{/t}</b></td>
                                <td><b>{t}Event{/t}</b></td>
                                <td><b>{t}Object group{/t}</b></td>
@@ -38,6 +39,7 @@
                {foreach from=$info item=item key=key}
                        {if $item.ERROR}
                                <tr style='background-color: #F0BBBB;'>
+                                       <td>{$item.TIMESTAMP}</td>
                                        <td>{$item.MAC}</td>
                                        <td>{$item.HEADER}</td>
                                        <td>{$item.OGROUP}</td>
@@ -55,8 +57,8 @@
                                {else}
                                        <tr class="rowxp1"> 
                                {/if}
-
-                                       <td>{$item.MAC}</td>
+                                       <td>{$item.TIMESTAMP}</td>
+                                       <td style='border-left: solid 1px #BBBBBB;'>{$item.MAC}</td>
                                        <td style='border-left: solid 1px #BBBBBB;'>{$item.HEADER}</td>
                                        <td style='border-left: solid 1px #BBBBBB;'>{$item.OGROUP}</td>
                                        <td style='border-left: solid 1px #BBBBBB;'>{$item.BASE}</td>