fix for repository update page mode type

This commit is contained in:
John Balasis 2022-06-15 09:41:37 +00:00
parent 1c756566b0
commit 4c0d2e560d
3 changed files with 10 additions and 0 deletions

View File

@ -52,6 +52,14 @@ export class SourcesUpdateRepoComponent implements OnInit {
this.repo = this.sharedService.getRepository();
if (this.repo.id.includes('eurocrisdris')) {
this.mode = 'cris';
} else if (this.repo.id.includes('opendoar')) {
this.mode = 'opendoar';
} else if (this.repo.id.includes('re3data')) {
this.mode = 're3data';
} else if (this.repo.id.includes('journal')) {
this.mode = 'journal';
} else if (this.repo.id.includes('aggregator')) {
this.mode = 'aggregator';
}
this.logoURL = this.repo.logoUrl;
this.getRepoInterfaces();

View File

@ -162,6 +162,7 @@ export class RepositoryService {
}
getDatasourceClasses(mode: string): Observable<Map<string, string>> {
console.log('mode: ' + mode);
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<Map<string, string>>(url, headerOptions);

View File

@ -172,6 +172,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
getDatasourceClasses() {
// FIXME: Use eoscDatasourceType when we support the new model
console.log('I update with mode: ' + this.mode);
this.repoService.getDatasourceClasses(this.mode).subscribe(
classes => this.datasourceClasses = classes,
error => {