Skip to content

Commit

Permalink
Rename 'is_configured' to 'running'
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Jul 30, 2024
1 parent fb922e2 commit 5b1197a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions imageroot/actions/get-configuration/10get
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ if config["interface"] != "" and config["dhcp-server"]["start"] == "" and config
config["are_dns_bound"] = network.are_ports_53_bound()
try:
p = subprocess.run(['systemctl', 'is-active', '-q', os.environ['MODULE_ID']])
config['is_configured'] = (p.returncode == 0)
config['running'] = (p.returncode == 0)
except:
config['is_configured'] = False
config['running'] = False

json.dump(config, sys.stdout)
4 changes: 2 additions & 2 deletions imageroot/actions/get-configuration/validate-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"secondary-server"
]
},
"is_configured": {
"running": {
"description": "True if dnsmasq is configured",
"type": "boolean"
},
Expand All @@ -110,7 +110,7 @@
"interface",
"dhcp-server",
"dns-server",
"is_configured",
"running",
"are_dns_bound"
]
}
8 changes: 4 additions & 4 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<div class="title-description mg-bottom-xlg">
{{ $t("settings.DNS_description") }}
</div>
<cv-row v-if="are_dns_bound && !is_configured">
<cv-row v-if="are_dns_bound && !running">
<cv-column>
<NsInlineNotification
kind="info"
Expand All @@ -177,7 +177,7 @@
v-model="dnsEnableField"
value="dnsEnableField"
formItem
:disabled="are_dns_bound && !is_configured"
:disabled="are_dns_bound && !running"
ref="dnsEnableField"
>
<template slot="text-left">{{
Expand Down Expand Up @@ -262,7 +262,7 @@ export default {
dhcpEndField: "",
dhcpLeaseField: 12,
are_dns_bound: false,
is_configured: false,
running: false,
dnsEnableField: false,
dnsPrimaryField: "",
dnsSecondaryField: "",
Expand Down Expand Up @@ -420,7 +420,7 @@ export default {
this.dnsPrimaryField = dns_server["primary-server"];
this.dnsSecondaryField = dns_server["secondary-server"];
this.are_dns_bound = config["are_dns_bound"];
this.is_configured = config["is_configured"];
this.running = config["running"];
},
validateConfigureModule() {
this.clearErrors(this);
Expand Down

0 comments on commit 5b1197a

Please sign in to comment.