mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
css fixes, nav menu update, searchable devParentNodeMac
This commit is contained in:
@@ -387,6 +387,16 @@ body
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.plugin-content #tabs-location .nav-tabs-custom > .nav-tabs > li
|
||||
{
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.plugin-content .left-nav
|
||||
{
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.pa-small-box-2 .inner h3 {
|
||||
margin-left: 0em;
|
||||
margin-bottom: 1.3em;
|
||||
@@ -1411,6 +1421,7 @@ input[readonly] {
|
||||
.iconPreview svg{
|
||||
min-width: 20px;
|
||||
max-width: 20px;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1659,8 +1670,6 @@ input[readonly] {
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
border-style: solid;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
|
||||
@@ -902,7 +902,7 @@ function initializeDatatable (status) {
|
||||
// Parent Mac
|
||||
{targets: [mapIndx(14)],
|
||||
'createdCell': function (td, cellData, rowData, row, col) {
|
||||
if (!cellData) {
|
||||
if (!isValidMac(cellData)) {
|
||||
$(td).html('');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -781,7 +781,7 @@ function initSelect2() {
|
||||
|
||||
// ------------------------------------------
|
||||
// Render a device link with hover-over functionality
|
||||
function renderDeviceLink(data, container, useName=false) {
|
||||
function renderDeviceLink(data, container, useName = false) {
|
||||
if (!data.id) return data.text; // default placeholder etc.
|
||||
|
||||
const device = getDevDataByMac(data.id);
|
||||
@@ -792,35 +792,37 @@ function renderDeviceLink(data, container, useName=false) {
|
||||
device.devMac
|
||||
);
|
||||
|
||||
$(container).addClass(badge.cssClass);
|
||||
|
||||
// Add badge class and hover-info class to container
|
||||
$(container)
|
||||
.addClass(`${badge.cssClass} hover-node-info`)
|
||||
.attr({
|
||||
'data-name': device.devName,
|
||||
'data-ip': device.devLastIP,
|
||||
'data-mac': device.devMac,
|
||||
'data-vendor': device.devVendor,
|
||||
'data-type': device.devType,
|
||||
'data-lastseen': device.devLastConnection,
|
||||
'data-firstseen': device.devFirstConnection,
|
||||
'data-relationship': device.devParentRelType,
|
||||
'data-status': device.devStatus,
|
||||
'data-present': device.devPresentLastScan,
|
||||
'data-alert': device.devAlertDown,
|
||||
'data-icon': device.devIcon
|
||||
});
|
||||
|
||||
return `
|
||||
<a href="${badge.url}" target="_blank">
|
||||
<span class="custom-chip hover-node-info"
|
||||
data-name="${device.devName}"
|
||||
data-ip="${device.devLastIP}"
|
||||
data-mac="${device.devMac}"
|
||||
data-vendor="${device.devVendor}"
|
||||
data-type="${device.devType}"
|
||||
data-lastseen="${device.devLastConnection}"
|
||||
data-firstseen="${device.devFirstConnection}"
|
||||
data-relationship="${device.devParentRelType}"
|
||||
data-status="${device.devStatus}"
|
||||
data-present="${device.devPresentLastScan}"
|
||||
data-alert="${device.devAlertDown}"
|
||||
data-icon="${device.devIcon}"
|
||||
>
|
||||
<span class="custom-chip">
|
||||
<span class="iconPreview">${atob(device.devIcon)}</span>
|
||||
${useName ? device.devName : data.text}
|
||||
<span>
|
||||
(${badge.iconHtml})
|
||||
(${badge.iconHtml})
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------
|
||||
// Display device info on hover (attach only once)
|
||||
function initHoverNodeInfo() {
|
||||
|
||||
@@ -436,8 +436,24 @@
|
||||
</li>
|
||||
|
||||
<!-- system info menu item -->
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="systeminfo.php"><i class="fa fa-fw fa-info-circle"></i> <span><?= lang('Navigation_SystemInfo');?></span></a>
|
||||
<li class=" treeview <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'active menu-open'; } ?>">
|
||||
<a href="#">
|
||||
<i class="fa fa-fw fa-info-circle"></i> <span><?= lang('Navigation_SystemInfo');?></span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu " style="display: <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'block'; } else {echo 'none';} ?>;">
|
||||
<li>
|
||||
<a href="systeminfo.php#panServer" onclick="setCache('activeSysinfoTab','tabServer');initializeTabs()"><?= lang('Systeminfo_System');?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="systeminfo.php#panNetwork" onclick="setCache('activeSysinfoTab','tabNetwork');initializeTabs()"><?= lang('Systeminfo_Network');?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="systeminfo.php#panStorage" onclick="setCache('activeSysinfoTab','tabStorage');initializeTabs()"><?= lang('Systeminfo_Storage');?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -450,24 +466,6 @@
|
||||
|
||||
<script defer>
|
||||
|
||||
// Generate work-in-progress icons
|
||||
function workInProgress() {
|
||||
|
||||
if($(".work-in-progress").length > 0 && $(".work-in-progress").html().trim() == "")
|
||||
{
|
||||
$(".work-in-progress").append(`
|
||||
<a href="https://github.com/jokob-sk/NetAlertX/issues" target="_blank">
|
||||
<b class="pointer" title="${getString("Gen_Work_In_Progress")}">🦺</b>
|
||||
</a>
|
||||
`)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
function toggleFullscreen() {
|
||||
|
||||
if (document.fullscreenElement) {
|
||||
@@ -485,6 +483,5 @@ function workInProgress() {
|
||||
|
||||
// Update server state in the header
|
||||
updateState()
|
||||
workInProgress()
|
||||
|
||||
</script>
|
||||
|
||||
@@ -197,7 +197,7 @@ class Query(ObjectType):
|
||||
searchable_fields = [
|
||||
"devName", "devMac", "devOwner", "devType", "devVendor", "devLastIP",
|
||||
"devGroup", "devComments", "devLocation", "devStatus", "devSSID",
|
||||
"devSite", "devSourcePlugin", "devSyncHubNode", "devFQDN", "devParentRelType"
|
||||
"devSite", "devSourcePlugin", "devSyncHubNode", "devFQDN", "devParentRelType", "devParentMAC"
|
||||
]
|
||||
|
||||
search_term = options.search.lower()
|
||||
|
||||
Reference in New Issue
Block a user