File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed
frontend/src/routes/device/new Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change 5
5
import NetworkScan from ' $lib/components/NetworkScan.svelte' ;
6
6
import { m } from ' $lib/paraglide/messages' ;
7
7
import { permission , pocketbase } from ' $lib/stores/pocketbase' ;
8
- import type { Device , Port } from ' $lib/types/device' ;
8
+ import type { Device , Group , Port } from ' $lib/types/device' ;
9
9
import { faBinoculars , faWrench } from ' @fortawesome/free-solid-svg-icons' ;
10
10
import Fa from ' svelte-fa' ;
11
11
import toast from ' svelte-french-toast' ;
12
12
13
13
let device: Device = {
14
+ name: ' ' ,
15
+ ip: ' ' ,
16
+ mac: ' ' ,
17
+ netmask: ' ' ,
18
+ description: ' ' ,
19
+ status: ' ' ,
20
+ ports: [] as string [],
21
+ link_open: ' ' ,
22
+ ping_cmd: ' ' ,
23
+ wake_cron: ' ' ,
24
+ wake_cron_enabled: false ,
25
+ wake_cmd: ' ' ,
26
+ wake_confirm: false ,
27
+ wake_timeout: 0 ,
28
+ shutdown_cron: ' ' ,
29
+ shutdown_cron_enabled: false ,
30
+ shutdown_cmd: ' ' ,
31
+ shutdown_confirm: false ,
32
+ shutdown_timeout: 0 ,
33
+ password: ' ' ,
34
+ groups: [] as string [],
14
35
expand: {
15
- ports: [] as Port []
36
+ ports: [] as Port [],
37
+ groups: [] as Group []
16
38
},
17
- groups: [] as string []
39
+ created_by: ' ' ,
40
+ sol_enabled: false ,
41
+ sol_auth: false ,
42
+ sol_user: ' ' ,
43
+ sol_password: ' ' ,
44
+ sol_port: 0
18
45
} as Device ;
19
46
20
47
$ : if (Object .hasOwn ($permission , ' create' )) {
You can’t perform that action at this time.
0 commit comments