diff --git a/docs/DATABASE.md b/docs/DATABASE.md index a6bce4a5..5889cb0b 100755 --- a/docs/DATABASE.md +++ b/docs/DATABASE.md @@ -13,7 +13,7 @@ | Devices | The main devices database that also contains the Network tree mappings. If `ScanCycle` is set to `0` device is not scanned. | ![Screen2][screen2] | | DHCP_Leases | Used for importing devices from DHCP_Leases files. Also leveraged by some plugins. | ![Screen3][screen3] | | Events | Used to collect connection/disconnection events. | ![Screen4][screen4] | - | Nmap_Scan | Contains results of the scheduled Nmap scan, taht is also displayed in the Nmap tab on each device. | ![Screen5][screen5] | + | Nmap_Scan | Contains results of the scheduled Nmap scan, that is also displayed in the Nmap tab on each device. | ![Screen5][screen5] | | Online_History | Used to display the `Device presence over time` chart | ![Screen6][screen6] | | Parameters | Used to pass values between the frontend and backend. | ![Screen7][screen7] | | Pholus_Scan | Scan results of the Pholus python network penetration script. | ![Screen8][screen8] | diff --git a/front/deviceDetails.php b/front/deviceDetails.php index 7fb46aa2..a72bdc62 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -852,6 +852,7 @@ function main () { var urlParams = new URLSearchParams(window.location.search); if (urlParams.has ('mac') == true) { mac = urlParams.get ('mac'); + setCache("piaDeviceDetailsMac", mac); // set cookie } else { $('#pageTitle').html ('Device not found'); } @@ -1544,7 +1545,10 @@ function performSwitch(direction) // get new mac from the devicesList. Don't change to the commented out line below, the mac query string in the URL isn't updated yet! // mac = params.mac; + mac = devicesList[pos].mac.toString(); + + setCache("piaDeviceDetailsMac", mac); getDeviceData (true); diff --git a/front/pluginsCore.php b/front/pluginsCore.php index ff40305d..346a05aa 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -2,25 +2,54 @@ - -
-
+ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/pialert/initialise.py b/pialert/initialise.py index 15ee9fc6..aab1d671 100755 --- a/pialert/initialise.py +++ b/pialert/initialise.py @@ -58,9 +58,6 @@ def importConfigs (db): return conf.lastImportedConfFile = os.path.getmtime(config_file) - - - mylog('debug', ['[Import Config] importing config file']) conf.mySettings = [] # reset settings @@ -86,14 +83,6 @@ def importConfigs (db): conf.DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', 'integer', '', 'General') conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', 'integer', "0", 'General') - # # New device defaults - # conf.NEWDEV_SCAN = ccd('NEWDEV_SCAN', 1 , c_d, 'Scan Device', 'integer.select', "['0', '1']", 'NewDeviceDefaults') - # conf.NEWDEV_ALERT_ALL = ccd('NEWDEV_ALERT_ALL', 0 , c_d, 'Alert All Events', 'integer.select', "['0', '1']", 'NewDeviceDefaults') - # conf.NEWDEV_ALERT_DWN = ccd('NEWDEV_ALERT_DWN', 0 , c_d, 'Alert Down', 'integer.select', "['0', '1']", 'NewDeviceDefaults') - # conf.NEWDEV_NEWDEV = ccd('NEWDEV_NEWDEV', 1 , c_d, 'New Device', 'integer.select', "['0', '1']", 'NewDeviceDefaults') - # conf.NEWDEV_ARCHIVED = ccd('NEWDEV_ARCHIVED', 0 , c_d, 'Archived', 'integer.select', "['0', '1']", 'NewDeviceDefaults') - # conf.NEWDEV_SKIPNTF = ccd('NEWDEV_SKIPNTF', 0 , c_d, 'Skip repeated notifications for', 'integer.select', "['0', '1', '8', '24', '168']", 'NewDeviceDefaults') - # Email conf.REPORT_MAIL = ccd('REPORT_MAIL', False , c_d, 'Enable email', 'boolean', '', 'Email', ['test']) conf.SMTP_SERVER = ccd('SMTP_SERVER', '' , c_d,'SMTP server URL', 'text', '', 'Email') diff --git a/pialert/plugins/newdev_template/README.md b/pialert/plugins/newdev_template/README.md index b6787517..2deb9d40 100755 --- a/pialert/plugins/newdev_template/README.md +++ b/pialert/plugins/newdev_template/README.md @@ -8,4 +8,4 @@ A simple template-based plugin for new devices. You can change the default value ### Notes -- This plugin generates editable settings taht are then used in the `device.py` script to initialize new values. \ No newline at end of file +- This plugin generates editable settings that are then used in the `device.py` script to initialize new values. \ No newline at end of file diff --git a/pialert/plugins/nmap_services/config.json b/pialert/plugins/nmap_services/config.json index d38eed86..848b752a 100755 --- a/pialert/plugins/nmap_services/config.json +++ b/pialert/plugins/nmap_services/config.json @@ -3,6 +3,13 @@ "unique_prefix": "NMAPSRV", "enabled": true, "data_source": "pialert-db-query", + "data_filters": [ + { + "column" : "Object_PrimaryID", + "function" : "==", + "filter_field_id": "txtMacFilter" + } + ], "localized": ["display_name", "description", "icon"], "display_name" : [{ "language_code":"en_us",