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();
|
||||
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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue