mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Merge branch 'master' into patch-2
This commit is contained in:
commit
50de4f73a3
@ -1,4 +1,4 @@
|
|||||||
# RaspAP Sponors
|
# Sponors
|
||||||
|
|
||||||
Development of RaspAP is made possible thanks to our awesome sponsors!
|
Development of RaspAP is made possible thanks to our awesome sponsors!
|
||||||
You can join them by [becoming a sponsor](https://github.com/sponsors/billz).
|
You can join them by [becoming a sponsor](https://github.com/sponsors/billz).
|
||||||
@ -10,3 +10,10 @@ You can join them by [becoming a sponsor](https://github.com/sponsors/billz).
|
|||||||
### 🤖 Robot fuelers
|
### 🤖 Robot fuelers
|
||||||
|
|
||||||
### ☕️ Coffee supporters
|
### ☕️ Coffee supporters
|
||||||
|
|
||||||
|
# Donors
|
||||||
|
|
||||||
|
One-time donors are vital to the continued development of this project. Join them by pledging via [Beerpay](https://beerpay.io/billz/raspap-webgui) or [PayPal](https://paypal.me/billzgithub).
|
||||||
|
|
||||||
|
### PayPal
|
||||||
|
Ray E - "This project is awesome and just works; saved me and my client tons of work. Thank you!" - $20
|
||||||
|
@ -14,85 +14,85 @@
|
|||||||
</div>
|
</div>
|
||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
</div><!-- /.card-header -->
|
</div><!-- /.card-header -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form">
|
<form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item"><a class="nav-link active" href="#server-settings" data-toggle="tab"><?php echo _("Server settings"); ?></a></li>
|
<li class="nav-item"><a class="nav-link active" href="#server-settings" data-toggle="tab"><?php echo _("Server settings"); ?></a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#static-leases" data-toggle="tab"><?php echo _("Static Leases") ?></a></li>
|
<li class="nav-item"><a class="nav-link" href="#static-leases" data-toggle="tab"><?php echo _("Static Leases") ?></a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#client-list" data-toggle="tab"><?php echo _("Client list"); ?></a></li>
|
<li class="nav-item"><a class="nav-link" href="#client-list" data-toggle="tab"><?php echo _("Client list"); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- Tab panes -->
|
<!-- Tab panes -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="server-settings">
|
<div class="tab-pane active" id="server-settings">
|
||||||
<h4 class="mt-3">DHCP server settings</h4>
|
<h4 class="mt-3">DHCP server settings</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="code">Interface</label>
|
<label for="code">Interface</label>
|
||||||
<select class="form-control" name="interface">
|
<select class="form-control" name="interface">
|
||||||
<?php foreach ($interfaces as $if) : ?>
|
<?php foreach ($interfaces as $if) : ?>
|
||||||
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
||||||
<?php $selected = $if === $conf['interface'] ? ' selected="selected"' : '' ?>
|
<?php $selected = $if === $conf['interface'] ? ' selected="selected"' : '' ?>
|
||||||
<option value="<?php echo $if_quoted ?>"<?php echo $selected ?>><?php echo $if_quoted ?></option>
|
<option value="<?php echo $if_quoted ?>"<?php echo $selected ?>><?php echo $if_quoted ?></option>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="code"><?php echo _("Starting IP Address"); ?></label>
|
<label for="code"><?php echo _("Starting IP Address"); ?></label>
|
||||||
<input type="text" class="form-control"name="RangeStart" value="<?php echo htmlspecialchars($RangeStart, ENT_QUOTES); ?>" />
|
<input type="text" class="form-control"name="RangeStart" value="<?php echo htmlspecialchars($RangeStart, ENT_QUOTES); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="code"><?php echo _("Ending IP Address"); ?></label>
|
<label for="code"><?php echo _("Ending IP Address"); ?></label>
|
||||||
<input type="text" class="form-control" name="RangeEnd" value="<?php echo htmlspecialchars($RangeEnd, ENT_QUOTES); ?>" />
|
<input type="text" class="form-control" name="RangeEnd" value="<?php echo htmlspecialchars($RangeEnd, ENT_QUOTES); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-xs-3 col-sm-3">
|
<div class="form-group col-xs-3 col-sm-3">
|
||||||
<label for="code"><?php echo _("Lease Time"); ?></label>
|
<label for="code"><?php echo _("Lease Time"); ?></label>
|
||||||
<input type="text" class="form-control" name="RangeLeaseTime" value="<?php echo htmlspecialchars($arrRangeLeaseTime[1], ENT_QUOTES); ?>" />
|
<input type="text" class="form-control" name="RangeLeaseTime" value="<?php echo htmlspecialchars($arrRangeLeaseTime[1], ENT_QUOTES); ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3 col-sm-3">
|
<div class="col-xs-3 col-sm-3">
|
||||||
<label for="code"><?php echo _("Interval"); ?></label>
|
<label for="code"><?php echo _("Interval"); ?></label>
|
||||||
<select name="RangeLeaseTimeUnits" class="form-control" >
|
<select name="RangeLeaseTimeUnits" class="form-control" >
|
||||||
<option value="m"<?php echo $mselected; ?>><?php echo _("Minute(s)"); ?></option>
|
<option value="m"<?php echo $mselected; ?>><?php echo _("Minute(s)"); ?></option>
|
||||||
<option value="h"<?php echo $hselected; ?>><?php echo _("Hour(s)"); ?></option>
|
<option value="h"<?php echo $hselected; ?>><?php echo _("Hour(s)"); ?></option>
|
||||||
<option value="d"<?php echo $dselected; ?>><?php echo _("Day(s)"); ?></option>
|
<option value="d"<?php echo $dselected; ?>><?php echo _("Day(s)"); ?></option>
|
||||||
<option value="infinite"<?php echo $infiniteselected; ?>><?php echo _("Infinite"); ?></option>
|
<option value="infinite"<?php echo $infiniteselected; ?>><?php echo _("Infinite"); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="code"><?php echo _("DNS Server"); ?> 1</label>
|
<label for="code"><?php echo _("DNS Server"); ?> 1</label>
|
||||||
<input type="text" class="form-control"name="DNS1" value="<?php echo htmlspecialchars($DNS1, ENT_QUOTES); ?>" />
|
<input type="text" class="form-control"name="DNS1" value="<?php echo htmlspecialchars($DNS1, ENT_QUOTES); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="code"><?php echo _("DNS Server"); ?> 2</label>
|
<label for="code"><?php echo _("DNS Server"); ?> 2</label>
|
||||||
<input type="text" class="form-control" name="DNS2" value="<?php echo htmlspecialchars($DNS2, ENT_QUOTES); ?>" />
|
<input type="text" class="form-control" name="DNS2" value="<?php echo htmlspecialchars($DNS2, ENT_QUOTES); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||||
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
|
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
|
||||||
<?php if ($dnsmasq_state) : ?>
|
<?php if ($dnsmasq_state) : ?>
|
||||||
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" />
|
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" />
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" />
|
<input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div><!-- /.tab-pane -->
|
</div><!-- /.tab-pane -->
|
||||||
|
|
||||||
<div class="tab-pane fade" id="client-list">
|
<div class="tab-pane fade" id="client-list">
|
||||||
<h4 class="mt-3 mb-3">Client list</h4>
|
<h4 class="mt-3 mb-3">Client list</h4>
|
||||||
@ -131,65 +131,66 @@
|
|||||||
</div><!-- /.tab-pane -->
|
</div><!-- /.tab-pane -->
|
||||||
|
|
||||||
<div class="tab-pane fade" id="static-leases">
|
<div class="tab-pane fade" id="static-leases">
|
||||||
<div class="dhcp-static-leases js-dhcp-static-lease-container">
|
<div class="dhcp-static-leases js-dhcp-static-lease-container">
|
||||||
<?php foreach ($dhcpHost as $host) : ?>
|
<?php foreach ($dhcpHost as $host) : ?>
|
||||||
<?php list($mac, $ip) = array_map("trim", explode(",", $host)); ?>
|
<?php list($mac, $ip) = array_map("trim", explode(",", $host)); ?>
|
||||||
<div class="row dhcp-static-lease-row js-dhcp-static-lease-row">
|
<div class="row dhcp-static-lease-row js-dhcp-static-lease-row">
|
||||||
<div class="col-md-5 col-xs-5">
|
<div class="col-md-5 col-xs-5">
|
||||||
<input type="text" name="static_leases[mac][]" value="<?php echo htmlspecialchars($mac, ENT_QUOTES) ?>" placeholder="<?php echo _("MAC address") ?>" class="form-control">
|
<input type="text" name="static_leases[mac][]" value="<?php echo htmlspecialchars($mac, ENT_QUOTES) ?>" placeholder="<?php echo _("MAC address") ?>" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 col-xs-4">
|
<div class="col-md-5 col-xs-4">
|
||||||
<input type="text" name="static_leases[ip][]" value="<?php echo htmlspecialchars($ip, ENT_QUOTES) ?>" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
<input type="text" name="static_leases[ip][]" value="<?php echo htmlspecialchars($ip, ENT_QUOTES) ?>" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 col-xs-3">
|
<div class="col-md-2 col-xs-3">
|
||||||
<button type="button" class="btn btn-danger js-remove-dhcp-static-lease"><?php echo _("Remove") ?></button>
|
<button type="button" class="btn btn-danger js-remove-dhcp-static-lease"><?php echo _("Remove") ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="mt-3 mb-3"><?php echo _("Add static DHCP lease") ?></h4>
|
<h4 class="mt-3 mb-3"><?php echo _("Add static DHCP lease") ?></h4>
|
||||||
<div class="row dhcp-static-lease-row js-new-dhcp-static-lease">
|
<div class="row dhcp-static-lease-row js-new-dhcp-static-lease">
|
||||||
<div class="col-md-5 col-xs-5">
|
<div class="col-md-5 col-xs-5">
|
||||||
<input type="text" name="mac" value="" placeholder="<?php echo _("MAC address") ?>" class="form-control" autofocus="autofocus">
|
<input type="text" name="mac" value="" placeholder="<?php echo _("MAC address") ?>" class="form-control" autofocus="autofocus">
|
||||||
</div>
|
|
||||||
<div class="col-md-5 col-xs-4">
|
|
||||||
<input type="text" name="ip" value="" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2 col-xs-3">
|
|
||||||
<button type="button" class="btn btn-success js-add-dhcp-static-lease"><?php echo _("Add") ?></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-5 col-xs-4">
|
||||||
|
<input type="text" name="ip" value="" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 col-xs-3">
|
||||||
|
<button type="button" class="btn btn-success js-add-dhcp-static-lease"><?php echo _("Add") ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template id="js-dhcp-static-lease-row">
|
<template id="js-dhcp-static-lease-row">
|
||||||
<div class="row dhcp-static-lease-row js-dhcp-static-lease-row">
|
<div class="row dhcp-static-lease-row js-dhcp-static-lease-row">
|
||||||
<div class="col-md-5 col-xs-5">
|
<div class="col-md-5 col-xs-5">
|
||||||
<input type="text" name="static_leases[mac][]" value="{{ mac }}" placeholder="<?php echo _("MAC address") ?>" class="form-control">
|
<input type="text" name="static_leases[mac][]" value="{{ mac }}" placeholder="<?php echo _("MAC address") ?>" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 col-xs-4">
|
<div class="col-md-5 col-xs-4">
|
||||||
<input type="text" name="static_leases[ip][]" value="{{ ip }}" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
<input type="text" name="static_leases[ip][]" value="{{ ip }}" placeholder="<?php echo _("IP address") ?>" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 col-xs-3">
|
<div class="col-md-2 col-xs-3">
|
||||||
<button type="button" class="btn btn-warning js-remove-dhcp-static-lease"><?php echo _("Remove") ?></button>
|
<button type="button" class="btn btn-warning js-remove-dhcp-static-lease"><?php echo _("Remove") ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
|
||||||
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||||
<?php
|
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
|
||||||
if ($dnsmasq_state) {
|
<?php
|
||||||
echo '<input type="submit" class="btn btn-warning" value="' . _("Stop dnsmasq") . '" name="stopdhcpd" />';
|
if ($dnsmasq_state) {
|
||||||
} else {
|
echo '<input type="submit" class="btn btn-warning" value="' . _("Stop dnsmasq") . '" name="stopdhcpd" />';
|
||||||
echo'<input type="submit" class="btn btn-success" value="' . _("Start dnsmasq") . '" name="startdhcpd" />';
|
} else {
|
||||||
}
|
echo'<input type="submit" class="btn btn-success" value="' . _("Start dnsmasq") . '" name="startdhcpd" />';
|
||||||
?>
|
}
|
||||||
<?php endif ?>
|
?>
|
||||||
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><!-- /.tab-content -->
|
</div><!-- /.tab-content -->
|
||||||
</form>
|
</form>
|
||||||
</div><!-- ./ card-body -->
|
</div><!-- ./ card-body -->
|
||||||
<div class="card-footer"> <?php echo _("Information provided by Dnsmasq"); ?></div>
|
<div class="card-footer"> <?php echo _("Information provided by Dnsmasq"); ?></div>
|
||||||
</div><!-- /.card -->
|
</div><!-- /.card -->
|
||||||
</div><!-- /.col-lg-12 -->
|
</div><!-- /.col-lg-12 -->
|
||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user