mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
hide caching settings when its disabled (#34756)
This commit is contained in:
parent
4221f2d147
commit
3aba08f708
@ -83,6 +83,9 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
||||
azure: AzureSettings = {
|
||||
managedIdentityEnabled: false,
|
||||
};
|
||||
caching = {
|
||||
enabled: false,
|
||||
};
|
||||
|
||||
constructor(options: GrafanaBootConfig) {
|
||||
const mode = options.bootData.user.lightTheme ? 'light' : 'dark';
|
||||
|
@ -255,6 +255,9 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
"cloud": hs.Cfg.Azure.Cloud,
|
||||
"managedIdentityEnabled": hs.Cfg.Azure.ManagedIdentityEnabled,
|
||||
},
|
||||
"caching": map[string]bool{
|
||||
"enabled": hs.Cfg.SectionWithEnvOverrides("caching").Key("enabled").MustBool(true),
|
||||
},
|
||||
}
|
||||
|
||||
return jsonObj, nil
|
||||
|
@ -68,7 +68,7 @@ export function buildNavModel(dataSource: DataSourceSettings, plugin: GenericDat
|
||||
id: `datasource-cache-${dataSource.id}`,
|
||||
text: 'Cache',
|
||||
url: `datasources/edit/${dataSource.id}/cache`,
|
||||
hideFromTabs: !pluginMeta.isBackend,
|
||||
hideFromTabs: !pluginMeta.isBackend || !config.caching.enabled,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user