Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const ReactProfileWrapper = () => (
{(api, states, teams, orgs, user) => {
return (
<>
{states.loadUser ? (
) : (
)}
{!states.loadUser && (
if (regex && !regex.exec(source.name)) {
continue;
}
options.push({ text: source.name, value: source.name });
}
if (options.length === 0) {
options.push({ text: 'No data sources found', value: '' });
}
this.options = options;
if (this.includeAll) {
this.addAllOption();
}
const { defaultDatasource } = config.bootData.settings;
return this.variableSrv.validateVariableSelectionState(this, defaultDatasource);
}
export const getCurrentThemeName = () =>
config.bootData.user.lightTheme ? GrafanaThemeType.Light : GrafanaThemeType.Dark;
export const getCurrentThemeName = () =>
config.bootData.user.lightTheme ? GrafanaThemeType.Light : GrafanaThemeType.Dark;