-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsettingsSchema.ts
More file actions
109 lines (108 loc) · 2.64 KB
/
settingsSchema.ts
File metadata and controls
109 lines (108 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import type { SettingsSection } from "../types/common/settings";
import type { BoardName } from "../types/data/board";
/** Settings form is generated from this schema. */
export const getSettingsSchema = (boards: BoardName[], branches: string[] = []): SettingsSection[] => [
{
title: "Vehicle Configuration",
fields: [
{
label: "Boards",
path: "vehicle.boards",
type: "multi-checkbox",
options: boards,
},
],
},
{
title: "ADJ Configuration",
fields: [
{
label: "Branch",
path: "adj.branch",
type: "combobox",
options: branches,
refetchable: true,
},
],
},
{
title: "Transport Configuration",
fields: [
{
label: "Propagate Fault",
path: "transport.propagate_fault",
type: "boolean",
},
],
},
{
title: "TCP Configuration",
fields: [
{ label: "Backoff Min (ms)", path: "tcp.backoff_min_ms", type: "number" },
{ label: "Backoff Max (ms)", path: "tcp.backoff_max_ms", type: "number" },
{
label: "Backoff Multiplier",
path: "tcp.backoff_multiplier",
type: "number",
},
{ label: "Max Retries", path: "tcp.max_retries", type: "number" },
{
label: "Connection Timeout (ms)",
path: "tcp.connection_timeout_ms",
type: "number",
},
{ label: "Keep Alive (ms)", path: "tcp.keep_alive_ms", type: "number" },
],
},
{
title: "BLCU Configuration",
fields: [
{
label: "IP Address",
path: "blcu.ip",
type: "text",
placeholder: "127.0.0.1",
},
{
label: "Download Order ID",
path: "blcu.download_order_id",
type: "number",
},
{
label: "Upload Order ID",
path: "blcu.upload_order_id",
type: "number",
},
],
},
{
title: "TFTP Configuration",
fields: [
{ label: "Block Size", path: "tftp.block_size", type: "number" },
{ label: "Retries", path: "tftp.retries", type: "number" },
{ label: "Timeout (ms)", path: "tftp.timeout_ms", type: "number" },
{ label: "Backoff Factor", path: "tftp.backoff_factor", type: "number" },
{
label: "Enable Progress",
path: "tftp.enable_progress",
type: "boolean",
},
],
},
{
title: "Logging Configuration",
fields: [
{
label: "Time Unit",
path: "logging.time_unit",
type: "select",
options: ["ns", "us", "ms", "s"],
},
{
label: "Logging Path",
path: "logging.logging_path",
type: "path",
},
],
},
];