mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-08-02 01:10:35 +02:00
Compare commits
2 Commits
dev
...
add_uiconf
Author | SHA1 | Date | |
---|---|---|---|
|
7a54e2cfb3 | ||
|
54283f6d3c |
@@ -119,81 +119,248 @@ var configSchema = `
|
|||||||
"required": ["apiAllowedIPs"]
|
"required": ["apiAllowedIPs"]
|
||||||
}`
|
}`
|
||||||
|
|
||||||
var clustersSchema = `
|
var uiConfigSchema = `
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "object",
|
||||||
"items": {
|
"properties": {
|
||||||
"type": "object",
|
"jobList": {
|
||||||
"properties": {
|
"description": "Job list defaults. Applies to user- and jobs views.",
|
||||||
"name": {
|
"type": "object",
|
||||||
"description": "The name of the cluster.",
|
"properties": {
|
||||||
"type": "string"
|
"usePaging": {
|
||||||
},
|
"description": "If classic paging is used instead of continuous scrolling by default.",
|
||||||
"metricDataRepository": {
|
"type": "boolean"
|
||||||
"description": "Type of the metric data repository for this cluster",
|
},
|
||||||
"type": "object",
|
"showFootprint": {
|
||||||
"properties": {
|
"description": "If footprint bars are shown as first column by default.",
|
||||||
"kind": {
|
"type": "boolean"
|
||||||
"type": "string",
|
}
|
||||||
"enum": ["influxdb", "prometheus", "cc-metric-store", "test"]
|
},
|
||||||
},
|
"required": ["usePaging", "showFootprint"]
|
||||||
"url": {
|
},
|
||||||
"type": "string"
|
"nodeList": {
|
||||||
},
|
"description": "Node list defaults. Applies to node list view.",
|
||||||
"token": {
|
"type": "object",
|
||||||
"type": "string"
|
"properties": {
|
||||||
}
|
"usePaging": {
|
||||||
},
|
"description": "If classic paging is used instead of continuous scrolling by default.",
|
||||||
"required": ["kind", "url"]
|
"type": "boolean"
|
||||||
},
|
}
|
||||||
"filterRanges": {
|
},
|
||||||
"description": "This option controls the slider ranges for the UI controls of numNodes, duration, and startTime.",
|
"required": ["usePaging"]
|
||||||
"type": "object",
|
},
|
||||||
"properties": {
|
"jobView": {
|
||||||
"numNodes": {
|
"description": "Job view defaults.",
|
||||||
"description": "UI slider range for number of nodes",
|
"type": "object",
|
||||||
"type": "object",
|
"properties": {
|
||||||
"properties": {
|
"showPolarPlot": {
|
||||||
"from": {
|
"description": "If the job metric footprints polar plot is shown by default.",
|
||||||
"type": "integer"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"to": {
|
"showFootprint": {
|
||||||
"type": "integer"
|
"description": "If the annotated job metric footprint bars are shown by default.",
|
||||||
}
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"required": ["from", "to"]
|
"showRoofline": {
|
||||||
},
|
"description": "If the job roofline plot is shown by default.",
|
||||||
"duration": {
|
"type": "boolean"
|
||||||
"description": "UI slider range for duration",
|
},
|
||||||
"type": "object",
|
"showStatTable": {
|
||||||
"properties": {
|
"description": "If the job metric statistics table is shown by default.",
|
||||||
"from": {
|
"type": "boolean"
|
||||||
"type": "integer"
|
}
|
||||||
},
|
},
|
||||||
"to": {
|
"required": ["showFootprint"]
|
||||||
"type": "integer"
|
},
|
||||||
}
|
"metricConfig": {
|
||||||
},
|
"description": "Global initial metric selections for primary views of all clusters.",
|
||||||
"required": ["from", "to"]
|
"type": "object",
|
||||||
},
|
"properties": {
|
||||||
"startTime": {
|
"jobListMetrics": {
|
||||||
"description": "UI slider range for start time",
|
"description": "Initial metrics shown for new users in job lists (User and jobs view).",
|
||||||
"type": "object",
|
"type": "array",
|
||||||
"properties": {
|
"items": {
|
||||||
"from": {
|
"type": "string",
|
||||||
"type": "string",
|
"minItems": 1
|
||||||
"format": "date-time"
|
|
||||||
},
|
|
||||||
"to": {
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": ["from", "to"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": ["numNodes", "duration", "startTime"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["name", "metricDataRepository", "filterRanges"],
|
"jobViewPlotMetrics": {
|
||||||
"minItems": 1
|
"description": "Initial metrics shown for new users as job view metric plots.",
|
||||||
}}`
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jobViewTableMetrics": {
|
||||||
|
"description": "Initial metrics shown for new users in job view statistics table.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clusters": {
|
||||||
|
"description": "Overrides for global defaults by cluster and subcluster.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"description": "The name of the cluster.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"subClusters" {
|
||||||
|
"description": "The array of overrides per subcluster.",
|
||||||
|
"type":"array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"description": "The name of the subcluster.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobListMetrics": {
|
||||||
|
"description": "Initial metrics shown for new users in job lists (User and jobs view) for subcluster.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jobViewPlotMetrics": {
|
||||||
|
"description": "Initial metrics shown for new users as job view timeplots for subcluster.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jobViewTableMetrics": {
|
||||||
|
"description": "Initial metrics shown for new users in job view statistics table for subcluster.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name"],
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "subClusters"],
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["jobListMetrics", "jobViewPlotMetrics", "jobViewTableMetrics"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plotConfiguration": {
|
||||||
|
"description": "Initial settings for plot render options.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"colorBackground": {
|
||||||
|
"description": "If the metric plot backgrounds are initially colored by threshold limits.",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"plotsPerRow": {
|
||||||
|
"description": "How many plots are initially rendered in per row. Applies to job, single node, and analysis views.",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"lineWidth": {
|
||||||
|
"description": "Initial thickness of rendered plotlines. Applies to metric plot, job compare plot and roofline.",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"colorScheme": {
|
||||||
|
"description": "Initial colorScheme to be used for metric plots.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["colorBackground", "plotsPerRow", "lineWidth"]
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
|
||||||
|
var clustersSchema = `
|
||||||
|
{
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"description": "The name of the cluster.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"metricDataRepository": {
|
||||||
|
"description": "Type of the metric data repository for this cluster",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["influxdb", "prometheus", "cc-metric-store", "test"]
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["kind", "url"]
|
||||||
|
},
|
||||||
|
"filterRanges": {
|
||||||
|
"description": "This option controls the slider ranges for the UI controls of numNodes, duration, and startTime.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"numNodes": {
|
||||||
|
"description": "UI slider range for number of nodes",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"from": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["from", "to"]
|
||||||
|
},
|
||||||
|
"duration": {
|
||||||
|
"description": "UI slider range for duration",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"from": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["from", "to"]
|
||||||
|
},
|
||||||
|
"startTime": {
|
||||||
|
"description": "UI slider range for start time",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"from": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["from", "to"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["numNodes", "duration", "startTime"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "metricDataRepository", "filterRanges"],
|
||||||
|
"minItems": 1
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
Reference in New Issue
Block a user