@@ -8,6 +8,7 @@ import {getOpenScdElement} from "./foundation.js";
8
8
export type CompasSettingsRecord = {
9
9
sclDataServiceUrl : string ;
10
10
cimMappingServiceUrl : string ;
11
+ sclAutoAlignmentServiceUrl : string ;
11
12
} ;
12
13
13
14
export function CompasSettings ( ) {
@@ -17,13 +18,15 @@ export function CompasSettings() {
17
18
return {
18
19
sclDataServiceUrl : this . getCompasSetting ( 'sclDataServiceUrl' ) ,
19
20
cimMappingServiceUrl : this . getCompasSetting ( 'cimMappingServiceUrl' ) ,
21
+ sclAutoAlignmentServiceUrl : this . getCompasSetting ( 'sclAutoAlignmentServiceUrl' ) ,
20
22
} ;
21
23
} ,
22
24
23
25
get defaultSettings ( ) : CompasSettingsRecord {
24
26
return {
25
27
sclDataServiceUrl : '/compas-scl-data-service' ,
26
- cimMappingServiceUrl : '/compas-cim-mapping'
28
+ cimMappingServiceUrl : '/compas-cim-mapping' ,
29
+ sclAutoAlignmentServiceUrl : '/compas-scl-auto-alignment'
27
30
}
28
31
} ,
29
32
@@ -55,9 +58,14 @@ export class CompasSettingsElement extends LitElement {
55
58
return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="cimMappingServiceUrl"]' ) ;
56
59
}
57
60
61
+ getSclAutoAlignmentServiceUrlField ( ) : TextFieldBase {
62
+ return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="sclAutoAlignmentServiceUrl"]' ) ;
63
+ }
64
+
58
65
valid ( ) : boolean {
59
66
return this . getSclDataServiceUrlField ( ) . checkValidity ( )
60
- && this . getCimMappingServiceUrlField ( ) . checkValidity ( ) ;
67
+ && this . getCimMappingServiceUrlField ( ) . checkValidity ( )
68
+ && this . getSclAutoAlignmentServiceUrlField ( ) . checkValidity ( ) ;
61
69
}
62
70
63
71
save ( ) : boolean {
@@ -68,6 +76,7 @@ export class CompasSettingsElement extends LitElement {
68
76
// Update settings from TextField.
69
77
CompasSettings ( ) . setCompasSetting ( 'sclDataServiceUrl' , this . getSclDataServiceUrlField ( ) . value ) ;
70
78
CompasSettings ( ) . setCompasSetting ( 'cimMappingServiceUrl' , this . getCimMappingServiceUrlField ( ) . value ) ;
79
+ CompasSettings ( ) . setCompasSetting ( 'sclAutoAlignmentServiceUrl' , this . getSclAutoAlignmentServiceUrlField ( ) . value ) ;
71
80
return true ;
72
81
}
73
82
@@ -94,6 +103,10 @@ export class CompasSettingsElement extends LitElement {
94
103
label = "${ translate ( 'compas.settings.cimMappingServiceUrl' ) } "
95
104
value = "${ this . compasSettings . cimMappingServiceUrl } " required >
96
105
</ mwc- textfield>
106
+ <mwc- textfield dialogInitialFocus id= "sclAutoAlignmentServiceUrl"
107
+ label = "${ translate ( 'compas.settings.sclAutoAlignmentServiceUrl' ) } "
108
+ value = "${ this . compasSettings . sclAutoAlignmentServiceUrl } " required >
109
+ </ mwc- textfield>
97
110
98
111
<mwc- butto n style= "--mdc-theme-primary: var(--mdc-theme-error)"
99
112
@click = ${ ( ) => {
0 commit comments