Refresh the page when moving from using a cluster template to not

This commit is contained in:
Westly Wright 2019-08-01 12:32:53 -07:00
parent 9c22f47692
commit 8b85cfb311
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,11 @@ export default Route.extend({
_cachedClusterDetails: null,
beforeModel(transition) {
if (transition && transition.queryParamsOnly && isEmpty(transition.queryParams.clusterTemplateRevision)) {
// there is too much to reset and ensure is correctly set when going from cluster template to none, just refresh the page.
return window.location.href = window.location.href.split('?')[0];
}
let { me: { hasAdmin: globalAdmin = false } } = this.access;
if (!globalAdmin) {