Skip to content

Commit

Permalink
Merge pull request #999 from newswangerd/stack-trace-my-content
Browse files Browse the repository at this point in the history
Fix stack trace on my-content page
  • Loading branch information
newswangerd authored Aug 2, 2018
2 parents 16be04d + ab5d8cf commit 78d0886
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export class RepositoriesContentComponent implements OnInit, OnDestroy {
items: Repository[] = [];

emptyStateConfig: EmptyStateConfig;
nonEmptyStateConfig: EmptyStateConfig;
disabledStateConfig: EmptyStateConfig;
paginationConfig: PaginationConfig = {
pageSize: 10,
Expand Down Expand Up @@ -132,6 +133,17 @@ export class RepositoriesContentComponent implements OnInit, OnDestroy {
helpLink: {}
} as EmptyStateConfig;

this.nonEmptyStateConfig = {
actions: {
primaryActions: [],
moreActions: []
} as ActionConfig,
iconStyleClass: '',
title: '',
info: '',
helpLink: {}
} as EmptyStateConfig;

this.disabledStateConfig = {
iconStyleClass: 'pficon-warning-triangle-o',
info: `The Namespace ${this.namespace.name} is disabled. You'll need to re-enable it before viewing and modifying its content.`,
Expand All @@ -140,7 +152,7 @@ export class RepositoriesContentComponent implements OnInit, OnDestroy {

this.listConfig = {
dblClick: false,
emptyStateConfig: null,
emptyStateConfig: this.nonEmptyStateConfig,
multiSelect: false,
selectItems: false,
selectionMatchProp: 'name',
Expand Down Expand Up @@ -290,7 +302,7 @@ export class RepositoriesContentComponent implements OnInit, OnDestroy {
if (this.items.length === 0) {
this.listConfig.emptyStateConfig = this.emptyStateConfig;
} else {
this.listConfig.emptyStateConfig = null;
this.listConfig.emptyStateConfig = this.nonEmptyStateConfig;
}
}

Expand Down

0 comments on commit 78d0886

Please sign in to comment.