Skip to content

Commit

Permalink
Add color to the main interface icon
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <[email protected]>
  • Loading branch information
rdwebdesign committed Jan 27, 2025
1 parent 9d49c61 commit 9717d87
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/js/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ $(function () {

// For each interface in data.interface, create a new object and push it to json
data.interfaces.forEach(function (interface) {
const status = interface.carrier
? '<span class="text-green">UP</span>'
: '<span class="text-red">DOWN</span>';
const status = interface.carrier ? "UP" : "DOWN";
const color = interface.carrier ? "text-green" : "text-red"

var obj = {
text: interface.name + " - " + status,
text: interface.name + ' - <span class="' + color + '">' + status + '</span>',
class: gateways.has(interface.name) ? "text-bold" : null,
icon: "fa fa-network-wired fa-fw",
icon: "fa fa-network-wired fa-fw " + color,
nodes: [],
};

Expand Down

0 comments on commit 9717d87

Please sign in to comment.