mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -3,7 +3,7 @@ name: docker
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 14 * * 0 # every sunday at 14:00
|
||||
- cron: 0 0 1 * * # The first of the month at 00:00
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
19
README.md
19
README.md
@@ -25,6 +25,9 @@ JavaScript)*
|
||||
![Main screen dark][main_dark]
|
||||
Dark mode (and Device presence over time) within this fork courtesy of [leiweibau](https://github.com/leiweibau/Pi.Alert)
|
||||
|
||||
## Modifications within this Fork
|
||||
... will follow soon
|
||||
|
||||
## How it works
|
||||
The system continuously scans the network for:
|
||||
- New devices
|
||||
@@ -102,9 +105,18 @@ With the work of [jokob-sk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert) and o
|
||||
Initially designed to run on a Raspberry Pi, probably it can run on many other
|
||||
Linux distributions.
|
||||
|
||||
> ⚠ Please note, this [fork (jokob-sk)](https://github.com/jokob-sk/Pi.Alert) is only tested via the [docker install method](dockerfiles/README.md)
|
||||
|
||||
Instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/)
|
||||
|
||||
- One-step Automated Install:
|
||||
#### `curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_install.sh | bash`
|
||||
|
||||
Instructions for [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/)
|
||||
|
||||
- One-step Automated Install:
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install.sh | bash`
|
||||
|
||||
|
||||
- One-step Automated Install without Webserver if another Webserver is already installed. (not recommended):
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_install_no_webserver.sh | bash`
|
||||
|
||||
@@ -113,7 +125,10 @@ Linux distributions.
|
||||
|
||||
# Update
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
- One-step Automated Update:
|
||||
- One-step Automated Update (pucherot):
|
||||
#### `curl -sSL https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_update.sh | bash`
|
||||
|
||||
- One-step Automated Update (leiweibau):
|
||||
#### `curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh | bash`
|
||||
|
||||
# Uninstall process
|
||||
|
||||
@@ -1206,7 +1206,7 @@ def email_reporting ():
|
||||
mail_html = mail_html.replace ('<REPORT_DATE>', timeFormated)
|
||||
|
||||
# mail_text = mail_text.replace ('<SCAN_CYCLE>', cycle )
|
||||
mail_html = mail_html.replace ('<SCAN_CYCLE>', cycle )
|
||||
# mail_html = mail_html.replace ('<SCAN_CYCLE>', cycle )
|
||||
|
||||
mail_text = mail_text.replace ('<SERVER_NAME>', socket.gethostname() )
|
||||
mail_html = mail_html.replace ('<SERVER_NAME>', socket.gethostname() )
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040"> <tr>
|
||||
<td width=50%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
<td width=50%> Scan Cycle: <b><SCAN_CYCLE></b> </td>
|
||||
|
||||
<td width=100%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
VERSION = '3.5_leiweibau'
|
||||
VERSION = '3.6_leiweibau'
|
||||
VERSION_YEAR = '2022'
|
||||
VERSION_DATE = '2022-07-07'
|
||||
VERSION_DATE = '2022-07-07'
|
||||
|
||||
@@ -541,4 +541,4 @@ height: 50px;
|
||||
|
||||
.infobox_label {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ if ($_SESSION["login"] != 1)
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/server/db.php';
|
||||
?>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
@@ -262,6 +263,32 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
|
||||
<textarea class="form-control" rows="3" id="txtComments"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Network -->
|
||||
<h4 class="bottom-border-aqua"><?php echo $pia_lang['DevDetail_MainInfo_Network_Title'];?></h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-6 control-label"><?php echo $pia_lang['DevDetail_MainInfo_Network'];?></label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
|
||||
<input class="form-control" id="txtNetworkNodeMac" type="text" value="--">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false" id="buttonNetworkNodeMac">
|
||||
<span class="fa fa-caret-down"></span></button>
|
||||
<ul id="dropdownNetworkNodeMac" class="dropdown-menu dropdown-menu-right">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-6 control-label"><?php echo $pia_lang['DevDetail_MainInfo_Network_Port'];?></label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" id="txtNetworkPort" type="text" value="--">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -455,7 +482,7 @@ if ($_REQUEST['mac'] == 'Internet') {
|
||||
?>
|
||||
<h4 class="">Online Speedtest</h4>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="speedtestcli" class="btn btn-default pa-btn" style="margin: auto;" onclick="speedtestcli()">Start Speedtest</button>
|
||||
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">Start Speedtest</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -485,11 +512,11 @@ if ($_REQUEST['mac'] == 'Internet') {
|
||||
}, 2000);
|
||||
</script>
|
||||
|
||||
<button type="button" id="piamanualnmap_fast" class="btn btn-default pa-btn" style="margin: auto;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'fast')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_normal" class="btn btn-default pa-btn" style="margin: auto;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'normal')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_detail" class="btn btn-default pa-btn" style="margin: auto;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'detail')">Loading...</button>
|
||||
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(document.getElementById('txtLastIP').value, 'fast')">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(document.getElementById('txtLastIP').value, 'normal')">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(document.getElementById('txtLastIP').value, 'detail')">Loading...</button>
|
||||
|
||||
<div style="margin-top: 20px; text-align: left;">
|
||||
<div style="text-align: left;">
|
||||
<ul style="padding:20px;">
|
||||
<li><?php echo $pia_lang['DevDetail_Nmap_buttonFast_text'];?></li>
|
||||
<li><?php echo $pia_lang['DevDetail_Nmap_buttonDefault_text'];?></li>
|
||||
@@ -788,10 +815,11 @@ function initializeiCheck () {
|
||||
// -----------------------------------------------------------------------------
|
||||
function initializeCombos () {
|
||||
// Initialize combos with queries
|
||||
initializeCombo ( $('#dropdownOwner')[0], 'getOwners', 'txtOwner');
|
||||
initializeCombo ( $('#dropdownDeviceType')[0], 'getDeviceTypes', 'txtDeviceType');
|
||||
initializeCombo ( $('#dropdownGroup')[0], 'getGroups', 'txtGroup');
|
||||
initializeCombo ( $('#dropdownLocation')[0], 'getLocations', 'txtLocation');
|
||||
initializeCombo ( $('#dropdownOwner')[0], 'getOwners', 'txtOwner');
|
||||
initializeCombo ( $('#dropdownDeviceType')[0], 'getDeviceTypes', 'txtDeviceType');
|
||||
initializeCombo ( $('#dropdownGroup')[0], 'getGroups', 'txtGroup');
|
||||
initializeCombo ( $('#dropdownLocation')[0], 'getLocations', 'txtLocation');
|
||||
initializeCombo ( $('#dropdownNetworkNodeMac')[0], 'getNetworkNodes', 'txtNetworkNodeMac');
|
||||
|
||||
// Initialize static combos
|
||||
initializeComboSkipRepeated ();
|
||||
@@ -812,10 +840,17 @@ function initializeCombo (HTMLelement, queryAction, txtDataField) {
|
||||
order = item['order'];
|
||||
}
|
||||
|
||||
id = item['name'];
|
||||
// use explicitly specified id (value) if avaliable
|
||||
if(item['id'])
|
||||
{
|
||||
id = item['id'];
|
||||
}
|
||||
|
||||
// add dropdown item
|
||||
HTMLelement.innerHTML +=
|
||||
'<li><a href="javascript:void(0)" onclick="setTextValue(\''+
|
||||
txtDataField +'\',\''+ item['name'] +'\')">'+ item['name'] + '</a></li>'
|
||||
txtDataField +'\',\''+ id +'\')">'+ item['name'] + '</a></li>'
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1091,33 +1126,35 @@ function getDeviceData (readAllData=false) {
|
||||
$('#deviceStatus')[0].className = 'text-gray';
|
||||
$('#deviceStatusIcon')[0].className = '';
|
||||
|
||||
$('#deviceSessions').html ('--');
|
||||
$('#deviceDownAlerts').html ('--');
|
||||
$('#deviceEvents').html ('--');
|
||||
$('#deviceSessions').html ('--');
|
||||
$('#deviceDownAlerts').html ('--');
|
||||
$('#deviceEvents').html ('--');
|
||||
|
||||
$('#txtMAC').val ('--');
|
||||
$('#txtName').val ('--');
|
||||
$('#txtOwner').val ('--');
|
||||
$('#txtDeviceType').val ('--');
|
||||
$('#txtVendor').val ('--');
|
||||
$('#txtMAC').val ('--');
|
||||
$('#txtName').val ('--');
|
||||
$('#txtOwner').val ('--');
|
||||
$('#txtDeviceType').val ('--');
|
||||
$('#txtVendor').val ('--');
|
||||
|
||||
$('#chkFavorite').iCheck ('uncheck');
|
||||
$('#txtGroup').val ('--');
|
||||
$('#txtLocation').val ('--');
|
||||
$('#txtComments').val ('--');
|
||||
$('#chkFavorite').iCheck ('uncheck');
|
||||
$('#txtGroup').val ('--');
|
||||
$('#txtLocation').val ('--');
|
||||
$('#txtComments').val ('--');
|
||||
$('#txtNetworkNodeMac').val ('--');
|
||||
$('#txtNetworkPort').val ('--');
|
||||
|
||||
$('#txtFirstConnection').val ('--');
|
||||
$('#txtLastConnection').val ('--');
|
||||
$('#txtLastIP').val ('--');
|
||||
$('#txtStatus').val ('--');
|
||||
$('#chkStaticIP').iCheck ('uncheck');
|
||||
$('#txtFirstConnection').val ('--');
|
||||
$('#txtLastConnection').val ('--');
|
||||
$('#txtLastIP').val ('--');
|
||||
$('#txtStatus').val ('--');
|
||||
$('#chkStaticIP').iCheck ('uncheck');
|
||||
|
||||
$('#txtScanCycle').val ('--');
|
||||
$('#chkAlertEvents').iCheck ('uncheck')
|
||||
$('#chkAlertDown').iCheck ('uncheck')
|
||||
$('#txtSkipRepeated').val ('--');
|
||||
$('#chkNewDevice').iCheck ('uncheck');
|
||||
$('#chkArchived').iCheck ('uncheck');
|
||||
$('#txtScanCycle').val ('--');
|
||||
$('#chkAlertEvents').iCheck ('uncheck')
|
||||
$('#chkAlertDown').iCheck ('uncheck')
|
||||
$('#txtSkipRepeated').val ('--');
|
||||
$('#chkNewDevice').iCheck ('uncheck');
|
||||
$('#chkArchived').iCheck ('uncheck');
|
||||
|
||||
$('#iconRandomMACactive').addClass ('hidden');
|
||||
$('#iconRandomMACinactive').removeClass ('hidden');
|
||||
@@ -1192,6 +1229,8 @@ function getDeviceData (readAllData=false) {
|
||||
$('#txtGroup').val (deviceData['dev_Group']);
|
||||
$('#txtLocation').val (deviceData['dev_Location']);
|
||||
$('#txtComments').val (deviceData['dev_Comments']);
|
||||
$('#txtNetworkNodeMac').val (deviceData['dev_Network_Node_MAC']);
|
||||
$('#txtNetworkPort').val (deviceData['dev_Network_Node_port']);
|
||||
|
||||
$('#txtFirstConnection').val (deviceData['dev_FirstConnection']);
|
||||
$('#txtLastConnection').val (deviceData['dev_LastConnection']);
|
||||
@@ -1300,6 +1339,8 @@ function setDeviceData (refreshCallback='') {
|
||||
+ '&group=' + $('#txtGroup').val()
|
||||
+ '&location=' + $('#txtLocation').val()
|
||||
+ '&comments=' + $('#txtComments').val()
|
||||
+ '&networknode=' + $('#txtNetworkNodeMac').val()
|
||||
+ '&networknodeport=' + $('#txtNetworkPort').val()
|
||||
+ '&staticIP=' + ($('#chkStaticIP')[0].checked * 1)
|
||||
+ '&scancycle=' + $('#txtScanCycle').val().split(' ')[0]
|
||||
+ '&alertevents=' + ($('#chkAlertEvents')[0].checked * 1)
|
||||
@@ -1321,6 +1362,7 @@ function setDeviceData (refreshCallback='') {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function askSkipNotifications () {
|
||||
// Check MAC
|
||||
@@ -1332,7 +1374,7 @@ function askSkipNotifications () {
|
||||
if ($('#chkArchived')[0].checked && $('#txtScanCycle').val().split(' ')[0] != "0") {
|
||||
// Ask skip notifications
|
||||
showModalDefault ('Device Archived', 'Do you want to skip all notifications for this device?',
|
||||
'Cancel', 'Ok', 'skipNotifications');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Okay'];?>', 'skipNotifications');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1384,7 +1426,7 @@ function askDeleteDevice () {
|
||||
|
||||
// Ask delete device
|
||||
showModalWarning ('Delete Device', 'Are you sure you want to delete this device?<br>(maybe you prefer to archive it)',
|
||||
'Cancel', 'Delete', 'deleteDevice');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteDevice');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ $config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.*
|
||||
$protection_line = explode("=", $config_file_lines_bypass[0]);
|
||||
$Pia_WebProtection = strtolower(trim($protection_line[1]));
|
||||
|
||||
if ($Pia_WebProtection != 'true')
|
||||
if ($Pia_WebProtection == 'false')
|
||||
{
|
||||
header('Location: /pialert/devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
@@ -48,7 +48,15 @@ if ($_SESSION["login"] == 1)
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
if (file_exists('../db/setting_darkmode')) {$ENABLED_DARKMODE = True;}
|
||||
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active';
|
||||
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {
|
||||
$login_info = 'Defaultpassword "123456" is still active';
|
||||
$login_mode = 'danger';
|
||||
$login_headline = 'Password Alert!';
|
||||
$login_icon = 'fa-ban';
|
||||
} else {
|
||||
$login_mode = 'info';
|
||||
$login_headline = 'Password Information';
|
||||
$login_icon = 'fa-info';
|
||||
}
|
||||
|
||||
// ##################################################
|
||||
@@ -122,9 +130,9 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<!-- /.login-box-body -->
|
||||
|
||||
<div class="box-body" style="margin-top: 50px;">
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<div class="alert alert-<?php echo $login_mode;?> alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i>Password Alert!</h4>
|
||||
<h4><i class="icon fa <?php echo $login_icon;?>"></i><?php echo $login_headline;?></h4>
|
||||
<p><?php echo $login_info;?></p>
|
||||
<p>To set a new password run:<br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh yournewpassword</span><br>in the config folder.</p>
|
||||
</div>
|
||||
@@ -156,4 +164,4 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
@@ -310,8 +310,12 @@ if (submit && isset($_POST['langselector_set'])) {
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo $pia_lang['Maintenance_Tool_del_allevents_text'];?></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents30" onclick="askDeleteEvents30()"><?php echo $pia_lang['Maintenance_Tool_del_allevents30'];?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo $pia_lang['Maintenance_Tool_del_allevents30_text'];?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteActHistory" onclick="askDeleteActHistory()"><?php echo $pia_lang['Maintenance_Tool_del_ActHistory'];?></button>
|
||||
@@ -379,7 +383,7 @@ function deleteDevicesWithEmptyMACs()
|
||||
function askDeleteAllDevices () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_del_alldev_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_del_alldev_noti_text'];?>',
|
||||
'Cancel', 'Delete', 'deleteAllDevices');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteAllDevices');
|
||||
}
|
||||
function deleteAllDevices()
|
||||
{
|
||||
@@ -393,7 +397,7 @@ function deleteAllDevices()
|
||||
function askDeleteUnknown () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_del_unknowndev_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_del_unknowndev_noti_text'];?>',
|
||||
'Cancel', 'Delete', 'deleteUnknownDevices');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteUnknownDevices');
|
||||
}
|
||||
function deleteUnknownDevices()
|
||||
{
|
||||
@@ -407,7 +411,7 @@ function deleteUnknownDevices()
|
||||
function askDeleteEvents () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_del_allevents_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_del_allevents_noti_text'];?>',
|
||||
'Cancel', 'Delete', 'deleteEvents');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteEvents');
|
||||
}
|
||||
function deleteEvents()
|
||||
{
|
||||
@@ -417,11 +421,25 @@ function deleteEvents()
|
||||
});
|
||||
}
|
||||
|
||||
// delete all Events older than 30 days
|
||||
function askDeleteEvents30 () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_del_allevents30_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_del_allevents30_noti_text'];?>',
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteEvents30');
|
||||
}
|
||||
function deleteEvents30()
|
||||
{
|
||||
// Execute
|
||||
$.get('php/server/devices.php?action=deleteEvents30', function(msg) {
|
||||
showMessage (msg);
|
||||
});
|
||||
}
|
||||
|
||||
// delete Hostory
|
||||
function askDeleteActHistory () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_del_ActHistory_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_del_ActHistory_noti_text'];?>',
|
||||
'Cancel', 'Delete', 'deleteActHistory');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Delete'];?>', 'deleteActHistory');
|
||||
}
|
||||
function deleteActHistory()
|
||||
{
|
||||
@@ -435,7 +453,7 @@ function deleteActHistory()
|
||||
function askPiaBackupDBtoArchive () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_backup_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_backup_noti_text'];?>',
|
||||
'Cancel', 'Run Backup', 'PiaBackupDBtoArchive');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Backup'];?>', 'PiaBackupDBtoArchive');
|
||||
}
|
||||
function PiaBackupDBtoArchive()
|
||||
{
|
||||
@@ -449,7 +467,7 @@ function PiaBackupDBtoArchive()
|
||||
function askPiaRestoreDBfromArchive () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_restore_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_restore_noti_text'];?>',
|
||||
'Cancel', 'Run Restore', 'PiaRestoreDBfromArchive');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Restore'];?>', 'PiaRestoreDBfromArchive');
|
||||
}
|
||||
function PiaRestoreDBfromArchive()
|
||||
{
|
||||
@@ -463,7 +481,7 @@ function PiaRestoreDBfromArchive()
|
||||
function askPiaPurgeDBBackups() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_purgebackup_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_purgebackup_noti_text'];?>',
|
||||
'Cancel', 'Purge', 'PiaPurgeDBBackups');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Purge'];?>', 'PiaPurgeDBBackups');
|
||||
}
|
||||
function PiaPurgeDBBackups()
|
||||
{
|
||||
@@ -477,7 +495,7 @@ function PiaPurgeDBBackups()
|
||||
function askPiaEnableDarkmode() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_darkmode_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_darkmode_noti_text'];?>',
|
||||
'Cancel', 'Switch', 'PiaEnableDarkmode');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Switch'];?>', 'PiaEnableDarkmode');
|
||||
}
|
||||
function PiaEnableDarkmode()
|
||||
{
|
||||
@@ -491,7 +509,7 @@ function PiaEnableDarkmode()
|
||||
function askPiaToggleArpScan () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo $pia_lang['Maintenance_Tool_arpscansw_noti'];?>', '<?php echo $pia_lang['Maintenance_Tool_arpscansw_noti_text'];?>',
|
||||
'Cancel', 'Switch', 'PiaToggleArpScan');
|
||||
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_lang['Gen_Switch'];?>', 'PiaToggleArpScan');
|
||||
}
|
||||
function PiaToggleArpScan()
|
||||
{
|
||||
|
||||
349
front/network.php
Normal file
349
front/network.php
Normal file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ($_SESSION["login"] != 1)
|
||||
{
|
||||
header('Location: /pialert/index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/server/db.php';
|
||||
require 'php/server/util.php';
|
||||
|
||||
// online / offline badges HTML snippets
|
||||
define('badge_online', '<div class="badge bg-green text-white" style="width: 60px;">Online</div>');
|
||||
define('badge_offline', '<div class="badge bg-red text-white" style="width: 60px;">Offline</div>');
|
||||
define('circle_online', '<div class="badge bg-green text-white" style="width: 10px; height: 10px; padding:2px; margin-top: -25px;"> </div>');
|
||||
define('circle_offline', '<div class="badge bg-red text-white" style="width: 10px; height: 10px; padding:2px; margin-top: -25px;"> </div>');
|
||||
|
||||
|
||||
$DBFILE = '../db/pialert.db';
|
||||
$NETWORKTYPES = getNetworkTypes();
|
||||
|
||||
OpenDB();
|
||||
|
||||
// #####################################
|
||||
// ## Expand Devices Table
|
||||
// #####################################
|
||||
$sql = 'ALTER TABLE "Devices" ADD "dev_Network_Node_MAC" INTEGER';
|
||||
$result = $db->query($sql);
|
||||
$sql = 'ALTER TABLE "Devices" ADD "dev_Network_Node_port" INTEGER';
|
||||
$result = $db->query($sql);
|
||||
?>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?php echo $pia_lang['Network_Title'];?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo $_REQUEST['net_MAC'];
|
||||
?>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content">
|
||||
<?php
|
||||
|
||||
// Create top-level node (network devices) tabs
|
||||
function createDeviceTabs($node_mac, $node_name, $node_status, $node_type, $node_ports_count, $activetab) {
|
||||
global $pia_lang; //language strings
|
||||
|
||||
// prepare string with port number in brackets if available
|
||||
$str_port = "";
|
||||
if ($node_ports_count != "") {
|
||||
$str_port = ' ('.$node_ports_count.')';
|
||||
}
|
||||
|
||||
// online/offline status circle (red/green)
|
||||
$node_badge = "";
|
||||
if($node_status == 1) // 1 means online, 0 offline
|
||||
{
|
||||
$node_badge = circle_online;
|
||||
} else
|
||||
{
|
||||
$node_badge = circle_offline;
|
||||
}
|
||||
|
||||
|
||||
$str_tab_header = '<li class="'.$activetab.'">
|
||||
<a href="#'.str_replace(":", "_", $node_mac).'" data-toggle="tab">'
|
||||
.$node_name.' ' .$str_port.$node_badge.
|
||||
'</a>
|
||||
</li>';
|
||||
|
||||
echo $str_tab_header;
|
||||
|
||||
}
|
||||
|
||||
// Create pane content (displayed inside of the tabs)
|
||||
function createPane($node_mac, $node_name, $node_status, $node_type, $node_ports_count, $activetab){
|
||||
global $pia_lang; //language strings
|
||||
|
||||
// online/offline status circle (red/green)
|
||||
$node_badge = "";
|
||||
if($node_status == 1) // 1 means online, 0 offline
|
||||
{
|
||||
$node_badge = badge_online;
|
||||
} else
|
||||
{
|
||||
$node_badge = badge_offline;
|
||||
}
|
||||
|
||||
$str_tab_pane = '<div class="tab-pane '.$activetab.'" id="'.str_replace(":", "_", $node_mac).'">
|
||||
<a href="./deviceDetails.php?mac='.$node_mac.'">
|
||||
<h4>'.$node_name.'</h4>
|
||||
</a>
|
||||
<table class="table table-striped" style="width:200px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<b>MAC:</b>
|
||||
</td>
|
||||
<td>'
|
||||
.$node_mac.
|
||||
'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>'.$pia_lang['Device_TableHead_Type'].'</b>
|
||||
</td>
|
||||
<td>
|
||||
' .$node_type. '
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>'.$pia_lang['Network_Table_State'].':</b>
|
||||
</td>
|
||||
<td> '
|
||||
.$node_badge.
|
||||
'</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div class="box-body no-padding">';
|
||||
|
||||
$str_table = ' <h4>
|
||||
'.$pia_lang['Device_Title'].'
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 40px">Port</th>
|
||||
<th style="width: 100px">'.$pia_lang['Network_Table_State'].'</th>
|
||||
<th>'.$pia_lang['Network_Table_Hostname'].'</th>
|
||||
<th>'.$pia_lang['Network_Table_IP'].'</th>
|
||||
</tr>';
|
||||
|
||||
// Prepare Array for Devices with Port value
|
||||
// If no Port is set, the Port number is set to 0
|
||||
if ($node_ports_count == "") {
|
||||
$node_ports_count = 0;
|
||||
}
|
||||
|
||||
// Get all leafs connected to a node based on the node_mac
|
||||
$func_sql = 'SELECT dev_Network_Node_port as port,
|
||||
dev_MAC as mac,
|
||||
dev_PresentLastScan as online,
|
||||
dev_Name as name,
|
||||
dev_DeviceType as type,
|
||||
dev_LastIP as last_ip,
|
||||
(select dev_DeviceType from Devices a where dev_MAC = "'.$node_mac.'") as node_type
|
||||
FROM Devices WHERE dev_Network_Node_MAC = "'.$node_mac.'" order by port asc';
|
||||
|
||||
global $db;
|
||||
$func_result = $db->query($func_sql);
|
||||
|
||||
// array
|
||||
$tableData = array();
|
||||
while ($row = $func_result -> fetchArray (SQLITE3_ASSOC)) {
|
||||
// Push row data
|
||||
$tableData[] = array( 'port' => $row['port'],
|
||||
'mac' => $row['mac'],
|
||||
'online' => $row['online'],
|
||||
'name' => $row['name'],
|
||||
'type' => $row['type'],
|
||||
'last_ip' => $row['last_ip'],
|
||||
'node_type' => $row['node_type']);
|
||||
}
|
||||
|
||||
// Control no rows
|
||||
if (empty($tableData)) {
|
||||
$tableData = [];
|
||||
}
|
||||
|
||||
$str_table_rows = "";
|
||||
|
||||
foreach ($tableData as $row) {
|
||||
|
||||
if ($row['online'] == 1) {
|
||||
$port_state = badge_online;
|
||||
} else {
|
||||
$port_state = badge_offline;
|
||||
}
|
||||
|
||||
// prepare HTML for the port table column cell
|
||||
$port_content = "N/A";
|
||||
|
||||
if ($row['node_type'] == "WLAN" || $row['node_type'] == "AP" ) {
|
||||
$port_content = '<i class="fa fa-wifi"></i>';
|
||||
} elseif ($row['node_type'] == "Powerline")
|
||||
{
|
||||
$port_content = '<i class="fa fa-flash"></i>';
|
||||
} elseif ($row['port'] != NULL && $row['port'] != "")
|
||||
{
|
||||
$port_content = $row['port'];
|
||||
}
|
||||
|
||||
$str_table_rows = $str_table_rows.
|
||||
'<tr>
|
||||
<td style="text-align: center;">
|
||||
'.$port_content.'
|
||||
</td>
|
||||
<td>'
|
||||
.$port_state.
|
||||
'</td>
|
||||
<td style="padding-left: 10px;">
|
||||
<a href="./deviceDetails.php?mac='.$row['mac'].'">
|
||||
<b>'.$row['name'].'</b>
|
||||
</a>
|
||||
</td>
|
||||
<td>'
|
||||
.$row['last_ip'].
|
||||
'</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
|
||||
$str_table_close = '</tbody>
|
||||
</table>';
|
||||
|
||||
// no connected device - don't render table, just dispaly some info
|
||||
if($str_table_rows == "")
|
||||
{
|
||||
$str_table = "<div>
|
||||
<h4>
|
||||
".$pia_lang['Device_Title']."
|
||||
</h4>
|
||||
<div>
|
||||
This network device (node) doesn't have any assigned devices (leaf nodes).
|
||||
Go to <a href='./devices.php'><b>".$pia_lang['Device_Title']."</b></a>, select a device you want to attach to this node and assign it in the <b>Details</b> tab by selecting it in the <b>".$pia_lang['DevDetail_MainInfo_Network'] ."</b> dropdown.
|
||||
</div>
|
||||
</div>";
|
||||
$str_table_close = "";
|
||||
}
|
||||
|
||||
$str_close_pane = '</div>
|
||||
</div>';
|
||||
|
||||
// write the HTML
|
||||
echo ''.$str_tab_header.
|
||||
$str_tab_pane.
|
||||
$str_table.
|
||||
$str_table_rows.
|
||||
$str_table_close.
|
||||
$str_close_pane;
|
||||
}
|
||||
|
||||
|
||||
// Create Top level tabs (List of network devices), explanation of the terminology below:
|
||||
//
|
||||
// Switch 1 (node)
|
||||
// /(p1) \ (p2) <----- port numbers
|
||||
// / \
|
||||
// Smart TV (leaf) Switch 2 (node (for the PC) and leaf (for Switch 1))
|
||||
// \
|
||||
// PC (leaf)
|
||||
|
||||
$sql = "SELECT node_name, node_mac, online, node_type, node_ports_count
|
||||
FROM
|
||||
(
|
||||
SELECT a.dev_Name as node_name,
|
||||
a.dev_MAC as node_mac,
|
||||
a.dev_PresentLastScan as online,
|
||||
a.dev_DeviceType as node_type
|
||||
FROM Devices a
|
||||
WHERE a.dev_DeviceType in ('AP', 'Gateway', 'Powerline', 'Switch', 'WLAN', 'PLC', 'Router','USB LAN Adapter', 'USB WIFI Adapter', 'Internet')
|
||||
) t1
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT b.dev_Network_Node_MAC as node_mac_2,
|
||||
count() as node_ports_count
|
||||
FROM Devices b
|
||||
WHERE b.dev_Network_Node_MAC NOT NULL group by b.dev_Network_Node_MAC
|
||||
) t2
|
||||
ON (t1.node_mac = t2.node_mac_2);
|
||||
";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
// array
|
||||
$tableData = array();
|
||||
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
|
||||
// Push row data
|
||||
$tableData[] = array( 'node_mac' => $row['node_mac'],
|
||||
'node_name' => $row['node_name'],
|
||||
'online' => $row['online'],
|
||||
'node_type' => $row['node_type'],
|
||||
'node_ports_count' => $row['node_ports_count']);
|
||||
}
|
||||
|
||||
// Control no rows
|
||||
if (empty($tableData)) {
|
||||
$tableData = [];
|
||||
}
|
||||
|
||||
echo '<div class="nav-tabs-custom" style="margin-bottom: 0px;">
|
||||
<ul class="nav nav-tabs">';
|
||||
|
||||
$activetab='active';
|
||||
foreach ($tableData as $row) {
|
||||
createDeviceTabs( $row['node_mac'],
|
||||
$row['node_name'],
|
||||
$row['online'],
|
||||
$row['node_type'],
|
||||
$row['node_ports_count'],
|
||||
$activetab);
|
||||
|
||||
$activetab = ""; // reset active tab indicator, only the first tab is active
|
||||
|
||||
}
|
||||
echo ' </ul> <div class="tab-content">';
|
||||
|
||||
$activetab='active';
|
||||
|
||||
foreach ($tableData as $row) {
|
||||
createPane($row['node_mac'],
|
||||
$row['node_name'],
|
||||
$row['online'],
|
||||
$row['node_type'],
|
||||
$row['node_ports_count'],
|
||||
$activetab);
|
||||
|
||||
$activetab = ""; // reset active tab indicator, only the first tab is active
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
?>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<?php
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
@@ -41,8 +41,8 @@ if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
|
||||
switch ($action) {
|
||||
case 'getDeviceData': getDeviceData(); break;
|
||||
case 'setDeviceData': setDeviceData(); break;
|
||||
case 'getNetworkNodes': getNetworkNodes(); break;
|
||||
case 'deleteDevice': deleteDevice(); break;
|
||||
case 'deleteDeviceEvents': deleteDeviceEvents(); break;
|
||||
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break;
|
||||
case 'createBackupDB': createBackupDB(); break;
|
||||
case 'restoreBackupDB': restoreBackupDB(); break;
|
||||
@@ -51,7 +51,9 @@ if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
|
||||
case 'runScan1min': runScan1min(); break;
|
||||
case 'deleteUnknownDevices': deleteUnknownDevices(); break;
|
||||
case 'deleteEvents': deleteEvents(); break;
|
||||
case 'deleteEvents30': deleteEvents30(); break;
|
||||
case 'deleteActHistory': deleteActHistory(); break;
|
||||
case 'deleteDeviceEvents': deleteDeviceEvents(); break;
|
||||
case 'PiaBackupDBtoArchive': PiaBackupDBtoArchive(); break;
|
||||
case 'PiaRestoreDBfromArchive': PiaRestoreDBfromArchive(); break;
|
||||
case 'PiaPurgeDBBackups': PiaPurgeDBBackups(); break;
|
||||
@@ -94,6 +96,8 @@ function getDeviceData() {
|
||||
$deviceData = $row;
|
||||
$mac = $deviceData['dev_MAC'];
|
||||
|
||||
$deviceData['dev_Network_Node_MAC'] = $row['dev_Network_Node_MAC'];
|
||||
$deviceData['dev_Network_Node_port'] = $row['dev_Network_Node_port'];
|
||||
$deviceData['dev_FirstConnection'] = formatDate ($row['dev_FirstConnection']); // Date formated
|
||||
$deviceData['dev_LastConnection'] = formatDate ($row['dev_LastConnection']); // Date formated
|
||||
|
||||
@@ -163,6 +167,8 @@ function setDeviceData() {
|
||||
dev_Group = "'. quotes($_REQUEST['group']) .'",
|
||||
dev_Location = "'. quotes($_REQUEST['location']) .'",
|
||||
dev_Comments = "'. quotes($_REQUEST['comments']) .'",
|
||||
dev_Network_Node_MAC = "'. quotes($_REQUEST['networknode']).'",
|
||||
dev_Network_Node_port = "'. quotes($_REQUEST['networknodeport']).'",
|
||||
dev_StaticIP = "'. quotes($_REQUEST['staticIP']) .'",
|
||||
dev_ScanCycle = "'. quotes($_REQUEST['scancycle']) .'",
|
||||
dev_AlertEvents = "'. quotes($_REQUEST['alertevents']) .'",
|
||||
@@ -203,26 +209,6 @@ function deleteDevice() {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete Device Events
|
||||
//------------------------------------------------------------------------------
|
||||
function deleteDeviceEvents() {
|
||||
global $db;
|
||||
global $pia_lang;
|
||||
|
||||
// sql
|
||||
$sql = 'DELETE FROM Events WHERE eve_MAC="' . $_REQUEST['mac'] .'"';
|
||||
// execute sql
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEvents'];
|
||||
} else {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEventsError']."\n\n$sql \n\n". $db->lastErrorMsg();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete all devices with empty MAC addresses
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -263,6 +249,26 @@ function deleteUnknownDevices() {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete Device Events
|
||||
//------------------------------------------------------------------------------
|
||||
function deleteDeviceEvents() {
|
||||
global $db;
|
||||
global $pia_lang;
|
||||
|
||||
// sql
|
||||
$sql = 'DELETE FROM Events WHERE eve_MAC="' . $_REQUEST['mac'] .'"';
|
||||
// execute sql
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEvents'];
|
||||
} else {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEventsError']."\n\n$sql \n\n". $db->lastErrorMsg();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete all devices
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -303,6 +309,26 @@ function deleteEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete all Events older than 30 days
|
||||
//------------------------------------------------------------------------------
|
||||
function deleteEvents30() {
|
||||
global $db;
|
||||
global $pia_lang;
|
||||
|
||||
// sql
|
||||
$sql = "DELETE FROM Events WHERE eve_DateTime <= date('now', '-30 day')";
|
||||
// execute sql
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEvents'];
|
||||
} else {
|
||||
echo $pia_lang['BackDevices_DBTools_DelEventsError']."\n\n$sql \n\n". $db->lastErrorMsg();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete History
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -595,12 +621,43 @@ function getOwners() {
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query Device Data
|
||||
//------------------------------------------------------------------------------
|
||||
function getNetworkNodes() {
|
||||
global $db;
|
||||
|
||||
// Device Data
|
||||
$sql = 'SELECT * FROM Devices WHERE dev_DeviceType in ( "AP", "Gateway", "Powerline", "Switch", "WLAN", "PLC", "Router","USB LAN Adapter", "USB WIFI Adapter")';
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
// arrays of rows
|
||||
$tableData = array();
|
||||
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
|
||||
// Push row data
|
||||
$tableData[] = array('id' => $row['dev_MAC'],
|
||||
'name' => $row['dev_Name'] );
|
||||
}
|
||||
|
||||
// Control no rows
|
||||
if (empty($tableData)) {
|
||||
$tableData = [];
|
||||
}
|
||||
|
||||
// Return json
|
||||
echo (json_encode ($tableData));
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query the List of types
|
||||
//------------------------------------------------------------------------------
|
||||
function getDeviceTypes() {
|
||||
global $db;
|
||||
|
||||
$networkTypes = getNetworkTypes();
|
||||
|
||||
// SQL
|
||||
$sql = 'SELECT DISTINCT 9 as dev_Order, dev_DeviceType
|
||||
FROM Devices
|
||||
@@ -609,7 +666,7 @@ function getDeviceTypes() {
|
||||
"Laptop", "Mini PC", "PC", "Printer", "Server", "Singleboard Computer (SBC)",
|
||||
"Game Console", "SmartTV", "TV Decoder", "Virtual Assistance",
|
||||
"Clock", "House Appliance", "Phone", "Radio",
|
||||
"AP", "NAS", "PLC", "Router")
|
||||
"AP", "Gateway", "Powerline", "Switch", "WLAN", "PLC", "Router","USB LAN Adapter", "USB WIFI Adapter" )
|
||||
|
||||
UNION SELECT 1 as dev_Order, "Smartphone"
|
||||
UNION SELECT 1 as dev_Order, "Tablet"
|
||||
@@ -620,6 +677,7 @@ function getDeviceTypes() {
|
||||
UNION SELECT 2 as dev_Order, "Printer"
|
||||
UNION SELECT 2 as dev_Order, "Server"
|
||||
UNION SELECT 2 as dev_Order, "Singleboard Computer (SBC)"
|
||||
UNION SELECT 2 as dev_Order, "NAS"
|
||||
|
||||
UNION SELECT 3 as dev_Order, "Domotic"
|
||||
UNION SELECT 3 as dev_Order, "Game Console"
|
||||
@@ -632,8 +690,12 @@ function getDeviceTypes() {
|
||||
UNION SELECT 4 as dev_Order, "Phone"
|
||||
UNION SELECT 4 as dev_Order, "Radio"
|
||||
|
||||
-- network devices
|
||||
UNION SELECT 5 as dev_Order, "AP"
|
||||
UNION SELECT 5 as dev_Order, "NAS"
|
||||
UNION SELECT 5 as dev_Order, "Gateway"
|
||||
UNION SELECT 5 as dev_Order, "Powerline"
|
||||
UNION SELECT 5 as dev_Order, "Switch"
|
||||
UNION SELECT 5 as dev_Order, "WLAN"
|
||||
UNION SELECT 5 as dev_Order, "PLC"
|
||||
UNION SELECT 5 as dev_Order, "Router"
|
||||
UNION SELECT 5 as dev_Order, "USB LAN Adapter"
|
||||
@@ -642,6 +704,8 @@ function getDeviceTypes() {
|
||||
UNION SELECT 10 as dev_Order, "Other"
|
||||
|
||||
ORDER BY 1,2';
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
// arrays of rows
|
||||
@@ -654,8 +718,6 @@ function getDeviceTypes() {
|
||||
// Return json
|
||||
echo (json_encode ($tableData));
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Query the List of groups
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -65,4 +65,12 @@ function logServerConsole ($text) {
|
||||
$y = $x['__________'. $text .'__________'];
|
||||
}
|
||||
|
||||
function getNetworkTypes(){
|
||||
|
||||
$array = array(
|
||||
"AP", "Gateway", "Powerline", "Switch", "WLAN", "PLC", "Router","USB LAN Adapter", "USB WIFI Adapter"
|
||||
);
|
||||
|
||||
return $array;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<?php
|
||||
$conf_file = '../config/version.conf';
|
||||
$conf_data = parse_ini_file($conf_file);
|
||||
echo 'Pi.Alert  '. $conf_data['VERSION'] .'  <small>('. $conf_data['VERSION_DATE'] .')</small>';
|
||||
echo 'Pi.Alert '. $conf_data['VERSION'] .' <small>('. $conf_data['VERSION_DATE'] .')</small>';
|
||||
?>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<?php
|
||||
|
||||
require 'php/server/db.php';
|
||||
$DBFILE = '../db/pialert.db';
|
||||
OpenDB();
|
||||
|
||||
$Pia_Graph_Device_Time = array();
|
||||
$Pia_Graph_Device_All = array();
|
||||
$Pia_Graph_Device_Online = array();
|
||||
$Pia_Graph_Device_Down = array();
|
||||
$Pia_Graph_Device_Arch = array();
|
||||
$db = new SQLite3('../db/pialert.db');
|
||||
|
||||
//$db = new SQLite3('../db/pialert.db');
|
||||
$results = $db->query('SELECT * FROM Online_History ORDER BY Scan_Date DESC LIMIT 144');
|
||||
while ($row = $results->fetchArray()) {
|
||||
$time_raw = explode(' ', $row['Scan_Date']);
|
||||
|
||||
@@ -92,6 +92,7 @@ require 'php/templates/language/'.$pia_lang_selected.'.php';
|
||||
|
||||
<!-- For better UX on Mobile Devices using the Shortcut on the Homescreen -->
|
||||
<link rel="manifest" href="img/manifest.json">
|
||||
<link rel="apple-touch-icon" href="https://net-dev.de/pialert_homescreen.png">
|
||||
<!-- Dark-Mode Patch -->
|
||||
<?php
|
||||
if ($ENABLED_DARKMODE === True) {
|
||||
@@ -99,7 +100,6 @@ if ($ENABLED_DARKMODE === True) {
|
||||
$BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/boxed-bg-dark.png\');"';
|
||||
} else { $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/background.png\');"';}
|
||||
?>
|
||||
|
||||
<!-- Servertime to the right of the hostname -->
|
||||
<script>
|
||||
|
||||
@@ -152,7 +152,7 @@ function show_pia_servertime() {
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<!-- Server Name -->
|
||||
<li><a style="pointer-events:none;"><?php echo gethostname();?> <span id="PIA_Servertime_place"></a></li>
|
||||
<li><a style="pointer-events:none;"><?php echo gethostname();?> <span id="PIA_Servertime_place"></span></a></li>
|
||||
|
||||
<!-- Header right info -->
|
||||
<li class="dropdown user user-menu">
|
||||
@@ -226,6 +226,10 @@ function show_pia_servertime() {
|
||||
<a href="events.php"><i class="fa fa-bolt"></i> <span><?php echo $pia_lang['Navigation_Events'];?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="network.php"><i class="fa fa-server"></i> <span><?php echo $pia_lang['Navigation_Network'];?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('maintenance.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="maintenance.php"><i class="fa fa-cog"></i> <span><?php echo $pia_lang['Navigation_Maintenance'];?></span></a>
|
||||
</li>
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// General
|
||||
//////////////////////////////////////////////////////////////////
|
||||
$pia_lang['Gen_Delete'] = 'Löschen';
|
||||
$pia_lang['Gen_Cancel'] = 'Abbrechen';
|
||||
$pia_lang['Gen_Okay'] = 'Ok';
|
||||
$pia_lang['Gen_Purge'] = 'Aufräumen';
|
||||
$pia_lang['Gen_Backup'] = 'Sichern';
|
||||
$pia_lang['Gen_Restore'] = 'Wiederherstellen';
|
||||
$pia_lang['Gen_Switch'] = 'Umschalten';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -7,6 +18,7 @@ $pia_lang['Navigation_Devices'] = 'Geräte';
|
||||
$pia_lang['Navigation_Presence'] = 'Anwesenheit';
|
||||
$pia_lang['Navigation_Events'] = 'Ereignisse';
|
||||
$pia_lang['Navigation_Maintenance'] = 'Wartung';
|
||||
$pia_lang['Navigation_Network'] = 'Netzwerk';
|
||||
$pia_lang['Device_Title'] = 'Geräte';
|
||||
$pia_lang['Device_Shortcut_AllDevices'] = 'Alle Geräte';
|
||||
$pia_lang['Device_Shortcut_Connected'] = 'Verbunden';
|
||||
@@ -120,6 +132,8 @@ $pia_lang['DevDetail_MainInfo_Favorite'] = 'Favorit';
|
||||
$pia_lang['DevDetail_MainInfo_Group'] = 'Gruppe';
|
||||
$pia_lang['DevDetail_MainInfo_Location'] = 'Standort';
|
||||
$pia_lang['DevDetail_MainInfo_Comments'] = 'Notiz';
|
||||
$pia_lang['DevDetail_MainInfo_Network'] = 'Netzwerk Gerät (ID)';
|
||||
$pia_lang['DevDetail_MainInfo_Network_Port'] = 'Netzwerk Port';
|
||||
$pia_lang['DevDetail_SessionInfo_Title'] = 'Sitzungsinfos';
|
||||
$pia_lang['DevDetail_SessionInfo_Status'] = 'Status';
|
||||
$pia_lang['DevDetail_SessionInfo_FirstSession'] = 'Erste Sitzung';
|
||||
@@ -139,6 +153,8 @@ $pia_lang['DevDetail_EveandAl_ScanCycle_z'] = 'Gerät nicht scannen (0 min)';
|
||||
$pia_lang['DevDetail_button_Delete'] = 'Lösche Gerät';
|
||||
$pia_lang['DevDetail_button_Reset'] = 'Verwerfen';
|
||||
$pia_lang['DevDetail_button_Save'] = 'Speichern';
|
||||
$pia_lang['DevDetail_button_DeleteEvents'] = 'Lösche Events';
|
||||
$pia_lang['DevDetail_button_DeleteEvents_Warning'] = 'Sind Sie sicher, dass Sie alle Ereignisse dieses Geräts löschen möchten? (dies löscht den Ereignisverlauf und die Sitzungen und könnte bei ständigen (anhaltenden) Benachrichtigungen helfen)';
|
||||
$pia_lang['DevDetail_SessionTable_Order'] = 'Order';
|
||||
$pia_lang['DevDetail_SessionTable_Connection'] = 'Verbindung';
|
||||
$pia_lang['DevDetail_SessionTable_Disconnection'] = 'Trennung';
|
||||
@@ -252,5 +268,36 @@ $pia_lang['BackDevices_DBTools_UpgradeError'] = 'Fehler beim Aktualisieren der D
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'Die ältesten Backups wurden gelöscht.';
|
||||
$pia_lang['BackDevices_DBTools_DelActHistory'] = 'Die Anzeige der Netzwerkaktivität wurde zurückgesetzt.';
|
||||
$pia_lang['BackDevices_DBTools_DelActHistoryError'] = 'Fehler beim Zurücksetzen der Netzwerkaktivitätsanzeige.';
|
||||
?>
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Maintenance Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Network_Title'] = 'Netzwerkübersicht';
|
||||
$pia_lang['Network_ManageDevices'] = 'Geräte verwalten';
|
||||
$pia_lang['Network_ManageAdd'] = 'Gerät hinzufügen';
|
||||
$pia_lang['Network_ManageEdit'] = 'Gerät bearbeiten';
|
||||
$pia_lang['Network_ManageDel'] = 'Gerät löschen';
|
||||
$pia_lang['Network_ManageAdd_Name'] = 'Name des Gerätes';
|
||||
$pia_lang['Network_ManageAdd_Name_text'] = 'Name ohne Sonderzeichen';
|
||||
$pia_lang['Network_ManageAdd_Type'] = 'Gerätetyp';
|
||||
$pia_lang['Network_ManageAdd_Type_text'] = '-- Typ wählen --';
|
||||
$pia_lang['Network_ManageAdd_Port'] = 'Portanzahl';
|
||||
$pia_lang['Network_ManageAdd_Port_text'] = 'bei WLAN oder Powerline leer lassen';
|
||||
$pia_lang['Network_ManageAdd_Submit'] = 'Hinzufügen';
|
||||
$pia_lang['Network_ManageEdit_ID'] = 'Gerät zum Bearbeiten auswählen';
|
||||
$pia_lang['Network_ManageEdit_ID_text'] = '-- Gerät wählen --';
|
||||
$pia_lang['Network_ManageEdit_Name'] = 'Neuer Name';
|
||||
$pia_lang['Network_ManageEdit_Name_text'] = 'Name ohne Sonderzeichen';
|
||||
$pia_lang['Network_ManageEdit_Type'] = 'Neuer Typ';
|
||||
$pia_lang['Network_ManageEdit_Type_text'] = '-- Typ wählen --';
|
||||
$pia_lang['Network_ManageEdit_Port'] = 'Neue Portanzahl';
|
||||
$pia_lang['Network_ManageEdit_Port_text'] = 'bei WLAN oder Powerline leer lassen';
|
||||
$pia_lang['Network_ManageEdit_Submit'] = 'Speichern';
|
||||
$pia_lang['Network_ManageDel_Name'] = 'Gerät zum Löschen auswählen';
|
||||
$pia_lang['Network_ManageDel_Name_text'] = '-- Gerät wählen --';
|
||||
$pia_lang['Network_ManageDel_Submit'] = 'Löschen';
|
||||
$pia_lang['Network_Table_State'] = 'Status';
|
||||
$pia_lang['Network_Table_Hostname'] = 'Gerätename';
|
||||
$pia_lang['Network_Table_IP'] = 'IP';
|
||||
?>
|
||||
@@ -4,6 +4,11 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
$pia_lang['Gen_Delete'] = 'Delete';
|
||||
$pia_lang['Gen_Cancel'] = 'Cancel';
|
||||
$pia_lang['Gen_Okay'] = 'Ok';
|
||||
$pia_lang['Gen_Purge'] = 'Purge';
|
||||
$pia_lang['Gen_Backup'] = 'Run Backup';
|
||||
$pia_lang['Gen_Restore'] = 'Run Restore';
|
||||
$pia_lang['Gen_Switch'] = 'Switch';
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -14,6 +19,7 @@ $pia_lang['Navigation_Devices'] = 'Devices';
|
||||
$pia_lang['Navigation_Presence'] = 'Presence';
|
||||
$pia_lang['Navigation_Events'] = 'Events';
|
||||
$pia_lang['Navigation_Maintenance'] = 'Maintenance';
|
||||
$pia_lang['Navigation_Network'] = 'Network';
|
||||
$pia_lang['Device_Title'] = 'Devices';
|
||||
$pia_lang['Device_Shortcut_AllDevices'] = 'All Devices';
|
||||
$pia_lang['Device_Shortcut_Connected'] = 'Connected';
|
||||
@@ -127,6 +133,9 @@ $pia_lang['DevDetail_MainInfo_Favorite'] = 'Favorite';
|
||||
$pia_lang['DevDetail_MainInfo_Group'] = 'Group';
|
||||
$pia_lang['DevDetail_MainInfo_Location'] = 'Location';
|
||||
$pia_lang['DevDetail_MainInfo_Comments'] = 'Comments';
|
||||
$pia_lang['DevDetail_MainInfo_Network_Title'] = 'Network';
|
||||
$pia_lang['DevDetail_MainInfo_Network'] = 'Network Node (MAC)';
|
||||
$pia_lang['DevDetail_MainInfo_Network_Port'] = 'Connected to Port';
|
||||
$pia_lang['DevDetail_SessionInfo_Title'] = 'Session Info';
|
||||
$pia_lang['DevDetail_SessionInfo_Status'] = 'Status';
|
||||
$pia_lang['DevDetail_SessionInfo_FirstSession'] = 'First Session';
|
||||
@@ -148,6 +157,8 @@ $pia_lang['DevDetail_button_DeleteEvents'] = 'Delete Events';
|
||||
$pia_lang['DevDetail_button_DeleteEvents_Warning'] = 'Are you sure you want to delete all Events of this device?<br><br>(this will clear the <b>Events history</b> and the <b>Sessions</b> and might help with constant (persistent) notifications)';
|
||||
$pia_lang['DevDetail_button_Reset'] = 'Reset Changes';
|
||||
$pia_lang['DevDetail_button_Save'] = 'Save';
|
||||
$pia_lang['DevDetail_button_DeleteEvents'] = 'Delete Events';
|
||||
$pia_lang['DevDetail_button_DeleteEvents_Warning'] = 'Are you sure you want to delete all Events of this device?<br><br>(this will clear the <b>Events history</b> and the <b>Sessions</b> and might help with constant (persistent) notifications)';
|
||||
$pia_lang['DevDetail_SessionTable_Order'] = 'Order';
|
||||
$pia_lang['DevDetail_SessionTable_Connection'] = 'Connection';
|
||||
$pia_lang['DevDetail_SessionTable_Disconnection'] = 'Disconnection';
|
||||
@@ -213,10 +224,14 @@ $pia_lang['Maintenance_Tool_del_unknowndev'] = 'Delete (unknown) Devices';
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_text'] = 'Before using this function, please make a backup. The deletion cannot be undone. All devices named (unknown) will be deleted from the database.';
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_noti'] = 'Delete (unknown) Devices';
|
||||
$pia_lang['Maintenance_Tool_del_unknowndev_noti_text'] = 'Are you sure you want to delete all (unknown) devices?';
|
||||
$pia_lang['Maintenance_Tool_del_allevents'] = 'Delete all Events (Reset Presence)';
|
||||
$pia_lang['Maintenance_Tool_del_allevents'] = 'Delete Events (Reset Presence)';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_text'] = 'Before using this function, please make a backup. The deletion cannot be undone. All events in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as "present" although they are offline. A scan while the device in question is online solves the problem.';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_noti'] = 'Delete Events';
|
||||
$pia_lang['Maintenance_Tool_del_allevents_noti_text'] = 'Are you sure you want to delete all Events? This resets Presence of all Devices.';
|
||||
$pia_lang['Maintenance_Tool_del_allevents30'] = 'Delete all Events older than 30 days';
|
||||
$pia_lang['Maintenance_Tool_del_allevents30_text'] = 'Before using this function, please make a backup. The deletion cannot be undone. All events older than 30 days in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as "present" although they are offline. A scan while the device in question is online solves the problem.';
|
||||
$pia_lang['Maintenance_Tool_del_allevents30_noti'] = 'Delete Events';
|
||||
$pia_lang['Maintenance_Tool_del_allevents30_noti_text'] = 'Are you sure you want to delete all Events older than 30 days? This resets Presence of all Devices.';
|
||||
$pia_lang['Maintenance_Tool_backup'] = 'DB Backup';
|
||||
$pia_lang['Maintenance_Tool_backup_text'] = 'The database backups are located in the database directory as a zip-archive, named with the creation date. There is no maximum number of backups.';
|
||||
$pia_lang['Maintenance_Tool_backup_noti'] = 'DB Backup';
|
||||
@@ -259,5 +274,36 @@ $pia_lang['BackDevices_DBTools_UpdDevError'] = 'Error updating device';
|
||||
$pia_lang['BackDevices_DBTools_Upgrade'] = 'Database upgraded successfully';
|
||||
$pia_lang['BackDevices_DBTools_UpgradeError'] = 'Database upgrade failed';
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'The oldest backups were deleted';
|
||||
?>
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Network Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Network_Title'] = 'Network overview';
|
||||
$pia_lang['Network_ManageDevices'] = 'Manage Devices';
|
||||
$pia_lang['Network_ManageAdd'] = 'Add Device';
|
||||
$pia_lang['Network_ManageEdit'] = 'Update Device';
|
||||
$pia_lang['Network_ManageDel'] = 'Delete Device';
|
||||
$pia_lang['Network_ManageAdd_Name'] = 'Device Name';
|
||||
$pia_lang['Network_ManageAdd_Name_text'] = 'Name without special characters';
|
||||
$pia_lang['Network_ManageAdd_Type'] = 'Device Type';
|
||||
$pia_lang['Network_ManageAdd_Type_text'] = '-- Select Type --';
|
||||
$pia_lang['Network_ManageAdd_Port'] = 'Port Count';
|
||||
$pia_lang['Network_ManageAdd_Port_text'] = 'leave blank for wifi and powerline';
|
||||
$pia_lang['Network_ManageAdd_Submit'] = 'Add Device';
|
||||
$pia_lang['Network_ManageEdit_ID'] = 'Device to update';
|
||||
$pia_lang['Network_ManageEdit_ID_text'] = '-- Select Device for editing --';
|
||||
$pia_lang['Network_ManageEdit_Name'] = 'New Device Name';
|
||||
$pia_lang['Network_ManageEdit_Name_text'] = 'Name without special characters';
|
||||
$pia_lang['Network_ManageEdit_Type'] = 'New Device Type';
|
||||
$pia_lang['Network_ManageEdit_Type_text'] = '-- Select Type --';
|
||||
$pia_lang['Network_ManageEdit_Port'] = ' New Port Count';
|
||||
$pia_lang['Network_ManageEdit_Port_text'] = 'leave blank for wifi and powerline';
|
||||
$pia_lang['Network_ManageEdit_Submit'] = 'Save Changes';
|
||||
$pia_lang['Network_ManageDel_Name'] = 'Device to delete';
|
||||
$pia_lang['Network_ManageDel_Name_text'] = '-- Select Device --';
|
||||
$pia_lang['Network_ManageDel_Submit'] = 'Delete';
|
||||
$pia_lang['Network_Table_State'] = 'State';
|
||||
$pia_lang['Network_Table_Hostname'] = 'Hostname';
|
||||
$pia_lang['Network_Table_IP'] = 'IP';
|
||||
?>
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// General - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
$pia_lang['Gen_Delete'] = 'Eliminar';
|
||||
$pia_lang['Gen_Cancel'] = 'Cancelar';
|
||||
$pia_lang['Gen_Okay'] = 'Ok';
|
||||
$pia_lang['Gen_Purge'] = 'Purgar';
|
||||
$pia_lang['Gen_Backup'] = 'Ejecutar copia de seguridad';
|
||||
$pia_lang['Gen_Restore'] = 'Ejecutar restauración';
|
||||
$pia_lang['Gen_Switch'] = 'Cambiar';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Page - Update by @TeroRERO 25jul2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -93,7 +104,7 @@ $pia_lang['Events_Table_nav_next'] = 'Siguiente';
|
||||
$pia_lang['Events_Table_nav_prev'] = 'Anterior';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Device Details Page - Update by @TeroRERO 25jul2022
|
||||
// Device Details Page - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['DevDetail_Periodselect_today'] = 'Hoy';
|
||||
@@ -120,6 +131,8 @@ $pia_lang['DevDetail_MainInfo_Favorite'] = 'Favorito';
|
||||
$pia_lang['DevDetail_MainInfo_Group'] = 'Grupo';
|
||||
$pia_lang['DevDetail_MainInfo_Location'] = 'Ubicación';
|
||||
$pia_lang['DevDetail_MainInfo_Comments'] = 'Comentario';
|
||||
$pia_lang['DevDetail_MainInfo_Network'] = 'Hardware de Red (ID)';
|
||||
$pia_lang['DevDetail_MainInfo_Network_Port'] = 'Puerto de Red HW';
|
||||
$pia_lang['DevDetail_SessionInfo_Title'] = 'Información de sesión';
|
||||
$pia_lang['DevDetail_SessionInfo_Status'] = 'Estado';
|
||||
$pia_lang['DevDetail_SessionInfo_FirstSession'] = '1ra. sesión';
|
||||
@@ -250,4 +263,36 @@ $pia_lang['BackDevices_DBTools_UpdDevError'] = 'Error al actualizar el dispositi
|
||||
$pia_lang['BackDevices_DBTools_Upgrade'] = 'Base de datos actualizada correctamente';
|
||||
$pia_lang['BackDevices_DBTools_UpgradeError'] = 'Falló la actualización de la base de datos';
|
||||
$pia_lang['BackDevices_DBTools_Purge'] = 'Las copias de seguridad más antiguas fueron eliminadas';
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Network Page - Update by @TeroRERO 01ago2022
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
$pia_lang['Network_Title'] = 'Descripción general de la red';
|
||||
$pia_lang['Network_ManageDevices'] = 'Administrar dispositivos';
|
||||
$pia_lang['Network_ManageAdd'] = 'Añadir dispositivo';
|
||||
$pia_lang['Network_ManageEdit'] = 'Actualizar dispositivo';
|
||||
$pia_lang['Network_ManageDel'] = 'Eliminar dispositivo';
|
||||
$pia_lang['Network_ManageAdd_Name'] = 'Nombre del dispositivo';
|
||||
$pia_lang['Network_ManageAdd_Name_text'] = 'Nombre sin caracteres especiales';
|
||||
$pia_lang['Network_ManageAdd_Type'] = 'Tipo de dispositivo';
|
||||
$pia_lang['Network_ManageAdd_Type_text'] = '-- Seleccionar tipo --';
|
||||
$pia_lang['Network_ManageAdd_Port'] = 'Recuento de puertos';
|
||||
$pia_lang['Network_ManageAdd_Port_text'] = 'dejar en blanco para WiFi y Powerline';
|
||||
$pia_lang['Network_ManageAdd_Submit'] = 'Añadir dispositivo';
|
||||
$pia_lang['Network_ManageEdit_ID'] = 'Dispositivo para actualizar';
|
||||
$pia_lang['Network_ManageEdit_ID_text'] = '-- Seleccione el dispositivo para editar --';
|
||||
$pia_lang['Network_ManageEdit_Name'] = 'Nuevo nombre del dispositivo';
|
||||
$pia_lang['Network_ManageEdit_Name_text'] = 'Nombre sin caracteres especiales';
|
||||
$pia_lang['Network_ManageEdit_Type'] = 'Nuevo tipo de dispositivo';
|
||||
$pia_lang['Network_ManageEdit_Type_text'] = '-- Seleccione tipo --';
|
||||
$pia_lang['Network_ManageEdit_Port'] = ' Nuevo recuento de puertos';
|
||||
$pia_lang['Network_ManageEdit_Port_text'] = 'Dejar en blanco para WiFi y Powerline';
|
||||
$pia_lang['Network_ManageEdit_Submit'] = 'Guardar los cambios';
|
||||
$pia_lang['Network_ManageDel_Name'] = 'Dispositivo para eliminar';
|
||||
$pia_lang['Network_ManageDel_Name_text'] = '-- Seleccione el dispositivo --';
|
||||
$pia_lang['Network_ManageDel_Submit'] = 'Eliminar';
|
||||
$pia_lang['Network_Table_State'] = 'Estado';
|
||||
$pia_lang['Network_Table_Hostname'] = 'Nombre de host';
|
||||
$pia_lang['Network_Table_IP'] = 'Dirección IP';
|
||||
?>
|
||||
|
||||
0
tar/create_tar.sh
Normal file → Executable file
0
tar/create_tar.sh
Normal file → Executable file
Reference in New Issue
Block a user