Skip to content

Commit

Permalink
Merge pull request #49 from runeharlyk/move-models
Browse files Browse the repository at this point in the history
Moves MQTT models
  • Loading branch information
theelims authored Apr 24, 2024
2 parents 18af27e + ffcd9b7 commit 16594b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
17 changes: 17 additions & 0 deletions interface/src/lib/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,20 @@ export type StaticSystemInformation = {
};

export type SystemInformation = Analytics & StaticSystemInformation;

export type MQTTStatus = {
enabled: boolean;
connected: boolean;
client_id: string;
last_error: string;
};

export type MQTTSettings = {
enabled: boolean;
uri: string;
username: string;
password: string;
client_id: string;
keep_alive: number;
clean_session: boolean;
};
18 changes: 1 addition & 17 deletions interface/src/routes/connections/mqtt/MQTT.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,7 @@
import Collapsible from '$lib/components/Collapsible.svelte';
import MQTT from '~icons/tabler/topology-star-3';
import Client from '~icons/tabler/robot';
type MQTTStatus = {
enabled: boolean;
connected: boolean;
client_id: string;
last_error: string;
};
type MQTTSettings = {
enabled: boolean;
uri: string;
username: string;
password: string;
client_id: string;
keep_alive: number;
clean_session: boolean;
};
import type { MQTTSettings, MQTTStatus } from '$lib/types/models';
let mqttSettings: MQTTSettings;
let mqttStatus: MQTTStatus;
Expand Down

0 comments on commit 16594b9

Please sign in to comment.