@@ -13,6 +13,7 @@ export type CompasSettingsRecord = {
13
13
sclValidatorServiceUrl : string ;
14
14
cimMappingServiceUrl : string ;
15
15
sclAutoAlignmentServiceUrl : string ;
16
+ importFromApiUrl : string ;
16
17
} ;
17
18
18
19
export function CompasSettings ( ) {
@@ -24,6 +25,7 @@ export function CompasSettings() {
24
25
sclValidatorServiceUrl : this . getCompasSetting ( 'sclValidatorServiceUrl' ) ,
25
26
cimMappingServiceUrl : this . getCompasSetting ( 'cimMappingServiceUrl' ) ,
26
27
sclAutoAlignmentServiceUrl : this . getCompasSetting ( 'sclAutoAlignmentServiceUrl' ) ,
28
+ importFromApiUrl : this . getCompasSetting ( 'importFromApiUrl' ) ,
27
29
} ;
28
30
} ,
29
31
@@ -32,7 +34,8 @@ export function CompasSettings() {
32
34
sclDataServiceUrl : '/compas-scl-data-service' ,
33
35
sclValidatorServiceUrl : '/compas-scl-validator' ,
34
36
cimMappingServiceUrl : '/compas-cim-mapping' ,
35
- sclAutoAlignmentServiceUrl : '/compas-scl-auto-alignment'
37
+ sclAutoAlignmentServiceUrl : '/compas-scl-auto-alignment' ,
38
+ importFromApiUrl : '/public/cim'
36
39
}
37
40
} ,
38
41
@@ -72,11 +75,16 @@ export class CompasSettingsElement extends LitElement {
72
75
return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="sclAutoAlignmentServiceUrl"]' ) ;
73
76
}
74
77
78
+ getImportFromApiUrlField ( ) : TextFieldBase {
79
+ return < TextFieldBase > this . shadowRoot ! . querySelector ( 'mwc-textfield[id="importFromApiUrl"]' ) ;
80
+ }
81
+
75
82
valid ( ) : boolean {
76
83
return this . getSclDataServiceUrlField ( ) . checkValidity ( )
77
84
&& this . getSclValidatorServiceUrlField ( ) . checkValidity ( )
78
85
&& this . getCimMappingServiceUrlField ( ) . checkValidity ( )
79
- && this . getSclAutoAlignmentServiceUrlField ( ) . checkValidity ( ) ;
86
+ && this . getSclAutoAlignmentServiceUrlField ( ) . checkValidity ( )
87
+ && this . getImportFromApiUrlField ( ) . checkValidity ( ) ;
80
88
}
81
89
82
90
save ( ) : boolean {
@@ -89,6 +97,7 @@ export class CompasSettingsElement extends LitElement {
89
97
CompasSettings ( ) . setCompasSetting ( 'sclValidatorServiceUrl' , this . getSclValidatorServiceUrlField ( ) . value ) ;
90
98
CompasSettings ( ) . setCompasSetting ( 'cimMappingServiceUrl' , this . getCimMappingServiceUrlField ( ) . value ) ;
91
99
CompasSettings ( ) . setCompasSetting ( 'sclAutoAlignmentServiceUrl' , this . getSclAutoAlignmentServiceUrlField ( ) . value ) ;
100
+ CompasSettings ( ) . setCompasSetting ( 'importFromApiUrl' , this . getImportFromApiUrlField ( ) . value ) ;
92
101
return true ;
93
102
}
94
103
@@ -122,6 +131,10 @@ export class CompasSettingsElement extends LitElement {
122
131
label = "${ translate ( 'compas.settings.sclAutoAlignmentServiceUrl' ) } "
123
132
value = "${ this . compasSettings . sclAutoAlignmentServiceUrl } " required >
124
133
</ mwc- textfield>
134
+ <mwc- textfield id= "importFromApiUrl"
135
+ label = "${ translate ( 'compas.settings.importFromApiUrl' ) } "
136
+ value = "${ this . compasSettings . importFromApiUrl } " required >
137
+ </ mwc- textfield>
125
138
126
139
<mwc- butto n @click = ${ ( ) => {
127
140
if ( this . reset ( ) ) {
0 commit comments