-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselectors.ts
224 lines (222 loc) · 7.04 KB
/
selectors.ts
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
import { E2ESelectors } from '@grafana/e2e-selectors';
export const Components = {
ConfigEditor: {
ServerAddress: {
label: 'Server address',
placeholder: 'localhost',
tooltip: 'QuestdDB TCP server address',
},
ServerPort: {
label: 'Server port',
placeholder: `8812`,
tooltip: 'QuestDB PG wire TCP port. Typically 8812.',
},
Username: {
label: 'Username',
placeholder: 'admin',
tooltip: 'QuestDB username',
},
Password: {
label: 'Password',
placeholder: 'quest',
tooltip: 'QuestDB password',
},
TLSCACert: {
label: 'TLS/SSL Root Certificate',
placeholder: 'CA Cert. Begins with -----BEGIN CERTIFICATE-----',
tooltip:
"Allows you to configure certificates by specifying its content. The content will be stored encrypted in Grafana's database.",
},
TLSClientCert: {
label: 'TLS/SSL Client Certificate',
placeholder: 'Client Cert. Begins with -----BEGIN CERTIFICATE-----',
},
TLSClientKey: {
label: 'TLS/SSL Client Key',
placeholder: 'Client Key. Begins with -----BEGIN RSA PRIVATE KEY-----',
},
TLSClientCertFile: {
label: 'TLS/SSL Client Certificate File',
placeholder:
'To authenticate with an TLS/SSL client certificate, provide the path to the file here. Be sure that the file is readable by the user executing the grafana process.',
},
TLSClientKeyFile: {
label: 'TLS/SSL Client Key File',
placeholder:
'To authenticate with a client TLS/SSL certificate, provide the path to the corresponding key file here. Be sure that the file is only readable by the user executing the grafana process.',
},
Timeout: {
label: 'Connect Timeout (seconds)',
placeholder: '10',
tooltip: 'Timeout in seconds for connection',
},
QueryTimeout: {
label: 'Query Timeout (seconds)',
placeholder: '60',
tooltip: 'Timeout in seconds for read queries',
},
TlsMode: {
label: 'TLS/SSL Mode',
tooltip:
'This option determines whether or with what priority a secure TLS/SSL TCP/IP connection will be negotiated with the server. For QuestDB Enterprise, use "require". For self-hosted QuestDB, use "disable".',
placeholder: 'TLS/SSL Mode',
},
TlsMethod: {
label: 'TLS/SSL Method',
tooltip:
'This option determines how TLS/SSL certifications are configured. Selecting ' +
'"File system path" will allow you to configure certificates by specifying paths to existing ' +
'certificates on the local file system where Grafana is running. Be sure that the file is ' +
'readable by the user executing the Grafana process. ' +
'Selecting "Certificate content" will allow you to configure certificates by specifying its ' +
"content. The content will be stored encrypted in Grafana's database.",
placeholder: 'TLS/SSL Method',
},
SecureSocksProxy: {
label: 'Enable Secure Socks Proxy',
tooltip: 'Enable proxying the datasource connection through the secure socks proxy to a different network.',
},
MaxOpenConnections: {
label: 'Max open',
placeholder: '100',
tooltip: 'Maximum number of open connections to the database.',
},
MaxIdleConnections: {
label: 'Max idle',
placeholder: '100',
tooltip: 'Maximum number of idle connections.',
},
MaxConnectionLifetime: {
label: 'Max lifetime',
placeholder: '14400',
tooltip:
'The maximum amount of time (in seconds) a connection may be reused. If set to 0, connections are reused forever.',
},
},
QueryEditor: {
CodeEditor: {
input: () => '.monaco-editor textarea',
container: 'data-testid-code-editor-container',
Expand: 'data-testid-code-editor-expand-button',
},
Format: {
label: 'Format',
tooltip: 'Query Type',
options: {
AUTO: 'Auto',
TABLE: 'Table',
TIME_SERIES: 'Time Series',
},
},
Types: {
label: 'Query Type',
tooltip: 'Query Type',
options: {
SQLEditor: 'SQL Editor',
QueryBuilder: 'Query Builder',
},
switcher: {
title: 'Are you sure?',
body: 'Queries that are too complex for the Query Builder will be altered.',
confirmText: 'Continue',
dismissText: 'Cancel',
},
cannotConvert: {
title: 'Cannot convert',
confirmText: 'Yes',
},
},
QueryBuilder: {
TYPES: {
label: 'Query type',
tooltip: 'Query type',
options: {
LIST: 'Table',
AGGREGATE: 'Aggregate',
TREND: 'Time Series',
},
},
DATABASE: {
label: 'Database',
tooltip: 'QuestDB database to query from',
},
FROM: {
label: 'Table',
tooltip: 'QuestDB table to query from',
},
SELECT: {
label: 'Fields',
tooltipTable: 'List of fields to show',
tooltipAggregate: `List of metrics to show. Use any of the given aggregation along with the field`,
ALIAS: {
label: 'as',
tooltip: 'alias',
},
AddLabel: 'Field',
RemoveLabel: '',
},
AGGREGATES: {
label: 'Aggregates',
tooltipTable: 'Aggregate functions to use',
tooltipAggregate: `Aggregate functions to use`,
ALIAS: {
label: 'as',
tooltip: 'alias',
},
AddLabel: 'Aggregate',
RemoveLabel: '',
},
WHERE: {
label: 'Filters',
tooltip: `List of filters`,
AddLabel: 'Filter',
RemoveLabel: '',
},
GROUP_BY: {
label: 'Group by',
tooltip: 'Group the results by specific field',
},
SAMPLE_BY: {
label: 'Sample by keys',
tooltip: 'Sample the results by specific field',
},
FILL: {
label: 'Sample by fill',
tooltip: 'Fill missing aggregate columns using a strategy or constant value',
},
ORDER_BY: {
label: 'Order by',
tooltip: 'Order by field',
AddLabel: 'Order by',
RemoveLabel: '',
},
LIMIT: {
label: 'Limit',
tooltip: 'Number of records/results to show.',
},
PARTITION_BY: {
label: 'Latest on partition by',
tooltip: 'List of fields to partition by with LATEST ON clause',
},
DESIGNATED_TIMESTAMP: {
label: 'Designated timestamp',
tooltip: "Select table's designated timestamp",
},
ALIGN_TO: {
label: 'Align to',
tooltip: 'Align sampling to first observation or calendar dates',
},
CALENDAR_OFF_TZ: {
label: 'Calendar offset/timezone',
tooltip: 'Align sampling to calendar offset or timezone',
},
PREVIEW: {
label: 'SQL Preview',
tooltip: 'SQL Preview. You can safely switch to SQL Editor to customize the generated query',
},
},
},
};
export const selectors: { components: E2ESelectors<typeof Components> } = {
components: Components,
};