added desired compatibility level plus minor fixes
This commit is contained in:
parent
fb452386a1
commit
6621357091
|
@ -50,7 +50,7 @@ export class RepositoryService {
|
||||||
let url;
|
let url;
|
||||||
comment = interfaceInfo.comments; // temp fix for emailing comment
|
comment = interfaceInfo.comments; // temp fix for emailing comment
|
||||||
if (comment == null || comment === '') {
|
if (comment == null || comment === '') {
|
||||||
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}$desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
} else {
|
} else {
|
||||||
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}$desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}$desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,10 @@ export class RepositoryService {
|
||||||
return this.httpClient.delete(url, {withCredentials: true, responseType: 'text'});
|
return this.httpClient.delete(url, {withCredentials: true, responseType: 'text'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getInterfaceDesiredCompatibilityLevel(repoId: string, interfaceId: string) {
|
||||||
|
return this.httpClient.get(environment.API_ENDPOINT + `/compliance/${repoId}/${interfaceId}`);
|
||||||
|
}
|
||||||
|
|
||||||
addRepository(datatype: string, newRepository: Repository): Observable<Repository> {
|
addRepository(datatype: string, newRepository: Repository): Observable<Repository> {
|
||||||
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
|
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
<span *ngIf="showIdentifiedBaseUrl" class="help-block inline" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
|
<span *ngIf="showIdentifiedBaseUrl" class="help-block inline" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
|
||||||
Identified
|
Identified
|
||||||
</span>
|
</span>
|
||||||
<input id="baseurl" type="text" class="md-input uk-disabled" formControlName="baseurl" (blur)="getInterfaceInfo()">
|
<input id="baseurl" type="text" class="md-input" [ngClass]="{'uk-disabled': this.repoInterfaceForm.get('compatibilityLevel').value}"
|
||||||
|
formControlName="baseurl" (blur)="getInterfaceInfo()">
|
||||||
<span class="md-input-bar"></span>
|
<span class="md-input-bar"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -113,14 +113,17 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
if (this.currentInterface?.apiParams?.find(entry => entry.param === 'set')) {
|
if (this.currentInterface?.apiParams?.find(entry => entry.param === 'set')) {
|
||||||
// it will not work if set is not on valsetList
|
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.apiParams
|
||||||
if (this.valsetList.some(x => x === this.currentInterface.apiParams['set'])) {
|
.find(entry => entry.param === 'set').value);
|
||||||
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.apiParams
|
this.repoService.getInterfaceDesiredCompatibilityLevel(this.currentInterface.datasource, this.currentInterface.id).subscribe(
|
||||||
.find(entry => entry.param === 'set').value);
|
res => {
|
||||||
}
|
console.log(res);
|
||||||
this.loadingMessage = '';
|
this.repoInterfaceForm.get('desiredCompatibilityLevel').setValue(res['desiredCompatibilityLevel']);
|
||||||
this.repoInterfaceForm.updateValueAndValidity();
|
}
|
||||||
this.checkIfValid();
|
);
|
||||||
|
this.loadingMessage = '';
|
||||||
|
this.repoInterfaceForm.updateValueAndValidity();
|
||||||
|
this.checkIfValid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue