webapp: implemented dhcp next server address option in edit scope.

This commit is contained in:
Shreyas Zare
2020-10-04 20:09:01 +05:30
parent 02c2225116
commit 6d066ec47b
2 changed files with 13 additions and 1 deletions

View File

@@ -1170,6 +1170,14 @@
<div class="col-sm-offset-3 col-sm-8" style="padding-top: 5px;">The TTL value of the DNS records updated for the above provided domain name.</div>
</div>
<div class="form-group">
<label for="txtDhcpScopeNextServerAddress" class="col-sm-3 control-label">Next Server Address</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="txtDhcpScopeNextServerAddress" placeholder="Next Server Address">
</div>
<div class="col-sm-offset-3 col-sm-8" style="padding-top: 5px;">The next bootstrap server IP address to be used by the clients. If not specified, the DHCP server's IP address is used.</div>
</div>
<div class="form-group">
<label for="txtDhcpScopeRouterAddress" class="col-sm-3 control-label">Router Address</label>
<div class="col-sm-3">

View File

@@ -247,6 +247,9 @@ function showEditDhcpScope(scopeName) {
$("#txtDhcpScopeDnsTtl").val(responseJSON.response.dnsTtl);
if (responseJSON.response.nextServerAddress != null)
$("#txtDhcpScopeNextServerAddress").val(responseJSON.response.nextServerAddress);
if (responseJSON.response.routerAddress != null)
$("#txtDhcpScopeRouterAddress").val(responseJSON.response.routerAddress);
@@ -315,6 +318,7 @@ function saveDhcpScope() {
var domainName = $("#txtDhcpScopeDomainName").val();
var dnsTtl = $("#txtDhcpScopeDnsTtl").val();
var nextServerAddress = $("#txtDhcpScopeNextServerAddress").val();
var routerAddress = $("#txtDhcpScopeRouterAddress").val();
var useThisDnsServer = $("#chkUseThisDnsServer").prop('checked');
@@ -340,7 +344,7 @@ function saveDhcpScope() {
HTTPRequest({
url: "/api/setDhcpScope?token=" + token + "&name=" + encodeURIComponent(name) + (newName == null ? "" : "&newName=" + encodeURIComponent(newName)) + "&startingAddress=" + encodeURIComponent(startingAddress) + "&endingAddress=" + encodeURIComponent(endingAddress) + "&subnetMask=" + encodeURIComponent(subnetMask) +
"&leaseTimeDays=" + leaseTimeDays + "&leaseTimeHours=" + leaseTimeHours + "&leaseTimeMinutes=" + leaseTimeMinutes + "&offerDelayTime=" + offerDelayTime + "&domainName=" + encodeURIComponent(domainName) + "&dnsTtl=" + dnsTtl + "&routerAddress=" + encodeURIComponent(routerAddress) +
"&leaseTimeDays=" + leaseTimeDays + "&leaseTimeHours=" + leaseTimeHours + "&leaseTimeMinutes=" + leaseTimeMinutes + "&offerDelayTime=" + offerDelayTime + "&domainName=" + encodeURIComponent(domainName) + "&dnsTtl=" + dnsTtl + "&nextServerAddress=" + encodeURIComponent(nextServerAddress) + "&routerAddress=" + encodeURIComponent(routerAddress) +
"&useThisDnsServer=" + useThisDnsServer + (useThisDnsServer ? "" : "&dnsServers=" + encodeURIComponent(dnsServers)) + "&winsServers=" + encodeURIComponent(winsServers) + "&ntpServers=" + encodeURIComponent(ntpServers) +
"&staticRoutes=" + encodeURIComponent(staticRoutes) + "&exclusions=" + encodeURIComponent(exclusions) + "&reservedLeases=" + encodeURIComponent(reservedLeases) + "&allowOnlyReservedLeases=" + allowOnlyReservedLeases,
success: function (responseJSON) {