Files
dashy/src/utils/ConfigSchema.json
2021-06-23 12:36:30 +01:00

323 lines
9.8 KiB
JSON

{
"type": "object",
"required": [
"sections"
],
"additionalProperties": false,
"properties": {
"pageInfo": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Title and heading for the app"
},
"description": {
"type": "string",
"description": "Sub-title, displayed in header"
},
"navLinks": {
"type": "array",
"maxItems": 6,
"description": "Quick access links, displayed in header",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"title",
"path"
],
"properties": {
"title": {
"type": "string"
},
"path": {
"type": "string"
}
}
}
},
"footerText": {
"type": "string"
}
},
"required": [
"title"
],
"additionalProperties": false
},
"appConfig": {
"type": "object",
"description": "Application configuration",
"properties": {
"backgroundImg": {
"type": "string",
"description": "A URL to an image asset to be displayed as background"
},
"theme": {
"type": "string",
"default": "Callisto",
"description": "A theme to be applied by default on first load"
},
"enableFontAwesome": {
"type": "boolean",
"default": true,
"description": "Should load font-awesome assets"
},
"fontAwesomeKey": {
"type": "string",
"pattern": "^[a-z0-9]{10}$",
"description": "API key for font-awesome"
},
"faviconApi": {
"enum": [
"local",
"faviconkit",
"google",
"clearbit",
"webmasterapi",
"allesedv"
],
"default": "faviconkit",
"description": "Which service to use to resolve favicons. Set to local to do this locally instead"
},
"layout": {
"enum": [
"horizontal",
"vertical",
"auto",
"sidebar"
],
"default": "auto",
"description": "Specifies sections layout orientation on the home screen"
},
"iconSize": {
"enum": [
"small",
"medium",
"large"
],
"default": "medium",
"description": "The size of each link item / icon"
},
"cssThemes": {
"type": "array",
"description": "Theme names to be added to the dropdown",
"items": {
"type": "string"
}
},
"externalStyleSheet": {
"description": "URL or URLs of external stylesheets to add to dropdown/ load",
"type": [
"string",
"array"
],
"items": {
"type": "string"
}
},
"customCss": {
"type": "string",
"description": "Any custom CSS overides, must be minified"
},
"showSplashScreen": {
"type": "boolean",
"default": false,
"description": "Display a loading screen when the app is launched"
},
"statusCheck": {
"type": "boolean",
"default": false,
"description": "Displays an online/ offline status for each of your services"
},
"statusCheckInterval": {
"type": "number",
"default": 0,
"description": "How often to recheck statuses. If set to 0, status will only be checked on page load"
},
"auth": {
"type": "array",
"description": "Usernames and hashed credentials for frontend authentication",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"user",
"hash"
],
"properties": {
"user": {
"type": "string",
"description": "The username for a user"
},
"hash": {
"type": "string",
"description": "A SHA-256 hashed password for that user",
"minLength": 64,
"maxLength": 64
},
"type": {
"enum": [
"admin",
"normal"
],
"description": "User type, denoting privilege level, either admin or normal",
"default": "normal"
}
}
}
},
"allowConfigEdit": {
"type": "boolean",
"default": true,
"description": "Can user write changes to conf.yml file from the UI. If set to false, preferences are only stored locally"
},
"disableServiceWorker": {
"type": "boolean",
"default": false,
"description": "If set to true, then service worker will not be used"
}
},
"additionalProperties": false
},
"sections": {
"type": "array",
"description": "Array of sections, containing items",
"items": {
"type": "object",
"required": [
"name",
"items"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Title/ heading for a section"
},
"icon": {
"type": "string",
"description": "Icon will be displayed next to title"
},
"displayData": {
"type": "object",
"additionalProperties": false,
"description": "Optional meta data for customizing a section",
"properties": {
"collapsed": {
"type": "boolean",
"default": false,
"description": "If true, section needs to be clicked to open"
},
"color": {
"type": "string",
"description": "Hex code, or HTML color for section fill"
},
"customStyles": {
"type": "string",
"description": "CSS overides for section container"
},
"itemSize": {
"enum": [
"small",
"medium",
"large"
],
"default": "medium",
"description": "Size of items within the section"
},
"rows": {
"type": "number",
"minimum": 1,
"maximum": 5,
"default": 1,
"description": "The amount of space that the section spans vertically"
},
"cols": {
"type": "number",
"minimum": 1,
"maximum": 5,
"default": 1,
"description": "The amount of space that the section spans horizontally"
},
"sectionLayout": {
"enum": [
"grid",
"auto"
],
"default": "auto",
"description": "If set to grid, items have uniform width, and itemCount can be set"
},
"itemCountX": {
"type": "number",
"minimum": 1,
"maximum": 12,
"description": "Number of items per column"
},
"itemCountY": {
"type": "number",
"minimum": 1,
"maximum": 12,
"description": "Number of items per row"
}
}
},
"items": {
"type": "array",
"description": "Array of items to display with a section",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"title"
],
"properties": {
"title": {
"type": "string",
"description": "Text shown on the item"
},
"description": {
"type": "string",
"nullable": true,
"description": "Short description, shown on hover or in a tooltip"
},
"icon": {
"type": "string",
"nullable": true,
"description": "An icon, either as a font-awesome identifier, local or remote URL, or the word favicon or generative"
},
"url": {
"type": "string",
"description": "The destination to navigate to when item is clicked"
},
"target": {
"enum": [
"newtab",
"sametab",
"iframe"
],
"default": "newtab",
"description": "Opening method, when item is clicked"
},
"color": {
"type": "string",
"description": "A custom fill color of the item"
},
"provider": {
"type": "string",
"description": "Provider name, e.g. Microsoft"
},
"statusCheck": {
"type": "boolean",
"default": false,
"description": "Whether or not to display online/ offline status for this service. Will override appConfig.statusCheck"
}
}
}
}
}
}
}
}
}