@@ -10,6 +10,7 @@ import {dispatchEventOnOpenScd} from "./foundation.js";
10
10
11
11
export type CompasSettingsRecord = {
12
12
sclDataServiceUrl : string ;
13
+ sclValidatorServiceUrl : string ;
13
14
cimMappingServiceUrl : string ;
14
15
sclAutoAlignmentServiceUrl : string ;
15
16
} ;
@@ -20,6 +21,7 @@ export function CompasSettings() {
20
21
get compasSettings ( ) : CompasSettingsRecord {
21
22
return {
22
23
sclDataServiceUrl : this . getCompasSetting ( 'sclDataServiceUrl' ) ,
24
+ sclValidatorServiceUrl : this . getCompasSetting ( 'sclValidatorServiceUrl' ) ,
23
25
cimMappingServiceUrl : this . getCompasSetting ( 'cimMappingServiceUrl' ) ,
24
26
sclAutoAlignmentServiceUrl : this . getCompasSetting ( 'sclAutoAlignmentServiceUrl' ) ,
25
27
} ;
@@ -28,6 +30,7 @@ export function CompasSettings() {
28
30
get defaultSettings ( ) : CompasSettingsRecord {
29
31
return {
30
32
sclDataServiceUrl : '/compas-scl-data-service' ,
33
+ sclValidatorServiceUrl : '/compas-scl-validator' ,
31
34
cimMappingServiceUrl : '/compas-cim-mapping' ,
32
35
sclAutoAlignmentServiceUrl : '/compas-scl-auto-alignment'
33
36
}
@@ -57,6 +60,10 @@ export class CompasSettingsElement extends LitElement {
57
60
return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="sclDataServiceUrl"]' ) ;
58
61
}
59
62
63
+ getSclValidatorServiceUrlField ( ) : TextFieldBase {
64
+ return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="sclValidatorServiceUrl"]' ) ;
65
+ }
66
+
60
67
getCimMappingServiceUrlField ( ) : TextFieldBase {
61
68
return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="cimMappingServiceUrl"]' ) ;
62
69
}
@@ -67,6 +74,7 @@ export class CompasSettingsElement extends LitElement {
67
74
68
75
valid ( ) : boolean {
69
76
return this . getSclDataServiceUrlField ( ) . checkValidity ( )
77
+ && this . getSclValidatorServiceUrlField ( ) . checkValidity ( )
70
78
&& this . getCimMappingServiceUrlField ( ) . checkValidity ( )
71
79
&& this . getSclAutoAlignmentServiceUrlField ( ) . checkValidity ( ) ;
72
80
}
@@ -78,6 +86,7 @@ export class CompasSettingsElement extends LitElement {
78
86
79
87
// Update settings from TextField.
80
88
CompasSettings ( ) . setCompasSetting ( 'sclDataServiceUrl' , this . getSclDataServiceUrlField ( ) . value ) ;
89
+ CompasSettings ( ) . setCompasSetting ( 'sclValidatorServiceUrl' , this . getSclValidatorServiceUrlField ( ) . value ) ;
81
90
CompasSettings ( ) . setCompasSetting ( 'cimMappingServiceUrl' , this . getCimMappingServiceUrlField ( ) . value ) ;
82
91
CompasSettings ( ) . setCompasSetting ( 'sclAutoAlignmentServiceUrl' , this . getSclAutoAlignmentServiceUrlField ( ) . value ) ;
83
92
return true ;
@@ -101,6 +110,10 @@ export class CompasSettingsElement extends LitElement {
101
110
label = "${ translate ( 'compas.settings.sclDataServiceUrl' ) } "
102
111
value = "${ this . compasSettings . sclDataServiceUrl } " required >
103
112
</ mwc- textfield>
113
+ <mwc- textfield dialogInitialFocus id= "sclValidatorServiceUrl"
114
+ label = "${ translate ( 'compas.settings.sclValidatorServiceUrl' ) } "
115
+ value = "${ this . compasSettings . sclValidatorServiceUrl } " required >
116
+ </ mwc- textfield>
104
117
<mwc- textfield id= "cimMappingServiceUrl"
105
118
label = "${ translate ( 'compas.settings.cimMappingServiceUrl' ) } "
106
119
value = "${ this . compasSettings . cimMappingServiceUrl } " required >
0 commit comments