mirror of https://github.com/status-im/consul.git
ui: Adds easily accessible `env` for user settable 'debug' settings (#5668)
This is a synchronous only 'debug' setting accessor, uses localStorage first and falls back to ember config.
This commit is contained in:
parent
21732d57a8
commit
cbbfaba6ac
|
@ -0,0 +1,5 @@
|
|||
import config from './config/environment';
|
||||
export default function(str) {
|
||||
const user = window.localStorage.getItem(str);
|
||||
return user !== null ? user : config[str];
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
import config from '../config/environment';
|
||||
import env from 'consul-ui/env';
|
||||
|
||||
const enabled = 'CONSUL_UI_DISABLE_REALTIME';
|
||||
export function initialize(container) {
|
||||
if (config[enabled] || window.localStorage.getItem(enabled) !== null) {
|
||||
if (env('CONSUL_UI_DISABLE_REALTIME')) {
|
||||
return;
|
||||
}
|
||||
['node', 'coordinate', 'session', 'service', 'proxy']
|
||||
|
|
Loading…
Reference in New Issue