Add an ability to enable/disable nscd (#3652)

This commit is contained in:
Louis Lam
2023-08-28 16:15:48 +08:00
committed by GitHub
parent 0c40f02584
commit cd79df07e1
7 changed files with 69 additions and 6 deletions

View File

@@ -150,6 +150,43 @@
</div>
</div>
<!-- DNS Cache (nscd) -->
<div v-if="$root.info.isContainer" class="mb-4">
<label class="form-label">
{{ $t("enableNSCD") }}
</label>
<div class="form-check">
<input
id="nscdEnable"
v-model="settings.nscd"
class="form-check-input"
type="radio"
name="nscd"
:value="true"
required
/>
<label class="form-check-label" for="nscdEnable">
{{ $t("Enable") }}
</label>
</div>
<div class="form-check">
<input
id="nscdDisable"
v-model="settings.nscd"
class="form-check-input"
type="radio"
name="nscd"
:value="false"
required
/>
<label class="form-check-label" for="nscdDisable">
{{ $t("Disable") }}
</label>
</div>
</div>
<!-- DNS Cache -->
<div class="mb-4">
<label class="form-label">

View File

@@ -449,9 +449,10 @@
"Server Timezone": "Server Timezone",
"statusPageMaintenanceEndDate": "End",
"IconUrl": "Icon URL",
"Enable DNS Cache": "Enable DNS Cache for HTTP(s) monitors",
"Enable DNS Cache": "(Deprecated) Enable DNS Cache for HTTP(s) monitors",
"Enable": "Enable",
"Disable": "Disable",
"enableNSCD": "Enable NSCD (Name Service Cache Daemon) for caching all DNS requests",
"chromeExecutable": "Chrome/Chromium Executable",
"chromeExecutableAutoDetect": "Auto Detect",
"chromeExecutableDescription": "For Docker users, if Chromium is not yet installed, it may take a few minutes to install and display the test result. It takes 1GB of disk space.",

View File

@@ -82,7 +82,7 @@
<option value="redis">
Redis
</option>
<option value="tailscale-ping">
<option v-if="$root.info.isContainer" value="tailscale-ping">
Tailscale Ping
</option>
</optgroup>

View File

@@ -163,6 +163,10 @@ export default {
this.settings.entryPage = "dashboard";
}
if (this.settings.nscd === undefined) {
this.settings.nscd = true;
}
if (this.settings.dnsCache === undefined) {
this.settings.dnsCache = false;
}