mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
feat(templates): collapse submenu if none visable templates
This commit is contained in:
parent
86b1906798
commit
4299feee37
@ -140,7 +140,11 @@ function (angular, $, _, moment) {
|
||||
};
|
||||
|
||||
p.isSubmenuFeaturesEnabled = function() {
|
||||
return this.templating.list.length > 0 || this.annotations.list.length > 0 || this.links.length > 0;
|
||||
var visableTemplates = _.filter(this.templating.list, function(template) {
|
||||
return template.hideVariable === undefined || template.hideVariable === false;
|
||||
});
|
||||
|
||||
return visableTemplates.length > 0 || this.annotations.list.length > 0 || this.links.length > 0;
|
||||
};
|
||||
|
||||
p.getPanelInfoById = function(panelId) {
|
||||
|
Loading…
Reference in New Issue
Block a user