mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
dhcplss #420 work
This commit is contained in:
@@ -21,6 +21,7 @@ services:
|
|||||||
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
|
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
|
||||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases
|
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases
|
||||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases
|
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases
|
||||||
|
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp_pihole.leases:/etc/pihole/dhcp.leases
|
||||||
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db
|
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db
|
||||||
- ${DEV_LOCATION}/pialert:/home/pi/pialert/pialert
|
- ${DEV_LOCATION}/pialert:/home/pi/pialert/pialert
|
||||||
- ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
|
- ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
|
||||||
|
|||||||
@@ -262,9 +262,9 @@ if ($ENABLED_DARKMODE === True) {
|
|||||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('help_faq.php') ) ){ echo 'active'; } ?>">
|
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('help_faq.php') ) ){ echo 'active'; } ?>">
|
||||||
<a href="help_faq.php"><i class="fa fa-question"></i> <span><?= lang('Navigation_HelpFAQ');?></span></a>
|
<a href="help_faq.php"><i class="fa fa-question"></i> <span><?= lang('Navigation_HelpFAQ');?></span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('donations.php') ) ){ echo 'active'; } ?>">
|
<!-- <li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('donations.php') ) ){ echo 'active'; } ?>">
|
||||||
<a href="donations.php"><i class="fa fa-heart"></i> <span><?= lang('Navigation_Donations');?></span></a>
|
<a href="donations.php"><i class="fa fa-heart"></i> <span><?= lang('Navigation_Donations');?></span></a>
|
||||||
</li>
|
</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- /.sidebar-menu -->
|
<!-- /.sidebar-menu -->
|
||||||
|
|||||||
@@ -31,17 +31,16 @@ def main():
|
|||||||
|
|
||||||
if values.paths:
|
if values.paths:
|
||||||
for path in values.paths.split('=')[1].split(','):
|
for path in values.paths.split('=')[1].split(','):
|
||||||
plug_objects_tmp = get_entries(path, plugin_objects)
|
plugin_objects = get_entries(path, plugin_objects)
|
||||||
mylog('verbose', [f'[DHCPLSS] {len(plug_objects_tmp)} Entries found in "{path}"'])
|
mylog('verbose', [f'[DHCPLSS] {len(plugin_objects)} Entries found in "{path}"'])
|
||||||
plugin_objects = plugin_objects + plug_objects_tmp
|
|
||||||
|
|
||||||
plugin_objects.write_result_file()
|
plugin_objects.write_result_file()
|
||||||
|
|
||||||
def get_entries(path, plugin_objects):
|
def get_entries(path, plugin_objects):
|
||||||
if 'pihole' in path:
|
if 'pihole' in path:
|
||||||
data = []
|
|
||||||
reporting = False
|
|
||||||
with open(piholeDhcpleases, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
row = line.rstrip().split()
|
row = line.rstrip().split()
|
||||||
if len(row) == 5:
|
if len(row) == 5:
|
||||||
|
|||||||
Reference in New Issue
Block a user