mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Firewall/Scrub: Display interface descriptions (#5433)
This commit is contained in:
parent
de3a021dd9
commit
aa20ccba4c
@ -205,6 +205,15 @@ $( document ).ready(function() {
|
||||
// watch scroll position and set to last known on page load
|
||||
watchScrollPosition();
|
||||
|
||||
// add titles to the fields having long text cut with ellipsis
|
||||
$('.mightOverflow').on('mouseenter', function(){
|
||||
var $this = $(this);
|
||||
|
||||
if(this.offsetWidth < this.scrollWidth && !$this.attr('title')){
|
||||
$this.attr('title', $this.text());
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -313,6 +322,7 @@ $( document ).ready(function() {
|
||||
<?php
|
||||
$special_nets = get_specialnets();
|
||||
legacy_html_escape_form_data($special_nets);
|
||||
$configured_interfaces = legacy_config_get_interfaces();
|
||||
foreach ($a_scrub as $i => $scrubEntry):?>
|
||||
<tr>
|
||||
<td>
|
||||
@ -321,7 +331,14 @@ $( document ).ready(function() {
|
||||
<span class="fa fa-play fa-fw <?=(empty($scrubEntry['disabled'])) ? "text-success" : "text-muted";?>"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td><?=strtoupper($scrubEntry['interface']);?></td>
|
||||
<?php
|
||||
$scrubEntryInterfaceDescrs = [];
|
||||
foreach (explode(',', $scrubEntry['interface']) as $scrubEntryInterfaceName) {
|
||||
if (array_key_exists($scrubEntryInterfaceName, $configured_interfaces)) {
|
||||
$scrubEntryInterfaceDescrs[] = $configured_interfaces[$scrubEntryInterfaceName]['descr'] ?? strtoupper($scrubEntryInterfaceName);
|
||||
}
|
||||
}?>
|
||||
<td class="mightOverflow" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch;"><?=implode(', ', $scrubEntryInterfaceDescrs);?></td>
|
||||
<td class="hidden-xs hidden-sm">
|
||||
<?php
|
||||
if (is_alias($scrubEntry['src'])):?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user