mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 11:42:36 +08:00

* WIP - time filtering * Replace variable test * Change tests * Validator is already tested * Change test to match evaluation * Add line to docs * Revert "Add line to docs" This reverts commit 783f247c33e854e00a72a42c5d04eee3aa923a5a. * Put transformations docs update in the right place, cannot build without an update, WIP * Run build * Use regex test and rewind * Does this help * make config optional
22 lines
596 B
TypeScript
22 lines
596 B
TypeScript
import { PluginState } from '@grafana/data';
|
|
import { config, GrafanaBootConfig } from '@grafana/runtime';
|
|
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);
|