Revision 50977
Added by Myrto Koukouli about 6 years ago
sr-data.component.ts | ||
---|---|---|
1 | 1 |
import { Component, OnInit, Type, ViewChild } from '@angular/core'; |
2 | 2 |
import { RegisterDatasourceShareableComponent } from './register-datasource-shareable.component'; |
3 | 3 |
import { DatasourceInfoFormComponent } from '../sources-forms/datasource-info-form.component'; |
4 |
import { RepositoryInterface } from '../../../domain/typeScriptClasses'; |
|
4 |
import { Repository, RepositoryInterface } from '../../../domain/typeScriptClasses';
|
|
5 | 5 |
import { DatasourceInterfaceFormComponent } from '../sources-forms/datasource-interface-form.component'; |
6 | 6 |
import { Description, interfaceFormDesc } from '../../../domain/oa-description'; |
7 | 7 |
import { FormBuilder, FormGroup } from '@angular/forms'; |
... | ... | |
23 | 23 |
step4: string = ''; |
24 | 24 |
|
25 | 25 |
datasourceId: string; |
26 |
repo: Repository; |
|
26 | 27 |
|
27 | 28 |
@ViewChild('datasourcesByCountry') |
28 | 29 |
public datasourcesByCountry: RegisterDatasourceShareableComponent; |
... | ... | |
46 | 47 |
moveAStep(){ |
47 | 48 |
if(this.showRepositories) { |
48 | 49 |
if (this.datasourcesByCountry.goToNextStep()) { |
49 |
this.datasourceId = this.datasourcesByCountry.repoId; |
|
50 | 50 |
this.showRepositories = false; |
51 | 51 |
this.showForm = true; |
52 | 52 |
this.step2 = 'active'; |
... | ... | |
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
|
87 |
getRepoId(emitedId: string) { |
|
88 |
this.datasourceId = emitedId; |
|
89 |
} |
|
90 |
|
|
91 |
getCurrentRepo(repo: Repository) { |
|
92 |
this.repo = repo; |
|
93 |
} |
|
94 |
|
|
87 | 95 |
getRepoInterfaces() { |
88 | 96 |
this.repoService.getRepositoryInterface(this.datasourceId).subscribe( |
89 | 97 |
interfaces => { this.repoInterfaces = interfaces; console.log(this.repoInterfaces.length)}, |
Also available in: Unified diff
finalized sources register and update