1 |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm |
2 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm 2023-12-19 09:44:56.678590486 +0000 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm 2023-12-19 09:44:56.678590486 +0000 |
3 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm 2023-12-30 15:31:00.000000000 +0000 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/Controller/Dhcpd.pm 2024-01-16 08:38:00.000000000 +0000 |
4 |
@@ -117,22 +117,41 @@ |
@@ -144,7 +144,7 @@ |
|
$c->render( template => 'dhcpd' ); |
|
|
} |
|
|
|
|
|
- |
|
|
-sub do_winpopup { |
|
|
- # |
|
|
- # call to win pop up |
|
|
- # |
|
|
+sub netmask2cidr { |
|
|
my $c = shift; |
|
|
- my $title = $c->l("dhcpd_GLOBAL_WINPOPUP"); |
|
|
- my $modul = ''; |
|
|
- my $trt = "WINPOPUP"; |
|
|
- $dhcp_data{trt} = $trt; |
|
|
- $dhcp_data{"first"} = ''; |
|
|
- #..... get winpopup details |
|
|
- $c->stash( title => $title, modul => $modul, dhcp_data => \%dhcp_data ); |
|
|
- $c->render( template => 'dhcpd' ); |
|
|
+ #my ($mask, $network) = @_; |
|
|
+ my $nmap_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration'); |
|
|
+ my $mask = $nmap_sme->get_value('LocalNetmask'); |
|
|
+ my $network = $nmap_sme->get_prop('InternalInterface','Network'); |
|
|
+ my @octet = split (/\./, $mask); |
|
|
+ my @bits; |
|
|
+ my $binmask; |
|
|
+ my $binoct; |
|
|
+ my $bitcount=0; |
|
|
+ |
|
|
+ foreach (@octet) { |
|
|
+ $binoct = dec2bin($_); |
|
|
+ $binmask = $binmask . substr $binoct, -8; |
|
|
+ } |
|
|
+ |
|
|
+ # let's count the 1s |
|
|
+ @bits = split (//,$binmask); |
|
|
+ foreach (@bits) { |
|
|
+ if ($_ eq "1") { |
|
|
+ $bitcount++; |
|
|
+ } |
|
|
+ } |
|
|
+ |
|
|
+ my $cidr = $network . "/" . $bitcount; |
|
|
+ return $cidr; |
|
|
+} |
|
|
+ |
|
|
+sub dec2bin { |
|
|
+ my $str = unpack("B32", pack("N", shift)); |
|
|
+ return $str; |
|
|
} |
|
|
|
|
|
+ |
|
|
sub do_scan { |
|
|
# |
|
|
# call to show scan results |
|
|
@@ -140,12 +159,13 @@ |
|
|
my $c = shift; |
|
|
my $title = $c->l("dhcpd_SCANNING_NETWORK_TITLE"); |
|
|
my $modul = ''; |
|
|
- my $trt = "NETSCAN"; |
|
|
+ my $trt = "SCAN"; |
|
5 |
$dhcp_data{trt} = $trt; |
$dhcp_data{trt} = $trt; |
6 |
$dhcp_data{"first"} = ''; |
$dhcp_data{"first"} = ''; |
7 |
# ..... get scan results into dhcp_data |
# ..... get scan results into dhcp_data |
8 |
- dhcp_data{"scanresults"} = get_scan_results($c); |
- dhcp_data{"scanresults"} = get_scan_results($c); |
9 |
- $c->stash( title => $title, modul => $modul, dhcp_data => \%dhcp_data ); |
+ $dhcp_data{"scanresults"} = get_scan_results($c); |
10 |
+ $dhcp_data{"cidr"} = netmask2cidr($c); |
$c->stash( title => $title, modul => $modul, dhcp_data => \%dhcp_data ); |
|
+ my @scanresults = get_scan_results($c); |
|
|
+ $c->stash( title => $title, modul => $modul, dhcp_data => \%dhcp_data, scanresults => @scanresults ); |
|
11 |
$c->render( template => 'dhcpd' ); |
$c->render( template => 'dhcpd' ); |
12 |
} |
} |
13 |
|
@@ -332,10 +332,10 @@ |
|
@@ -361,8 +381,30 @@ |
|
|
|
|
|
sub get_scan_results { |
|
14 |
my $c = shift; |
my $c = shift; |
15 |
- #...do it |
my $ret = delete_all_leases($c); |
16 |
- return "results"; |
if ($ret == 'ok') { |
17 |
+ my $cidr = netmask2cidr($c); |
- dhcp_data{"success"}="dhcpd_SUCCESSFULLY_SAVED_SETTINGS"; |
18 |
+ my $res = execute_nmap($cidr); |
+ $dhcp_data{"success"}="dhcpd_SUCCESSFULLY_SAVED_SETTINGS"; |
19 |
+ return $res; |
do_leases($c); |
20 |
+} |
} |
21 |
+ |
- else {dhcp_data{"error"}=$ret;} |
22 |
+sub execute_nmap { |
+ else {$dhcp_data{"error"}=$ret;} |
23 |
+ my ($ip, $port) = @_; |
return ; |
|
+ my @result; |
|
|
+ my $nmapcmd = qq(/usr/bin/nmap --script smb-os-discovery.nse -p U:137,T:139 $ip| \ |
|
|
+ /bin/grep -Ev "MAC|NetBIOS|OS CPE"| /bin/grep -E "scan|done|Computer|OS"| \ |
|
|
+ /bin/sed -e 's/Nmap scan/-- Scan/g'|/bin/sed -e 's/done/Done/g'| \ |
|
|
+ /bin/sed -e 's/Nmap//g'|/bin/sed -e 's/|/ /g'); |
|
|
+ |
|
|
+ open my $nmap, '-|', "$nmapcmd" or die "Can't start nmap: $!"; |
|
|
+ |
|
|
+ while (my $line = <$nmap>) { |
|
|
+ chomp $line; |
|
|
+ my @fields = split /\s+/, $line; |
|
|
+ push @result, \@fields; |
|
|
+ } |
|
|
+ |
|
|
+ close $nmap; |
|
|
+ |
|
|
+ return \@result; |
|
24 |
} |
} |
|
|
|
25 |
|
|
26 |
@@ -498,13 +540,6 @@ |
@@ -352,10 +352,10 @@ |
27 |
return @results; |
# else return "ok" |
28 |
|
my $ret = delete_lease($c); |
29 |
|
if ($ret == 'ok') { |
30 |
|
- dhcp_data{"success"}="dhcpd_SUCCESSFULLY_SAVED_SETTINGS"; |
31 |
|
+ $dhcp_data{"success"}="dhcpd_SUCCESSFULLY_SAVED_SETTINGS"; |
32 |
|
do_leases($c); |
33 |
|
} |
34 |
|
- else {dhcp_data{"error"}=$ret;} |
35 |
|
+ else {$dhcp_data{"error"}=$ret;} |
36 |
|
return ; |
37 |
} |
} |
38 |
|
|
39 |
-sub winpopup{ |
@@ -536,4 +536,4 @@ |
|
- my $c = shift; |
|
|
- # Message in $c->param("winpopupmsg") |
|
|
- # .... do it |
|
|
- return TRUE; |
|
|
-} |
|
|
- |
|
|
sub do_wol{ |
|
|
my $c = shift; |
|
|
my $retVal = Perform_Wake_Up($c); |
|
|
@@ -536,4 +571,4 @@ |
|
40 |
|
|
41 |
1; |
1; |
42 |
|
|
43 |
- |
- |
44 |
\ No newline at end of file |
\ No newline at end of file |
45 |
+ |
+ |
|
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Dhcpd/en.pm smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Dhcpd/en.pm |
|
|
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Dhcpd/en.pm 1970-01-01 01:00:00.000000000 +0100 |
|
|
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Dhcpd/en.pm 2023-12-30 11:30:00.000000000 +0000 |
|
|
@@ -0,0 +1,109 @@ |
|
|
+package SrvMngr::I18N::Modules::Dhcpd::en; |
|
|
+use strict; |
|
|
+use warnings; |
|
|
+use utf8; |
|
|
+use Mojo::Base 'SrvMngr::I18N'; |
|
|
+ |
|
|
+use SrvMngr::I18N::Modules::General::en; |
|
|
+ |
|
|
+my %lexicon = ( |
|
|
+ 'dhcpd_ACTION' => 'Action', |
|
|
+ 'dhcpd_ACTIVE_DEVICE' => 'Active Device', |
|
|
+ 'dhcpd_ALL_OF_THEM' => 'All of them', |
|
|
+ 'dhcpd_CHECK_CLIENT_STATUS' => 'Always check the status of computers (Disabled is much faster)', |
|
|
+ 'dhcpd_CLEAN_ALL_DHCPLEASES' => 'You may want to clean the dhcpd.leases', |
|
|
+ 'dhcpd_CLICK_HERE_TO_MAIN_PANEL' => 'Return to the main panel', |
|
|
+ 'dhcpd_CONNECTED_IP' => 'Show DHCP Clients', |
|
|
+ 'dhcpd_CUSTOM_DNS_STATUS' => 'Custom DNS', |
|
|
+ 'dhcpd_CUSTOM_DNS_TITLE' => 'Enable custom DNS servers.', |
|
|
+ 'dhcpd_CUSTOM_GATEWAY_ADDRESS' => 'Gateway address', |
|
|
+ 'dhcpd_CUSTOM_GATEWAY_STATUS' => 'Custom gateway', |
|
|
+ 'dhcpd_CUSTOM_GATEWAY_TITLE' => 'Enable a custom gateway address.', |
|
|
+ 'dhcpd_CUSTOM_LEASETIME' => 'Custom lease time', |
|
|
+ 'dhcpd_CUSTOM_LEASETIME_TITLE' => 'Set the lease time (default is 86400 seconds).', |
|
|
+ 'dhcpd_CUSTOM_WINSERVER_ADDRESS' => 'WINS Server address', |
|
|
+ 'dhcpd_CUSTOM_WINSERVER_STATUS' => 'WINS Server', |
|
|
+ 'dhcpd_CUSTOM_WINSERVER_TITLE' => 'Enable a WINS Server.', |
|
|
+ 'dhcpd_DHCPD_SETTING_ERRORS' => 'DHCPd Settings ERRORS', |
|
|
+ 'dhcpd_DHCPD_SETTINGS_TITLE' => 'DHCP server settings', |
|
|
+ 'dhcpd_DHCPD_TITLE' => 'DHCP Manager', |
|
|
+ 'dhcpd_DHCP_END' => 'DHCP End', |
|
|
+ 'dhcpd_DHCP manager' => 'DHCP Manager', |
|
|
+ 'dhcpd_DHCP_RANGE_MUST_NOT_INCLUDE_SERVER_IP' =>'Incorrect range of IPs, the range of IP address allocation must not include the server address, Update unsuccessfull', |
|
|
+ 'dhcpd_DHCP_RANGE_WITH_BAD_IP' => 'Incorrect IP in the DHCP range, Update unsuccessfull', |
|
|
+ 'dhcpd_DHCP_START' => 'DHCP Start', |
|
|
+ 'dhcpd_DHCP_START_GREATER_DHCP_END_ERRORS' =>'Incorrect range of IPs, the DHCP Start is greater than the DHCP End , Update unsuccessfull', |
|
|
+ 'dhcpd_DISABLED' => 'Disabled', |
|
|
+ 'dhcpd_DNS_SERVER_WITH_BAD_IP' => 'Incorrect IP for DNS servers, Update unsuccessfull', |
|
|
+ 'dhcpd_DO_YOU_WANT_TO_SENT' => 'Do you want to send this message to', |
|
|
+ 'dhcpd_ENABLED' => 'Enabled', |
|
|
+ 'dhcpd_END_DATE' => 'End Date', |
|
|
+ 'dhcpd_ERROR_WHILE_REMOVING_ALL_LEASES' => 'Error while removing all dhcpd Leases', |
|
|
+ 'dhcpd_ERROR_WHILE_SAVING_SETTINGS' => 'Error while saving settings', |
|
|
+ 'dhcpd_GATEWAY_BAD_IP' => 'Incorrect IP for Gateway, Update unsuccessfull', |
|
|
+ 'dhcpd_GLOBAL_WINPOPUP' => 'Send Global Netsend WinPopup', |
|
|
+ 'dhcpd_GLOBAL_WINPOPUP_TITLE' => 'Send a global WinPopup with the Net send protocol', |
|
|
+ 'dhcpd_IP' => 'Ip Address', |
|
|
+ 'dhcpd_MAC_ADDRESS' => 'MAC Address', |
|
|
+ 'dhcpd_MANAGING_DHCP_CLIENT' => 'Managing DHCP clients', |
|
|
+ 'dhcpd_NETWORK_NAME' => 'Network Name', |
|
|
+ 'dhcpd_NETWORK_VALUES_FOUND' => 'Please wait .... Your subnet and your netmask appear to be :', |
|
|
+ 'dhcpd_NO_CONNECTED_COMPUTERS' => 'There are no connected computers', |
|
|
+ 'dhcpd_NOT_CHECKED' => 'Not Checked...', |
|
|
+ 'dhcpd_PRIMARY_DNS_ADDRESS' => 'Primary DNS', |
|
|
+ 'dhcpd_REFRESH_CONNECTED_IP_LIST' => 'You may want to refresh this list ?', |
|
|
+ 'dhcpd_REFRESH' => 'Refresh the list', |
|
|
+ 'dhcpd_REMOVE_ACTION' => 'Remove...', |
|
|
+ 'dhcpd_REMOVE_A_DHCP_LEASE_ACTION' => 'You are about to remove a client from the dhcpd.leases file.', |
|
|
+ 'dhcpd_REMOVE_A_DHCP_LEASE' => 'Remove a DHCP lease', |
|
|
+ 'dhcpd_ARE_YOU_SURE' => 'are you sure ?', |
|
|
+ 'dhcpd_REMOVE_A_DHCP_LEASE_TITLE' => 'Removing a DHCP Lease', |
|
|
+ 'dhcpd_REMOVE_ALL_LEASES_ACTION' => 'Remove all dhcpd leases', |
|
|
+ 'dhcpd_REMOVE_ALL_LEASES' => 'Remove all leases', |
|
|
+ 'dhcpd_REMOVE_DHCP_LEASE_TITLE' => 'Removing all DHCP Lease', |
|
|
+ 'dhcpd_REMOVE_DHCP_LEASE_WARNING' => 'Remove all entries in dhcpd.leases may cause issues', |
|
|
+ 'dhcpd_REMOVE' => 'Remove', |
|
|
+ 'dhcpd_SAVE/RESTART' => 'Save/Restart', |
|
|
+ 'dhcpd_SAVE_TITLE' => 'After changing settings above, you must save and restart dhcpd.', |
|
|
+ 'dhcpd_SCANNING_NETWORK_TITLE' => 'Scanning your network, the time needed depends on your subnet mask', |
|
|
+ 'dhcpd_SCAN_YOUR_NETWORK' => 'Scan your network', |
|
|
+ 'dhcpd_SCAN_YOUR_NETWORK_TITLE' => 'Scan your network to show active devices :', |
|
|
+ 'dhcpd_SECONDARY_DNS_ADDRESS' => 'Secondary DNS', |
|
|
+ 'dhcpd_SENDING_A_WINPOPUP' => 'Sending a WinPopup', |
|
|
+ 'dhcpd_SENDING_A_WINPOPUP_TO' => 'You are about to send a WinPopup to ', |
|
|
+ 'dhcpd_SEND_WINPOPUP_TO' => 'Send a WinPopup to', |
|
|
+ 'dhcpd_SHOW_CONNECTED_IP_TITLE' => 'Show all devices connected to the dhcpd server :', |
|
|
+ 'dhcpd_START_DATE' => 'Start Date', |
|
|
+ 'dhcpd_STATUS_CLICK_FOR_WOL' => 'Status - click for WOL', |
|
|
+ 'dhcpd_STATUS_DHCP_SERVER' => 'State of DHCPD', |
|
|
+ 'dhcpd_STATUS_REPORT' => 'Operation status report :', |
|
|
+ 'dhcpd_SUCCESSFULLY_CLIENT_WOL_REQUEST' =>'Successfull request to wake up the client. The computer may take time to wake up.', |
|
|
+ 'dhcpd_SUCCESSFULLY_DELETED_THE_CLIENT' => 'Successfully deleted the client in dhcpd.leases : ', |
|
|
+ 'dhcpd_SUCCESSFULLY_REMOVED_ALL_LEASES' => 'Successfully deleted all leases.', |
|
|
+ 'dhcpd_SUCCESSFULLY_SAVED_SETTINGS' => 'Successfully saved settings', |
|
|
+ 'dhcpd_SUCCESSFULLY_SENT_MESSAGE' => 'Successfully sent message popup to', |
|
|
+ 'dhcpd_TERTIARY_DNS_ADDRESS' => 'Tertiary DNS', |
|
|
+ 'dhcpd_WAKE_UP_ACTION' => '<font color="red">Wake-Up...</font>', |
|
|
+ 'dhcpd_WAKE_UP' => 'Wake UP', |
|
|
+ 'dhcpd_WAKING_A_REMOTE_COMPUTER_ACTION' => 'Are you sure you want to wake on lan the client : ', |
|
|
+ 'dhcpd_WAKING_A_REMOTE_COMPUTER_TITLE' => 'Waking Up a remote computer', |
|
|
+ 'dhcpd_WAKING_A_REMOTE_COMPUTER' => 'You are about to wake up a remote computer.', |
|
|
+ 'dhcpd_WARNING_NO_WINPOPUP_GARANTY' =>'Warning, there is no guarantee that the popup will appear on the remote computer.', |
|
|
+ 'dhcpd_WINPOPUP_ACTION' => 'WinPopup...', |
|
|
+ 'dhcpd_WINSSERVER_BAD_IP' => 'Incorrect IP for WINS Server, Update unsuccessfull', |
|
|
+ 'dhcpd_WRITE_YOUR_MESSAGE' => 'Write your message here', |
|
|
+ 'dhcpd_YOUR_MESSAGE' => 'Your message', |
|
|
+ 'dhcpd_REMOVE_DHCP_LEASE_WARNING2' => 'The lease file is a log-structured file - whenever a lease changes, the |
|
|
+ contents of that lease are written to the end of the file. This means that it is entirely possible for there to be two |
|
|
+ or more declarations of the same lease in the lease file at the same |
|
|
+ time. In that case, the instance of that particular lease that |
|
|
+ appears last in the file is the one that is in effect.', |
|
|
+); |
|
|
+ |
|
|
+our %Lexicon = ( |
|
|
+ %{ SrvMngr::I18N::Modules::General::en::Lexicon }, |
|
|
+ %lexicon |
|
|
+); |
|
|
+ |
|
|
+ |
|
|
+1; |
|
46 |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep |
47 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep 2023-12-19 09:44:56.680590493 +0000 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep 2023-12-19 09:44:56.680590493 +0000 |
48 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep 2023-12-30 10:10:00.000000000 +0000 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/dhcpd.html.ep 2023-12-19 11:12:00.000000000 +0000 |
49 |
@@ -49,10 +49,8 @@ |
@@ -63,9 +63,12 @@ |
|
|
|
|
% if ($dhcp_data->{trt} eq 'LEASES') { |
|
|
%= include 'partials/_dhcpd_leases' |
|
|
- %} elsif ($dhcp_data->{trt} eq 'WINPOPUP') { |
|
|
- %= include 'partials/_dhcpd_winpopup' |
|
|
%} elsif ($dhcp_data->{trt} eq 'SCAN') { |
|
|
- %= include 'partials/_dhcpd_scan' |
|
|
+ %= include 'partials/_dhcpd_scanresults' |
|
|
%} else { #PARAMS |
|
|
% my $ip_regex = '^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$'; |
|
|
<table><tr><td> |
|
|
@@ -63,9 +61,12 @@ |
|
50 |
</button> |
</button> |
51 |
</td><td> |
</td><td> |
52 |
%= button_to $c->l('dhcpd_SCAN_YOUR_NETWORK') => '/dhcpd3' |
%= button_to $c->l('dhcpd_SCAN_YOUR_NETWORK') => '/dhcpd3' |
63 |
<hr /> |
<hr /> |
64 |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep |
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep |
65 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep 2023-12-19 09:44:56.681590497 +0000 |
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep 2023-12-19 09:44:56.681590497 +0000 |
66 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep 2023-12-29 15:16:00.000000000 +0000 |
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_leases.html.ep 2024-01-16 12:32:00.000000000 +0000 |
67 |
@@ -26,7 +26,7 @@ |
@@ -26,7 +26,7 @@ |
68 |
%= submit_button "$btn", class => 'action' |
%= submit_button "$btn", class => 'action' |
69 |
% end |
% end |
88 |
<a href="/smanager/dhcpd6?trt=DEL&ip=<%= $ip->{ip}%>" onclick="Remove_lease_confirm(event,'<%=$c->l('dhcpd_REMOVE_A_DHCP_LEASE_ACTION')%>',this);"><center><%=l 'dhcpd_REMOVE'%></center></a> |
<a href="/smanager/dhcpd6?trt=DEL&ip=<%= $ip->{ip}%>" onclick="Remove_lease_confirm(event,'<%=$c->l('dhcpd_REMOVE_A_DHCP_LEASE_ACTION')%>',this);"><center><%=l 'dhcpd_REMOVE'%></center></a> |
89 |
- </td><td class = 'sme-border'> |
- </td><td class = 'sme-border'> |
90 |
+ </td> |
+ </td> |
91 |
+ <!--> |
+ <!-- |
92 |
+ <td class = 'sme-border'> |
+ <td class = 'sme-border'> |
93 |
<a href="/smanager/dhcpd8?trt=WIN&ip=<%= $ip->{ip}%>" onclick="Winpop_confirm(event,'<%=$c->l('dhcpd_SENDING_A_WINPOPUP')%>',this);"><center><%=l 'dhcpd_WINPOPUP_ACTION'%></center></a> |
<a href="/smanager/dhcpd8?trt=WIN&ip=<%= $ip->{ip}%>" onclick="Winpop_confirm(event,'<%=$c->l('dhcpd_SENDING_A_WINPOPUP')%>',this);"><center><%=l 'dhcpd_WINPOPUP_ACTION'%></center></a> |
94 |
</td> |
</td> |
103 |
-</div> |
-</div> |
104 |
\ No newline at end of file |
\ No newline at end of file |
105 |
+</div> |
+</div> |
|
diff -urN smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_scanresults.html.ep smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_scanresults.html.ep |
|
|
--- smeserver-dhcpmanager-2.0.4.old/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_scanresults.html.ep 1970-01-01 01:00:00.000000000 +0100 |
|
|
+++ smeserver-dhcpmanager-2.0.4/root/usr/share/smanager/themes/default/templates/partials/_dhcpd_scanresults.html.ep 2023-12-30 15:30:00.000000000 +0000 |
|
|
@@ -0,0 +1,41 @@ |
|
|
+<div id='dhcpd-scanresults'> |
|
|
+%#= 1/0 |
|
|
+ %= $c->l('dhcpd_NETWORK_VALUES_FOUND').$dhcp_data->{"cidr"}; |
|
|
+ %= form_for '/dhcpd10' => (method => 'POST') => begin |
|
|
+ <br /> |
|
|
+ <table class="sme-border table-sort"><thead> |
|
|
+ <tr> |
|
|
+ <th class='sme-border'> |
|
|
+ %=l 'dhcpd_NETWORK_NAME' |
|
|
+ </th> |
|
|
+ <th class='sme-border'> |
|
|
+ %=l 'dhcpd_IP' |
|
|
+ </th> |
|
|
+ <th class='sme-border'> |
|
|
+ %=l 'dhcpd_MAC_ADDRESS' |
|
|
+ </th> |
|
|
+ <th class='sme-border'> |
|
|
+ %=l 'dhcpd_STATUS_CLICK_FOR_WOL' |
|
|
+ </th> |
|
|
+ </tr> |
|
|
+ </thead> |
|
|
+ <tbody> |
|
|
+ % foreach my $line (@$scanresults) { |
|
|
+ % my @thisline = @$line; |
|
|
+ <tr> |
|
|
+ <td class='sme-border'> |
|
|
+ %= "$thisline[4]"; |
|
|
+ </td> |
|
|
+ <td class='sme-border'> |
|
|
+ %= "$thisline[5]"; |
|
|
+ </td> |
|
|
+ <td class='sme-border'> |
|
|
+ </td> |
|
|
+ <td class='sme-border'> |
|
|
+ </td> |
|
|
+ </tr> |
|
|
+ %} |
|
|
+ </table> |
|
|
+ % end |
|
|
+ %= button_to $c->l('dhcpd_CLICK_HERE_TO_MAIN_PANEL') => '/dhcpd' |
|
|
+</div> |
|