Fix information page to output correct information
authorMichal Novotny <minovotn@redhat.com>
Mon, 6 Aug 2012 13:27:04 +0000 (15:27 +0200)
committerMichal Novotny <minovotn@redhat.com>
Mon, 6 Aug 2012 13:27:04 +0000 (15:27 +0200)
Signed-off-by: Michal Novotny <minovotn@redhat.com>

classes/language.php
lang/cs.php
lang/en.php
pages/info.php

index 94f66e0..b87d9ec 100644 (file)
                                        'password_mismatch' => 'Password mismatch',
                                        'screenshot-settings-auto-release' => 'Send automatic mouse pointer release event',
                                        'screenshot-delay' => 'Delay has been changed to %d second(s)',
+                                       'cpu_stats' => 'Node CPU stats',
+                                       'mem_stats' => 'Node memory stats',
+                                       'system_information' => 'System information',
+                                       'date-format' => 'Y-m-d H:i:s',
+                                       'run' => 'Run',
                                        );
 
                        $this->trans = $trans;
index 5f604a4..ce05b48 100644 (file)
                                        'cpu_stats' => 'CPU Statistiky uzlu',
                                        'mem_stats' => 'Paměťové statistiky uzlu',
                                        'system_information' => 'Systémové informace',
+                                       'date-format' => 'd.m.Y H:i:s',
+                                       'run' => 'Spuštění',
                                        );
 ?>
index 7c7893b..931f92c 100644 (file)
                                        'cpu_stats' => 'Node CPU stats',
                                        'mem_stats' => 'Node memory stats',
                                        'system_information' => 'System information',
+                                       'date-format' => 'Y-m-d H:i:s',
+                                       'run' => 'Run',
                                        );
 ?>
index a685515..ac20183 100644 (file)
 <?php
 $tmp = $lv->node_get_cpu_stats();
 foreach ($tmp as $id => $data) {
-    echo '<div class="label">CPU #'.$id.'</div>';
+    echo '<div class="label">'.$lang->get('run').' #'.$id.'</div>';
     echo '<div class="value">';
     foreach ($data as $key => $val) {
-        echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.$val.'</div>';
+        if ($key != 'time')
+            echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.$val.'</div>';
+        else
+            echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.@Date($lang->get('date-format'), $val).'</div>';
     }
     echo '</div><br />';
 }
@@ -141,10 +144,13 @@ foreach ($tmp as $id => $data) {
 <?php
 $tmp = $lv->node_get_mem_stats();
 foreach ($tmp as $id => $data) {
-    echo '<div class="label">CPU #'.$id.'</div>';
+    echo '<div class="label">'.$lang->get('run').' #'.$id.'</div>';
     echo '<div class="value">';
     foreach ($data as $key => $val) {
-        echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.$val.'</div>';
+        if ($key != 'time')
+            echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.$val.'</div>';
+        else
+            echo '<div class="label">'.$key.'</div><div class="value" style="text-align: right">'.@Date($lang->get('date-format'), $val).'</div>';
     }
     echo '</div><br />';
 }