change: more work on changing default group by time interval to min interval setting

This commit is contained in:
Torkel Ödegaard
2017-09-01 15:57:02 +02:00
parent e8e1f1bc6d
commit 07e192ff47
12 changed files with 80 additions and 59 deletions
+10 -12
View File
@@ -8,15 +8,13 @@ import (
type DataSourcePlugin struct {
FrontendPluginBase
Annotations bool `json:"annotations"`
Metrics bool `json:"metrics"`
Alerting bool `json:"alerting"`
MinInterval bool `json:"minInterval,omitempty"`
CacheTimeout bool `json:"cacheTimeout,omitempty"`
MaxDataPoints bool `json:"maxDataPoints,omitempty"`
BuiltIn bool `json:"builtIn,omitempty"`
Mixed bool `json:"mixed,omitempty"`
HasHelp bool `json:"hasHelp,omitempty"`
Annotations bool `json:"annotations"`
Metrics bool `json:"metrics"`
Alerting bool `json:"alerting"`
QueryOptions map[string]bool `json:"queryOptions,omitempty"`
BuiltIn bool `json:"builtIn,omitempty"`
Mixed bool `json:"mixed,omitempty"`
HasQueryHelp bool `json:"hasQueryHelp,omitempty"`
Routes []*AppPluginRoute `json:"-"`
}
@@ -31,12 +29,12 @@ func (p *DataSourcePlugin) Load(decoder *json.Decoder, pluginDir string) error {
}
// look for help markdown
helpPath := filepath.Join(p.PluginDir, "HELP.md")
helpPath := filepath.Join(p.PluginDir, "QUERY_HELP.md")
if _, err := os.Stat(helpPath); os.IsNotExist(err) {
helpPath = filepath.Join(p.PluginDir, "help.md")
helpPath = filepath.Join(p.PluginDir, "query_help.md")
}
if _, err := os.Stat(helpPath); err == nil {
p.HasHelp = true
p.HasQueryHelp = true
}
DataSources[p.Id] = p