diff --git a/client/src/app/instance/doc/components/index.ts b/client/src/app/instance/doc/components/index.ts index 3da0e0842c41a674191226268b6b1940bdaa192a..a4c97d3abd4d83a23b0ce9ee7365150ae024cc47 100644 --- a/client/src/app/instance/doc/components/index.ts +++ b/client/src/app/instance/doc/components/index.ts @@ -1,7 +1,9 @@ import { DatasetByFamilyComponent } from './dataset-by-family.component'; import { DatasetCardDocComponent } from './dataset-card-doc.component'; +import { OutputListComponent } from "./output-list.component"; export const dummiesComponents = [ DatasetByFamilyComponent, - DatasetCardDocComponent + DatasetCardDocComponent, + OutputListComponent ]; diff --git a/client/src/app/instance/doc/components/output-list.component.html b/client/src/app/instance/doc/components/output-list.component.html new file mode 100644 index 0000000000000000000000000000000000000000..14fa0ec4fa11969501ef9c13e0b601c44864abba --- /dev/null +++ b/client/src/app/instance/doc/components/output-list.component.html @@ -0,0 +1,12 @@ +<h4>Available outputs for {{ datasetSelected }}</h4> + +<table id="table" class="attributes-table p-0"> + <tr> + <th>id</th> + <th>attribute</th> + </tr> + <tr *ngFor="let attribute of attributeList"> + <td>{{ attribute.id }}</td> + <td>{{ attribute.name }}</td> + </tr> +</table> diff --git a/client/src/app/instance/doc/components/output-list.component.ts b/client/src/app/instance/doc/components/output-list.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b32769d17bbf0628fb2f9ebd0fdab33bff85ffa --- /dev/null +++ b/client/src/app/instance/doc/components/output-list.component.ts @@ -0,0 +1,35 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; +import { Router } from '@angular/router'; + +import {Survey, Dataset, Attribute} from 'src/app/metamodel/models'; + +@Component({ + selector: 'app-output-list', + templateUrl: 'output-list.component.html', + styleUrls: ['../doc.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush +}) +/** + * @class + * @classdesc Documentation output list component. + */ +export class OutputListComponent { + @Input() datasetSelected: string; + @Input() attributeList: Attribute[]; + + // constructor(private router: Router) { } + // + // selectDataset(datasetName: string) { + // this.router.routeReuseStrategy.shouldReuseRoute = () => false; + // this.router.navigate([`/instance/${this.instanceSelected}/doc/${datasetName}`]); + // } +} diff --git a/client/src/app/instance/doc/containers/doc.component.html b/client/src/app/instance/doc/containers/doc.component.html index d241add0af293f86f4585234bb9ca7898832aea4..34896c683daa76444cc7cf6879a0dfb5775a486e 100644 --- a/client/src/app/instance/doc/containers/doc.component.html +++ b/client/src/app/instance/doc/containers/doc.component.html @@ -28,44 +28,10 @@ <blockquote>c=3::eq::ping;2::eq::pong</blockquote> </ul> - <h4>Available parameters</h4> - -<!-- <h5>Datasets</h5>--> -<!-- <div *ngIf="datasetListIsLoading | async">--> -<!-- <span class="fas fa-circle-notch fa-spin fa-3x"></span>--> -<!-- <span class="sr-only">Loading...</span>--> -<!-- </div>--> -<!-- <table *ngIf="datasetListIsLoaded | async" id="table">--> -<!-- <tr>--> -<!-- <th>Dataset</th>--> -<!-- <th>Description</th>--> -<!-- </tr>--> -<!-- <tr *ngFor="let dataset of datasetList | async">--> -<!-- <td>{{ dataset.name }}</td>--> -<!-- <td>{{ dataset.description }}</td>--> -<!-- </tr>--> -<!-- </table>--> - - <!-- <h5>Outputs</h5> - <div *ngIf="attributeListsIsLoading | async"> - <span class="fas fa-circle-notch fa-spin fa-3x"></span> - <span class="sr-only">Loading...</span> - </div> - <div *ngIf="attributeListsIsLoaded | async" class="row"> - <div *ngFor="let dataset of datasetList | async" class="col-auto mb-5"> - <h6>{{ dataset.label }} output list</h6> - <table id="table" class="attributes-table p-0"> - <tr> - <th>id</th> - <th>attribute</th> - </tr> - <tr *ngFor="let attribute of getAttributeList(dataset.name, attributeList | async)"> - <td>{{ attribute.id }}</td> - <td>{{ attribute.name }}</td> - </tr> - </table> - </div> - </div> --> + <app-output-list + [datasetSelected]="datasetSelected | async" + [attributeList]="attributeList | async" + ></app-output-list> <h5>Operators</h5> <table id="table">