This commit is contained in:
Michele Artini 2024-02-07 09:50:12 +01:00
parent a17df1d503
commit 5228545723
3 changed files with 18 additions and 6 deletions

View File

@ -32,6 +32,7 @@ const routes: Routes = [
{ path: "dsm/results/:page/:size", component: DsmResultsComponent },
{ path: "dsm/api", component: DsmApiComponent },
{ path: "mdstores", component: MdstoresComponent },
{ path: "mdstores/:mdId", component: MdstoresComponent },
{ path: "mdrecords/:versionId/:limit", component: MdstoreInspectorComponent },
{ path: "cleaner", component: CleanerTesterComponent },
{ path: "index", component: IndexComponent },

View File

@ -121,19 +121,19 @@
<span *ngIf="!api.compatibilityOverrided">{{api.compatibility}}</span>
</td>
</tr>
<tr *ngIf="api.lastColletionMdid">
<tr *ngIf="api.lastCollectionMdid">
<th align="left" width="20%">Last Collection</th>
<td width="80%">
{{api.lastCollectionDate}}
<a [routerLink]="['/mdstores/' + api.lastCollectionMdid]" style="float: right;">Total:
{{api.lastAggregationTotal}}</a>
<a [routerLink]="['/mdstores', api.lastCollectionMdid]" style="float: right;">Total:
{{api.lastCollectionTotal}}</a>
</td>
</tr>
<tr *ngIf="api.lastAggregationMdid">
<th align="left" width="20%">Last Transformation</th>
<td width="80%">
{{api.lastCollectionDate}}
<a [routerLink]="['/mdstores/' + api.lastAggregationMdid]" style="float: right;">Total:
<a [routerLink]="['/mdstores' + api.lastAggregationMdid]" style="float: right;">Total:
{{api.lastAggregationTotal}}</a>
</td>
</tr>

View File

@ -12,13 +12,24 @@ import { MdstoresClient } from './mdstores.client';
})
export class MdstoresComponent implements OnInit {
mdId?: string;
mdstores: MDStore[] = [];
searchText: string = '';
constructor(public client: MdstoresClient, public route: ActivatedRoute, public dialog: MatDialog) { }
ngOnInit() { this.reload() }
reload() { this.client.loadMDStores((data: MDStore[]) => this.mdstores = data); }
ngOnInit() {
this.route.params.subscribe(params => this.mdId = params['mdId']);
this.reload();
}
reload() {
if (this.mdId) {
this.client.loadMDStore(this.mdId, (data: MDStore) => this.mdstores = [data]);
} else {
this.client.loadMDStores((data: MDStore[]) => this.mdstores = data);
}
}
openVersionsDialog(md: MDStore): void {
const dialogRef = this.dialog.open(MDStoreVersionsDialog, {