Skip to content

Commit d348f29

Browse files
committed
Small update
1 parent 8adacca commit d348f29

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/components/Configuration.vue

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@
4646
>Database id in the range of greater 0 and smaller as
4747
65536</b-form-text
4848
>
49+
<b-form-input
50+
v-model="inputUrl"
51+
type="text"
52+
:state="urlState()"
53+
aria-describedby="input-liveurl-help input-liveurl-feedback"
54+
id="nested-url"
55+
trim
56+
></b-form-input>
57+
<b-form-invalid-feedback id="input-liveurl-feedback">
58+
URL not correct
59+
</b-form-invalid-feedback>
60+
<b-form-text id="input-liveurl-help"
61+
>Either empty or it need to be a ADATCP URL</b-form-text
62+
>
4963
</b-form-group>
5064
<b-collapse id="mapFile-collapse">
5165
<b-form-group
@@ -254,7 +268,7 @@
254268
bordered
255269
hover
256270
small
257-
:items="config.Module.FileAccess.Directories"
271+
:items="config.Module.Directories"
258272
:fields="fileFields"
259273
>
260274
<template v-slot:cell(delete)="row">
@@ -454,6 +468,7 @@ export default class Configuration extends Vue {
454468
fileTransferName: '',
455469
location: '',
456470
dbid: '0' as string,
471+
inputUrl: '',
457472
file: 100 as number,
458473
mapFileDisplay: false,
459474
modalType: '',
@@ -471,9 +486,7 @@ export default class Configuration extends Vue {
471486
Metrics: { Database: [] },
472487
Module: {
473488
AdabasData: '',
474-
FileAccess: {
475-
Directories: [],
476-
},
489+
Directories: [],
477490
Installation: [],
478491
},
479492
JobStore: {
@@ -597,6 +610,12 @@ export default class Configuration extends Vue {
597610
dbidState() {
598611
return this.$data.dbid > 0 && this.$data.dbid < 64536 ? true : false;
599612
}
613+
urlState() {
614+
if (this.$data.inputUrl == "") {
615+
return true;
616+
}
617+
return /^adatcp[s]?:\/\/[\w\.]*:\d*$/.test(this.$data.inputUrl);
618+
}
600619
fileState() {
601620
return this.$data.file > 0 && this.$data.file < 64536 ? true : false;
602621
}

0 commit comments

Comments
 (0)