Maintaining

Improve Network page and merge a7709ce6e1
This commit is contained in:
leiweibau
2022-07-30 18:52:12 +02:00
parent 8b49a5a53f
commit ace63ade46
9 changed files with 231 additions and 47 deletions

View File

@@ -427,6 +427,8 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
<!-- 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()"> <?php echo $pia_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()"> <?php echo $pia_lang['DevDetail_button_Delete'];?> </button>
<button type="button" class="btn btn-default pa-btn" style="margin-left:6px;"
@@ -1345,7 +1347,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');
}
}
@@ -1361,6 +1363,33 @@ function skipNotifications () {
activateSaveRestoreData();
}
// -----------------------------------------------------------------------------
function askDeleteDeviceEvents () {
// Check MAC
if (mac == '') {
return;
}
// Ask delete device Events
showModalWarning ('<?php echo $pia_lang['DevDetail_button_DeleteEvents'];?>', '<?php echo $pia_lang['DevDetail_button_DeleteEvents_Warning'];?>',
'<?php echo $pia_lang['Gen_Cancel'];?>', '<?php echo $pia_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
@@ -1370,7 +1399,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');
}