fix for repository update page mode type
This commit is contained in:
parent
1c756566b0
commit
4c0d2e560d
|
@ -52,6 +52,14 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
this.repo = this.sharedService.getRepository();
|
this.repo = this.sharedService.getRepository();
|
||||||
if (this.repo.id.includes('eurocrisdris')) {
|
if (this.repo.id.includes('eurocrisdris')) {
|
||||||
this.mode = 'cris';
|
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.logoURL = this.repo.logoUrl;
|
||||||
this.getRepoInterfaces();
|
this.getRepoInterfaces();
|
||||||
|
|
|
@ -162,6 +162,7 @@ export class RepositoryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDatasourceClasses(mode: string): Observable<Map<string, string>> {
|
getDatasourceClasses(mode: string): Observable<Map<string, string>> {
|
||||||
|
console.log('mode: ' + mode);
|
||||||
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
|
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
return this.httpClient.get<Map<string, string>>(url, headerOptions);
|
return this.httpClient.get<Map<string, string>>(url, headerOptions);
|
||||||
|
|
|
@ -172,6 +172,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
|
|
||||||
getDatasourceClasses() {
|
getDatasourceClasses() {
|
||||||
// FIXME: Use eoscDatasourceType when we support the new model
|
// FIXME: Use eoscDatasourceType when we support the new model
|
||||||
|
console.log('I update with mode: ' + this.mode);
|
||||||
this.repoService.getDatasourceClasses(this.mode).subscribe(
|
this.repoService.getDatasourceClasses(this.mode).subscribe(
|
||||||
classes => this.datasourceClasses = classes,
|
classes => this.datasourceClasses = classes,
|
||||||
error => {
|
error => {
|
||||||
|
|
Loading…
Reference in New Issue