Device Edit Rebuild + New Dummy Device

This commit is contained in:
jokob-sk
2024-11-30 23:34:20 +11:00
parent 67fd08a093
commit afaac3277d
42 changed files with 1891 additions and 1621 deletions

View File

@@ -18,6 +18,16 @@
--color-red: #dd4b39;
}
.input-group .checkbox
{
margin-left: 5px;
}
h5
{
font-size: medium;
}
/* -----------------------------------------------------------------------------
Helper Classes
----------------------------------------------------------------------------- */
@@ -1256,6 +1266,7 @@ input[readonly] {
position: absolute;
font-size: x-small;
margin-bottom: 6px;
margin-left: 3px;
}
.pageHelp{
@@ -1283,6 +1294,10 @@ input[readonly] {
height: 1em !important;
}
#panDetails .control-label{
text-align: left;
}
/* ----------------------------------------------------------------- */
/* MODAL popups */
/* ----------------------------------------------------------------- */

File diff suppressed because it is too large Load Diff

475
front/deviceDetailsEdit.php Executable file
View File

@@ -0,0 +1,475 @@
<?php
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
?>
<div class="row">
<div class="box-body form-horizontal">
<form id="edit-form">
<!-- Form fields will be appended here -->
</form>
</div>
<!-- Buttons -->
<div class="col-xs-12">
<div class="pull-right">
<button type="button"
class="btn btn-default pa-btn pa-btn-delete"
style="margin-left:0px;"
id="btnDeleteEvents"
onclick="askDeleteDeviceEvents()">
<?= lang('DevDetail_button_DeleteEvents');?>
</button>
<button type="button"
class="btn btn-default pa-btn pa-btn-delete"
style="margin-left:0px;"
id="btnDelete"
onclick="askDeleteDevice()">
<?= lang('DevDetail_button_Delete');?>
</button>
<button type="button"
class="btn btn-primary pa-btn"
style="margin-left:6px; "
id="btnSave"
onclick="setDeviceData()" >
<?= lang('DevDetail_button_Save');?>
</button>
</div>
</div>
</div>
<script defer>
// -------------------------------------------------------------------
// Get plugin and settings data from API endpoints
function getDeviceData(readAllData){
mac = getMac()
console.log(mac);
// get data from server
$.get('php/server/devices.php?action=getServerDeviceData&mac='+ mac + '&period='+ period, function(data) {
// show loading dialog
showSpinner()
var deviceData = JSON.parse(data);
// Deactivate next previous buttons
if (readAllData) {
$('#btnPrevious').attr ('disabled','');
$('#btnPrevious').addClass ('text-gray50');
$('#btnNext').attr ('disabled','');
$('#btnNext').addClass ('text-gray50');
}
// some race condition, need to implement delay
setTimeout(() => {
$.get('api/table_settings.json?nocache=' + Date.now(), function(res) {
settingsData = res["data"];
// columns to hide
hiddenFields = ["NEWDEV_devScan", "NEWDEV_devPresentLastScan" ]
// columns to disable - conditional depending if a new dummy device is created
disabledFields = mac == "new" ? ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection"] : ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devMac", "NEWDEV_devLastIP" ];
// Grouping of fields into categories with associated documentation links
const fieldGroups = {
// Group for device main information
DevDetail_MainInfo_Title: {
data: ["devMac", "devLastIP", "devName", "devOwner", "devType", "devVendor", "devGroup", "devIcon", "devLocation", "devComments"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-pencil"
},
// Group for session information
DevDetail_SessionInfo_Title: {
data: ["devStatus", "devLastConnection", "devFirstConnection"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-calendar"
},
// Group for event and alert settings
DevDetail_EveandAl_Title: {
data: ["devAlertEvents", "devAlertDown", "devSkipRepeated"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-bell"
},
// Group for network details
DevDetail_MainInfo_Network_Title: {
data: ["devParentMAC", "devParentPort", "devSSID", "devSite"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
iconClass: "fa fa-network-wired"
},
// Group for other fields like static IP, archived status, etc.
DevDetail_DisplayFields_Title: {
data: ["devStaticIP", "devIsNew", "devFavorite", "devIsArchived"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-list-check"
}
};
// Filter settings data to get relevant settings
const relevantSettings = settingsData.filter(set =>
set.setGroup === "NEWDEV" && // Filter for settings in the "NEWDEV" group
set.setKey.includes("_dev") && // Include settings with '_dev' in the key
!hiddenFields.includes(set.setKey) && // Exclude settings listed in hiddenFields
!set.setKey.includes("__metadata") // Exclude metadata fields
);
// Function to generate the form
const generateSimpleForm = settings => {
const form = $('#edit-form'); // Get the form element to append generated fields
// Loop over each field group to generate sections for each category
Object.entries(fieldGroups).forEach(([groupName, obj]) => {
const groupDiv = $('<div>').addClass('field-group col-lg-4 col-sm-6 col-xs-12'); // Create a div for each group with responsive Bootstrap classes
// Add group title and documentation link
groupDiv.append(`<h5><i class="${obj.iconClass}"></i> ${getString(groupName)}
<span class="helpIconSmallTopRight">
<a target="_blank" href="${obj.docs}">
<i class="fa fa-circle-question"></i>
</a>
</span>
</h5>
<hr>
`);
// Filter relevant settings for the current group
const groupSettings = settings.filter(set => obj.data.includes(set.setKey.replace('NEWDEV_', '')));
// Loop over each setting in the group to generate form fields
groupSettings.forEach(setting => {
const column = $('<div>'); // Create a column for each setting (Bootstrap column)
// Get the field data (replace 'NEWDEV_' prefix from the key)
fieldData = deviceData[setting.setKey.replace('NEWDEV_', '')]
fieldData = fieldData == null ? "" : fieldData;
// console.log(setting.setKey);
// console.log(fieldData);
// Additional form elements like the random MAC address button for devMac
let inlineControl = "";
// handle rendom mac
if (setting.setKey == "NEWDEV_devMac" && deviceData["devRandomMAC"] == true) {
inlineControl += `<span class="input-group-addon pointer"
title="${getString("RandomMAC_hover")}">
<a href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/RANDOM_MAC.md" target="_blank">
<i class="fa-solid fa-shuffle"></i>
</a>
</span>`;
}
// handle generate MAC for new device
if (setting.setKey == "NEWDEV_devMac" && deviceData["devMac"] == "") {
inlineControl += `<span class="input-group-addon pointer"
onclick="generate_NEWDEV_devMac()"
title="${getString("Gen_Generate")}">
<i class="fa-solid fa-dice" ></i>
</span>`;
}
// handle generate IP for new device
if (setting.setKey == "NEWDEV_devLastIP" && deviceData["devLastIP"] == "") {
inlineControl += `<span class="input-group-addon pointer"
onclick="generate_NEWDEV_devLastIP()"
title="${getString("Gen_Generate")}">
<i class="fa-solid fa-dice" ></i>
</span>`;
}
// Generate the input field HTML
const inputFormHtml = `<div class="form-group col-xs-12">
<label class="col-sm-4 col-xs-12 control-label"> ${setting.setName}
<i my-set-key="${setting.setKey}"
title="${getString("Settings_Show_Description")}"
class="fa fa-circle-info pointer helpIconSmallTopRight"
onclick="showDescriptionPopup(this)">
</i>
</label>
<div class="col-sm-8 col-xs-12 input-group">
${generateFormHtml(setting, fieldData.toString())}
${inlineControl}
</div>
</div>`;
column.append(inputFormHtml); // Append the input field to the column
groupDiv.append(column); // Append the column to the group div
});
form.append(groupDiv); // Append the group div (containing columns) to the form
});
// wait until everything is initialized to update icon
updateIconPreview();
// update readonly fields
handleReadOnly(settingsData, disabledFields);
// Page title - Name
if (mac == "new") {
$('#pageTitle').html(getString("Gen_AddDevice"));
} else if (deviceData['devOwner'] == null || deviceData['devOwner'] == '' ||
(deviceData['devName'].toString()).indexOf(deviceData['devOwner']) != -1) {
$('#pageTitle').html(deviceData['devName']);
} else {
$('#pageTitle').html(deviceData['devName'] + ' (' + deviceData['devOwner'] + ')');
}
};
// console.log(relevantSettings)
generateSimpleForm(relevantSettings);
// <> chevrons
updateChevrons(deviceData)
toggleNetworkConfiguration(mac == 'Internet')
hideSpinner();
})
}, 1);
});
}
// ----------------------------------------
// Handle previous/next arrows/chevrons
function updateChevrons(deviceData) {
devicesList = getDevicesList();
// console.log(devicesList);
// Check if device is part of the devicesList
pos = devicesList.findIndex(item => item.rowid == deviceData['rowid']);
// console.log(pos);
if (pos == -1) {
devicesList.push({"rowid" : deviceData['rowid'], "mac" : deviceData['devMac'], "name": deviceData['devName'], "type": deviceData['devType']});
pos=0;
}
// Record number
$('#txtRecord').html (pos+1 +' / '+ devicesList.length);
// Deactivate previous button
if (pos <= 0) {
$('#btnPrevious').attr ('disabled','');
$('#btnPrevious').addClass ('text-gray50');
} else {
$('#btnPrevious').removeAttr ('disabled');
$('#btnPrevious').removeClass ('text-gray50');
}
// Deactivate next button
if (pos >= (devicesList.length-1)) {
$('#btnNext').attr ('disabled','');
$('#btnNext').addClass ('text-gray50');
} else {
$('#btnNext').removeAttr ('disabled');
$('#btnNext').removeClass ('text-gray50');
}
}
// ----------------------------------------
// Handle the read-only fields
function handleReadOnly(settingsData, disabledFields) {
settingsData.forEach(setting => {
const element = $(`#${setting.setKey}`);
if (disabledFields.includes(setting.setKey)) {
element.prop('readonly', true);
} else {
element.prop('readonly', false);
}
});
}
// ----------------------------------------
// Show the description of a setting
function showDescriptionPopup(e) {
console.log($(e).attr("my-set-key"));
showModalOK("Info", getString($(e).attr("my-set-key") + '_description'))
}
// -----------------------------------------------------------------------------
function askDeleteDeviceEvents () {
// Check MAC
if (mac == '') {
return;
}
// Ask delete device Events
showModalWarning ('<?= lang('DevDetail_button_DeleteEvents');?>', '<?= lang('DevDetail_button_DeleteEvents_Warning');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteDeviceEvents');
}
function deleteDeviceEvents () {
// Check MAC
if (mac == '') {
return;
}
// Delete device events
$.get('php/server/devices.php?action=deleteDeviceEvents&mac='+ mac, function(msg) {
showMessage (msg);
});
// Deactivate controls
$('#panDetails :input').attr('disabled', true);
}
// -----------------------------------------------------------------------------
function askDeleteDevice () {
// Check MAC
if (mac == '') {
return;
}
// Ask delete device
showModalWarning ('Delete Device', 'Are you sure you want to delete this device?<br>(maybe you prefer to archive it)',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteDevice');
}
// -----------------------------------------------------------------------------
function deleteDevice () {
// Check MAC
if (mac == '') {
return;
}
// Delete device
$.get('php/server/devices.php?action=deleteDevice&mac='+ mac, function(msg) {
showMessage (msg);
});
// Deactivate controls
$('#panDetails :input').attr('disabled', true);
// refresh API
updateApi("devices,appevents")
}
// -----------------------------------------------------------------------------
function setDeviceData(direction = '', refreshCallback = '') {
// Check MAC
if (mac === '') {
return;
}
// Determine if a new device should be created
const createNew = mac === 'new' ? 1 : 0;
const devLastIP = $('#NEWDEV_devLastIP').val();
// Validate MAC and Last IP
if (mac === '' || !(isValidIPv4(devLastIP) || isValidIPv6(devLastIP))) {
showMessage(getString("DeviceEdit_ValidMacIp"), 5000, "modal_red");
return;
}
showSpinner();
// update data to server
$.get('php/server/devices.php?action=setDeviceData&mac='+ $('#NEWDEV_devMac').val()
+ '&name=' + encodeURIComponent($('#NEWDEV_devName').val().replace(/'/g, ""))
+ '&owner=' + encodeURIComponent($('#NEWDEV_devOwner').val().replace(/'/g, ""))
+ '&type=' + $('#NEWDEV_devType').val()
+ '&vendor=' + encodeURIComponent($('#NEWDEV_devVendor').val().replace(/'/g, ""))
+ '&icon=' + encodeURIComponent($('#NEWDEV_devIcon').val())
+ '&favorite=' + ($('#NEWDEV_devFavorite')[0].checked * 1)
+ '&group=' + encodeURIComponent($('#NEWDEV_devGroup').val())
+ '&location=' + encodeURIComponent($('#NEWDEV_devLocation').val())
+ '&comments=' + encodeURIComponent(encodeSpecialChars($('#NEWDEV_devComments').val()))
+ '&networknode=' + $('#NEWDEV_devParentMAC').val()
+ '&networknodeport=' + $('#NEWDEV_devParentPort').val()
+ '&ssid=' + $('#NEWDEV_devSSID').val()
+ '&networksite=' + $('#NEWDEV_devSite').val()
+ '&staticIP=' + ($('#NEWDEV_devStaticIP')[0].checked * 1)
+ '&scancycle=' + "1"
+ '&alertevents=' + ($('#NEWDEV_devAlertEvents')[0].checked * 1)
+ '&alertdown=' + ($('#NEWDEV_devAlertDown')[0].checked * 1)
+ '&skiprepeated=' + $('#NEWDEV_devSkipRepeated').val().split(' ')[0]
+ '&newdevice=' + ($('#NEWDEV_devIsNew')[0].checked * 1)
+ '&archived=' + ($('#NEWDEV_devIsArchived')[0].checked * 1)
+ '&devFirstConnection=' + ($('#NEWDEV_devFirstConnection').val())
+ '&devLastConnection=' + ($('#NEWDEV_devLastConnection').val())
+ '&ip=' + ($('#NEWDEV_devLastIP').val())
+ '&createNew=' + createNew
, function(msg) {
showMessage (msg);
// clear session storage
setCache("#dropdownOwner","");
setCache("#dropdownDeviceType","");
setCache("#dropdownGroup","");
setCache("#dropdownLocation","");
setCache("#dropdownNetworkNodeMac","");
// Remove navigation prompt "Are you sure you want to leave..."
window.onbeforeunload = null;
somethingChanged = false;
// refresh API
updateApi("devices,appevents")
// Callback fuction
if (typeof refreshCallback == 'function') {
refreshCallback(direction);
}
// everything loaded
hideSpinner();
});
}
// Helper function to clear dropdown cache
function clearDropdownCache() {
setCache("#dropdownOwner", "");
setCache("#dropdownDeviceType", "");
setCache("#dropdownGroup", "");
setCache("#dropdownLocation", "");
setCache("#dropdownNetworkNodeMac", "");
}
//-----------------------------------------------------------------------------------
// Disables or enables network configuration for the root node
function toggleNetworkConfiguration(disable) {
if (disable) {
// Completely disable the NEWDEV_devParentMAC <select> and NEWDEV_devParentPort
$('#NEWDEV_devParentMAC').prop('disabled', true).val("").prop('selectedIndex', 0);
$('#NEWDEV_devParentMAC').empty() // Remove all options
.append('<option value="">Root Node</option>')
$('#NEWDEV_devParentPort').prop('disabled', true);
$('#NEWDEV_devParentPort').prop('readonly', true );
$('#NEWDEV_devParentMAC').prop('readonly', true );
} else {
// Enable the NEWDEV_devParentMAC <select> and NEWDEV_devParentPort
$('#NEWDEV_devParentMAC').prop('disabled', false);
$('#NEWDEV_devParentPort').prop('disabled', false);
$('#NEWDEV_devParentPort').prop('readonly', false );
$('#NEWDEV_devParentMAC').prop('readonly', false );
}
}
// -------------------- INIT ------------------------
getDeviceData(true);
</script>

View File

@@ -1,74 +1,125 @@
<?php
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
?>
<!-- INTERNET INFO -->
<?php if ($_REQUEST["mac"] == "Internet") { ?>
<h4 class=""><i class="fa-solid fa-globe"></i>
<?= lang("DevDetail_Tab_Tools_Internet_Info_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?>
</h5>
<br>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()">
<?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button>
<h4 class=""><i class="fa-solid fa-globe"></i>
<?= lang("DevDetail_Tab_Tools_Internet_Info_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?>
</h5>
<br>
<div id="internetinfooutput" style="margin-top: 10px;"></div>
</div>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()">
<?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button>
<br>
<div id="internetinfooutput" style="margin-top: 10px;"></div>
</div>
<?php } ?>
<!-- COPY FROM DEVICE -->
<?php if ($_REQUEST["mac"] != "Internet") { ?>
<h4 class=""><i class="fa-solid fa-copy"></i>
<?= lang("DevDetail_Copy_Device_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Copy_Device_Tooltip") ?>
</h5>
<br>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<select class="form-control"
title="<?= lang('DevDetail_Copy_Device_Tooltip');?>"
id="txtCopyFromDevice" >
<option value="lemp_loading" id="lemp_loading">Loading</option>
</select>
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="()">
<?= lang("BackDevDetail_Copy_Title") ?></button>
<br>
</div>
<?php } ?>
<!-- WAKE ON LAN - WOL -->
<?php if ($_REQUEST["mac"] != "Internet") { ?>
<h4 class=""><i class="fa-solid fa-bell"></i>
<?= lang("DevDetail_Tools_WOL_noti") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tools_WOL_noti_text") ?>
</h5>
<br>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="wakeonlan()">
<?= lang("DevDetail_Tools_WOL_noti") ?></button>
<br>
<div id="wol_output" style="margin-top: 10px;"></div>
</div>
<?php } ?>
<!-- SPEEDTEST -->
<?php if ($_REQUEST["mac"] == "Internet") { ?>
<h4 class=""><i class="fa-solid fa-gauge-high"></i>
<?= lang("DevDetail_Tab_Tools_Speedtest_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?>
</h5>
<br>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">
<?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button>
<h4 class=""><i class="fa-solid fa-gauge-high"></i>
<?= lang("DevDetail_Tab_Tools_Speedtest_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?>
</h5>
<br>
<div id="speedtestoutput" style="margin-top: 10px;"></div>
</div>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">
<?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button>
<br>
<div id="speedtestoutput" style="margin-top: 10px;"></div>
</div>
<?php } ?>
<!-- TRACEROUTE -->
<?php if ($_REQUEST["mac"] != "Internet") { ?>
<h4 class=""><i class="fa-solid fa-route"></i>
<?= lang("DevDetail_Tab_Tools_Traceroute_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?>
</h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()">
<?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?>
</button>
<br>
<div id="tracerouteoutput" style="margin-top: 10px;"></div>
</div>
<h4 class=""><i class="fa-solid fa-route"></i>
<?= lang("DevDetail_Tab_Tools_Traceroute_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?>
</h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()">
<?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?>
</button>
<br>
<div id="tracerouteoutput" style="margin-top: 10px;"></div>
</div>
<?php } ?>
<!-- NSLOOKUP -->
<?php if ($_REQUEST["mac"] != "Internet") { ?>
<h4 class=""><i class="fa-solid fa-magnifying-glass"></i>
<?= lang("DevDetail_Tab_Tools_Nslookup_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?>
</h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()">
<?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?>
</button>
<br>
<div id="nslookupoutput" style="margin-top: 10px;"></div>
</div>
<h4 class=""><i class="fa-solid fa-magnifying-glass"></i>
<?= lang("DevDetail_Tab_Tools_Nslookup_Title") ?>
</h4>
<h5 class="">
<?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?>
</h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;">
<button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()">
<?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?>
</button>
<br>
<div id="nslookupoutput" style="margin-top: 10px;"></div>
</div>
<?php } ?>
<!-- NMAP SCANS -->
<h4 class=""><i class="fa-solid fa-ethernet"></i>
<?= lang("DevDetail_Nmap_Scans") ?>
</h4>
@@ -77,16 +128,16 @@
<?= lang("DevDetail_Nmap_Scans_desc") ?>
</div>
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDeviceDataByMac(getMac(), 'devLastIP'), 'fast')">
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDevDataByMac(getMac(), 'devLastIP'), 'fast')">
<?= lang("DevDetail_Loading") ?>
</button>
<button type="button" id="piamanualnmap_normal" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDeviceDataByMac(getMac(), 'devLastIP'), 'normal')">
<button type="button" id="piamanualnmap_normal" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDevDataByMac(getMac(), 'devLastIP'), 'normal')">
<?= lang("DevDetail_Loading") ?>
</button>
<button type="button" id="piamanualnmap_detail" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDeviceDataByMac(getMac(), 'devLastIP'), 'detail')">
<button type="button" id="piamanualnmap_detail" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDevDataByMac(getMac(), 'devLastIP'), 'detail')">
<?= lang("DevDetail_Loading") ?>
</button>
<button type="button" id="piamanualnmap_skipdiscovery" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDeviceDataByMac(getMac(), 'devLastIP'), 'skipdiscovery')">
<button type="button" id="piamanualnmap_skipdiscovery" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(getDevDataByMac(getMac(), 'devLastIP'), 'skipdiscovery')">
<?= lang("DevDetail_Loading") ?>
</button>
@@ -155,7 +206,7 @@
$( "#tracerouteoutput" ).empty();
$.ajax({
method: "GET",
url: "./php/server/traceroute.php?action=get&ip=" + getDeviceDataByMac(getMac(), 'devLastIP') + "",
url: "./php/server/traceroute.php?action=get&ip=" + getDevDataByMac(getMac(), 'devLastIP') + "",
beforeSend: function() { $('#tracerouteoutput').addClass("ajax_scripts_loading"); },
complete: function() { $('#tracerouteoutput').removeClass("ajax_scripts_loading"); },
success: function(data, textStatus) {
@@ -170,7 +221,7 @@
$( "#nslookupoutput" ).empty();
$.ajax({
method: "GET",
url: "./php/server/nslookup.php?action=get&ip=" + getDeviceDataByMac(getMac(), 'devLastIP') + "",
url: "./php/server/nslookup.php?action=get&ip=" + getDevDataByMac(getMac(), 'devLastIP') + "",
beforeSend: function() { $('#nslookupoutput').addClass("ajax_scripts_loading"); },
complete: function() { $('#nslookupoutput').removeClass("ajax_scripts_loading"); },
success: function(data, textStatus) {
@@ -181,23 +232,110 @@
// ----------------------------------------------------------------
function initNmapButtons() {
setTimeout(function(){
document.getElementById('piamanualnmap_fast').innerHTML=getString(
"DevDetail_Nmap_buttonFast"
) ;
document.getElementById('piamanualnmap_normal').innerHTML=getString(
"DevDetail_Nmap_buttonDefault"
) ;
document.getElementById('piamanualnmap_detail').innerHTML=getString(
"DevDetail_Nmap_buttonDetail"
) ;
document.getElementById('piamanualnmap_skipdiscovery').innerHTML=getString(
"DevDetail_Nmap_buttonSkipDiscovery"
) ;
}, 500);
}
setTimeout(function(){
document.getElementById('piamanualnmap_fast').innerHTML=getString(
"DevDetail_Nmap_buttonFast"
) ;
document.getElementById('piamanualnmap_normal').innerHTML=getString(
"DevDetail_Nmap_buttonDefault"
) ;
document.getElementById('piamanualnmap_detail').innerHTML=getString(
"DevDetail_Nmap_buttonDetail"
) ;
document.getElementById('piamanualnmap_skipdiscovery').innerHTML=getString(
"DevDetail_Nmap_buttonSkipDiscovery"
) ;
}, 500);
}
// ----------------------------------------------------------------
function initCopyFromDevice() {
const devices = getVisibleDevicesList()
console.log(devices);
const $select = $('#txtCopyFromDevice');
$select.empty(); // Clear existing options
devices.forEach(device => {
const option = $('<option></option>')
.val(device.devMac)
.text(device.devName);
$select.append(option);
});
}
// ----------------------------------------------------------------
function wakeonlan() {
macAddress = getMac();
// Execute
$.get('php/server/devices.php?action=wakeonlan&'
+ '&mac=' + macAddress
+ '&ip=' + getDevDataByMac(macAddress, "devLastIP")
, function(msg) {
showMessage (msg);
});
}
// ------------------------------------------------------------
function copyFromDevice() {
macAddress = getMac();
// Execute
$.get('php/server/devices.php?action=copyFromDevice&'
+ '&macTo=' + macAddress
+ '&macFrom=' + $('#txtCopyFromDevice').val()
, function(msg) {
showMessage (msg);
setTimeout(function() {
window.location.reload();
}, 2000);
});
}
// ------------------------------------------------------------
function getVisibleDevicesList()
{
// Read cache (skip cookie expiry check)
devicesList = getCache('devicesListAll_JSON', true);
if (devicesList != '') {
devicesList = JSON.parse (devicesList);
} else {
devicesList = [];
}
// only loop thru the filtered down list
visibleDevices = getCache("ntx_visible_macs")
if(visibleDevices != "") {
visibleDevicesMACs = visibleDevices.split(',');
devicesList_tmp = [];
// Iterate through the data and filter only visible devices
$.each(devicesList, function(index, item) {
// Check if the current item's MAC exists in visibleDevicesMACs
if (visibleDevicesMACs.includes(item.devMac)) {
devicesList_tmp.push(item);
}
});
// Update devicesList with the filtered items
devicesList = devicesList_tmp;
}
return devicesList;
}
// ----------------------------------------------------------------
function internetinfo() {
$( "#internetinfooutput" ).empty();
@@ -210,8 +348,9 @@
$("#internetinfooutput").html(data);
}
})
}
}
// init first time
initNmapButtons();
initCopyFromDevice();
</script>

View File

@@ -75,6 +75,7 @@
<div class=" col-md-10 ">
<h3 id="tableDevicesTitle" class="box-title text-gray "></h3>
</div>
<div class=" col-md-2 "><a href="deviceDetails.php?mac=new"><i title="Add new dummy device" class="fa fa-square-plus"></i> <?= lang('Gen_create_new_device');?></a></div>
</div>
<!-- table -->
@@ -258,6 +259,12 @@ function processDeviceTotals(devicesData) {
});
// Render info boxes/tile cards
console.log(getSetting('UI_hide_empty'));
console.log(dataArray);
console.log(devicesData);
renderInfoboxes(dataArray);
}
@@ -658,7 +665,7 @@ function initializeDatatable (status) {
'createdCell': function (td, cellData, rowData, row, col) {
// console.log(cellData)
if (cellData == 1){
$(td).html ('<i data-toggle="tooltip" data-placement="right" title="Random MAC" style="font-size: 16px;" class="text-yellow glyphicon glyphicon-random"></i>');
$(td).html ('<i data-toggle="tooltip" data-placement="right" title="Random MAC" class="fa-solid fa-shuffle"></i>');
} else {
$(td).html ('');
}
@@ -831,20 +838,22 @@ function getMacsOfShownDevices() {
var selectedDevices = [];
for (var i = 0; i < rows.length; i++) {
// first row is the heading, skip
for (var i = 1; i < rows.length; i++) {
selectedDevices.push(devicesDataTableData[rows[i]._DT_RowIndex]);
}
}
for (var i = 1; i < selectedDevices.length; i++) {
macs.push(selectedDevices[i][mapIndx(11)]); // mapIndx(11) == MAC
for (var j = 0; j < selectedDevices.length; j++) {
macs.push(selectedDevices[j][mapIndx(11)]); // mapIndx(11) == MAC
}
return macs;
}
// -----------------------------------------------------------------------------
// Update cahce with shown devices before navigating away
// Update cache with shown devices before navigating away
window.addEventListener('beforeunload', function(event) {
// Call your function here
macs = getMacsOfShownDevices();

View File

@@ -165,7 +165,7 @@ switch ($UI_THEME) {
<!-- jQuery 3 -->
<script src="js/jquery/jquery.min.js"></script>
<script src="lib/jquery/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="lib/bootstrap/bootstrap.min.js"></script>
<!-- iCheck -->

View File

@@ -161,8 +161,8 @@ function cacheSettings()
}
}
setCache(`pia_set_${set.setKey}`, set.setValue)
setCache(`pia_set_opt_${set.setKey}`, resolvedOptions)
setCache(`nax_set_${set.setKey}`, set.setValue)
setCache(`nax_set_opt_${set.setKey}`, resolvedOptions)
});
}).then(() => handleSuccess('cacheSettings', resolve())).catch(() => handleFailure('cacheSettings', reject("cacheSettings already completed"))); // handle AJAX synchronization
})
@@ -177,7 +177,7 @@ function getSettingOptions (key) {
// handle initial load to make sure everything is set-up and cached
// handleFirstLoad()
result = getCache(`pia_set_opt_${key}`, true);
result = getCache(`nax_set_opt_${key}`, true);
if (result == "")
{
@@ -195,7 +195,7 @@ function getSetting (key) {
// handle initial load to make sure everything is set-up and cached
// handleFirstLoad()
result = getCache(`pia_set_${key}`, true);
result = getCache(`nax_set_${key}`, true);
if (result == "")
{
@@ -690,10 +690,12 @@ function openUrl(urls) {
}
// -----------------------------------------------------------------------------
// force laod URL in current window with specific anchor
// force load URL in current window with specific anchor
function forceLoadUrl(relativeUrl) {
window.location.replace(relativeUrl);
window.location.reload()
window.location.reload()
}
@@ -721,7 +723,7 @@ function navigateToDeviceWithIp (ip) {
// -----------------------------------------------------------------------------
function getNameByMacAddress(macAddress) {
return getDeviceDataByMac(macAddress, "devName")
return getDevDataByMac(macAddress, "devName")
}
// -----------------------------------------------------------------------------
@@ -758,6 +760,12 @@ function isValidIPv6(ipAddress) {
return ipv6Regex.test(ipAddress);
}
function isValidIPv4(ip) {
const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
return ipv4Regex.test(ip);
}
function formatIPlong(ipAddress) {
if (ipAddress.includes(':') && isValidIPv6(ipAddress)) {
const parts = ipAddress.split(':');
@@ -822,7 +830,11 @@ function isRandomMAC(mac)
// Empty array
if (input === '[]' || input === '') {
return [];
}
}
// handle integer
if (typeof input === 'number') {
input = input.toString();
}
// Regex pattern for brackets
const patternBrackets = /(^\s*\[)|(\]\s*$)/g;
@@ -874,7 +886,7 @@ function isRandomMAC(mac)
// -----------------------------------------------------------------------------
// A function to get a device property using the mac address as key and DB column nakme as parameter
// for the value to be returned
function getDeviceDataByMac(macAddress, dbColumn) {
function getDevDataByMac(macAddress, dbColumn) {
const sessionDataKey = 'devicesListAll_JSON';
const devicesCache = getCache(sessionDataKey);
@@ -1193,6 +1205,40 @@ function hideUIelements(setKey) {
}
// ------------------------------------------------------------
function getDevicesList()
{
// Read cache (skip cookie expiry check)
devicesList = getCache('devicesListAll_JSON', true);
if (devicesList != '') {
devicesList = JSON.parse (devicesList);
} else {
devicesList = [];
}
// only loop thru the filtered down list
visibleDevices = getCache("ntx_visible_macs")
if(visibleDevices != "") {
visibleDevicesMACs = visibleDevices.split(',');
devicesList_tmp = [];
// Iterate through the data and filter only visible devices
$.each(devicesList, function(index, item) {
// Check if the current item's MAC exists in visibleDevicesMACs
if (visibleDevicesMACs.includes(item.devMac)) {
devicesList_tmp.push(item);
}
});
// Update devicesList with the filtered items
devicesList = devicesList_tmp;
}
return devicesList;
}
// -----------------------------------------------------------------------------

View File

@@ -87,7 +87,8 @@ function showModalInput(
message,
btnCancel = getString("Gen_Cancel"),
btnOK = getString("Gen_Okay"),
callbackFunction = null
callbackFunction = null,
triggeredBy = null
) {
prefix = "modal-input";
@@ -101,6 +102,10 @@ function showModalInput(
modalCallbackFunction = callbackFunction;
}
if (triggeredBy != null) {
$('#'+prefix).attr("data-myparam-triggered-by", triggeredBy)
}
// Show modal
$(`#${prefix}`).modal("show");
@@ -117,7 +122,8 @@ function showModalFieldInput(
btnCancel = getString("Gen_Cancel"),
btnOK = getString("Gen_Okay"),
curValue = "",
callbackFunction = null
callbackFunction = null,
triggeredBy = null
) {
// set captions
prefix = "modal-field-input";
@@ -128,9 +134,14 @@ function showModalFieldInput(
$(`#${prefix}-OK`).html(btnOK);
if (callbackFunction != null) {
modalCallbackFunction = callbackFunction;
}
if (triggeredBy != null) {
$('#'+prefix).attr("data-myparam-triggered-by", triggeredBy)
}
$(`#${prefix}-field`).val(curValue);
setTimeout(function () {
@@ -148,7 +159,13 @@ function modalDefaultOK() {
// timer to execute function
window.setTimeout(function () {
window[modalCallbackFunction]();
if (typeof modalCallbackFunction === "function") {
modalCallbackFunction(); // Direct call
} else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") {
window[modalCallbackFunction](); // Call via window
} else {
console.error("Invalid callback function");
}
}, 100);
}
@@ -159,7 +176,13 @@ function modalDefaultInput() {
// timer to execute function
window.setTimeout(function () {
window[modalCallbackFunction]();
if (typeof modalCallbackFunction === "function") {
modalCallbackFunction(); // Direct call
} else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") {
window[modalCallbackFunction](); // Call via window
} else {
console.error("Invalid callback function");
}
}, 100);
}
@@ -170,7 +193,13 @@ function modalDefaultFieldInput() {
// timer to execute function
window.setTimeout(function () {
modalCallbackFunction();
if (typeof modalCallbackFunction === "function") {
modalCallbackFunction(); // Direct call
} else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") {
window[modalCallbackFunction](); // Call via window
} else {
console.error("Invalid callback function");
}
}, 100);
}
@@ -181,7 +210,13 @@ function modalWarningOK() {
// timer to execute function
window.setTimeout(function () {
window[modalCallbackFunction]();
if (typeof modalCallbackFunction === "function") {
modalCallbackFunction(); // Direct call
} else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") {
window[modalCallbackFunction](); // Call via window
} else {
console.error("Invalid callback function");
}
}, 100);
}

View File

@@ -859,3 +859,164 @@ function genListWithInputSet(options, valuesArray, targetField, transformers, pl
// Place the resulting HTML into the specified placeholder div
$("#" + placeholder).replaceWith(listHtml);
}
// ------------------------------------------------------------------------------
// Generate the form control for setting
function generateFormHtml(set, overrideValue) {
let inputHtml = '';
isEmpty(overrideValue) ? inVal = set['setValue'] : inVal = overrideValue;
const setKey = set['setKey'];
const setType = set['setType'];
// console.log(setType);
// console.log(setKey);
// console.log(overrideValue);
// console.log(inVal);
// Parse the setType JSON string
const setTypeObject = JSON.parse(setType.replace(/'/g, '"'));
const dataType = setTypeObject.dataType;
const elements = setTypeObject.elements || [];
// Generate HTML for elements
elements.forEach(elementObj => {
const { elementType, elementOptions = [], transformers = [] } = elementObj;
// Handle element options
const {
inputType,
readOnly,
isMultiSelect,
isOrdeable,
cssClasses,
placeholder,
suffix,
sourceIds,
separator,
editable,
valRes,
getStringKey,
onClick,
onChange,
customParams,
customId
} = handleElementOptions(setKey, elementOptions, transformers, inVal);
// Override value
const val = valRes;
// console.log(val);
// Generate HTML based on elementType
switch (elementType) {
case 'select':
const multi = isMultiSelect ? "multiple" : "";
const addCss = isOrdeable ? "select2 select2-hidden-accessible" : "";
inputHtml += `<select onChange="settingsChanged();${onChange}"
my-data-type="${dataType}"
my-editable="${editable}"
class="form-control ${addCss}"
name="${setKey}"
id="${setKey}"
my-customparams="${customParams}"
my-customid="${customId}"
${multi}>
<option value="" id="${setKey + "_temp_"}"></option>
</select>`;
generateOptionsOrSetOptions(setKey, createArray(val), `${setKey}_temp_`, generateOptions, null, transformers);
break;
case 'input':
const checked = val === 'True' || val === '1' ? 'checked' : '';
const inputClass = inputType === 'checkbox' ? 'checkbox' : 'form-control';
inputHtml += `<input
class="${inputClass} ${cssClasses}"
onChange="settingsChanged();${onChange}"
my-data-type="${dataType}"
my-customparams="${customParams}"
my-customid="${customId}"
id="${setKey}${suffix}"
type="${inputType}"
value="${val}"
${readOnly}
${checked}
placeholder="${placeholder}"
/>`;
break;
case 'button':
inputHtml += `<button
class="btn btn-primary ${cssClasses}"
my-customparams="${customParams}"
my-customid="${customId}"
my-input-from="${sourceIds}"
my-input-to="${setKey}"
onclick="${onClick}">
${getString(getStringKey)}
</button>`;
break;
case 'textarea':
inputHtml += `<textarea
class="form-control input"
my-customparams="${customParams}"
my-customid="${customId}"
my-data-type="${dataType}"
id="${setKey}"
${readOnly}>${val}</textarea>`;
break;
case 'span':
inputHtml += `<span
class="${cssClasses}"
my-data-type="${dataType}"
my-customparams="${customParams}"
my-customid="${customId}">
${getString(getStringKey)}
</span>`;
break;
default:
console.warn(`🟥 Unknown element type: ${elementType}`);
}
});
// Generate event HTML if applicable
let eventsHtml = '';
// console.log(setTypeObject);
// console.log(set);
const eventsList = createArray(set['setEvents']);
// inline buttons events
if (eventsList.length > 0) {
eventsList.forEach(event => {
eventsHtml += `<span class="input-group-addon pointer"
id="${`${event}_${setKey}`}"
data-myparam-setkey="${setKey}"
data-myparam="${setKey}"
data-myparam-plugin="${setTypeObject.prefix || ''}"
data-myevent="${event}"
onclick="execute_settingEvent(this)">
<i title="${getString(event + "_event_tooltip")}" class="fa ${getString(event + "_event_icon")}"></i>
</span>`;
});
}
// Combine and return the final HTML
return inputHtml + eventsHtml;
}

View File

@@ -97,64 +97,66 @@ function generateApiToken(elem, length) {
}
}
// ----------------------------------------------
// Updates the icon preview
function updateIconPreview(elem) {
// Retrieve and parse custom parameters from the element
let params = $(elem).attr("my-customparams")?.split(',').map(param => param.trim());
const targetElement = $('[my-customid="NEWDEV_devIcon_preview"]');
const iconInput = $("#NEWDEV_devIcon");
// console.log(params);
let attempts = 0;
if (params && params.length >= 2) {
var inputElementID = params[0];
var targetElementID = params[1];
} else {
console.error("Invalid parameters passed to updateIconPreview function");
return;
}
function tryUpdateIcon() {
let value = iconInput.val();
// Get the input element using the inputElementID
let iconInput = $("#" + inputElementID);
if (value) {
targetElement.html(atob(value));
iconInput.off('change input').on('change input', function () {
let newValue = $(this).val();
targetElement.html(atob(newValue));
});
return; // Stop retrying if successful
}
if (iconInput.length === 0) {
console.error("Icon input element not found");
return;
}
// Get the initial value and update the target element
let value = iconInput.val();
if (!value) {
console.error("Input value is empty or not defined");
return;
}
if (!targetElementID) {
targetElementID = "txtIcon";
}
// Check if the target element exists, if not find an element with matching custom attribute
let targetElement = $('#' + targetElementID);
if (targetElement.length === 0) {
// Look for an element with my-custom-id attribute equal to targetElementID
targetElement = $('[my-customid="' + targetElementID + '"]');
if (targetElement.length === 0) {
console.error("Neither target element with ID nor element with custom attribute found");
return;
attempts++;
if (attempts < 10) {
setTimeout(tryUpdateIcon, 1000); // Retry after 1 second
} else {
console.error("Input value is empty after 10 attempts");
}
}
// Update the target element with decoded base64 value
targetElement.html(atob(value));
// Add event listener to update the icon on input change
iconInput.on('change input', function () {
let newValue = $(this).val();
$('#' + targetElementID).html(atob(newValue));
});
tryUpdateIcon();
}
// -----------------------------------------------------------------------------
// Nice checkboxes with iCheck
function initializeiCheck () {
// Blue
$('input[type="checkbox"].blue').iCheck({
checkboxClass: 'icheckbox_flat-blue',
radioClass: 'iradio_flat-blue',
increaseArea: '20%'
});
// Orange
$('input[type="checkbox"].orange').iCheck({
checkboxClass: 'icheckbox_flat-orange',
radioClass: 'iradio_flat-orange',
increaseArea: '20%'
});
// Red
$('input[type="checkbox"].red').iCheck({
checkboxClass: 'icheckbox_flat-red',
radioClass: 'iradio_flat-red',
increaseArea: '20%'
});
}
// -----------------------------------------------------------------------------
@@ -219,19 +221,24 @@ function getCellValue(row, index) {
return $(row).children('td').eq(index).text();
}
// -----------------------------------------------------------------------------
// handling events on the backend initiated by the front end START
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// handling events
// -----------------------------------------------------------------------------
modalEventStatusId = 'modal-message-front-event'
modalEventStatusId = 'modal-message-front-event'
// --------------------------------------------------------
// Calls a backend function to add a front-end event (specified by the attributes 'data-myevent' and 'data-myparam-plugin' on the passed element) to an execution queue
function addToExecutionQueue_settingEvent(element)
{
function execute_settingEvent(element) {
feEvent = $(element).attr('data-myevent');
fePlugin = $(element).attr('data-myparam-plugin');
feSetKey = $(element).attr('data-myparam-setkey');
feParam = $(element).attr('data-myparam');
feSourceId = $(element).attr('id');
if (["test", "run"].includes(feEvent)) {
// Calls a backend function to add a front-end event (specified by the attributes 'data-myevent' and 'data-myparam-plugin' on the passed element) to an execution queue
// value has to be in format event|param. e.g. run|ARPSCAN
action = `${getGuid()}|${$(element).attr('data-myevent')}|${$(element).attr('data-myparam-plugin')}`
action = `${getGuid()}|${feEvent}|${fePlugin}`
$.ajax({
method: "POST",
@@ -246,29 +253,138 @@ function getCellValue(row, index) {
updateModalState()
}
})
}
} else if (["add_option"].includes(feEvent)) {
showModalFieldInput (
'<i class="fa fa-square-plus pointer"></i> ' + getString('Gen_Add'),
getString('Gen_Add'),
getString('Gen_Cancel'),
getString('Gen_Okay'),
'', // curValue
'addOptionFromModalInput',
feSourceId // triggered by id
);
} else if (["add_icon"].includes(feEvent)) {
// --------------------------------------------------------
// Updating the execution queue in in modal pop-up
function updateModalState() {
setTimeout(function() {
// Fetch the content from the log file using an AJAX request
$.ajax({
url: '/log/execution_queue.log',
type: 'GET',
success: function(data) {
// Update the content of the HTML element (e.g., a div with id 'logContent')
$('#'+modalEventStatusId).html(data);
// Add new icon as base64 string
showModalInput (
'<i class="fa fa-square-plus pointer"></i> ' + getString('DevDetail_button_AddIcon'),
getString('DevDetail_button_AddIcon_Help'),
getString('Gen_Cancel'),
getString('Gen_Okay'),
() => addIconAsBase64(element), // Wrap in an arrow function
feSourceId // triggered by id
);
} else if (["copy_icons"].includes(feEvent)) {
updateModalState();
},
error: function() {
// Handle error, such as the file not being found
$('#logContent').html('Error: Log file not found.');
}
});
}, 2000);
// Ask overwrite icon types
showModalWarning (
getString('DevDetail_button_OverwriteIcons'),
getString('DevDetail_button_OverwriteIcons_Warning'),
getString('Gen_Cancel'),
getString('Gen_Okay'),
'overwriteIconType'
);
} else if (["go_to_node"].includes(feEvent)) {
goToNetworkNode('NEWDEV_devParentMAC');
} else {
console.warn(`🔺Not implemented: ${feEvent}`)
}
}
// -----------------------------------------------------------------------------
// Go to the correct network node in the Network section
function goToNetworkNode(dropdownId)
{
setCache('activeNetworkTab', $('#'+dropdownId).val().replaceAll(":","_")+'_id');
window.location.href = './network.php';
}
// --------------------------------------------------------
// Updating the execution queue in in modal pop-up
function updateModalState() {
setTimeout(function() {
// Fetch the content from the log file using an AJAX request
$.ajax({
url: '/log/execution_queue.log',
type: 'GET',
success: function(data) {
// Update the content of the HTML element (e.g., a div with id 'logContent')
$('#'+modalEventStatusId).html(data);
updateModalState();
},
error: function() {
// Handle error, such as the file not being found
$('#logContent').html('Error: Log file not found.');
}
});
}, 2000);
}
// --------------------------------------------------------
// A method to add option to select and make it selected
function addOptionFromModalInput() {
var inputVal = $(`#modal-field-input-field`).val();
console.log($('#modal-field-input-field'));
var triggeredBy = $('#modal-field-input').attr("data-myparam-triggered-by");
var targetId = $('#' + triggeredBy).attr("data-myparam-setkey");
// Add new option and set it as selected
$('#' + targetId).append(new Option(inputVal, inputVal)).val(inputVal);
}
// --------------------------------------------------------
// Generate a random MAC address starting 00:1A
function generate_NEWDEV_devMac() {
const randomHexPair = () => Math.floor(Math.random() * 256).toString(16).padStart(2, '0').toUpperCase();
$('#NEWDEV_devMac').val(`00:1A:${randomHexPair()}:${randomHexPair()}:${randomHexPair()}:${randomHexPair()}`.toLowerCase());
}
// --------------------------------------------------------
// Generate a random IP address starting 192.
function generate_NEWDEV_devLastIP() {
const randomByte = () => Math.floor(Math.random() * 256);
$('#NEWDEV_devLastIP').val(`192.${randomByte()}.${randomByte()}.${Math.floor(Math.random() * 254) + 1}`);
}
// -----------------------------------------------------------------------------
// A method to add an Icon as an option to select and make it selected
function addIconAsBase64 (el) {
var iconHtml = $('#modal-input-textarea').val();
console.log(iconHtml);
iconHtmlBase64 = btoa(iconHtml.replace(/"/g, "'"));
console.log(iconHtmlBase64);
console.log($('#modal-field-input-field'));
var triggeredBy = $('#modal-input').attr("data-myparam-triggered-by");
var targetId = $('#' + triggeredBy).attr("data-myparam-setkey");
// $('#'+targetId).val(iconHtmlBase64);
// Add new option and set it as selected
$('#' + targetId).append(new Option(iconHtmlBase64, iconHtmlBase64)).val(iconHtmlBase64);
updateIconPreview(el)
}
// -----------------------------------------------------------------------------
@@ -324,15 +440,14 @@ function initSelect2() {
}
}
// init select2 after dom laoded
// init functions after dom loaded
window.addEventListener("load", function() {
// try to initialize select2
// try to initialize
setTimeout(() => {
initSelect2()
initializeiCheck();
}, 1000);
});
console.log("init ui_components.js")

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,8 @@
<?php
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
?>
<div class="col-md-12">
<div class="callout callout-warning">

View File

@@ -0,0 +1,57 @@
<?php
require '../server/init.php';
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
function renderSmallBox($params) {
$onclickEvent = isset($params['onclickEvent']) ? $params['onclickEvent'] : '';
$color = isset($params['color']) ? $params['color'] : '';
$headerId = isset($params['headerId']) ? $params['headerId'] : '';
$headerStyle = isset($params['headerStyle']) ? $params['headerStyle'] : '';
$labelLang = isset($params['labelLang']) ? $params['labelLang'] : '';
$iconId = isset($params['iconId']) ? $params['iconId'] : '';
$iconClass = isset($params['iconClass']) ? $params['iconClass'] : '';
$dataValue = isset($params['dataValue']) ? $params['dataValue'] : '';
return '
<div class="col-lg-3 col-sm-6 col-xs-6">
<a href="#" onclick="javascript: ' . htmlspecialchars($onclickEvent) . '">
<div class="small-box ' . htmlspecialchars($color) . '">
<div class="inner">
<h3 id="' . htmlspecialchars($headerId) . '" style="' . htmlspecialchars($headerStyle) . '"> '.$dataValue.' </h3>
<p class="infobox_label">'.lang(htmlspecialchars($labelLang)).'</p>
</div>
<div class="icon">
<i id="' . htmlspecialchars($iconId) . '" class="' . htmlspecialchars($iconClass) . '"></i>
</div>
</div>
</a>
</div>';
}
// Load default data from JSON file
$defaultDataFile = 'device_cards_defaults.json';
$defaultData = file_exists($defaultDataFile) ? json_decode(file_get_contents($defaultDataFile), true) : [];
// Check if 'items' parameter exists and is valid JSON
$items = isset($_POST['items']) ? json_decode($_POST['items'], true) : [];
// Use default data if 'items' is not provided or cannot be decoded
if (empty($items)) {
$items = $defaultData;
}
// Generate HTML
$html = '<div class="row">';
foreach ($items as $item) {
$html .= renderSmallBox($item);
}
$html .= '</div>';
// Output generated HTML
echo $html;
exit();
?>

View File

@@ -0,0 +1,43 @@
[
{
"onclickEvent": "$('#tabDetails').trigger('click')",
"color": "bg-aqua",
"headerId": "deviceStatus",
"headerStyle": "margin-left: 0em",
"labelLang": "DevDetail_Shortcut_CurrentStatus",
"iconId": "deviceStatusIcon",
"iconClass": "",
"dataValue": "--"
},
{
"onclickEvent": "$('#tabSessions').trigger('click');",
"color": "bg-green",
"headerId": "deviceSessions",
"headerStyle": "",
"labelLang": "DevDetail_Shortcut_Sessions",
"iconId": "",
"iconClass": "fa fa-plug",
"dataValue": "--"
},
{
"onclickEvent": "$('#tabPresence').trigger('click')",
"color": "bg-yellow",
"headerId": "deviceEvents",
"headerStyle": "margin-left: 0em",
"labelLang": "DevDetail_Shortcut_Presence",
"iconId": "deviceEventsIcon",
"iconClass": "fa fa-calendar",
"dataValue": "--"
},
{
"onclickEvent": "$('#tabEvents').trigger('click');",
"color": "bg-red",
"headerId": "deviceDownAlerts",
"headerStyle": "",
"labelLang": "DevDetail_Shortcut_DownAlerts",
"iconId": "",
"iconClass": "fa fa-warning",
"dataValue": "--"
}
]

View File

@@ -68,6 +68,10 @@
},
{
"buttons": [
{
"labelStringCode": "Maint_PurgeLog",
"event": "logManage('db_is_locked.log', 'cleanLog')"
}
],
"fileName": "db_is_locked.log",
"filePath": "/app/front/log/db_is_locked.log",

View File

@@ -26,7 +26,7 @@
if (isset ($_REQUEST['action']) && !empty ($_REQUEST['action'])) {
$action = $_REQUEST['action'];
switch ($action) {
case 'getDeviceData': getDeviceData(); break;
case 'getServerDeviceData': getServerDeviceData(); break;
case 'setDeviceData': setDeviceData(); break;
case 'deleteDevice': deleteDevice(); break;
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break;
@@ -64,13 +64,59 @@
//------------------------------------------------------------------------------
// Query Device Data
//------------------------------------------------------------------------------
function getDeviceData() {
function getServerDeviceData() {
global $db;
// Request Parameters
$periodDate = getDateFromPeriod();
$mac = $_REQUEST['mac'];
// Check for "new" MAC case
if ($mac === "new") {
$now = date('Y-m-d H:i');
$deviceData = [
"devMac" => "",
"devName" => "",
"devOwner" => "",
"devType" => "",
"devVendor" => "",
"devFavorite" => 0,
"devGroup" => "",
"devComments" => "",
"devFirstConnection" => $now,
"devLastConnection" => $now,
"devLastIP" => "",
"devStaticIP" => 0,
"devScan" => 0,
"devLogEvents" => 0,
"devAlertEvents" => 0,
"devAlertDown" => 0,
"devSkipRepeated" => 0,
"devLastNotification" => "",
"devPresentLastScan" => 0,
"devIsNew" => 1,
"devLocation" => "",
"devIsArchived" => 0,
"devParentMAC" => "",
"devParentPort" => "",
"devIcon" => "",
"devGUID" => "",
"devSite" => "",
"devSSID" => "",
"devSyncHubNode" => "",
"devSourcePlugin" => "",
"devStatus" => "Unknown",
"devRandomMAC" => false,
"devSessions" => 0,
"devEvents" => 0,
"devDownAlerts" => 0,
"devPresenceHours" => 0
];
echo json_encode($deviceData);
return;
}
// Device Data
$sql = 'SELECT rowid, *,
CASE WHEN devAlertDown !=0 AND devPresentLastScan=0 THEN "Down"
@@ -143,29 +189,118 @@ function getDeviceData() {
function setDeviceData() {
global $db;
// sql
$sql = 'UPDATE Devices SET
devName = "'. quotes($_REQUEST['name']) .'",
devOwner = "'. quotes($_REQUEST['owner']) .'",
devType = "'. quotes($_REQUEST['type']) .'",
devVendor = "'. quotes($_REQUEST['vendor']) .'",
devIcon = "'. quotes($_REQUEST['icon']) .'",
devFavorite = "'. quotes($_REQUEST['favorite']) .'",
devGroup = "'. quotes($_REQUEST['group']) .'",
devLocation = "'. quotes($_REQUEST['location']) .'",
devComments = "'. quotes($_REQUEST['comments']) .'",
devParentMAC = "'. quotes($_REQUEST['networknode']).'",
devParentPort = "'. quotes($_REQUEST['networknodeport']).'",
devSSID = "'. quotes($_REQUEST['ssid']).'",
devSite = "'. quotes($_REQUEST['networksite']).'",
devStaticIP = "'. quotes($_REQUEST['staticIP']) .'",
devScan = "'. quotes($_REQUEST['scancycle']) .'",
devAlertEvents = "'. quotes($_REQUEST['alertevents']) .'",
devAlertDown = "'. quotes($_REQUEST['alertdown']) .'",
devSkipRepeated = "'. quotes($_REQUEST['skiprepeated']) .'",
devIsNew = "'. quotes($_REQUEST['newdevice']) .'",
devIsArchived = "'. quotes($_REQUEST['archived']) .'"
WHERE devMac="' . $_REQUEST['mac'] .'"';
// Sanitize input
$mac = quotes($_REQUEST['mac']);
$name = quotes($_REQUEST['name']);
$owner = quotes($_REQUEST['owner']);
$type = quotes($_REQUEST['type']);
$vendor = quotes($_REQUEST['vendor']);
$icon = quotes($_REQUEST['icon']);
$favorite = quotes($_REQUEST['favorite']);
$group = quotes($_REQUEST['group']);
$location = quotes($_REQUEST['location']);
$comments = quotes($_REQUEST['comments']);
$parentMac = quotes($_REQUEST['networknode']);
$parentPort = quotes($_REQUEST['networknodeport']);
$ssid = quotes($_REQUEST['ssid']);
$site = quotes($_REQUEST['networksite']);
$staticIP = quotes($_REQUEST['staticIP']);
$scancycle = quotes($_REQUEST['scancycle']);
$alertevents = quotes($_REQUEST['alertevents']);
$alertdown = quotes($_REQUEST['alertdown']);
$skiprepeated = quotes($_REQUEST['skiprepeated']);
$newdevice = quotes($_REQUEST['newdevice']);
$archived = quotes($_REQUEST['archived']);
$devFirstConnection = quotes($_REQUEST['devFirstConnection']);
$devLastConnection = quotes($_REQUEST['devLastConnection']);
$ip = quotes($_REQUEST['ip']);
$createNew = quotes($_REQUEST['createNew']);
$devNewGuid = generateGUID();
// an update
if ($_REQUEST['createNew'] == 0)
{
// UPDATE SQL query
$sql = "UPDATE Devices SET
devName = '$name',
devOwner = '$owner',
devType = '$type',
devVendor = '$vendor',
devIcon = '$icon',
devFavorite = '$favorite',
devGroup = '$group',
devLocation = '$location',
devComments = '$comments',
devParentMAC = '$parentMac',
devParentPort = '$parentPort',
devSSID = '$ssid',
devSite = '$site',
devStaticIP = '$staticIP',
devScan = '$scancycle',
devAlertEvents = '$alertevents',
devAlertDown = '$alertdown',
devSkipRepeated = '$skiprepeated',
devIsNew = '$newdevice',
devIsArchived = '$archived'
WHERE devMac = '$mac'";
} else // an INSERT
{
$sql = "INSERT INTO Devices (
devMac,
devName,
devOwner,
devType,
devVendor,
devIcon,
devFavorite,
devGroup,
devLocation,
devComments,
devParentMAC,
devParentPort,
devSSID,
devSite,
devStaticIP,
devScan,
devAlertEvents,
devAlertDown,
devSkipRepeated,
devIsNew,
devIsArchived,
devLastConnection,
devFirstConnection,
devLastIP,
devGUID
) VALUES (
'$mac',
'$name',
'$owner',
'$type',
'$vendor',
'$icon',
'$favorite',
'$group',
'$location',
'$comments',
'$parentMac',
'$parentPort',
'$ssid',
'$site',
'$staticIP',
'$scancycle',
'$alertevents',
'$alertdown',
'$skiprepeated',
'$newdevice',
'$archived',
'$devLastConnection',
'$devFirstConnection',
'$ip',
'$devNewGuid'
)
";
}
// update Data
$result = $db->query($sql);

View File

@@ -588,6 +588,18 @@ function getDevicesColumns(){
return $columns;
}
function generateGUID() {
return sprintf(
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
random_int(0, 0xffff), random_int(0, 0xffff),
random_int(0, 0xffff),
random_int(0, 0x0fff) | 0x4000, // Version 4 UUID
random_int(0, 0x3fff) | 0x8000, // Variant 1
random_int(0, 0xffff), random_int(0, 0xffff), random_int(0, 0xffff)
);
}
//------------------------------------------------------------------------------
// Simple cookie cache
//------------------------------------------------------------------------------

View File

@@ -41,6 +41,8 @@
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="lib/bootstrap/bootstrap.min.css">
<!-- iCheck -->
<script src="lib/iCheck/icheck.min.js"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="lib/font-awesome/fontawesome.min.css">

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "",
"DevDetail_Copy_Device_Title": "",
"DevDetail_Copy_Device_Tooltip": "",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "",
"DevDetail_EveandAl_AlertDown": "",
"DevDetail_EveandAl_Archived": "",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "",
"DevDetail_button_Reset": "",
"DevDetail_button_Save": "",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "",
"Device_MultiEdit_Backup": "",
"Device_MultiEdit_Fields": "",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "",
"Gen_Add": "",
"Gen_AddDevice": "",
"Gen_Add_All": "",
"Gen_All_Devices": "",
"Gen_AreYouSure": "",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "",
"Gen_Offline": "",
"Gen_Okay": "",
"Gen_Online": "",
"Gen_Purge": "",
"Gen_ReadDocs": "",
"Gen_Remove_All": "",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "",
"Gen_Warning": "",
"Gen_Work_In_Progress": "",
"Gen_create_new_device": "",
"General_display_name": "",
"General_icon": "",
"HRS_TO_KEEP_NEWDEV_description": "",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "",
"general_event_description": "",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments més vells de",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalls des del dispositiu",
"DevDetail_Copy_Device_Tooltip": "Copiar detalls del dispositius des de la llista desplegable. Tot el d'aquesta pàgina es sobre-escriurà",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Alertes",
"DevDetail_EveandAl_AlertDown": "Cancel·lar alerta",
"DevDetail_EveandAl_Archived": "Arxivat",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Dispositiu d'escaneig",
"DevDetail_EveandAl_ScanCycle_z": "No Escanejar Dispositiu",
"DevDetail_EveandAl_Skip": "Omet notificacions repetides per",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Configuració de Successos i Alertes",
"DevDetail_EveandAl_Title": "Configuració de Successos i Alertes",
"DevDetail_Events_CheckBox": "Amagar successos de connexió",
"DevDetail_GoToNetworkNode": "Navegació a la pàgina de la Xarxa del node donat.",
"DevDetail_Icon": "Icona",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Node (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "Lloc web",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Xarxa",
"DevDetail_MainInfo_Network_Title": "Xarxa",
"DevDetail_MainInfo_Owner": "Propietari",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Informació principal",
"DevDetail_MainInfo_Title": "Informació principal",
"DevDetail_MainInfo_Type": "Tipus",
"DevDetail_MainInfo_Vendor": "Venedor",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Últim Fora de línia",
"DevDetail_SessionInfo_StaticIP": "IP estàtica",
"DevDetail_SessionInfo_Status": "Estat",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Informació de la sessió",
"DevDetail_SessionInfo_Title": "Informació de la sessió",
"DevDetail_SessionTable_Additionalinfo": "Informació addicional",
"DevDetail_SessionTable_Connection": "Connexió",
"DevDetail_SessionTable_Disconnection": "Desconnexió",
@@ -133,7 +134,7 @@
"DevDetail_Shortcut_Presence": "Presència",
"DevDetail_Shortcut_Sessions": "Sessions",
"DevDetail_Tab_Details": "<i class=\"fa fa-info-circle\"></i> Detalls",
"DevDetail_Tab_Events": "<i class=\"fa fa-bolt\"></i> Esdeveniments",
"DevDetail_Tab_Events": "Esdeveniments",
"DevDetail_Tab_EventsTableDate": "Data",
"DevDetail_Tab_EventsTableEvent": "Tipus d'esdeveniment",
"DevDetail_Tab_EventsTableIP": "IP",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Estàs segur que vols sobreescriure totes les icones de tots els dispositius amb el mateix tipus de dispositiu que el tipus de dispositiu actual?",
"DevDetail_button_Reset": "Restablir canvis",
"DevDetail_button_Save": "Guardar",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Multi-edició",
"Device_MultiEdit_Backup": "Atenció, entrar valors incorrectes a continuació trencarà la configuració. Si us plau, abans feu còpia de seguretat la vostra base de dades o configuració de Dispositius (<a href=\"php/server/devices.php?action=ExportCSV\">clic per descarregar <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Llegiu com per recuperar Dispositius des d'aquest fitxer dins el <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">documentació de Còpies de seguretat</a>.",
"Device_MultiEdit_Fields": "Editar camps:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "Port GraphQL",
"Gen_Action": "Acció",
"Gen_Add": "Afegir",
"Gen_AddDevice": "",
"Gen_Add_All": "Afegeix tot",
"Gen_All_Devices": "Tots els dispositius",
"Gen_AreYouSure": "Estàs segur?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "ERROR - DB podria estar bloquejada - Fes servir F12 Eines desenvolupament -> Consola o provar-ho més tard.",
"Gen_Offline": "Fora de línia",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Elimina",
"Gen_ReadDocs": "Llegit més dins el docs.",
"Gen_Remove_All": "Esborra tot",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Actualitzar Valor",
"Gen_Warning": "Advertència",
"Gen_Work_In_Progress": "Work in progress, un bon moment per retroalimentació a https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "General",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Això és un paràmetre de manteniment <b>ELIMINANT dispositius</b>. Si s'activa (<code>0</code> està desactivat), els dispositius marcats com <b>Dispositiu Nou</b> seran eliminats si el temps de <b>Primera Sessió</b> es més vell que les hores especificades en aquest paràmetre. Faci servir aquest paràmetre si vol auto-eliminar <b>Nous Dispositius</b> després de <code>X</code> hores.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "",
"general_event_description": "",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "",
@@ -718,4 +731,4 @@
"settings_update_item_warning": "",
"test_event_icon": "",
"test_event_tooltip": ""
}
}

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "",
"DevDetail_Copy_Device_Title": "",
"DevDetail_Copy_Device_Tooltip": "",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "",
"DevDetail_EveandAl_AlertDown": "",
"DevDetail_EveandAl_Archived": "",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "",
"DevDetail_button_Reset": "",
"DevDetail_button_Save": "",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "",
"Device_MultiEdit_Backup": "",
"Device_MultiEdit_Fields": "",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "",
"Gen_Add": "",
"Gen_AddDevice": "",
"Gen_Add_All": "",
"Gen_All_Devices": "",
"Gen_AreYouSure": "",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "",
"Gen_Offline": "",
"Gen_Okay": "",
"Gen_Online": "",
"Gen_Purge": "",
"Gen_ReadDocs": "",
"Gen_Remove_All": "",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "",
"Gen_Warning": "",
"Gen_Work_In_Progress": "",
"Gen_create_new_device": "",
"General_display_name": "",
"General_icon": "",
"HRS_TO_KEEP_NEWDEV_description": "",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "",
"general_event_description": "",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "",

View File

@@ -76,6 +76,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Lösche Events älter als",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Details von Gerät kopieren",
"DevDetail_Copy_Device_Tooltip": "Details vom Gerät aus der Dropdown-Liste kopieren. Alles auf dieser Seite wird überschrieben",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Melde alle Ereignisse",
"DevDetail_EveandAl_AlertDown": "Melde Down",
"DevDetail_EveandAl_Archived": "Archivierung",
@@ -100,10 +101,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Knoten (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "Seite",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Network",
"DevDetail_MainInfo_Network_Title": "Network",
"DevDetail_MainInfo_Owner": "Eigen&shy;tümer",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Hauptinformation",
"DevDetail_MainInfo_Title": "Hauptinformation",
"DevDetail_MainInfo_Type": "Typ",
"DevDetail_MainInfo_Vendor": "Hersteller",
"DevDetail_MainInfo_mac": "MAC",
@@ -133,7 +134,7 @@
"DevDetail_SessionInfo_LastSession": "Zuletzt offline",
"DevDetail_SessionInfo_StaticIP": "Statische IP",
"DevDetail_SessionInfo_Status": "Status",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Sitzungsinformation",
"DevDetail_SessionInfo_Title": "Sitzungsinformation",
"DevDetail_SessionTable_Additionalinfo": "Zusätzliche Info",
"DevDetail_SessionTable_Connection": "Verbindung",
"DevDetail_SessionTable_Disconnection": "Trennung",
@@ -196,6 +197,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Bist du sicher, dass du alle Symbole aller Geräte mit dem gleichen Gerätetyp wie dem aktuellen Gerätetyp überschreiben willst?",
"DevDetail_button_Reset": "Verwerfen",
"DevDetail_button_Save": "Speichern",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Mehrfach-bearbeiten",
"Device_MultiEdit_Backup": "",
"Device_MultiEdit_Fields": "Felder bearbeiten:",
@@ -290,6 +292,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "Action",
"Gen_Add": "Hinzufügen",
"Gen_AddDevice": "",
"Gen_Add_All": "Alle hinzufügen",
"Gen_All_Devices": "Alle Geräte",
"Gen_AreYouSure": "Sind Sie sich sicher?",
@@ -307,6 +310,7 @@
"Gen_LockedDB": "ERROR - DB eventuell gesperrt - Nutze die Konsole in den Entwickler Werkzeugen (F12) zur Überprüfung oder probiere es später erneut.",
"Gen_Offline": "Offline",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Aufräumen",
"Gen_ReadDocs": "Mehr in der Dokumentation.",
"Gen_Remove_All": "Alle entfernen",
@@ -325,6 +329,7 @@
"Gen_Update_Value": "Wert aktualisieren",
"Gen_Warning": "Warnung",
"Gen_Work_In_Progress": "Keine Finalversion, feedback bitte unter: https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Allgemein",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Dies ist eine Wartungseinstellung <b>DELETING devices</b>. Wenn aktiviert (<code>0</code> bedeutet deaktiviert), werden als <b>\"Neues Gerät\"</b> markierte Geräte gelöscht, wenn ihre <b>erste Sitzung</b> länger her ist als in dieser Einstellung angegeben. Verwenden Sie diese Einstellung, wenn Sie <b>Neue Geräte</b> nach <code>X</code> Stunden automatisch löschen wollen.",
@@ -762,9 +767,17 @@
"WEBHOOK_URL_name": "Target URL",
"Webhooks_display_name": "Webhooks",
"Webhooks_icon": "<i class=\"fa fa-circle-nodes\"></i>",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Aktualisiert...",
"general_event_description": "Das Ereignis, das Sie ausgelöst haben, könnte eine Weile dauern, bis Hintergrundprozesse abgeschlossen sind. Die Ausführung endet, wenn die unten ausgeführte Warteschlangen abgearbeitet ist. (Siehe <a href='/maintenance.php#tab_Logging'>error log</a>, wenn Probleme auftreten.)<br/> <br/> Ausführungsschlange:",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "Format auswählen:",

View File

@@ -62,8 +62,9 @@
"CLEAR_NEW_FLAG_name": "Clear new flag",
"DAYS_TO_KEEP_EVENTS_description": "This is a maintenance setting. This specifies the number of days worth of event entries that will be kept. All older events will be deleted periodically. Also applies on Plugin Events History.",
"DAYS_TO_KEEP_EVENTS_name": "Delete events older than",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copy details from device",
"DevDetail_Copy_Device_Title": "Copy details from device",
"DevDetail_Copy_Device_Tooltip": "Copy details from device from the dropdown list. Everything on this page will be overwritten",
"DevDetail_DisplayFields_Title": "Display",
"DevDetail_EveandAl_AlertAllEvents": "Alert Events",
"DevDetail_EveandAl_AlertDown": "Alert Down",
"DevDetail_EveandAl_Archived": "Archived",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Scan Device",
"DevDetail_EveandAl_ScanCycle_z": "Don&#39;t Scan Device",
"DevDetail_EveandAl_Skip": "Skip repeated notifications for",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Events & Alerts config",
"DevDetail_EveandAl_Title": "Notifications config",
"DevDetail_Events_CheckBox": "Hide Connection Events",
"DevDetail_GoToNetworkNode": "Navigate to the Network page of the given node.",
"DevDetail_Icon": "Icon",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Node (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "Site",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Network",
"DevDetail_MainInfo_Network_Title": "Network",
"DevDetail_MainInfo_Owner": "Owner",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Main Info",
"DevDetail_MainInfo_Title": "Main Info",
"DevDetail_MainInfo_Type": "Type",
"DevDetail_MainInfo_Vendor": "Vendor",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Last Offline",
"DevDetail_SessionInfo_StaticIP": "Static IP",
"DevDetail_SessionInfo_Status": "Status",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Session Info",
"DevDetail_SessionInfo_Title": "Session Info",
"DevDetail_SessionTable_Additionalinfo": "Additional info",
"DevDetail_SessionTable_Connection": "Connection",
"DevDetail_SessionTable_Disconnection": "Disconnection",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Are you sure you want to overwrite all icons of all devices with the same device type as the current device type?",
"DevDetail_button_Reset": "Reset Changes",
"DevDetail_button_Save": "Save",
"DeviceEdit_ValidMacIp": "Enter a valid <b>Mac</b> and <b>IP</b> address.",
"Device_MultiEdit": "Multi-edit",
"Device_MultiEdit_Backup": "Careful, entering wrong values below will break your setup. Please backup your database or Devices configuration first (<a href=\"php/server/devices.php?action=ExportCSV\">click to download <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Read how to recover Devices from this file in the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Backups documentation</a>.",
"Device_MultiEdit_Fields": "Edit fields:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "GraphQL port",
"Gen_Action": "Action",
"Gen_Add": "Add",
"Gen_AddDevice": "Add Device",
"Gen_Add_All": "Add all",
"Gen_All_Devices": "All Devices",
"Gen_AreYouSure": "Are you sure?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "ERROR - DB might be locked - Check F12 Dev tools -> Console or try later.",
"Gen_Offline": "Offline",
"Gen_Okay": "Ok",
"Gen_Online": "Online",
"Gen_Purge": "Purge",
"Gen_ReadDocs": "Read more in the docs.",
"Gen_Remove_All": "Remove all",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Update Value",
"Gen_Warning": "Warning",
"Gen_Work_In_Progress": "Work in progress, good time to feedback on https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "Create dummy device",
"General_display_name": "General",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "This is a maintenance setting <b>DELETING devices</b>. If enabled (<code>0</code> is disabled), devices marked as <b>New Device</b> will be deleted if their <b>First Session</b> time was older than the specified hours in this setting. Use this setting if you want to auto-delete <b>New Devices</b> after <code>X</code> hours.",
@@ -576,7 +581,7 @@
"REPORT_MAIL_description": "If enabled an email is sent out with a list of changes you have subscribed to. Please also fill out all remaining settings related to the SMTP setup below. If facing issues, set <code>LOG_LEVEL</code> to <code>debug</code> and check the <a href=\"/maintenance.php#tab_Logging\">error log</a>.",
"REPORT_MAIL_name": "Enable email",
"REPORT_TITLE": "Report",
"RandomMAC_hover": "Autodetected - indicates if the device randomizes it's MAC address.",
"RandomMAC_hover": "Autodetected - indicates if the device randomizes it's MAC address. You can exclude specific MACs with the UI_NOT_RANDOM_MAC setting. Click to find out more.",
"Reports_Sent_Log": "Sent Reports Log",
"SCAN_SUBNETS_description": "Most on-network scanners (ARP-SCAN, NMAP, NSLOOKUP, DIG) rely on scanning specific network interfaces and subnets. Check the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md\" target=\"_blank\">subnets documentation</a> for help on this setting, especially VLANs, what VLANs are supported, or how to figure out the network mask and your interface. <br/> <br/> An alternative to on-network scanners is to enable some other Device scanners/importers that don't rely on NetAlert<sup>X</sup> having access to the network (UNIFI, dhcp.leases, PiHole, etc.). <br/> <br/> Note: The scan time itself depends on the number of IP addresses to check, so set this up carefully with the appropriate network mask and interface.",
"SCAN_SUBNETS_name": "Networks to scan",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Auto-refresh UI",
"VERSION_description": "Version or timestamp helper value to check if app was upgraded.",
"VERSION_name": "Version or timestamp",
"add_icon_event_icon": "fa-square-plus",
"add_icon_event_tooltip": "Add new icon",
"add_option_event_icon": "fa-square-plus",
"add_option_event_tooltip": "Add new value",
"copy_icons_event_icon": "fa-copy",
"copy_icons_event_tooltip": "Overwrite icons of all devices with the same device type",
"devices_old": "Refreshing...",
"general_event_description": "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you encounter issues). <br/> <br/> Execution queue:",
"general_event_title": "Executing an ad-hoc event",
"go_to_node_event_icon": "fa-square-up-right",
"go_to_node_event_tooltip": "Navigate to the Network page of the given node",
"report_guid": "Notification guid:",
"report_guid_missing": "Linked notification not found. There is a small delay between recently sent notifications and them being available. Referesh your page and cache after a few seconds. It's also possible the selected notification have been deleted during maintenance as specified in the <code>DBCLNP_NOTIFI_HIST</code> setting. <br/> <br/>The latest notification is displayed instead. The missing notification has the following GUID:",
"report_select_format": "Select Format:",

View File

@@ -74,6 +74,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Eliminar eventos anteriores a",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalles del dispositivo",
"DevDetail_Copy_Device_Tooltip": "Copiar detalles del dispositivo de la lista desplegable. Todo en esta página se sobrescribirá",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Notificaciones de eventos",
"DevDetail_EveandAl_AlertDown": "Alerta de caída",
"DevDetail_EveandAl_Archived": "Archivada",
@@ -84,7 +85,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Escanear Dispositivo",
"DevDetail_EveandAl_ScanCycle_z": "No Escanear Dispositivo",
"DevDetail_EveandAl_Skip": "Omitir notificaciones repetidas durante",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Configuración de eventos y alertas",
"DevDetail_EveandAl_Title": "Configuración de eventos y alertas",
"DevDetail_Events_CheckBox": "Ocultar eventos de conexión",
"DevDetail_GoToNetworkNode": "Navegar a la página de Internet del nodo seleccionado.",
"DevDetail_Icon": "Icono",
@@ -98,10 +99,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Nodo (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Puerto de Red HW",
"DevDetail_MainInfo_Network_Site": "Lugar",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Red",
"DevDetail_MainInfo_Network_Title": "Red",
"DevDetail_MainInfo_Owner": "Propietario",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Información principal",
"DevDetail_MainInfo_Title": "Información principal",
"DevDetail_MainInfo_Type": "Tipo",
"DevDetail_MainInfo_Vendor": "Proveedor",
"DevDetail_MainInfo_mac": "MAC",
@@ -131,7 +132,7 @@
"DevDetail_SessionInfo_LastSession": "Última conexión",
"DevDetail_SessionInfo_StaticIP": "IP estática",
"DevDetail_SessionInfo_Status": "Estado",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Información de sesión",
"DevDetail_SessionInfo_Title": "Información de sesión",
"DevDetail_SessionTable_Additionalinfo": "Información adicional",
"DevDetail_SessionTable_Connection": "Conexión",
"DevDetail_SessionTable_Disconnection": "Desconexión",
@@ -194,6 +195,7 @@
"DevDetail_button_OverwriteIcons_Warning": "¿Sobreescribir todos los iconos de todos los dispositivos con el mismo tipo que el dispositivo actual?",
"DevDetail_button_Reset": "Restablecer cambios",
"DevDetail_button_Save": "Guardar",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Edición múltiple",
"Device_MultiEdit_Backup": "Tenga cuidado, ingresar valores incorrectos o romperá su configuración. Por favor, haga una copia de seguridad de su base de datos o de la configuración de los dispositivos primero (<a href=\"php/server/devices.php?action=ExportCSV\">haga clic para descargar <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Lea cómo recuperar dispositivos de este archivo en la documentación de <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Copia de seguridad</a>.",
"Device_MultiEdit_Fields": "Editar campos:",
@@ -288,6 +290,7 @@
"GRAPHQL_PORT_name": "Puerto GraphQL",
"Gen_Action": "Acción",
"Gen_Add": "Añadir",
"Gen_AddDevice": "",
"Gen_Add_All": "Añadir todo",
"Gen_All_Devices": "Todo los dispositivos",
"Gen_AreYouSure": "¿Estás seguro?",
@@ -305,6 +308,7 @@
"Gen_LockedDB": "Fallo - La base de datos puede estar bloqueada - Pulsa F1 -> Ajustes de desarrolladores -> Consola o prueba más tarde.",
"Gen_Offline": "Desconectado",
"Gen_Okay": "Aceptar",
"Gen_Online": "",
"Gen_Purge": "Purgar",
"Gen_ReadDocs": "Lee más en los documentos.",
"Gen_Remove_All": "Quitar todo",
@@ -323,6 +327,7 @@
"Gen_Update_Value": "Actualizar valor",
"Gen_Warning": "Advertencia",
"Gen_Work_In_Progress": "Trabajo en curso, un buen momento para hacer comentarios en https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "General",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Se trata de una configuración de mantenimiento <b>BORRAR dispositivos</b>. Si está activado (<code>0</code> está desactivado), los dispositivos marcados como <b>Nuevo dispositivo</b> se eliminarán si su fecha de <b>primera sesión</b> es anterior a las horas especificadas en este ajuste. Use este ajuste si desea eliminar automáticamente <b>Nuevos dispositivos</b> después de <code>X</code> horas.",
@@ -760,9 +765,17 @@
"Webhooks_display_name": "Webhooks",
"Webhooks_icon": "<i class=\"fa fa-circle-nodes\"></i>",
"Webhooks_settings_group": "<i class=\"fa fa-circle-nodes\"></i> Webhooks",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Volviendo a actualizar....",
"general_event_description": "El evento que ha activado puede tardar un poco hasta que finalicen los procesos en segundo plano. La ejecución finalizó una vez que se vacía la cola de ejecución a continuación (consulte el <a href='/maintenance.php#tab_Logging'>registro de errores</a> si encuentra problemas). <br/> <br/> Cola de ejecución:",
"general_event_title": "Ejecutar un evento ad-hoc",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "Guía de las notificaciones:",
"report_guid_missing": "No se ha encontrado la notificación vinculada. Hay un pequeño retraso entre las notificaciones enviadas recientemente y su disponibilidad. Actualiza tu página y la caché después de unos segundos. También es posible que la notificación seleccionada se haya eliminado durante el mantenimiento, tal y como se especifica en la configuración <code>de DBCLNP_NOTIFI_HIST</code>. <br/> <br/>En su lugar, se muestra la notificación más reciente. La notificación que falta tiene el siguiente GUID:",
"report_select_format": "Selecciona el formato:",
@@ -797,4 +810,4 @@
"settings_update_item_warning": "Actualice el valor a continuación. Tenga cuidado de seguir el formato anterior. <b>O la validación no se realiza.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Guarda tus cambios antes de probar nuevos ajustes."
}
}

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Supprimer les événements plus anciens que",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copier les détails de l'appareil",
"DevDetail_Copy_Device_Tooltip": "Copier les détails de l'appareil dans la liste déroulante. Tout ce qui se trouve sur cette page sera remplacé",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Alerter les événements",
"DevDetail_EveandAl_AlertDown": "Alerte de panne",
"DevDetail_EveandAl_Archived": "Archivés",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Scanner l'appareil",
"DevDetail_EveandAl_ScanCycle_z": "Ne pas scanner l'appareil",
"DevDetail_EveandAl_Skip": "Passer les notifications répétées durant",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Configuration des événements & Alertes",
"DevDetail_EveandAl_Title": "Configuration des événements & Alertes",
"DevDetail_Events_CheckBox": "Masquer les événements de connexion",
"DevDetail_GoToNetworkNode": "Naviguer à la page Réseau pour le nœud sélectionné.",
"DevDetail_Icon": "Icône",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Nœud (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "Site",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Réseau",
"DevDetail_MainInfo_Network_Title": "Réseau",
"DevDetail_MainInfo_Owner": "Possesseur",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Informations principales",
"DevDetail_MainInfo_Title": "Informations principales",
"DevDetail_MainInfo_Type": "Type",
"DevDetail_MainInfo_Vendor": "Fabricant",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Hors ligne depuis",
"DevDetail_SessionInfo_StaticIP": "IP statique",
"DevDetail_SessionInfo_Status": "État",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Info de session",
"DevDetail_SessionInfo_Title": "Info de session",
"DevDetail_SessionTable_Additionalinfo": "Informations supplémentaires",
"DevDetail_SessionTable_Connection": "Connexion",
"DevDetail_SessionTable_Disconnection": "Déconnexion",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Êtes-vous sûr de vouloir remplacer toutes les icônes de tous les appareils du même type que l'appareil actuel?",
"DevDetail_button_Reset": "Réinitialiser les modifications",
"DevDetail_button_Save": "Enregistrer",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Édition multiple",
"Device_MultiEdit_Backup": "Attention, renseigner des valeurs non cohérentes ci-dessous peut bloquer votre paramétrage. Veillez à faire une sauvegarde de votre base de données ou de la configuration de vos appareils en premier lieu (<a href=\"php/server/devices.php?action=ExportCSV\">clisuer ici pour la télécharger <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Renseignez-vous sur comment remettre les appareils depuis ce fichier via la <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">documentation des sauvegardes</a>.",
"Device_MultiEdit_Fields": "Champs modifiables:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "Port GraphQL",
"Gen_Action": "Action",
"Gen_Add": "Ajouter",
"Gen_AddDevice": "",
"Gen_Add_All": "Ajouter tous",
"Gen_All_Devices": "Tous les appareils",
"Gen_AreYouSure": "Êtes-vous sûr?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "Erreur - La base de données est peut-être verrouillée - Vérifier avec les outils de dév via F12 -> Console ou essayer plus tard.",
"Gen_Offline": "Hors ligne",
"Gen_Okay": "OK",
"Gen_Online": "",
"Gen_Purge": "Purger",
"Gen_ReadDocs": "Plus d'infos dans la documentation.",
"Gen_Remove_All": "Enlever tous",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Valeur à mettre à jour",
"Gen_Warning": "Avertissement",
"Gen_Work_In_Progress": "Travaux en cours, c'est le bon moment pour faire un retour via la liste d'anomalies sur Github https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Général",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Paramètre de maintenance. S'il est activé (<code>0</code> s'il est désactivé), les appareils marqués comme <b>Nouvel appareil</b> seront supprimés si leur durée depuis la <b>première session</b> est plus ancienne que le nombre d'heures paramétré. Utilisez ce paramétrage si vous voulez supprimer automatiquement les <b>Nouveaux appareils</b> après <code>X</code> heures.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Rafraîchir automatiquement l'interface graphique",
"VERSION_description": "Valeur de la version ou du timestamp d'aide à vérifier si l'application a été mise à jour.",
"VERSION_name": "Version ou Timestamp",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Rafraichissement...",
"general_event_description": "L'événement que vous avez lancé peut prendre du temps avant que les tâches de fond ne soit terminées. La durée d'exécution finira une fois que la file d'exécution ci-dessous sera vide (consulter les <a href='/maintenance.php#tab_Logging'>journaux d'erreur</a> si vous rencontrez des erreurs). <br/> <br/> File d'exécution:",
"general_event_title": "Lancement d'un événement sur mesure",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "GUID de la notification:",
"report_guid_missing": "La notification associée n'a pas été trouvée. Un petit délai existe entre l'envoi d'une notification et sa disponibilité réelle pour affichage. Rafraichissez la page et votre cache après quelques secondes. Il est aussi possible que la notification sélectionnée ait été supprimée durant une opération de maintenance, comme renseigné dans le paramètre <code>DBCLNP_NOTIFI_HIST</code>. <br/> <br/> La dernière notification est affichée à sa place. La notification manquante dispose du GUID suivant:",
"report_select_format": "Sélectionner un format:",
@@ -718,4 +731,4 @@
"settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. <b>Il n'y a pas de pas de contrôle.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage."
}
}

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Elimina eventi più vecchi di",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copia dettagli dal dispositivo",
"DevDetail_Copy_Device_Tooltip": "Copia i dettagli dal dispositivo dall'elenco a discesa. Tutto in questa pagina verrà sovrascritto",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Notifica eventi",
"DevDetail_EveandAl_AlertDown": "Avviso disconnessione",
"DevDetail_EveandAl_Archived": "Archiviato",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Scansiona dispositivo",
"DevDetail_EveandAl_ScanCycle_z": "Non scansionare dispositivo",
"DevDetail_EveandAl_Skip": "Salta notifiche ripetute per",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Configurazione Eventi e avvisi",
"DevDetail_EveandAl_Title": "Configurazione Eventi e avvisi",
"DevDetail_Events_CheckBox": "Nascondi eventi di connessione",
"DevDetail_GoToNetworkNode": "Passa alla pagina Rete del nodo specificato.",
"DevDetail_Icon": "Icona",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Nodo (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Porta",
"DevDetail_MainInfo_Network_Site": "Sito",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Rete",
"DevDetail_MainInfo_Network_Title": "Rete",
"DevDetail_MainInfo_Owner": "Proprietario",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Informazioni principali",
"DevDetail_MainInfo_Title": "Informazioni principali",
"DevDetail_MainInfo_Type": "Tipo",
"DevDetail_MainInfo_Vendor": "Produttore",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Ultimo offline",
"DevDetail_SessionInfo_StaticIP": "IP statico",
"DevDetail_SessionInfo_Status": "Stato",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Info sessione",
"DevDetail_SessionInfo_Title": "Info sessione",
"DevDetail_SessionTable_Additionalinfo": "Info aggiuntive",
"DevDetail_SessionTable_Connection": "Connessione",
"DevDetail_SessionTable_Disconnection": "Disconnessione",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Sei sicuro di voler sovrascrivere tutte le icone di tutti i dispositivi con lo stesso tipo di dispositivo come l'attuale tipo di dispositivo?",
"DevDetail_button_Reset": "Reimposta modifiche",
"DevDetail_button_Save": "Salva",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Modifica multipla",
"Device_MultiEdit_Backup": "Attento, l'inserimento di valori errati di seguito interromperà la configurazione. Effettua prima il backup del database o della configurazione dei dispositivi (<a href=\"php/server/devices.php?action=ExportCSV\">fai clic per scaricare <i class=\"fa-solid fa-download fa-bounce\"></i> </a>). Leggi come ripristinare i dispositivi da questo file nella <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\" _blank\">Documentazione di backup</a>.",
"Device_MultiEdit_Fields": "Modifica campi:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "Porta GraphQL",
"Gen_Action": "Azione",
"Gen_Add": "Aggiungi",
"Gen_AddDevice": "",
"Gen_Add_All": "Aggiungi tutti",
"Gen_All_Devices": "Tutti i dispositivi",
"Gen_AreYouSure": "Sei sicuro?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "ERRORE: il DB potrebbe essere bloccato, controlla F12 Strumenti di sviluppo -> Console o riprova più tardi.",
"Gen_Offline": "Offline",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Svuota",
"Gen_ReadDocs": "Maggiori informazioni nella documentazione.",
"Gen_Remove_All": "Rimuovi tutti",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Aggiorna valore",
"Gen_Warning": "Avviso",
"Gen_Work_In_Progress": "Lavori in corso, è quindi un buon momento per un feedback su https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Generale",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Questa è un'impostazione di manutenzione <b>ELIMINAZIONE dispositivi</b>. Se abilitata (<code>0</code> è disabilitata), tutti i dispositivi marcati con <b>Nuovo dispositivo</b> verranno eliminati se l'orario della <b>Prima sessione</b> è precedente all'orario di questa impostazione. Usa questa impostazione se vuoi eliminare automaticamente i <b>Nuovi dispositivi</b> dopo <code>X</code> ore.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Aggiorna automaticamente la UI",
"VERSION_description": "Valore di supporto della versione o della marca temporale per verificare se l'app è stata aggiornata.",
"VERSION_name": "Versione o marca temporale",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Aggiornamento...",
"general_event_description": "L'evento che hai attivato potrebbe richiedere del tempo prima che i processi in background vengano completati. L'esecuzione è terminata una volta che la coda di esecuzione sottostante si è svuotata (controlla il <a href='/maintenance.php#tab_Logging'>log degli errori</a> se riscontri problemi). <br/> <br/> Coda di esecuzione:",
"general_event_title": "Esecuzione di un evento ad-hoc",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "GUID notifica:",
"report_guid_missing": "Notifica collegata non trovata. C'è un piccolo ritardo tra la disponibilità delle notifiche inviate di recente e la loro disponibilità. Aggiorna la pagina e la cache dopo alcuni secondi. È anche possibile che la notifica selezionata sia stata eliminata durante la manutenzione come specificato nell'impostazione <code>DBCLNP_NOTIFI_HIST</code>. <br/> <br/>Viene invece visualizzata l'ultima notifica. La notifica mancante ha il seguente GUID:",
"report_select_format": "Seleziona formato:",
@@ -718,4 +731,4 @@
"settings_update_item_warning": "Aggiorna il valore qui sotto. Fai attenzione a seguire il formato precedente. <b>La convalida non viene eseguita.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Salva le modifiche prima di provare le nuove impostazioni."
}
}

View File

@@ -12,7 +12,7 @@ global $db;
$result = $db->querySingle("SELECT setValue FROM Settings WHERE setKey = 'UI_LANG'");
// below has to match exactly teh values in /front/php/templates/language/lang.php & /front/js/common.js
// below has to match exactly the values in /front/php/templates/language/lang.php & /front/js/common.js
switch($result){
case 'Spanish': $pia_lang_selected = 'es_es'; break;
case 'German': $pia_lang_selected = 'de_de'; break;

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Slett hendelser eldre enn",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Kopier detaljer fra enhet",
"DevDetail_Copy_Device_Tooltip": "Kopier detaljer fra enheten via nedtrekks menyen. Alt på denne siden vil bli overskrevet",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Varsel Alle Hendelser",
"DevDetail_EveandAl_AlertDown": "Varsel Nede",
"DevDetail_EveandAl_Archived": "Arkivert",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Skann Enhet",
"DevDetail_EveandAl_ScanCycle_z": "Don&#39;t Skann Enhet",
"DevDetail_EveandAl_Skip": "Hopp over gjentatte varsler for",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Hendelse og Varslings konfigurasjon",
"DevDetail_EveandAl_Title": "Hendelse og Varslings konfigurasjon",
"DevDetail_Events_CheckBox": "Skjul Tilkoblingshendelser",
"DevDetail_GoToNetworkNode": "Naviger til Nettverkssiden på noden.",
"DevDetail_Icon": "Ikon",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Node (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Nettverk",
"DevDetail_MainInfo_Network_Title": "Nettverk",
"DevDetail_MainInfo_Owner": "Eier",
"DevDetail_MainInfo_SSID": "",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Hovedinfo",
"DevDetail_MainInfo_Title": "Hovedinfo",
"DevDetail_MainInfo_Type": "Type",
"DevDetail_MainInfo_Vendor": "Leverandør",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Siste Sesjon",
"DevDetail_SessionInfo_StaticIP": "Statisk IP",
"DevDetail_SessionInfo_Status": "Status",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Sesjonsinformasjon",
"DevDetail_SessionInfo_Title": "Sesjonsinformasjon",
"DevDetail_SessionTable_Additionalinfo": "Tilleggsinformasjon",
"DevDetail_SessionTable_Connection": "Koble til",
"DevDetail_SessionTable_Disconnection": "Koble fra",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Er du sikker på at du vil overskrive alle ikonene på alle enheter med samme enhetstype som gjeldende enhetstype?",
"DevDetail_button_Reset": "Tilbakestill endringer",
"DevDetail_button_Save": "Lagre",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Multiredigering",
"Device_MultiEdit_Backup": "Forsiktig, hvis du legger inn feil verdier nedenfor, vil oppsettet ditt ødelegges. Ta sikkerhetskopi av databasen eller enhetskonfigurasjonen først (<a href=\"php/server/devices.php?action=ExportCSV\">klikk for å laste ned <i class=\"fa-solid fa-download fa-bounce\"></i> </a>). Les hvordan du gjenoppretter enheter fra denne filen i <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Sikkerhetskopierings dokumentasjon</a>.",
"Device_MultiEdit_Fields": "Rediger felt:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "Handling",
"Gen_Add": "Legg til",
"Gen_AddDevice": "",
"Gen_Add_All": "Legg til alle",
"Gen_All_Devices": "",
"Gen_AreYouSure": "Er du sikker?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "FEIL - DB kan være låst - Sjekk F12 Dev tools -> Konsoll eller prøv senere.",
"Gen_Offline": "Frakoblet",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Rensing",
"Gen_ReadDocs": "Les mer i dokumentasjonen.",
"Gen_Remove_All": "Fjern alle",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Oppdater verdi",
"Gen_Warning": "Advarsel",
"Gen_Work_In_Progress": "Work in progress, gjerne kom med tilbakemeldinger på https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Generelt",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Dette er en vedlikeholdsinnstilling. Hvis aktivert (<code>0</code> er deaktivert), vil enheter merket som <b>Ny Enhet</b> bli slettet hvis tiden deres for <b>Første økt</b> var eldre enn de angitte timene i denne innstilling. Bruk denne innstillingen hvis du vil automatisk slette <b>Nye Enheter</b> etter <code>X</code> timer.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Oppdater UI automatisk",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Oppdaterer...",
"general_event_description": "Hendelsen du har utløst kan ta en stund til før bakgrunnsprosesser er ferdig. Utførelsen ble avsluttet når utførelseskøen nedenfor tømmes (sjekk <a href='/maintenance.php#tab_Logging'>Feillogg</a> Hvis du møter problemer). <br/> <br/> Utførelseskø:",
"general_event_title": "Utfører en ad-hoc hendelse",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "Notifikasjons GUID:",
"report_guid_missing": "Koblet notifikasjon ikke funnet. Det er en liten forsinkelse mellom nylig sendt notifikasjoner og at de er tilgjengelige. Oppdater siden din og hurtigbufferen etter noen sekunder. Det er også mulig den valgte notifikasjonen er slettet under vedlikehold som spesifisert i <code>DBCLNP_NOTIFI_HIST</code> innstillingen. <br/> <br/> Den siste notifikasjonen vises i stedet. Den manglende notifikasjonen har følgende GUID:",
"report_select_format": "Velg format:",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Usuń wydarzenia starsze niż",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i>Kopiuj opis z urządzenia",
"DevDetail_Copy_Device_Tooltip": "Kopiuj opis z urządzenia z listy rozwijanej. Wszystko na tej stronie zostanie nadpisane",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Powiadamiaj o wszystkich wydarzeniach",
"DevDetail_EveandAl_AlertDown": "Wyłącz powiadomienia",
"DevDetail_EveandAl_Archived": "Zarchiwizowane",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Skanuj Urządzenie",
"DevDetail_EveandAl_ScanCycle_z": "Nie skanuj Urządzenia",
"DevDetail_EveandAl_Skip": "Pomiń powtarzające się powiadomienia przez",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Konfiguracja powiadomień i alertów",
"DevDetail_EveandAl_Title": "Konfiguracja powiadomień i alertów",
"DevDetail_Events_CheckBox": "Ukryj wydarzenia połączeń",
"DevDetail_GoToNetworkNode": "Przenieś do strony Sieć danego węzła.",
"DevDetail_Icon": "Ikona",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Węzeł (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Port",
"DevDetail_MainInfo_Network_Site": "Lokalizacja",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Sieć",
"DevDetail_MainInfo_Network_Title": "Sieć",
"DevDetail_MainInfo_Owner": "Właściciel",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Główne informacje",
"DevDetail_MainInfo_Title": "Główne informacje",
"DevDetail_MainInfo_Type": "Typ",
"DevDetail_MainInfo_Vendor": "Dostawca",
"DevDetail_MainInfo_mac": "MAC",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Czy na pewno chcesz nadpisać wszystkie ikony dla urządzeń o tym samym typie co to urządzenie?",
"DevDetail_button_Reset": "Zresetuj Zmiany",
"DevDetail_button_Save": "Zapisz",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Multi-edycja",
"Device_MultiEdit_Backup": "Ostrożnie, wprowadzenie błędnych wartości poniżej może zepsuć konfiguracje. Najpierw wykonaj kopie zapasową bazy danych lub konfiguracji Urządzeń (<a href=\"php/server/devices.php?action=ExportCSV\">kliknij aby pobrać<i class=\"fa-solid fa-download fa-bounce\"></i></a>). Przeczytaj jak odzyskać Urządzenia z tego pliku w <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Dokumentacji Kopii Zapasowej</a>.",
"Device_MultiEdit_Fields": "Edytuj pola:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "Akcja",
"Gen_Add": "Dodaj",
"Gen_AddDevice": "",
"Gen_Add_All": "Dodaj wszystko",
"Gen_All_Devices": "Wszystkie urządzenia",
"Gen_AreYouSure": "Jesteś pewien?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "BŁĄD - BAZA DANYCH może być zablokowana - Sprawdź F12 narzędzia dewelopera -> Konsola lub spróbuj ponownie później.",
"Gen_Offline": "Wyłączone",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Wyczyść",
"Gen_ReadDocs": "Przeczytaj więcej w dokumentacji.",
"Gen_Remove_All": "Usuń wszystko",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Aktualizuj Wartość",
"Gen_Warning": "Uwaga",
"Gen_Work_In_Progress": "Praca w toku, dobry czas na feedback https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Ogólne",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "To jest ustawienie konserwacyjne. Jeżeli uruchomione (<code>0</code> jest wyłączone), urządzenie oznaczone jako <b>Nowe Urządzenie</b> zostanie usunięte jeżeli czas <b>Pierwszej Sesji</b> jest starszy niż godzina podana w tym ustawieniu. Uzyj tego ustawienia jeżeli chcesz automatycznie usuwać <b>Nowe Urządzenia</b> po <code>X</code> godzinach.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Automatycznie odświeżaj UI",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Odświeżanie...",
"general_event_description": "Wydarzenie które wyzwoliłeś może chwilę zająć dopóki procesy w tle nie zakończą się. Wykonanie zakończy się kiedy kolejka się opróżni (Sprawdź <a href='/maintenance.php#tab_Logging'>logi błędów</a> jeżeli napotkasz błędy).<br/><br/> Kolejka wykonywania:",
"general_event_title": "Wykonywanie wydarzeń ad-hoc",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "Przewodnik powiadomień:",
"report_guid_missing": "Linkowane powiadomienie nie znaleziono. Jest małe opóźnienie między wysłaniem powiadomienia a ich dostępnością. Odśwież stronę i cache za kilka sekund. Możliwe też że zaznaczone powiadomienie zostało usunięte podczas konserwacji tak jak określono w ustawieniu <code>DBCLNP_NOTIFI_HIST</code>. <br/><br/>Zamiast tego wyświetlane jest najnowsze powiadomienie. Brakujące powiadomienie ma następujące GUID:",
"report_select_format": "Wybierz Format:",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Excluir eventos mais antigos que",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalhes do dispositivo",
"DevDetail_Copy_Device_Tooltip": "Copiar detalhes do dispositivo a partir da lista pendente. Tudo o que se encontra nesta página será substituído",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Alerte Todos os Eventos",
"DevDetail_EveandAl_AlertDown": "Alerta Desligado",
"DevDetail_EveandAl_Archived": "Arquivado",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Rastrear Dispositivo",
"DevDetail_EveandAl_ScanCycle_z": "Não Rastrear Dispositivo",
"DevDetail_EveandAl_Skip": "Pular notificações repetidas para",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Configuração de Eventos & Alertas",
"DevDetail_EveandAl_Title": "Configuração de Eventos & Alertas",
"DevDetail_Events_CheckBox": "Esconder Eventos de Conexão",
"DevDetail_GoToNetworkNode": "Navega para a página Rede do nó indicado.",
"DevDetail_Icon": "Icone",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"> </i> Node (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i>Porta",
"DevDetail_MainInfo_Network_Site": "Site",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Rede",
"DevDetail_MainInfo_Network_Title": "Rede",
"DevDetail_MainInfo_Owner": "Proprietário",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Informações principais",
"DevDetail_MainInfo_Title": "Informações principais",
"DevDetail_MainInfo_Type": "Tipo",
"DevDetail_MainInfo_Vendor": "Vendedor",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Último offline",
"DevDetail_SessionInfo_StaticIP": "IP estático",
"DevDetail_SessionInfo_Status": "Estado",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Informações de Sessão",
"DevDetail_SessionInfo_Title": "Informações de Sessão",
"DevDetail_SessionTable_Additionalinfo": "Informações adicionais",
"DevDetail_SessionTable_Connection": "Conexão",
"DevDetail_SessionTable_Disconnection": "Desconexão",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Tem certeza de que deseja substituir todos os ícones de todos os dispositivos pelo mesmo tipo de dispositivo do tipo de dispositivo atual?",
"DevDetail_button_Reset": "Redefinir alterações",
"DevDetail_button_Save": "Salvar",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Edição múltipla",
"Device_MultiEdit_Backup": "Cuidado, inserir valores errados abaixo interromperá sua configuração. Faça backup do seu banco de dados ou da configuração dos dispositivos primeiro (<a href=\"php/server/devices.php?action=ExportCSV\">clique para baixar <i class=\"fa-solid fa-download fa-bounce\"></i> </a>). Leia como recuperar dispositivos deste arquivo no <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\" _blank\">Documentação de backups</a>.",
"Device_MultiEdit_Fields": "Editar campos:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "Ação",
"Gen_Add": "Adicionar",
"Gen_AddDevice": "",
"Gen_Add_All": "Adicionar todos",
"Gen_All_Devices": "Todos os Dispositivos",
"Gen_AreYouSure": "Tem certeza?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "ERRO - O banco de dados pode estar bloqueado - Verifique F12 Ferramentas de desenvolvimento -> Console ou tente mais tarde.",
"Gen_Offline": "Offline",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "Purge",
"Gen_ReadDocs": "Leia mais em documentos.",
"Gen_Remove_All": "Remover tudo",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Atualizar valor",
"Gen_Warning": "Aviso",
"Gen_Work_In_Progress": "Trabalho em andamento, um bom momento para enviar feedback em https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Geral",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Esta é uma configuração de manutenção. Se habilitada (<code>0</code> is disabled), dispositivos marcados como <b>Novo Dispositivo</b> serão excluídos se o tempo de <b>Primeira Sessão</b> for mais antigo que as horas especificadas nesta configuração. Use esta configuração se quiser excluir automaticamente <b>Novos Dispositivos</b> após <code>X</code> horas.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "",
"general_event_description": "",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Удалить события старше",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Скопировать данные с устройства",
"DevDetail_Copy_Device_Tooltip": "Скопируйте данные с устройства из раскрывающегося списка. Все на этой странице будет перезаписано",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "Оповещения о событиях",
"DevDetail_EveandAl_AlertDown": "Оповещение о доступности",
"DevDetail_EveandAl_Archived": "Архив",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "Сканировать Устройство",
"DevDetail_EveandAl_ScanCycle_z": "Не сканировать устройство",
"DevDetail_EveandAl_Skip": "Пропустить повторные уведомления",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> Конфигурация событий и оповещений",
"DevDetail_EveandAl_Title": "Конфигурация событий и оповещений",
"DevDetail_Events_CheckBox": "Скрыть события подключения",
"DevDetail_GoToNetworkNode": "Перейти на страницу Сеть данного узла.",
"DevDetail_Icon": "Значок",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> Узел (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> Порт",
"DevDetail_MainInfo_Network_Site": "Сайт",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> Сеть",
"DevDetail_MainInfo_Network_Title": "Сеть",
"DevDetail_MainInfo_Owner": "Владелец",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> Основное",
"DevDetail_MainInfo_Title": "Основное",
"DevDetail_MainInfo_Type": "Тип",
"DevDetail_MainInfo_Vendor": "Поставщик",
"DevDetail_MainInfo_mac": "MAC адрес",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "Последний оффлайн",
"DevDetail_SessionInfo_StaticIP": "Статический IP",
"DevDetail_SessionInfo_Status": "Статус",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Информация о сеансе",
"DevDetail_SessionInfo_Title": "Информация о сеансе",
"DevDetail_SessionTable_Additionalinfo": "Дополнительная информация",
"DevDetail_SessionTable_Connection": "Подключение",
"DevDetail_SessionTable_Disconnection": "Отключение",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "Вы уверены, что хотите перезаписать все значки всех устройств с тем же типом устройства, что и текущий тип устройства?",
"DevDetail_button_Reset": "Сбросить изменения",
"DevDetail_button_Save": "Сохранить",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "Мультиредакт",
"Device_MultiEdit_Backup": "Будьте осторожны: ввод неправильных значений ниже приведет к поломке вашей настройки. Сначала сделайте резервную копию базы данных или конфигурации устройств (<a href=\"php/server/devices.php?action=ExportCSV\">нажмите для загрузки <i class=\"fa-solid fa-download fa-bounce\"></i></a>). О том, как восстановить Устройства из этого файла, читайте в разделе <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Документация о резервном копировании</a>.",
"Device_MultiEdit_Fields": "Редактировать поля:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "Порт GraphQL",
"Gen_Action": "Действия",
"Gen_Add": "Добавить",
"Gen_AddDevice": "",
"Gen_Add_All": "Добавить все",
"Gen_All_Devices": "Все устройства",
"Gen_AreYouSure": "Вы уверены?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "ОШИБКА - Возможно, база данных заблокирована. Проверьте инструменты разработчика F12 -> Консоль или повторите попытку позже.",
"Gen_Offline": "Оффлайн",
"Gen_Okay": "OK",
"Gen_Online": "",
"Gen_Purge": "Очистить",
"Gen_ReadDocs": "Подробнее читайте в документации.",
"Gen_Remove_All": "Удалить все",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "Обновить значение",
"Gen_Warning": "Предупреждение",
"Gen_Work_In_Progress": "Работа продолжается, самое время оставить отзыв на https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "",
"General_display_name": "Главное",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Это настройка обслуживания <b>УДАЛЕНИЕ устройств</b>. Если этот параметр включен (<code>0</code> отключен), устройства, помеченные как <b>Новое устройство</b>, будут удалены, если время их <b>Первого сеанса</b> было старше указанных в этой настройке часов. Используйте этот параметр, если вы хотите автоматически удалять <b>Новые устройства</b> через <code>X</code> часов.",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "Автоматическое обновление интерфейса",
"VERSION_description": "Вспомогательное значение версии или метки времени, позволяющее проверить, было ли приложение обновлено.",
"VERSION_name": "Версия или временная метка",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Актуализируется...",
"general_event_description": "Событие, которое вы инициировали, может занять некоторое время, прежде чем фоновые процессы завершатся. Выполнение завершится, как только очередь выполнения, указанная ниже, опустеет (Проверьте <a href='/maintenance.php#tab_Logging'>журнал ошибок</a> при возникновении проблем). <br/> <br/>· · Очередь выполнения:",
"general_event_title": "Выполнение специального события",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "Идентификатор уведомления:",
"report_guid_missing": "Связанное уведомление не найдено. Между недавно отправленными уведомлениями и их доступностью существует небольшая задержка. Обновите страницу и кэшируйте ее через несколько секунд. Также возможно, что выбранное уведомление было удалено во время обслуживания, как указано в настройке <code>DBCLNP_NOTIFI_HIST</code>. <br/> <br/>Вместо этого отображается последнее уведомление. Отсутствующее уведомление имеет следующий GUID:",
"report_select_format": "Выбрать формат:",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "",
"DevDetail_Copy_Device_Title": "",
"DevDetail_Copy_Device_Tooltip": "",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "",
"DevDetail_EveandAl_AlertDown": "",
"DevDetail_EveandAl_Archived": "",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "",
"DevDetail_SessionInfo_StaticIP": "",
"DevDetail_SessionInfo_Status": "Durum",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> Oturum Bİlgisi",
"DevDetail_SessionInfo_Title": "Oturum Bİlgisi",
"DevDetail_SessionTable_Additionalinfo": "Ek bilgi",
"DevDetail_SessionTable_Connection": "Bağlantı",
"DevDetail_SessionTable_Disconnection": "",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "",
"DevDetail_button_Reset": "Değişiklikleri Sıfırla",
"DevDetail_button_Save": "Kaydet",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "",
"Device_MultiEdit_Backup": "",
"Device_MultiEdit_Fields": "",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "Komut",
"Gen_Add": "Ekle",
"Gen_AddDevice": "",
"Gen_Add_All": "Tümünü ekle",
"Gen_All_Devices": "Tüm Cihazlar",
"Gen_AreYouSure": "Emin misiniz?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "",
"Gen_Offline": "Çevrimdışı",
"Gen_Okay": "Tamam",
"Gen_Online": "",
"Gen_Purge": ıkar",
"Gen_ReadDocs": "",
"Gen_Remove_All": "Tümünü kaldır",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "",
"Gen_Warning": "Uyarı",
"Gen_Work_In_Progress": "",
"Gen_create_new_device": "",
"General_display_name": "Genel",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "Yenileniyor...",
"general_event_description": "",
"general_event_title": "",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "",
"report_guid_missing": "",
"report_select_format": "",

View File

@@ -64,6 +64,7 @@
"DAYS_TO_KEEP_EVENTS_name": "删除早于",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> 从设备复制详细信息",
"DevDetail_Copy_Device_Tooltip": "从下拉列表中复制设备的详细信息。此页面上的所有内容都将被覆盖",
"DevDetail_DisplayFields_Title": "",
"DevDetail_EveandAl_AlertAllEvents": "提醒所有事件",
"DevDetail_EveandAl_AlertDown": "警报关闭",
"DevDetail_EveandAl_Archived": "已归档",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_ScanCycle_a": "扫描设备",
"DevDetail_EveandAl_ScanCycle_z": "不扫描设备",
"DevDetail_EveandAl_Skip": "跳过重复通知",
"DevDetail_EveandAl_Title": "<i class=\"fa fa-bolt\"></i> 事件和警报配置",
"DevDetail_EveandAl_Title": "事件和警报配置",
"DevDetail_Events_CheckBox": "隐藏连接事件",
"DevDetail_GoToNetworkNode": "导航到指定节点的网络页面。",
"DevDetail_Icon": "图标",
@@ -88,10 +89,10 @@
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> 节点 (MAC)",
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> 端口",
"DevDetail_MainInfo_Network_Site": "地点",
"DevDetail_MainInfo_Network_Title": "<i class=\"fa fa-network-wired\"></i> 网络",
"DevDetail_MainInfo_Network_Title": "网络",
"DevDetail_MainInfo_Owner": "所有者",
"DevDetail_MainInfo_SSID": "SSID",
"DevDetail_MainInfo_Title": "<i class=\"fa fa-pencil\"></i> 主要信息",
"DevDetail_MainInfo_Title": "主要信息",
"DevDetail_MainInfo_Type": "类型",
"DevDetail_MainInfo_Vendor": "制造商",
"DevDetail_MainInfo_mac": "MAC",
@@ -121,7 +122,7 @@
"DevDetail_SessionInfo_LastSession": "上次离线",
"DevDetail_SessionInfo_StaticIP": "静态 IP",
"DevDetail_SessionInfo_Status": "状态",
"DevDetail_SessionInfo_Title": "<i class=\"fa fa-calendar\"></i> 进程信息",
"DevDetail_SessionInfo_Title": "进程信息",
"DevDetail_SessionTable_Additionalinfo": "附加信息",
"DevDetail_SessionTable_Connection": "连接",
"DevDetail_SessionTable_Disconnection": "断开",
@@ -184,6 +185,7 @@
"DevDetail_button_OverwriteIcons_Warning": "您确定要覆盖与当前设备类型相同的所有设备的所有图标吗?",
"DevDetail_button_Reset": "重置",
"DevDetail_button_Save": "保存",
"DeviceEdit_ValidMacIp": "",
"Device_MultiEdit": "编辑",
"Device_MultiEdit_Backup": "小心,输入错误的值将破坏您的设置。请先备份您的数据库或设备配置(<a href=\"php/server/devices.php?action=ExportCSV\">点击下载<i class=\"fa-solid fa-download fa-bounce\"></i></a>)。在<a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">备份文档</a>中了解如何从此文件恢复设备。",
"Device_MultiEdit_Fields": "编辑:",
@@ -278,6 +280,7 @@
"GRAPHQL_PORT_name": "",
"Gen_Action": "动作",
"Gen_Add": "增加",
"Gen_AddDevice": "",
"Gen_Add_All": "全部添加",
"Gen_All_Devices": "所有设备",
"Gen_AreYouSure": "你确定吗?",
@@ -295,6 +298,7 @@
"Gen_LockedDB": "错误 - DB 可能被锁定 - 检查 F12 开发工具 -> 控制台或稍后重试。",
"Gen_Offline": "离线",
"Gen_Okay": "Ok",
"Gen_Online": "",
"Gen_Purge": "清除",
"Gen_ReadDocs": "在文档中阅读更多内容。",
"Gen_Remove_All": "全部删除",
@@ -313,6 +317,7 @@
"Gen_Update_Value": "更新值",
"Gen_Warning": "警告",
"Gen_Work_In_Progress": "工作正在进行中,欢迎在 https://github.com/jokob-sk/NetAlertX/issues 上反馈",
"Gen_create_new_device": "",
"General_display_name": "通用",
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "这是一项维护设置。如果启用(<code>0</code> 为禁用),则标记为<b>新设备</b>的设备(如果其<b>首次会话</b>时间早于此设置中指定的小时数)将被删除。如果您想在 <code>X</code> 小时后自动删除<b>新设备</b>,请使用此设置。",
@@ -681,9 +686,17 @@
"UI_REFRESH_name": "自动刷新界面",
"VERSION_description": "",
"VERSION_name": "",
"add_icon_event_icon": "",
"add_icon_event_tooltip": "",
"add_option_event_icon": "",
"add_option_event_tooltip": "",
"copy_icons_event_icon": "",
"copy_icons_event_tooltip": "",
"devices_old": "刷新中...",
"general_event_description": "您触发的事件可能需要一段时间才能完成后台进程。一旦以下执行队列清空,执行就会结束(如果遇到问题,请检查<a href='/maintenance.php#tab_Logging'>错误日志</a>)。<br/> <br/> 执行队列:",
"general_event_title": "执行自组织网络事件",
"go_to_node_event_icon": "",
"go_to_node_event_tooltip": "",
"report_guid": "通知guid",
"report_guid_missing": "未找到链接的通知。最近发送的通知与可用通知之间存在短暂延迟。几秒钟后刷新页面并缓存。所选通知也可能已在维护期间被删除,如 <code>DBCLNP_NOTIFI_HIST</code> 设置中所述。<br/> <br/>系统将改为显示最新通知。缺失的通知具有以下 GUID",
"report_select_format": "选择格式:",

View File

@@ -95,7 +95,7 @@
</div>
<!-- Modal textarea input -->
<div class="modal modal-warning fade" id="modal-input" style="display: none;">
<div class="modal modal-warning fade" id="modal-input" data-myparam-triggered-by="" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
@@ -119,7 +119,7 @@
<!-- Modal field input -->
<div class="modal modal-warning fade" id="modal-field-input" style="display: none;">
<div class="modal modal-warning fade" id="modal-field-input" data-myparam-triggered-by="" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">

View File

@@ -284,7 +284,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device MAC"
"string": "MAC"
}
],
"description": [
@@ -313,18 +313,19 @@
"name": [
{
"language_code": "en_us",
"string": "Device Name"
"string": "Name"
}
],
"description": [
{
"language_code": "en_us",
"string": "The name of the device. Uneditable as internal functionality is dependent on specific new device names."
"string": "The name of the device. If the value is set to <code>(unknown)</code> or <code>(name not found)</code> the application will try to discover the name of the device."
}
]
},
{
"function": "devOwner",
"events": ["add_option"],
"type": {
"dataType": "string",
"elements": [
@@ -345,7 +346,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Owner"
"string": "Owner"
}
],
"description": [
@@ -357,6 +358,7 @@
},
{
"function": "devType",
"events": ["add_option"],
"type": {
"dataType": "string",
"elements": [
@@ -382,7 +384,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Type"
"string": "Type"
}
],
"description": [
@@ -399,7 +401,7 @@
"elements": [
{
"elementType": "input",
"elementOptions": [{ "readonly": "true" }],
"elementOptions": [],
"transformers": []
}
]
@@ -411,13 +413,13 @@
"name": [
{
"language_code": "en_us",
"string": "Device Vendor"
"string": "Vendor"
}
],
"description": [
{
"language_code": "en_us",
"string": "The vendor of the device. Uneditable - Autodetected."
"string": "The vendor of the device. If set to empty or <code>(unknown)</code> teh app will try to auto-detect it."
}
]
},
@@ -451,6 +453,7 @@
},
{
"function": "devGroup",
"events": ["add_option"],
"type": {
"dataType": "string",
"elements": [
@@ -471,7 +474,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Group"
"string": "Group"
}
],
"description": [
@@ -486,7 +489,7 @@
"type": {
"dataType": "string",
"elements": [
{ "elementType": "input", "elementOptions": [], "transformers": [] }
{ "elementType": "textarea", "elementOptions": [], "transformers": [] }
]
},
"default_value": "",
@@ -495,7 +498,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Comments"
"string": "Comments"
}
],
"description": [
@@ -570,7 +573,7 @@
"elements": [
{
"elementType": "input",
"elementOptions": [{ "readonly": "true" }],
"elementOptions": [],
"transformers": []
}
]
@@ -638,13 +641,13 @@
"name": [
{
"language_code": "en_us",
"string": "Scan Cycle"
"string": "Scan device"
}
],
"description": [
{
"language_code": "en_us",
"string": "The default value of the <code>Scan device</code> dropdown. Enable if newly discovered devices should be scanned."
"string": "Select if the device should be scanned."
}
]
},
@@ -722,13 +725,13 @@
"name": [
{
"language_code": "en_us",
"string": "Alert Device Down"
"string": "Alert Down"
}
],
"description": [
{
"language_code": "en_us",
"string": "Indicates whether an alert should be triggered when the device goes down. The default value of the <code>Alert Down</code> checkbox."
"string": "Indicates whether an alert should be triggered when the device goes down. The device has to be down for longet than the time set in the <b>Alert Down After</b> <code>NTFPRCS_alert_down_time</code> setting."
}
]
},
@@ -759,7 +762,7 @@
"description": [
{
"language_code": "en_us",
"string": "The default value of the <code>Skip repeated notifications for</code> dropdown. Enter number of <b>hours</b> for which repeated notifications should be ignored for. If you enter <code>0</code> then you get notified on all events."
"string": "Enter number of <b>hours</b> for which repeated notifications should be ignored for. If you select <code>0</code> then you get notified on all events."
}
]
},
@@ -850,6 +853,7 @@
},
{
"function": "devLocation",
"events": ["add_option"],
"type": {
"dataType": "string",
"elements": [
@@ -870,7 +874,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Location"
"string": "Location"
}
],
"description": [
@@ -910,6 +914,7 @@
},
{
"function": "devParentMAC",
"events": ["go_to_node"],
"type": {
"dataType": "string",
"elements": [
@@ -934,7 +939,7 @@
"name": [
{
"language_code": "en_us",
"string": "Network Node MAC Address"
"string": "Network Node"
}
],
"description": [
@@ -951,7 +956,7 @@
"elements": [
{
"elementType": "input",
"elementOptions": [{ "readonly": "true" }],
"elementOptions": [],
"transformers": []
}
]
@@ -968,12 +973,69 @@
"description": [
{
"language_code": "en_us",
"string": "The port number of the network node. Uneditable."
"string": "The port number of the network node."
}
]
},
{
"function": "devSSID",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "SSID"
}
],
"description": [
{
"language_code": "en_us",
"string": "The network SSID."
}
]
},
{
"function": "devSite",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Network Site"
}
],
"description": [
{
"language_code": "en_us",
"string": "The network site."
}
]
},
{
"function": "devIcon",
"events": ["copy_icons", "add_icon"],
"type": {
"dataType": "string",
"elements": [
@@ -1013,7 +1075,7 @@
"name": [
{
"language_code": "en_us",
"string": "Device Icon"
"string": "Icon"
}
],
"description": [

View File

@@ -1,3 +1,8 @@
<?php
//------------------------------------------------------------------------------
// check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
?>
<!-- ----------------------------------------------------------------------- -->
<!-- Datatable -->

View File

@@ -464,151 +464,10 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
}
// INPUT
inputFormHtml = generateFormHtml(set, valIn);
// Parse the setType JSON string into an object
let inputHtml = '';
console.log(setKey);
console.log(setType);
const setTypeObject = JSON.parse(setType.replace(/'/g, '"'));
const dataType = setTypeObject.dataType;
const elements = setTypeObject.elements || [];
// Iterate through each element in elements array
elements.forEach(elementObj => {
const { elementType, elementOptions = [], transformers = [] } = elementObj;
const {
inputType,
readOnly,
isMultiSelect,
isOrdeable,
cssClasses,
placeholder,
suffix,
sourceIds,
separator,
editable,
valRes,
getStringKey,
onClick,
onChange,
customParams,
customId
} = handleElementOptions(setKey, elementOptions, transformers, valIn);
// override
val = valRes;
// Generate HTML based on dataType and elementType
switch (elementType) {
case 'select':
let multi = isMultiSelect ? "multiple" : "";
let addCss = isOrdeable ? "select2 select2-hidden-accessible" : "";
inputHtml += `<select onChange="settingsChanged();${onChange}"
my-data-type="${dataType}"
my-editable="${editable}"
class="form-control ${addCss}"
name="${setKey}"
id="${setKey}"
my-customparams="${customParams}"
my-customid="${customId}"
${multi}>
<option value="" id="${setKey + "_temp_"}"></option>
</select>`;
generateOptionsOrSetOptions(setKey, createArray(val), `${setKey}_temp_`, generateOptions, targetField = null, transformers);
break;
case 'input':
let checked = val === 'True' || val === '1' ? 'checked' : '';
inputType === 'checkbox' ? inputClass = 'checkbox' : inputClass = 'form-control';
inputHtml += `
<input
class="${inputClass} ${cssClasses}"
onChange="settingsChanged();${onChange}"
my-data-type="${dataType}"
my-customparams="${customParams}"
my-customid="${customId}"
id="${setKey}${suffix}"
type="${inputType}"
value="${val}"
${readOnly}
${checked}
placeholder="${placeholder}"
/>`;
break;
case 'button':
inputHtml += `
<button
class="btn btn-primary ${cssClasses}"
my-customparams="${customParams}"
my-customid="${customId}"
my-input-from="${sourceIds}"
my-input-to="${setKey}"
onclick="${onClick}">
${getString(getStringKey)}
</button>`;
break;
case 'textarea':
inputHtml += `
<textarea
class="form-control input"
my-customparams="${customParams}"
my-customid="${customId}"
my-data-type="${dataType}"
id="${setKey}"
${readOnly}>
${val}
</textarea>`;
break;
case 'span':
inputHtml += `
<span
class="${cssClasses}"
my-data-type="${dataType}"
my-customparams="${customParams}"
my-customid="${customId}"
>
${getString(getStringKey)}
</span>`;
break;
default:
console.warn(`🟥Unknown element type: ${elementType}`);
}
});
// EVENTS
// process events (e.g. run a scan, or test a notification) if associated with the setting
let eventsHtml = "";
const eventsList = createArray(set['setEvents']);
if (eventsList.length > 0) {
// console.log(eventsList)
eventsList.forEach(event => {
eventsHtml += `<span class="input-group-addon pointer"
data-myparam="${setKey}"
data-myparam-plugin="${prefix}"
data-myevent="${event}"
onclick="addToExecutionQueue_settingEvent(this)"
>
<i title="${getString(event + "_event_tooltip")}" class="fa ${getString(event + "_event_icon")}">
</i>
</span>`;
});
}
// construct final HTML for the setting
setHtml += inputHtml + eventsHtml + overrideHtml + `
// construct final HTML for the setting
setHtml += inputFormHtml + overrideHtml + `
</div>
</div>
`