327 lines
12 KiB
JSON
327 lines
12 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"properties": {
|
|
"dashboard": {
|
|
"type": "object",
|
|
"properties": {
|
|
"majorItems": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{ "$ref": "#/definitions/sectionTitle" },
|
|
{ "$ref": "#/definitions/swiper" },
|
|
{ "$ref": "#/definitions/graph" },
|
|
{ "$ref": "#/definitions/table" },
|
|
{ "$ref": "#/definitions/reference" },
|
|
{ "$ref": "#/definitions/comparison" }
|
|
]
|
|
}
|
|
},
|
|
"minorItems": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/minorItem" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["dashboard"],
|
|
"definitions": {
|
|
"sectionTitle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["sectionTitle"] },
|
|
"title": { "type": "string" }
|
|
},
|
|
"required": ["type", "title"],
|
|
"additionalProperties": false
|
|
},
|
|
"swiper": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["swiper"] },
|
|
"class": { "type": "string" },
|
|
"css": {
|
|
"type": "object",
|
|
"properties": {
|
|
"graph": {
|
|
"type": "object",
|
|
"properties": {
|
|
"wrapper": {
|
|
"$ref": "#/definitions/cssWithEval"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"containerProps": { "$ref": "#/definitions/containerProps" },
|
|
"elements": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/graph" }
|
|
}
|
|
},
|
|
"required": ["type", "elements"],
|
|
"additionalProperties": false
|
|
},
|
|
"comparison": {
|
|
"$ref": "#/definitions/graph"
|
|
},
|
|
|
|
"graph": {
|
|
"type": "object",
|
|
"properties": {
|
|
"class": { "type": "string" },
|
|
"type": { "type": "string", "enum": ["graph"] },
|
|
"containerProps": { "$ref": "#/definitions/containerProps" },
|
|
"title": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"value": { "type": "string" },
|
|
"contentAfter": { "type": "string" },
|
|
"contentBefore": { "type": "string" },
|
|
"eval": { "type": "string" }
|
|
},
|
|
"required": ["value"]
|
|
},
|
|
{ "type": "string" },
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"de": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"required": ["de", "en"]
|
|
}
|
|
]
|
|
},
|
|
"subTitle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"de": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"required": ["de", "en"]
|
|
},
|
|
"xAxis": { "type": "string", "enum": ["timeline"] },
|
|
"timeInterval": {
|
|
"type": "string",
|
|
"enum": ["day", "month", "year"]
|
|
},
|
|
"filter": { "type": "boolean" },
|
|
"dateTimeField": { "type": "string" },
|
|
"until": {
|
|
"type": "string",
|
|
"enum": ["lastWeek", "lastMonth", "lastYear", "allTime"]
|
|
},
|
|
"graphType": {
|
|
"type": "string",
|
|
"enum": ["bar", "line", "pie", "donut", "area"]
|
|
},
|
|
"graphs": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/graphDetail" }
|
|
},
|
|
"defaultUntil": {
|
|
"type": "string",
|
|
"enum": ["lastWeek", "lastMonth", "lastYear", "allTime"]
|
|
},
|
|
"newPageRef": { "type": "boolean" },
|
|
"limit": { "type": "number" },
|
|
"value": { "type": "string", "enum": ["total", "amount"] },
|
|
"valueType": {
|
|
"type": "string",
|
|
"enum": ["absolute", "relative"]
|
|
},
|
|
"field": { "type": "string" },
|
|
"path": { "type": "string" },
|
|
"style": {
|
|
"type": "object",
|
|
"properties": {
|
|
"upper": { "type": "string" },
|
|
"lower": { "type": "string" }
|
|
}
|
|
},
|
|
"collection": { "type": "string" },
|
|
"subNavigation": { "type": "number" },
|
|
"graphBaseColor": { "type": "string" },
|
|
"multipleYAxes": { "type": "boolean" },
|
|
"timespan": {
|
|
"type": "string",
|
|
"enum": ["YTD", "QTD", "MTD"]
|
|
},
|
|
"backgroundLines": { "type": "boolean" },
|
|
"opacity": { "type": "number" },
|
|
"elements": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/graph" }
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"graphDetail": {
|
|
"type": "object",
|
|
"properties": {
|
|
"graphName": {
|
|
"type": "object",
|
|
"properties": {
|
|
"de": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"required": ["de", "en"]
|
|
},
|
|
"graphType": {
|
|
"type": "string",
|
|
"enum": ["bar", "line", "pie", "donut", "area"]
|
|
},
|
|
"yAxisTitle": { "type": "string" },
|
|
"yAxis": {
|
|
"type": "string",
|
|
"enum": ["sum", "amount"]
|
|
},
|
|
"field": { "type": "string" }
|
|
},
|
|
"required": ["graphName"]
|
|
},
|
|
"table": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["table"] },
|
|
"filter": { "type": "boolean" },
|
|
"collection": { "type": "string" },
|
|
"title": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"de": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"required": ["de", "en"]
|
|
},
|
|
{ "type": "string" }
|
|
]
|
|
},
|
|
"subTitle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"de": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"required": ["de", "en"]
|
|
},
|
|
"columns": {
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
},
|
|
"filterGroups": {
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
},
|
|
"additionalApiParams": {
|
|
"type": "object",
|
|
"properties": {
|
|
"offset": { "type": "number" },
|
|
"limit": { "type": "number" },
|
|
"sort": { "type": "string" },
|
|
"filter": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"projection": { "type": "string" },
|
|
"count": { "type": "number", "enum": [1] }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": ["type", "columns"],
|
|
"additionalProperties": false
|
|
},
|
|
|
|
"reference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["reference"] },
|
|
"newPageRef": { "type": "boolean" },
|
|
"collection": { "type": "string" },
|
|
"style": {
|
|
"type": "object",
|
|
"properties": {
|
|
"upper": { "type": "string" },
|
|
"lower": { "type": "string" }
|
|
}
|
|
},
|
|
"subNavigation": { "type": "number" }
|
|
},
|
|
"required": ["type"],
|
|
"additionalProperties": false
|
|
},
|
|
"minorItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"collection": { "type": "string" },
|
|
"subNavigation": { "type": "number" },
|
|
"newPageRef": { "type": "boolean" }
|
|
},
|
|
"required": ["collection"],
|
|
"additionalProperties": false
|
|
},
|
|
|
|
"containerProps": {
|
|
"type": "object",
|
|
"properties": {
|
|
"class": { "type": "string" },
|
|
"style": { "type": "string" },
|
|
"layout": {
|
|
"type": "object",
|
|
"properties": {
|
|
"breakBefore": { "type": "boolean" },
|
|
"breakAfter": { "type": "boolean" },
|
|
"size": {
|
|
"type": "object",
|
|
"properties": {
|
|
"default": { "type": "string" },
|
|
"small": { "type": "string" },
|
|
"large": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"cssWithEval": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"eval": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["eval"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^[a-zA-Z_][a-zA-Z0-9_-]*$": {
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{ "type": "number" }
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|