Skip to content

Commit 6b5e697

Browse files
namespace list shows up after tab switching
1 parent 1c16cfa commit 6b5e697

File tree

3 files changed

+2
-18
lines changed
  • ui/packages

3 files changed

+2
-18
lines changed

ui/packages/consul-nspaces/app/templates/dc/nspaces/index.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ as |route|>
1414
nspace=route.params.nspace
1515
dc=route.params.dc
1616
)}}
17-
@useCachedOnEmpty={{true}}
1817
as |loader|>
1918

2019
<BlockSlot @name="error">

ui/packages/consul-ui/app/components/data-loader/index.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,8 @@ export default Component.extend(Slotted, {
2929
isLoaded: function () {
3030
return typeof this.items !== 'undefined' || typeof this.src === 'undefined';
3131
},
32-
// caching data for namesapce page only currently to avoid showing a Welcome screen when we switch tabs
33-
// and come back to this page.
34-
// For other pages, it will behave as before without a need of explicit caching logic used here.
3532
change: function (data) {
36-
if (
37-
this.useCachedOnEmpty && // Only apply for namespace page
38-
((Array.isArray(data) && data.length === 0) || (!Array.isArray(data) && !data))
39-
) {
40-
if (this._lastKnownData) {
41-
set(this, 'data', this.onchange(this._lastKnownData));
42-
} else {
43-
set(this, 'data', this.onchange(data));
44-
}
45-
} else {
46-
set(this, 'data', this.onchange(data));
47-
this._lastKnownData = data;
48-
}
33+
set(this, 'data', this.onchange(data));
4934
},
5035
},
5136
});

ui/packages/consul-ui/app/services/repository/nspace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class NspaceService extends RepositoryService {
5757
if (!this.permissions.can('use nspaces')) {
5858
return [];
5959
}
60-
return super.findAll(...arguments).catch(() => []);
60+
return super.findAll(...arguments);
6161
}
6262

6363
@dataSource('/:partition/:ns/:dc/namespace/:id')

0 commit comments

Comments
 (0)