diff --git a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/bg-BG/shell.json b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/bg-BG/shell.json index 15ed0164c0a..13188700442 100644 --- a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/bg-BG/shell.json +++ b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/bg-BG/shell.json @@ -46,7 +46,9 @@ "dashboard": { "title": "Табло", "overview": "Преглед на публикуваните приложения.", - "kpis": "Ключови показатели" + "kpis": "Ключови показатели", + "viewAll": "Виж всички", + "viewAllOf": "Отваряне на справка {{name}}" }, "inbox": { "refresh": "Обнови", diff --git a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/en-US/shell.json b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/en-US/shell.json index 43139c3abc6..40c65bfdb19 100644 --- a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/en-US/shell.json +++ b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/i18n/en-US/shell.json @@ -46,7 +46,9 @@ "dashboard": { "title": "Dashboard", "overview": "Overview of your published applications.", - "kpis": "Key Indicators" + "kpis": "Key Indicators", + "viewAll": "View all", + "viewAllOf": "Open the {{name}} report" }, "inbox": { "refresh": "Refresh", diff --git a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/layout/appShell.js b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/layout/appShell.js index e7a25ff3289..b9c61fc21f2 100644 --- a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/layout/appShell.js +++ b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/components/layout/appShell.js @@ -94,7 +94,11 @@ document.addEventListener('alpine:init', () => { // a built-in shell section, or an entity route /[/create | /:id/edit]. The last crumb // is the current page (no route); earlier crumbs link back. get breadcrumbTrail() { - if (this.isDashboard) return []; + // The dashboard names itself like every other page: the home icon ahead of it is the route, + // this crumb is the label - the page itself carries no heading of its own. + if (this.isDashboard) { + return [{ label: window.T ? T('application-core:shell.nav.dashboard', 'Dashboard') : 'Dashboard', route: null }]; + } const segments = this.currentPath.split('/').filter(Boolean); const top = segments[0]; const crumbs = []; diff --git a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/stores/reports.js b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/stores/reports.js index f42e5b4484e..f9f53ea8936 100644 --- a/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/stores/reports.js +++ b/components/resources/application-core/src/main/resources/META-INF/dirigible/application-core/shell/js/stores/reports.js @@ -98,6 +98,10 @@ document.addEventListener('alpine:init', () => { if (def.description) it.description = def.description; if (def.dashboard === false) it.dashboard = false; if (def.tId) it.tId = def.tId; + // The report's chart type (line / pie / bar / ...), when it declares one. The dashboard + // reads it to pick the tile shape: a chart preview is a padded, borderless card like the + // reference's chart cards, a row preview the bordered full-bleed table card. + if (def.chart) it.chart = def.chart; if (def.descriptionTId) it.descriptionTId = def.descriptionTId; // A report-attached KPI widget: the dashboard shows a compact KPI tile (count / single // aggregate value / top-N list) instead of the report's iframe preview tile. diff --git a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/index.html.template b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/index.html.template index 4f691e3090f..8add93154de 100644 --- a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/index.html.template +++ b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/perspective/report-file/index.html.template @@ -136,7 +136,14 @@ -
+ +
#if($chart) ## Native Harmonia chart directive for this report's chart type (a generation-time constant). #if($chart == "line")#set($chartDirective = "x-h-chart-line")#elseif($chart == "pie")#set($chartDirective = "x-h-chart-pie")#elseif($chart == "doughnut")#set($chartDirective = "x-h-chart-doughnut")#elseif($chart == "polarArea")#set($chartDirective = "x-h-chart-polar-area")#elseif($chart == "radar")#set($chartDirective = "x-h-chart-radar")#else#set($chartDirective = "x-h-chart-bar")#end @@ -146,8 +153,8 @@
#end -
- +
+
diff --git a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/dashboard.html.template b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/dashboard.html.template index 30a4c0808a1..6d8bee03e03 100644 --- a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/dashboard.html.template +++ b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/dashboard.html.template @@ -1,135 +1,181 @@ -
-
-

+ model. Two card shapes, both composed from the card's own slots: a NUMBER tile (description = + label, title = value, action = the icon in an avatar, footer = hint) and, for everything that + carries content of its own - a top-N table, an embedded report preview, a custom page - the + reference's table-card shape (plain title over its description, a border-b header, flush + content, the navigation on a "View all" button). The blocks carry no headings - every tile names + itself, so a heading above them only repeats what the cards already say, and the reference's + dashboard is likewise bare grids separated by the page's own gap. The KPI widgets are grouped + by the shape they render as - scalars in one row, top-N tables in the next - because one grid + holding both leaves holes around the wide tiles. The page carries + no title of its own; the shell's breadcrumb names it. Reached via the Home icon ('/' and + /dashboard). --> +
- -
-
- -
-
-
- -
-
-
+ - -
-
- -
-
-
-
+
diff --git a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/js/components/pages/dashboardPage.js.template b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/js/components/pages/dashboardPage.js.template index b069b930624..cf3872e9ce4 100644 --- a/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/js/components/pages/dashboardPage.js.template +++ b/components/template/template-application-ui-harmonia-java/src/main/resources/META-INF/dirigible/template-application-ui-harmonia-java/ui/shell/js/components/pages/dashboardPage.js.template @@ -75,6 +75,12 @@ document.addEventListener('alpine:init', () => { kpiState(r) { return this.kpiData[r.name] || { loaded: false }; }, + // KPI widgets split by the shape they render as. A scalar reads as a compact number tile and a + // list as a top-N table, so each kind gets a row of its own - in one grid the wide list tiles + // leave holes between the narrow ones. + get summaryKpis() { return this.kpis.filter(r => r.widget.kind !== 'list'); }, + get listKpis() { return this.kpis.filter(r => r.widget.kind === 'list'); }, + // Custom widgets, split by how they render: number tiles (kpi) vs embedded pages. get customKpis() { return this.customWidgets.filter(w => w.kind !== 'page'); }, get customPages() { return this.customWidgets.filter(w => w.kind === 'page'); },