mirror of https://github.com/status-im/consul.git
ui: Completely remove the Overview routes when running the UI in HCP (#14606)
This commit is contained in:
parent
acd9d42914
commit
ea06d6c5aa
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Removed Overview page from HCP instalations
|
||||
```
|
|
@ -1,8 +1,6 @@
|
|||
(routes => routes({
|
||||
dc: {
|
||||
show: {
|
||||
license: null,
|
||||
},
|
||||
show: null
|
||||
},
|
||||
}))(
|
||||
(json, data = (typeof document !== 'undefined' ? document.currentScript.dataset : module.exports)) => {
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import BaseAbility from './base';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class OverviewAbility extends BaseAbility {
|
||||
@service('env') env;
|
||||
|
||||
resource = 'operator';
|
||||
segmented = false;
|
||||
get canAccess() {
|
||||
return this.canRead;
|
||||
return !this.env.var('CONSUL_HCP_ENABLED') && this.canRead;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,10 @@ export default function(config = {}, win = window, doc = document) {
|
|||
return typeof operatorConfig.PeeringEnabled === 'undefined'
|
||||
? false
|
||||
: operatorConfig.PeeringEnabled;
|
||||
case 'CONSUL_HCP_ENABLED':
|
||||
return typeof operatorConfig.HCPEnabled === 'undefined'
|
||||
? false
|
||||
: operatorConfig.HCPEnabled;
|
||||
case 'CONSUL_DATACENTER_LOCAL':
|
||||
return operatorConfig.LocalDatacenter;
|
||||
case 'CONSUL_DATACENTER_PRIMARY':
|
||||
|
@ -226,6 +230,9 @@ export default function(config = {}, win = window, doc = document) {
|
|||
case 'CONSUL_PEERINGS_ENABLE':
|
||||
prev['CONSUL_PEERINGS_ENABLED'] = !!JSON.parse(String(value).toLowerCase());
|
||||
break;
|
||||
case 'CONSUL_HCP_ENABLE':
|
||||
prev['CONSUL_HCP_ENABLED'] = !!JSON.parse(String(value).toLowerCase());
|
||||
break;
|
||||
case 'CONSUL_UI_CONFIG':
|
||||
prev['CONSUL_UI_CONFIG'] = JSON.parse(value);
|
||||
break;
|
||||
|
@ -275,6 +282,7 @@ export default function(config = {}, win = window, doc = document) {
|
|||
case 'CONSUL_ACLS_ENABLED':
|
||||
case 'CONSUL_NSPACES_ENABLED':
|
||||
case 'CONSUL_PEERINGS_ENABLED':
|
||||
case 'CONSUL_HCP_ENABLED':
|
||||
case 'CONSUL_SSO_ENABLED':
|
||||
case 'CONSUL_PARTITIONS_ENABLED':
|
||||
case 'CONSUL_METRICS_PROVIDER':
|
||||
|
|
Loading…
Reference in New Issue