You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
618 B
22 lines
618 B
import { config, GrafanaBootConfig } from '@grafana/runtime';
|
|
import { PluginState } from '@grafana/data';
|
|
// Legacy binding paths
|
|
export { config, GrafanaBootConfig as Settings };
|
|
|
|
let grafanaConfig: GrafanaBootConfig = config;
|
|
|
|
export default grafanaConfig;
|
|
|
|
export const getConfig = () => {
|
|
return grafanaConfig;
|
|
};
|
|
|
|
export const updateConfig = (update: Partial<GrafanaBootConfig>) => {
|
|
grafanaConfig = {
|
|
...grafanaConfig,
|
|
...update,
|
|
};
|
|
};
|
|
|
|
// The `enable_alpha` flag is no exposed directly, this is equivolant
|
|
export const hasAlphaPanels = Boolean(config.panels?.debug?.state === PluginState.alpha);
|
|
|