Skip to content
Snippets Groups Projects
Commit 5e48ee7f authored by Charly Maeder's avatar Charly Maeder
Browse files

Fix bug when change repository in describe api : reinit all global var on change

parent 193adda5
No related branches found
No related tags found
1 merge request!18Feature/request history
......@@ -3,10 +3,13 @@
<mat-sidenav #sidenav mode="side" position="end" opened id="request-historical">
<h6 id="history-title">Request history</h6>
<nb-list id="history-list">
<nb-list id="history-list" *ngIf="requestHistorical != null && requestHistorical.length > 0; else noHistory">
<nb-list-item *ngFor="let request of requestHistorical"><a [href]="request" target="_blank"
rel="noreferrer noopener">{{request}}</a></nb-list-item>
</nb-list>
<ng-template #noHistory>
<p id="no-history-found-message">No history found...</p>
</ng-template>
</mat-sidenav>
......
......@@ -69,3 +69,10 @@ label {
display: grid;
grid-template-columns: auto 110px;
}
#no-history-found-message {
color: grey;
font-style: italic;
padding-top: 48px;
margin-left: 5px;
}
......@@ -68,8 +68,16 @@ export class DatasetsComponent implements OnInit, OnChanges, AfterViewChecked {
}
ngOnChanges() {
this.loading = false;
this.ready = false;
this.values = new Map<string, Map<string, Map<string, RequestInfo>>>();
this.previews = new Map<string, any>();
this.spinners = new Map<string, boolean>();
this.initValueMap();
this.updateRequestHistorical();
this.dataSetService.resetDataset();
}
ngAfterViewChecked() {
......@@ -340,6 +348,7 @@ export class DatasetsComponent implements OnInit, OnChanges, AfterViewChecked {
}
private updateRequestHistorical() {
this.requestHistorical = [];
const catId = this.openApi.info['x-catalog-id'];
if (catId == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment