Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #129 from mdrillin/TTOOLS-410
Browse files Browse the repository at this point in the history
TTOOLS-410 Resolve issue with duplicate empty states
  • Loading branch information
mdrillin committed Apr 18, 2018
2 parents e799b61 + dfcd95f commit 6bbc0d6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ngapp/src/app/connections/connections.component.html
Expand Up @@ -63,15 +63,15 @@ <h1 class="card-pf-title">

<!-- The list or card view -->
<div class="col-md-12" *ngIf="isLoaded('connections')">
<app-connections-list *ngIf="isListLayout"
<app-connections-list *ngIf="isListLayout && hasConnections"
[connections]="filteredConnections"
[selectedConnections]="selectedConnections"
(activateConnection)="onActivate($event)"
(editConnection)="onEdit($event)"
(deleteConnection)="onDelete($event)"
(connectionSelected)="onSelected($event)"
(connectionDeselected)="onDeselected($event)"></app-connections-list>
<app-connections-cards *ngIf="isCardLayout"
<app-connections-cards *ngIf="isCardLayout && hasConnections"
[connections]="filteredConnections"
[selectedConnections]="selectedConnections"
(activateConnection)="onActivate($event)"
Expand Down
7 changes: 7 additions & 0 deletions ngapp/src/app/connections/connections.component.ts
Expand Up @@ -192,6 +192,13 @@ export class ConnectionsComponent extends AbstractPageComponent implements OnIni
return this.allConns;
}

/**
* @returns {boolean} 'true' if any connections are available
*/
public get hasConnections(): boolean {
return this.allConns.length > 0;
}

/**
* @returns {Connection[]} the array of filtered connections
*/
Expand Down
4 changes: 2 additions & 2 deletions ngapp/src/app/dataservices/dataservices.component.html
Expand Up @@ -82,13 +82,13 @@ <h1 class="card-pf-title">
</div>

<div class="{{cardListAreaCss}}">
<app-dataservices-list *ngIf="isListLayout" [dataservices]="filteredDataservices" [selectedDataservices]="selectedDataservices"
<app-dataservices-list *ngIf="isListLayout && hasDataservices" [dataservices]="filteredDataservices" [selectedDataservices]="selectedDataservices"
(activateDataservice)="onActivate($event)" (testDataservice)="onTest($event)"
(publishDataservice)="onPublish($event)" (deleteDataservice)="onDelete($event)"
(editDataservice)="onEdit($event)" (quickLookDataservice)="onQuickLook($event)"
(downloadDataservice)="onDownload($event)" (dataserviceSelected)="onSelected($event)"
(dataserviceDeselected)="onDeselected($event)"></app-dataservices-list>
<app-dataservices-cards *ngIf="isCardLayout" [dataservices]="filteredDataservices" [selectedDataservices]="selectedDataservices"
<app-dataservices-cards *ngIf="isCardLayout && hasDataservices" [dataservices]="filteredDataservices" [selectedDataservices]="selectedDataservices"
(activateDataservice)="onActivate($event)" (testDataservice)="onTest($event)"
(publishDataservice)="onPublish($event)" (deleteDataservice)="onDelete($event)"
(editDataservice)="onEdit($event)" (quickLookDataservice)="onQuickLook($event)"
Expand Down
7 changes: 7 additions & 0 deletions ngapp/src/app/dataservices/dataservices.component.ts
Expand Up @@ -323,6 +323,13 @@ export class DataservicesComponent extends AbstractPageComponent implements OnIn
return this.allServices;
}

/**
* @returns {boolean} 'true' if any dataservices are available
*/
public get hasDataservices(): boolean {
return this.allServices.length > 0;
}

/**
* @returns {Dataservice[]} the array of filtered dataservices
*/
Expand Down

0 comments on commit 6bbc0d6

Please sign in to comment.