diff --git a/web/configSchema.go b/web/configSchema.go index 9e88e79..b4b83f2 100644 --- a/web/configSchema.go +++ b/web/configSchema.go @@ -93,13 +93,7 @@ var configSchema = ` "type": "object", "properties": { "name": { - "description": "The name of the cluster.", - "kind": { - "type": "string", - "enum": ["influxdb", "prometheus", "cc-metric-store", "cc-metric-store-internal", "test"] - }, - "url": { - "type": "string" + "description": "The name of the cluster." }, "subClusters" { "description": "The array of overrides per subcluster.", diff --git a/web/web.go b/web/web.go index a6512f8..495e365 100644 --- a/web/web.go +++ b/web/web.go @@ -54,8 +54,11 @@ type MetricConfig struct { } type ClusterConfig struct { - Name string `json:"name"` - SubClusters []SubClusterConfig `json:"subClusters"` + Name string `json:"name"` + JobListMetrics []string `json:"jobListMetrics"` + JobViewPlotMetrics []string `json:"jobViewPlotMetrics"` + JobViewTableMetrics []string `json:"jobViewTableMetrics"` + SubClusters []SubClusterConfig `json:"subClusters"` } type SubClusterConfig struct { @@ -74,7 +77,7 @@ type PlotConfiguration struct { var initOnce sync.Once -var Keys = WebConfig{ +var UIDefaults = WebConfig{ JobList: JobListConfig{ UsePaging: false, ShowFootprint: true, @@ -119,7 +122,7 @@ func Init(rawConfig json.RawMessage, disableArchive bool) error { initOnce.Do(func() { config.Validate(configSchema, rawConfig) - if err = json.Unmarshal(rawConfig, &Keys); err != nil { + if err = json.Unmarshal(rawConfig, &UIDefaults); err != nil { cclog.Warn("Error while unmarshaling raw config json") return }