From: Sagar Gopale Date: Tue, 6 Jan 2026 07:56:42 +0000 (+0530) Subject: mgr/dashboard: empty-data-message X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6ec02a28ac87f03f85dd431d43ea207c32bd8a3;p=ceph.git mgr/dashboard: empty-data-message Fixes: https://tracker.ceph.com/issues/74324 Signed-off-by: Sagar Gopale --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway-group/nvmeof-gateway-group.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway-group/nvmeof-gateway-group.component.html index e2f6c75879ff6..a06b87feb6708 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway-group/nvmeof-gateway-group.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway-group/nvmeof-gateway-group.component.html @@ -7,7 +7,11 @@ selectionType="single" identifier="name" (updateSelection)="updateSelection($event)" - (fetchData)="fetchData()"> + (fetchData)="fetchData()" + emptyStateTitle="No gateway group created" + i18n-emptyStateTitle + emptyStateMessage="Set up your first gateway group to start using NVMe over Fabrics. This will allow you to create high-performance block storage with NVMe/TCP protocol." + i18n-emptyStateMessage> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-list/nvmeof-namespaces-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-list/nvmeof-namespaces-list.component.html index 6067a75ca2d18..369c9b96acd18 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-list/nvmeof-namespaces-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-list/nvmeof-namespaces-list.component.html @@ -8,7 +8,11 @@ (fetchData)="listNamespaces()" [columns]="namespacesColumns" selectionType="single" - (updateSelection)="updateSelection($event)"> + (updateSelection)="updateSelection($event)" + emptyStateTitle="No namespaces created." + i18n-emptyStateTitle + emptyStateMessage="Namespaces are storage volumes mapped to subsystems for host access. Create a namespace to start provisioning storage within a subsystem." + i18n-emptyStateMessage>
+ (updateSelection)="updateSelection($event)" + emptyStateTitle="No subsystems created" + i18n-emptyStateTitle + emptyStateMessage="Subsystems group NVMe namespaces and manage host access. Create a subsystem to start mapping NVMe volumes to hosts." + i18n-emptyStateMessage>
+ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.scss index 544c16f6a2429..2024593ec2242 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.scss @@ -38,3 +38,7 @@ Using `color` in css and seyting svg will fill="currentColor does not work. .info-icon { fill: theme.$support-info !important; } + +.deploy-icon { + fill: theme.$layer-selected-disabled !important; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts index 8df7b98b69d2b..456763d3b104b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts @@ -17,7 +17,8 @@ import { TagModule, LayerModule, InputModule, - GridModule + GridModule, + LayoutModule } from 'carbon-components-angular'; import AddIcon from '@carbon/icons/es/add/16'; import FilterIcon from '@carbon/icons/es/filter/16'; @@ -29,6 +30,7 @@ import MaximizeIcon from '@carbon/icons/es/maximize/16'; import ArrowDown from '@carbon/icons/es/caret--down/16'; import ChevronDwon from '@carbon/icons/es/chevron--down/16'; import CheckMarkIcon from '@carbon/icons/es/checkmark/32'; +import CubeIcon from '@carbon/icons/es/cube/32'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormlyModule } from '@ngx-formly/core'; @@ -104,7 +106,8 @@ import { TableDetailDirective } from './directives/table-detail.directive'; TagModule, LayerModule, InputModule, - GridModule + GridModule, + LayoutModule ], declarations: [ TableComponent, @@ -144,7 +147,8 @@ export class DataTableModule { MaximizeIcon, ArrowDown, ChevronDwon, - CheckMarkIcon + CheckMarkIcon, + CubeIcon ]); } } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html index 2893f59cc9300..81b63d35d4173 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html @@ -223,8 +223,26 @@ class="no-data" cdstabledata [attr.colspan]="visibleColumns.length + 2"> - No data to display +
+
+
+
+ + +
+ + {{ emptyStateTitle }} + + {{ emptyStateMessage }} + + +
+
@@ -337,6 +355,7 @@ + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index 9ac507fae22d8..30edd6a6ec4f1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -22,7 +22,8 @@ import { BehaviorSubject, Observable, of, Subject, Subscription } from 'rxjs'; import { TableStatus } from '~/app/shared/classes/table-status'; import { CellTemplate } from '~/app/shared/enum/cell-template.enum'; -import { Icons } from '~/app/shared/enum/icons.enum'; +import { Icons, IconSize, ICON_TYPE } from '~/app/shared/enum/icons.enum'; + import { CdTableColumn } from '~/app/shared/models/cd-table-column'; import { CdTableColumnFilter } from '~/app/shared/models/cd-table-column-filter'; import { CdTableColumnFiltersChange } from '~/app/shared/models/cd-table-column-filters-change'; @@ -226,6 +227,22 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr @Input() scrollable: boolean = true; + /** + * Title to be displayed when there is no data + */ + @Input() + emptyStateTitle: string = $localize`No data available`; + /** + * Helper text to be displayed when there is no data + */ + @Input() + emptyStateMessage: string = $localize`There are currently no records to display.`; + /** + * Icon to be displayed when there is no data + */ + @Input() + emptyStateIcon: string = ICON_TYPE.deploy; + /** * Should be a function to update the input data if undefined nothing will be triggered * @@ -363,6 +380,7 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr } icons = Icons; + iconSize = IconSize; cellTemplates: { [key: string]: TemplateRef; } = {}; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts index 50db9d77e826c..5f45acf054e62 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts @@ -116,6 +116,7 @@ export const ICON_TYPE = { check: 'check', copy: 'copy', danger: 'danger', + deploy: 'deploy', edit: 'edit', error: 'error--filled', infoCircle: 'info-circle',