root преди 1 година
родител
ревизия
3572af6855
променени са 3 файла, в които са добавени 15 реда и са изтрити 8 реда
  1. 3 3
      html/admin/devices/switchport.php
  2. 3 3
      html/admin/devices/switchstatus.php
  3. 9 2
      html/inc/common.php

+ 3 - 3
html/admin/devices/switchport.php

@@ -105,9 +105,9 @@ foreach ($ports as $row) {
         }
         print "</td>\n";
         print "<td class='".$cl."'>" . get_port_comment($db_link, $row['id'],$row['comment']) . "</td>\n";
-        print "<td class='".$cl."' >" . get_qa($row['uplink']) . "</td>\n";
-        print "<td class='".$cl."' >" . get_qa($row['nagios']) . "</td>\n";
-        print "<td class='".$cl."' >" . get_qa($row['skip']) . "</td>\n";
+        print_td_yes($row['uplink'],FALSE,$cl);
+        print_td_yes($row['nagios'],FALSE,$cl);
+        print_td_yes($row['skip'],FALSE,$cl);
         $display_vlan= $row['vlan'];
         if (!empty($row['untagged_vlan'])) { 
             if ($row['untagged_vlan'] != $row['vlan']) { 

+ 3 - 3
html/admin/devices/switchstatus.php

@@ -191,9 +191,9 @@ print_editdevice_submenu($page_url, $id, $device['device_type'], $user_info['log
             }
             print "</td>\n";
             print "<td class='" . $cl . "' >" . get_port_comment($db_link, $row['id'], $row['comment']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_yes($row['uplink']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_yes($row['nagios']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_yes($row['skip']) . "</td>\n";
+            print_td_yes($row['uplink'],FALSE,$cl);
+            print_td_yes($row['nagios'],FALSE,$cl);
+            print_td_yes($row['skip'],FALSE,$cl);
             $poe_info = "POE:None";
 
             $ifname = $row['ifName'];

+ 9 - 2
html/inc/common.php

@@ -1270,7 +1270,7 @@ function get_qa($qa_value, $text = FALSE)
         if ($qa_value == 1) { return "Да"; }
         return "Нет";
         } else {
-        if ($qa_value == 1) { return '<span style="font-size: 16px;">✓</span>'; }
+        if ($qa_value == 1) { return '<span style="font-size: 16px; font-weight: bold;">✓</span>'; }
         return '<span style="font-size: 16px;">✗</span>';
         }
 }
@@ -1281,7 +1281,7 @@ function get_yes($qa_value, $text = FALSE)
         if ($qa_value == 1) { return "Да"; }
         return "";
         } else {
-        if ($qa_value == 1) { return '<span style="font-size: 16px;">✓</span>'; }
+        if ($qa_value == 1) { return '<span style="font-size: 16px; font-weight: bold;">✓</span>'; }
         return "";
         }
 }
@@ -1293,6 +1293,13 @@ if (!$qa_value) { $cl = "data_red"; }
 print "<td class=\"$parent_class $cl\" >" . get_qa($qa_value,$text) . "</td>";
 }
 
+function print_td_yes ($qa_value, $text = FALSE, $parent_class = '')
+{
+$cl = "data_green";
+if (!$qa_value) { $cl = "data_red"; }
+print "<td class=\"$parent_class $cl\" >" . get_yes($qa_value,$text) . "</td>";
+}
+
 function print_action_select($action_name, $action_value)
 {
     print "<select id=\"$action_name\" name=\"$action_name\">\n";