Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
45903e83
Commit
45903e83
authored
Jun 11, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: consistent style for status keyword
(cherry picked from commit
bf745dea
)
parent
427a3aaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
gateways.widget.php
src/www/widgets/widgets/gateways.widget.php
+13
-9
No files found.
src/www/widgets/widgets/gateways.widget.php
View file @
45903e83
...
...
@@ -40,7 +40,7 @@
tr_content
.
push
(
'
<td><small><strong>
'
+
gateway
[
'
name
'
]
+
'
</strong><br/>
'
+
gateway
[
'
address
'
]
+
'
</small></td>
'
);
tr_content
.
push
(
'
<td>
'
+
gateway
[
'
delay
'
]
+
'
</td>
'
);
tr_content
.
push
(
'
<td>
'
+
gateway
[
'
loss
'
]
+
'
</td>
'
);
tr_content
.
push
(
'
<td><
div class="" style="width:40px;">
'
+
gateway
[
'
status_translated
'
]
+
'
</div
></td>
'
);
tr_content
.
push
(
'
<td><
font>
'
+
gateway
[
'
status_translated
'
]
+
'
</font
></td>
'
);
tr_content
.
push
(
'
</tr>
'
);
tbody
.
append
(
tr_content
.
join
(
''
));
}
else
{
...
...
@@ -51,24 +51,28 @@
// set color on status text
switch
(
gateway
[
'
status
'
])
{
case
'
force_down
'
:
status_color
=
'
danger
'
;
status_color
=
'
red
'
;
break
;
case
'
down
'
:
status_color
=
'
danger
'
;
status_color
=
'
red
'
;
break
;
case
'
loss
'
:
status_color
=
'
warning
'
;
status_color
=
'
purple
'
;
break
;
case
'
delay
'
:
status_color
=
'
warning
'
;
status_color
=
'
purple
'
;
break
;
case
'
none
'
:
status_color
=
'
success
'
;
status_color
=
'
green
'
;
break
;
default
:
status_color
=
'
info
'
;
status_color
=
''
;
break
;
}
$
(
"
#
"
+
tr_id
+
"
> td:eq(3) > font
"
).
removeAttr
(
'
color
'
);
if
(
status_color
!=
''
)
{
$
(
"
#
"
+
tr_id
+
"
> td:eq(3) > font
"
).
attr
(
'
color
'
,
status_color
);
}
$
(
"
#
"
+
tr_id
+
"
> td:eq(3) > div
"
).
removeClass
().
addClass
(
'
bg-
'
+
status_color
);
});
}
</script>
...
...
@@ -80,7 +84,7 @@
<th>
<?=
gettext
(
'Name'
)
?>
</th>
<th>
<?=
gettext
(
'RTT'
)
?>
</th>
<th>
<?=
gettext
(
'Loss'
)
?>
</th>
<th
style=
"width:160px;"
>
<?=
gettext
(
'Status'
)
?>
</th>
<th>
<?=
gettext
(
'Status'
)
?>
</th>
</tr>
</thead>
<tbody>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment