webapp: create interface for MqttConfig
This commit is contained in:
parent
c735fb8c3c
commit
a9a6a40eb8
20
webapp/src/types/MqttConfig.ts
Normal file
20
webapp/src/types/MqttConfig.ts
Normal file
@ -0,0 +1,20 @@
|
||||
export interface MqttConfig {
|
||||
mqtt_enabled: boolean,
|
||||
mqtt_hostname: string,
|
||||
mqtt_port: number,
|
||||
mqtt_username: string,
|
||||
mqtt_password: string,
|
||||
mqtt_topic: string,
|
||||
mqtt_publish_interval: number,
|
||||
mqtt_retain: boolean,
|
||||
mqtt_tls: boolean,
|
||||
mqtt_root_ca_cert: string,
|
||||
mqtt_lwt_topic: string,
|
||||
mqtt_lwt_online: string,
|
||||
mqtt_lwt_offline: string,
|
||||
mqtt_hass_enabled: boolean,
|
||||
mqtt_hass_expire: boolean,
|
||||
mqtt_hass_retain: boolean,
|
||||
mqtt_hass_topic: string,
|
||||
mqtt_hass_individualpanels: boolean
|
||||
}
|
||||
@ -228,6 +228,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import BootstrapAlert from "@/components/BootstrapAlert.vue";
|
||||
import type { MqttConfig } from "@/types/MqttConfig";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -236,26 +237,7 @@ export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
dataLoading: true,
|
||||
mqttConfigList: {
|
||||
mqtt_enabled: false,
|
||||
mqtt_hostname: "",
|
||||
mqtt_port: 0,
|
||||
mqtt_username: "",
|
||||
mqtt_password: "",
|
||||
mqtt_topic: "",
|
||||
mqtt_publish_interval: 0,
|
||||
mqtt_retain: false,
|
||||
mqtt_tls: false,
|
||||
mqtt_root_ca_cert: "",
|
||||
mqtt_lwt_topic: "",
|
||||
mqtt_lwt_online: "",
|
||||
mqtt_lwt_offline: "",
|
||||
mqtt_hass_enabled: false,
|
||||
mqtt_hass_expire: false,
|
||||
mqtt_hass_retain: false,
|
||||
mqtt_hass_topic: "",
|
||||
mqtt_hass_individualpanels: false
|
||||
},
|
||||
mqttConfigList: {} as MqttConfig,
|
||||
alertMessage: "",
|
||||
alertType: "info",
|
||||
showAlert: false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user