Skip to content

Commit ecb62eb

Browse files
committed
Admin UI updated, internationalization (partially).
1 parent 4ecda26 commit ecb62eb

File tree

5 files changed

+184
-116
lines changed

5 files changed

+184
-116
lines changed

src/htdocs-admin/src/components/ProtocolConnections.vue

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@click="createProtocolConnection($event)"
2828
>
2929
<v-icon dark> mdi-plus </v-icon>
30-
New Connection
30+
{{msg.connNewConnection}}
3131
</v-btn>
3232
</v-col>
3333

@@ -40,7 +40,7 @@
4040
class="title grey--text text--lighten-1 font-weight-light"
4141
style="align-self: center"
4242
>
43-
Select a Connection
43+
{{msg.connSelectConnection}}
4444
</div>
4545
<v-card
4646
v-else
@@ -56,7 +56,7 @@
5656
outlined
5757
clearable
5858
:input-value="active"
59-
label="Name"
59+
:label="msg.connConnectionName"
6060
hide-details="auto"
6161
v-model="selected.name"
6262
@change="updateProtocolConnection"
@@ -77,17 +77,17 @@
7777
<v-icon dark> mdi-minus </v-icon>
7878
</v-btn>
7979
</template>
80-
<span>Delete protocol connection!</span>
80+
<span>{{msg.connDeleteConnection}}</span>
8181
</v-tooltip>
8282

83-
<v-dialog v-model="dialogDelConn" max-width="290">
83+
<v-dialog v-model="dialogDelConn" max-width="400">
8484
<v-card>
8585
<v-card-title class="headline">
86-
Delete connection!
86+
{{msg.connDeleteConnection}}
8787
</v-card-title>
8888

8989
<v-card-text>
90-
Please confirm removal of protocol connection.
90+
{{msg.connDeleteConnectionConfirm}}
9191
</v-card-text>
9292

9393
<v-card-actions>
@@ -98,7 +98,7 @@
9898
text
9999
@click="dialogDelConn = false"
100100
>
101-
Cancel
101+
{{msg.connDeleteConnectionCancel}}
102102
</v-btn>
103103

104104
<v-btn
@@ -109,7 +109,7 @@
109109
deleteProtocolConnection($event);
110110
"
111111
>
112-
Delete Connection!
112+
{{msg.connDeleteConnectionExecute}}
113113
</v-btn>
114114
</v-card-actions>
115115
</v-card>
@@ -123,7 +123,7 @@
123123
min="1"
124124
clearable
125125
:input-value="active"
126-
label="Connection Number"
126+
:label="msg.connConnectionNumber"
127127
hide-details="auto"
128128
v-model="selected.protocolConnectionNumber"
129129
@change="updateProtocolConnection"
@@ -135,7 +135,7 @@
135135
outlined
136136
clearable
137137
:input-value="active"
138-
label="Description"
138+
:label="msg.connDescription"
139139
hide-details="auto"
140140
v-model="selected.description"
141141
@change="updateProtocolConnection"
@@ -145,7 +145,7 @@
145145
v-model="selected.enabled"
146146
inset
147147
color="primary"
148-
:label="`Enabled: ${selected.enabled.toString()}`"
148+
:label="`${msg.connEnabled}${selected.enabled?msg.connEnabledTrue:msg.connEnabledFalse}`"
149149
@change="updateProtocolConnection"
150150
class="mb-0"
151151
></v-switch>
@@ -154,15 +154,15 @@
154154
v-model="selected.commandsEnabled"
155155
inset
156156
color="primary"
157-
:label="`Commands Enabled: ${selected.commandsEnabled.toString()}`"
157+
:label="`${msg.connCmdEnabled}${selected.commandsEnabled?msg.connCmdEnabledTrue:msg.connCmdEnabledFalse}`"
158158
@change="updateProtocolConnection"
159159
class="mt-0"
160160
></v-switch>
161161

162162
<v-select
163163
prepend-inner-icon="mdi-cogs"
164164
:items="driverNameItems"
165-
label="Protocol driver"
165+
:label="msg.connProtocolDriver"
166166
v-model="selected.protocolDriver"
167167
outlined
168168
@change="updateProtocolConnection"
@@ -176,19 +176,18 @@
176176
min="1"
177177
clearable
178178
:input-value="active"
179-
label="Instance Number"
179+
:label="msg.connInstanceNumber"
180180
hide-details="auto"
181181
v-model="selected.protocolDriverInstanceNumber"
182182
@change="updateProtocolConnection"
183183
></v-text-field>
184184

185185
<v-card class="mx-auto" tile>
186186
<v-list flat dense shaped subheader>
187-
<v-subheader>Protocol Connection Parameters</v-subheader>
187+
<v-subheader>{{msg.connProtocolConnectionParameters}}</v-subheader>
188188

189189
<v-list-item-group multiple active-class="">
190190

191-
192191
<v-list-item
193192
v-if="
194193
[
@@ -210,18 +209,18 @@
210209
type="number"
211210
min="0"
212211
:input-value="active"
213-
label="Local link address"
212+
:label="msg.connLocalLinkAddress"
214213
hide-details="auto"
215214
v-model="selected.localLinkAddress"
216215
@change="updateProtocolConnection"
217216
></v-text-field>
218217
</v-list-item-action>
219218
<v-list-item-content>
220219
<v-list-item-title
221-
>Local Link Address</v-list-item-title
220+
>{{msg.connLocalLinkAddressTitle}}</v-list-item-title
222221
>
223222
<v-list-item-subtitle
224-
>Integer number</v-list-item-subtitle
223+
>{{msg.connLocalLinkAddressHint}}</v-list-item-subtitle
225224
>
226225
</v-list-item-content>
227226
</template>
@@ -248,18 +247,18 @@
248247
type="number"
249248
min="0"
250249
:input-value="active"
251-
label="Remote link address"
250+
:label="msg.connRemoteLinkAddress"
252251
hide-details="auto"
253252
v-model="selected.remoteLinkAddress"
254253
@change="updateProtocolConnection"
255254
></v-text-field>
256255
</v-list-item-action>
257256
<v-list-item-content>
258257
<v-list-item-title
259-
>Remote Link Address</v-list-item-title
258+
>{{msg.connRemoteLinkAddressTitle}}</v-list-item-title
260259
>
261260
<v-list-item-subtitle
262-
>Integer number</v-list-item-subtitle
261+
>{{msg.connRemoteLinkAddressHint}}</v-list-item-subtitle
263262
>
264263
</v-list-item-content>
265264
</template>
@@ -279,7 +278,7 @@
279278
chips
280279
small-chips
281280
deletable-chips
282-
label="Remote Endpoint URLs"
281+
:label="msg.connRemoteEndpointsUrls"
283282
multiple
284283
@change="updateProtocolConnection"
285284
></v-autocomplete>
@@ -299,7 +298,7 @@
299298
<v-icon dark> mdi-plus </v-icon>
300299
</v-btn>
301300
</template>
302-
<span>Add new endpoint URL!</span>
301+
<span>{{msg.connRemoteEndpointsAddNew}}</span>
303302
</v-tooltip>
304303
<v-dialog
305304
v-model="dialogAddURL"
@@ -308,12 +307,12 @@
308307
>
309308
<v-card>
310309
<v-card-title class="headline">
311-
Add a new OPC-UA URL!
310+
{{msg.connRemoteEndpointsAddNew}}
312311
</v-card-title>
313312

314313
<v-card-title class="headline">
315314
<v-text-field
316-
label="New URL"
315+
:label="msg.connRemoteEndpointsNewUrl"
317316
v-model="newURL"
318317
:rules="[rules.required, rules.opcUrl]"
319318
></v-text-field>
@@ -327,7 +326,7 @@
327326
text
328327
@click="dialogAddURL = false"
329328
>
330-
Cancel
329+
{{msg.connRemoteEndpointsNewUrlCancel}}
331330
</v-btn>
332331

333332
<v-btn
@@ -338,7 +337,7 @@
338337
addNewURL($event);
339338
"
340339
>
341-
Add URL!
340+
{{msg.connRemoteEndpointsNewUrlExecute}}
342341
</v-btn>
343342
</v-card-actions>
344343
</v-card>
@@ -356,50 +355,50 @@
356355
<v-text-field
357356
type="string"
358357
:input-value="active"
359-
label="Publishing interval"
358+
:label="msg.connConfigFileName"
360359
hide-details="auto"
361360
v-model="selected.configFileName"
362361
@change="updateProtocolConnection"
363362
></v-text-field>
364363
</v-list-item-action>
365364

366365
<v-list-item-content>
367-
<v-list-item-title>Config file name</v-list-item-title>
366+
<v-list-item-title>{{msg.connConfigFileNameTitle}}</v-list-item-title>
368367
<v-list-item-subtitle
369-
>XML config file name with path.</v-list-item-subtitle
368+
>{{msg.connConfigFileNameHint}}</v-list-item-subtitle
370369
>
371370
</v-list-item-content>
372371
</template>
373372
</v-list-item>
374373

375-
<v-list-item
374+
<v-list-item class="ma-0"
376375
v-if="
377376
[
378377
'OPC-UA'
379378
].includes(selected.protocolDriver)
380379
"
381380
>
382-
<v-switch
381+
<v-switch class="ma-0"
383382
v-model="selected.useSecurity"
384383
inset
385384
color="primary"
386-
:label="`Use security (certificates, encryption)`"
385+
:label="`${msg.connUseSecurity}${selected.useSecurity?msg.connUseSecurityTrue:msg.connUseSecurityFalse}`"
387386
@change="updateProtocolConnection"
388387
></v-switch>
389388
</v-list-item>
390389

391-
<v-list-item
390+
<v-list-item class="ma-0"
392391
v-if="
393392
[
394393
'OPC-UA'
395394
].includes(selected.protocolDriver)
396395
"
397396
>
398-
<v-switch
397+
<v-switch class="ma-0"
399398
v-model="selected.autoCreateTags"
400399
inset
401400
color="primary"
402-
:label="`Auto create tags (server browse)`"
401+
:label="`${msg.connAutoCreateTags}${selected.autoCreateTags?msg.connAutoCreateTagsTrue:msg.connAutoCreateTagsFalse}`"
403402
@change="updateProtocolConnection"
404403
></v-switch>
405404
</v-list-item>
@@ -416,17 +415,17 @@
416415
<v-text-field
417416
type="number"
418417
:input-value="active"
419-
label="Publishing interval"
418+
:label="msg.connPublishingInterval"
420419
hide-details="auto"
421420
v-model="selected.autoCreateTagPublishingInterval"
422421
@change="updateProtocolConnection"
423422
></v-text-field>
424423
</v-list-item-action>
425424

426425
<v-list-item-content>
427-
<v-list-item-title>Default publishing interval</v-list-item-title>
426+
<v-list-item-title>{{msg.connPublishingIntervalTitle}}</v-list-item-title>
428427
<v-list-item-subtitle
429-
>In seconds (for auto created tags).</v-list-item-subtitle
428+
>{{msg.connPublishingIntervalHint}}</v-list-item-subtitle
430429
>
431430
</v-list-item-content>
432431
</template>
@@ -444,16 +443,16 @@
444443
<v-text-field
445444
type="number"
446445
:input-value="active"
447-
label="Sampling interval"
446+
:label="msg.connSamplingInterval"
448447
hide-details="auto"
449448
v-model="selected.autoCreateTagSamplingInterval"
450449
@change="updateProtocolConnection"
451450
></v-text-field>
452451
</v-list-item-action>
453452
<v-list-item-content>
454-
<v-list-item-title>Default sampling interval on server</v-list-item-title>
453+
<v-list-item-title>{{msg.connSamplingIntervalTitle}}</v-list-item-title>
455454
<v-list-item-subtitle
456-
>In seconds (0=auto adjusted by the OPC server).</v-list-item-subtitle
455+
>{{msg.connSamplingIntervalHint}}</v-list-item-subtitle
457456
>
458457
</v-list-item-content>
459458
</template>
@@ -471,16 +470,16 @@
471470
<v-text-field
472471
type="number"
473472
:input-value="active"
474-
label="Queue size"
473+
:label="msg.connServerQueueSize"
475474
hide-details="auto"
476475
v-model="selected.autoCreateTagQueueSize"
477476
@change="updateProtocolConnection"
478477
></v-text-field>
479478
</v-list-item-action>
480479
<v-list-item-content>
481-
<v-list-item-title>Default sampling queue size on server</v-list-item-title>
480+
<v-list-item-title>{{msg.connServerQueueSizeTitle}}</v-list-item-title>
482481
<v-list-item-subtitle
483-
>Use zero to avoid buffering on the OPC server.</v-list-item-subtitle
482+
>{{msg.connServerQueueSizeHint}}</v-list-item-subtitle
484483
>
485484
</v-list-item-content>
486485
</template>
@@ -497,16 +496,16 @@
497496
<v-text-field
498497
type="number"
499498
:input-value="active"
500-
label="Timeout keep-alive"
499+
:label="msg.connTimeoutKeepalive"
501500
hide-details="auto"
502501
v-model="selected.timeoutMs"
503502
@change="updateProtocolConnection"
504503
></v-text-field>
505504
</v-list-item-action>
506505
<v-list-item-content>
507-
<v-list-item-title>Timeout interval for keep-alive messages</v-list-item-title>
506+
<v-list-item-title>{{msg.connTimeoutKeepaliveTitle}}</v-list-item-title>
508507
<v-list-item-subtitle
509-
>In milliseconds.</v-list-item-subtitle
508+
>{{msg.connTimeoutKeepaliveHint}}</v-list-item-subtitle
510509
>
511510
</v-list-item-content>
512511
</template>

0 commit comments

Comments
 (0)