Die Karten werden in dashboard.jsons mit folgender Syntax konfiguriert.:
dashboard.json Beispiel
Codeblock | ||||
---|---|---|---|---|
| ||||
{ "cards": [ { "categories": [ "shop-shop" ], "header": { "label": { "de": "Lorem ipsum", "en": "Lorem ipsum" }, "icon": "fa-image", "accent": "" }, "defaultTableLinks": [ "ShopSomething" ], "settingsTableLinks": [ "ShopSomething" ], "maintenanceTableLinks": [ "ShopSomething" ], "relationTableLinks": [ "ShopSomething" ], "staticLinks": [ { "icon": "fa-database", "label": { "de": "Import", "en": "Import" }, "attributes": { }, "isAuthorizedResource": "Shop/Package.something" } ], "helpLinks": [ { "icon": "fa-database", "label": { "de": "Import", "settingsTableLinks": [ "en": "ShopSomethingImport" ], }, "maintenanceTableLinks": [ "ShopSomethingattributes": { ], } "relationTableLinks": [ } "ShopSomething" ] } ] } |
Was sind defaultTableLinks?
...
Um die Gültigkeit der dashboard.json-Dateien zu bestätigen, werden diese anhand eines Schemas validiert. Dieses Schema ist in der dashboard-schema.json definiert brandbox/base-core/resources/dashboard-schema.json.
...
dashboard-schema.json
Codeblock | |||
---|---|---|---|
| |||
{ "$schema": "http://json-schema.org/draft-04/schema#", "name": "dashboard", "type": "object", "additionalProperties": false, "required": [ "cards" ], "properties": { "cards": { "type": [ "array" ], "description": "List of dashboard cards.", "items": { "type": "object", "additionalProperties": false, "properties": { "categories": { "type": "array", "description": "List of categories where the card will be shown." }, "header": { "type": [ "object" ], "description": "Dashboard card head", "properties": { "label": { "type": "object", "additionalProperties": true, "required": [ "de", "en" ], "properties": { "de": { "type": "string", "description": "German head label" }, "en": { "type": "string", "description": "English head label" } } }, "icon": { "type": "string", "description": "Font-Awesome icon for the head section" }, "accent": { "type": "string", "enum": [ "", "danger", "danger-dark", "warning", "warning-dark", "success", "success-dark", "info", "info-dark", "note", "note-dark" ], "description": "Head section color accent" } } }, "quickAccess": { "type": "boolean", "description": "Is displayed by default in the quick access bar." }, "isAuthorizedResource": { "type": "string", "description": "Checks right" }, "type": { "type": "string", "description": "Card-Type: html, static" }, "variant": { "type": "string", "description": "Frame-Type: full" }, "feature": { "type": "string", "description": "Feature to customize the card body" }, "configuration": { "type": "object", "description": "Configuration for Feature" }, "defaultTableLinks": { "type": "array", "description": "List of table identifiert to display in the card." }, "settingsTableLinks": { "type": "array", "description": "List of table identifier to display when in settings section." }, "maintenanceTableLinks": { "type": "array", "description": "List of table identifier to display when in maintenance mode." }, "relationTableLinks": { "type": "array", "description": "List of table identifier to display when in relation section." }, "staticLinks": { "type": [ "array" ], "description": "List of orm links to list in the card. (maximum of 3 including mainTables)", "items": { "type": "object", "additionalProperties": true, "properties": { "label": { "type": "object", "additionalProperties": true, "required": [ "de", "en" ], "properties": { "de": { "type": "string", "description": "German label" }, "en": { "type": "string", "description": "English label" } } }, "icon": { "type": "string", "description": "Font-Awesome icon" }, "target": { "type": "string", "description": "Ajax target css selector" }, "href": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true, "properties": {} } } } }, "helpLinks": { "type": [ "array" ], "description": "List of orm links to list in the card. (maximum of 3 including mainTables)", "items": { "type": "object", "additionalProperties": true, "properties": { "label": { "type": "object", "additionalProperties": true, "required": [ "de", "en" ], "properties": { "de": { "type": "string", "description": "German label" }, "en": { "type": "string", "description": "English label" } } }, "icon": { "type": "string", "description": "Font-Awesome icon" }, "target": { "type": "string", "description": "Ajax target css selector" }, "href": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true, "properties": {} } } } } } } } } } |
Genaueres zum Aufbau und Funktion eines JSON Schema kann hier nachgelesen werden: https://json-schema.org/understanding-json-schema.
Eventübersicht
Klassenname | Beschreibung |
---|---|
OnCollectWelcomePanels | Steht zur Verfügung, um Inhalte im Willkommen-Dashboard zu ergänzen. |
OnMapPanel | Wird beim genutzt, um das Dashboard selbst mit Inhalten zu füllen. |
OnMapDashboard | Ermöglicht das nachträgliche ändern des fertig aufgebauten Dashboards. |
OnPopulateDashboardTab | Ermöglicht das nachträgliche ändern des fertig aufgebauten Dashboard-Tabs. |
OnMapConfigurationDropdown | Wird beim genutzt, um die Toolbar Einstellungen mit Einträgen zu füllen. |
OnMapDashboardGroups | Wird beim genutzt, um eine dashboard-config.json in einem bestehenden Dashboard zu registrieren und so eine neue Kategorie zu ergänzen. |