initial commit of file from CVS for smeserver-dhcpmanager on Sat Sep 7 19:51:44 AEST 2024
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
<div id='dhcpd-leases'>
|
||||
<table><tr><td>
|
||||
%= button_to $c->l('dhcpd_REFRESH') => '/dhcpd1', onclick=>"showSpinnerLeases()", id=>"scanLeases"
|
||||
<button class ="btn btn-primary spinnerButtonOverlay" type = "submit" id="load" style="display:true">
|
||||
Scanning <!--%= $c->l('dhcpd_CONNECTED_IP')-->
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
</td><td>
|
||||
%= button_to $c->l('dhcpd_REMOVE_ALL_LEASES') => '/dhcpd4'
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
% my $btn = l('dhcpd_SAVE/RESTART');
|
||||
%= form_for '/dhcpd10' => (method => 'POST') => begin
|
||||
<span class=label>
|
||||
%=l 'dhcpd_CHECK_CLIENT_STATUS'
|
||||
</span><span class=data>
|
||||
% param dhcp_check=>$dhcp_data->{"params"}->{"check"};
|
||||
%=select_field dhcp_check=>$dhcp_data->{"check"}
|
||||
</span><br>
|
||||
<br />
|
||||
%= $c->l("dhcpd_SAVE_TITLE");
|
||||
<br />
|
||||
%= submit_button "$btn", class => 'action'
|
||||
% end
|
||||
<br>
|
||||
<table class="sme-border TableSort"><thead>
|
||||
<tr>
|
||||
<th class='sme-border'>
|
||||
%=l 'dhcpd_IP'
|
||||
</th>
|
||||
<th class='sme-border'>
|
||||
%=l 'dhcpd_NETWORK_NAME'
|
||||
</th>
|
||||
<th class='sme-border'>
|
||||
%=l 'dhcpd_STATUS_CLICK_FOR_WOL'
|
||||
</th>
|
||||
<th class='sme-border'>
|
||||
%=l('dhcpd_START_DATE',"")
|
||||
</th>
|
||||
<th class='sme-border'>
|
||||
%=l 'dhcpd_END_DATE'
|
||||
</th>
|
||||
<th class='sme-border'>
|
||||
%=l 'dhcpd_MAC_ADDRESS'
|
||||
</th>
|
||||
<th class='sme-border' colspan=2>
|
||||
%=l 'dhcpd_ACTION'
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
% foreach my $ip (@$leases) {
|
||||
<tr>
|
||||
%= t td => (class => 'sme-border') => $ip->{ip}
|
||||
%= t td => (class => 'sme-border') => $ip->{name}
|
||||
<td class='sme-border'>
|
||||
% if ($ip->{wol} =~ /ACTIVE/) {
|
||||
<center><%==l $ip->{wol}%></center>
|
||||
%} else {
|
||||
<a href="/smanager/dhcpd9??state=wake_up&MAC=<%= $ip->{mac}%>&name=<%= $ip->{name}%>" onclick="Wol_confirm(event,'<%=$c->l('dhcpd_WAKING_A_REMOTE_COMPUTER')%>',this);"><center><%==l $ip->{wol}%></center></a>
|
||||
%}
|
||||
</td>
|
||||
%= t td => (class => 'sme-border') => $ip->{start}
|
||||
%= t td => (class => 'sme-border') => $ip->{end}
|
||||
%= t td => (class => 'sme-border') => $ip->{mac}
|
||||
<td class = 'sme-border'>
|
||||
<a href="/smanager/dhcpd6?trt=DEL&ip=<%= $ip->{ip}%>&name=<%= $ip->{name}%>" onclick="Remove_lease_confirm(event,'<%=$c->l('dhcpd_REMOVE_A_DHCP_LEASE_ACTION')%>',this);"><center><%=l 'dhcpd_REMOVE'%></center></a>
|
||||
</td>
|
||||
</tr>
|
||||
%}
|
||||
</tbody>
|
||||
</table>
|
||||
%= hidden_field "hiddenmsg"=>"", id=>"hiddenmsg"
|
||||
<br />
|
||||
%= button_to $c->l('dhcpd_CLICK_HERE_TO_MAIN_PANEL') => '/dhcpd'
|
||||
|
||||
%= javascript begin
|
||||
function Wol_confirm(event,msg,current){
|
||||
const getMAC = /.*MAC\=(.*)\&name.*/;
|
||||
var MAC = current.href.match(getMAC)[1];
|
||||
if (confirm(msg+": MAC: "+MAC))
|
||||
{ return true;}
|
||||
else {event.preventDefault();return false;}
|
||||
}
|
||||
|
||||
function Winpop_confirm(event,msg,current){
|
||||
const getIP = /.*ip\=(.*)/;
|
||||
var IP = ": IP: "+current.href.match(getIP)[1];
|
||||
msg = msg.replace("$",IP);
|
||||
var retVal = prompt(msg);
|
||||
if (retVal) {
|
||||
//Write it away in a hidden field
|
||||
$hidden = document.getElementById("hiddenMsg");
|
||||
$hidden.value = retVal;
|
||||
return true;
|
||||
} else {event.preventDefault();return false;}
|
||||
}
|
||||
|
||||
function Remove_lease_confirm(event,msg,current){
|
||||
const getIP = /.*ip\=(.*)/;
|
||||
var IP = current.href.match(getIP)[1];
|
||||
if (confirm(msg+" IP: "+IP))
|
||||
{ return true;}
|
||||
else {event.preventDefault();return false;}
|
||||
}
|
||||
|
||||
%end
|
||||
|
||||
|
||||
</div>
|
@@ -0,0 +1,63 @@
|
||||
<div id='dhcpd-scan'>
|
||||
<table><tr><td>
|
||||
%= button_to $c->l('dhcpd_REFRESH') => '/dhcpd3', onclick=>"showSpinnerNetwork1()", id=>"scanNetwork1"
|
||||
<button class ="btn btn-primary spinnerButtonOverlay" type = "submit" id="loadingNetwork1" style="display:true">
|
||||
Scanning <!--%= $c->l('dhcpd_CONNECTED_IP')-->
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<table class="sme-border TableSort"><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>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
% foreach my $ip (@$scanresults) {
|
||||
<tr>
|
||||
%= t td => (class => 'sme-border') => $ip->{Network}
|
||||
%= t td => (class => 'sme-border') => $ip->{ip}
|
||||
%= t td => (class => 'sme-border') => $ip->{mac}
|
||||
</tr>
|
||||
%}
|
||||
</tbody>
|
||||
</table>
|
||||
%= hidden_field "hiddenmsg"=>"", id=>"hiddenmsg"
|
||||
<br />
|
||||
%= button_to $c->l('dhcpd_CLICK_HERE_TO_MAIN_PANEL') => '/dhcpd'
|
||||
|
||||
%= javascript begin
|
||||
function Wol_confirm(event,msg,current){
|
||||
const getMAC = /.*MAC\=(.*)\&name.*/;
|
||||
var MAC = current.href.match(getMAC)[1];
|
||||
if (confirm(msg+": MAC: "+MAC))
|
||||
{ return true;}
|
||||
else {event.preventDefault();return false;}
|
||||
}
|
||||
|
||||
|
||||
%end
|
||||
|
||||
|
||||
</div>
|
||||
%= javascript begin
|
||||
document.getElementById("loadingNetwork1").style.display="none";
|
||||
|
||||
function showSpinnerNetwork1(){
|
||||
document.getElementById("scanNetwork1").style.display="none";
|
||||
document.getElementById("loadingNetwork1").style.display="inline";
|
||||
}
|
||||
|
||||
%end
|
Reference in New Issue
Block a user