Skip to content

Commit

Permalink
webapp: optimize syslog settings
Browse files Browse the repository at this point in the history
* avoid duplicate id for hostname input
* hide server and port inputs if syslog disabled
  • Loading branch information
schlimmchen committed Sep 28, 2024
1 parent aa159fd commit d0ba065
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@
"MdnsSettings": "mDNS-Einstellungen",
"EnableSyslog": "Syslog aktivieren",
"SyslogSettings": "Syslog-Einstellungen",
"Port": "Port:"
"SyslogHostname": "Syslog Server",
"SyslogPort": "Port"
},
"mqttadmin": {
"MqttSettings": "MQTT-Einstellungen",
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@
"MdnsSettings": "mDNS Settings",
"EnableSyslog": "Enable Syslog",
"SyslogSettings": "Syslog Settings",
"Port": "Port:"
"SyslogHostname": "Syslog Server",
"SyslogPort": "Port"
},
"mqttadmin": {
"MqttSettings": "MQTT Settings",
Expand Down
30 changes: 16 additions & 14 deletions webapp/src/views/NetworkAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,22 @@
type="checkbox"
/>

<InputElement
:label="$t('networkadmin.Hostname', { num: 1 })"
v-model="networkConfigList.sysloghostname"
type="text"
maxlength="128"
/>

<InputElement
:label="$t('networkadmin.Port')"
v-model="networkConfigList.syslogport"
type="number"
min="1"
max="65535"
/>
<div v-if="networkConfigList.syslogenabled">
<InputElement
:label="$t('networkadmin.SyslogHostname')"
v-model="networkConfigList.sysloghostname"
type="text"
maxlength="128"
/>

<InputElement
:label="$t('networkadmin.SyslogPort')"
v-model="networkConfigList.syslogport"
type="number"
min="1"
max="65535"
/>
</div>
</CardElement>

<CardElement :text="$t('networkadmin.AdminAp')" textVariant="text-bg-primary" add-space>
Expand Down

0 comments on commit d0ba065

Please sign in to comment.