Revision 72b9555487ba00c1c3c8212dfb6af3a968c036a9 authored by Julien Duchesne on 12 October 2022, 11:07:13 UTC, committed by GitHub on 12 October 2022, 11:07:13 UTC
:facepalm:

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
1 parent 719769e
Raw File
config.ts
import { PluginState } from '@grafana/data';
import { config, GrafanaBootConfig } from '@grafana/runtime';
// 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 not exposed directly, this is equivalent
export const hasAlphaPanels = Boolean(config.panels?.debug?.state === PluginState.alpha);
back to top