diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index bfdedf94031f4b2f64503192144358113f4240ab..def56452631b72c8f300f59f0bbb7427b6b7fb7a 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -24,7 +24,7 @@ <nb-menu [items]="menuItems" autoCollapse="true"></nb-menu> </nb-sidebar> <nb-layout-column> - <app-stats *ngIf="routerUrl === '/dashboard' && loadComponent"></app-stats> + <app-stats *ngIf="routerUrl === '/dashboard'"></app-stats> <router-outlet></router-outlet> </nb-layout-column> diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index fe0bad2a18a1a6137ba8b39706ba21b000a6a00e..632c8d7e08ad4d88fa633eba0d23fd32c374e6b9 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -18,7 +18,6 @@ export class DashboardComponent implements OnInit { user: SmartHarvesterUser = new SmartHarvesterUser(); routerUrl: string; - loadComponent: boolean; private _isDead = new Subject(); menuItems: NbMenuItem[] = [ { @@ -103,7 +102,6 @@ export class DashboardComponent implements OnInit { this.user.lastName = data['principal']['userInfo']['familyName']; this.user.firstName = data['principal']['userInfo']['givenName']; this.tokeService.saveUser(this.user); - this.loadComponent = true; }, err => console.log(err.error.message), () => {}); diff --git a/src/app/semantic-enrichment/semantic-enrichment.component.ts b/src/app/semantic-enrichment/semantic-enrichment.component.ts index 6cb87fc4cb97253519fb4cb440b5eebf76e701f7..d5882e749d3cddf3aeed5508b3de1fe214dd18b4 100644 --- a/src/app/semantic-enrichment/semantic-enrichment.component.ts +++ b/src/app/semantic-enrichment/semantic-enrichment.component.ts @@ -200,7 +200,7 @@ export class SemanticEnrichmentComponent implements OnInit { } getStatus(concepts: ESModel[], results: Result[]) { - if (!concepts && results.length === 0) { + if (!concepts && concepts.filter(e => e.results.length > 0).length > 0 && results.length === 0) { return 'danger'; } return 'success';