diff --git a/app/edge/react/components/index.ts b/app/edge/react/components/index.ts index a754170cd..d552e1a86 100644 --- a/app/edge/react/components/index.ts +++ b/app/edge/react/components/index.ts @@ -60,7 +60,6 @@ const ngModule = angular .component( 'edgeGroupAssociationTable', r2a(withReactQuery(EdgeGroupAssociationTable), [ - 'emptyContentLabel', 'onClickRow', 'query', 'title', diff --git a/app/kubernetes/react/components/index.ts b/app/kubernetes/react/components/index.ts index e6351ee68..654c3dfb3 100644 --- a/app/kubernetes/react/components/index.ts +++ b/app/kubernetes/react/components/index.ts @@ -84,7 +84,6 @@ export const ngModule = angular 'initialIngressControllers', 'allowNoneIngressClass', 'isLoading', - 'noIngressControllerLabel', 'view', ]) ) diff --git a/app/portainer/rbac/components/access-viewer/access-viewer.html b/app/portainer/rbac/components/access-viewer/access-viewer.html index 8be5ebb0b..8b19249ee 100644 --- a/app/portainer/rbac/components/access-viewer/access-viewer.html +++ b/app/portainer/rbac/components/access-viewer/access-viewer.html @@ -17,8 +17,9 @@ - - +
+ +
diff --git a/app/portainer/react/components/index.ts b/app/portainer/react/components/index.ts index 329bc0608..44fd7cc5f 100644 --- a/app/portainer/react/components/index.ts +++ b/app/portainer/react/components/index.ts @@ -236,7 +236,6 @@ export const ngModule = angular .component( 'groupAssociationTable', r2a(withReactQuery(GroupAssociationTable), [ - 'emptyContentLabel', 'onClickRow', 'query', 'title', diff --git a/app/react/azure/container-instances/ListView/ContainersDatatable.tsx b/app/react/azure/container-instances/ListView/ContainersDatatable.tsx index 534616257..59f07de2d 100644 --- a/app/react/azure/container-instances/ListView/ContainersDatatable.tsx +++ b/app/react/azure/container-instances/ListView/ContainersDatatable.tsx @@ -30,7 +30,6 @@ export function ContainersDatatable({ dataset, onRemoveClick }: Props) { title="Containers" titleIcon={Box} getRowId={(container) => container.id} - emptyContentLabel="No container available." data-cy="containers-datatable" renderTableActions={(selectedRows) => (
diff --git a/app/react/common/stacks/ItemView/StackContainersDatatable.tsx b/app/react/common/stacks/ItemView/StackContainersDatatable.tsx index 8c12f92c5..bd445b9c6 100644 --- a/app/react/common/stacks/ItemView/StackContainersDatatable.tsx +++ b/app/react/common/stacks/ItemView/StackContainersDatatable.tsx @@ -87,7 +87,6 @@ export function StackContainersDatatable({ environment, stackName }: Props) { )} dataset={containersQuery.data || []} isLoading={!containersQuery.data} - emptyContentLabel="No containers found" /> diff --git a/app/react/components/datatables/TableContent.tsx b/app/react/components/datatables/TableContent.tsx index df522de31..7aee09d40 100644 --- a/app/react/components/datatables/TableContent.tsx +++ b/app/react/components/datatables/TableContent.tsx @@ -13,7 +13,7 @@ interface Props { export function TableContent({ isLoading = false, rows, - emptyContent = 'No items available', + emptyContent = 'No items available.', renderRow, }: Props) { if (isLoading) { diff --git a/app/react/docker/configs/ListView/ConfigsDatatable/ConfigsDatatable.tsx b/app/react/docker/configs/ListView/ConfigsDatatable/ConfigsDatatable.tsx index 0e48e7386..dc7917234 100644 --- a/app/react/docker/configs/ListView/ConfigsDatatable/ConfigsDatatable.tsx +++ b/app/react/docker/configs/ListView/ConfigsDatatable/ConfigsDatatable.tsx @@ -40,7 +40,6 @@ export function ConfigsDatatable({ dataset, onRefresh, onRemoveClick }: Props) { settingsManager={tableState} title="Configs" titleIcon={Clipboard} - emptyContentLabel="No config available." renderTableSettings={() => ( )} dataset={containersQuery.data || []} - emptyContentLabel="No containers found" extendTableOptions={mergeOptions( withColumnFilters( tableState.columnFilters, diff --git a/app/react/docker/containers/StatsView/ProcessesDatatable.tsx b/app/react/docker/containers/StatsView/ProcessesDatatable.tsx index 0ec2a67d7..df8a4f72a 100644 --- a/app/react/docker/containers/StatsView/ProcessesDatatable.tsx +++ b/app/react/docker/containers/StatsView/ProcessesDatatable.tsx @@ -52,7 +52,6 @@ export function ProcessesDatatable({ settingsManager={tableState} disableSelect isLoading={!dataset} - emptyContentLabel="No processes found." data-cy="docker-container-stats-processes-datatable" /> ); diff --git a/app/react/docker/events/EventsDatatables.tsx b/app/react/docker/events/EventsDatatables.tsx index e73ab3a43..e79f65407 100644 --- a/app/react/docker/events/EventsDatatables.tsx +++ b/app/react/docker/events/EventsDatatables.tsx @@ -48,7 +48,6 @@ export function EventsDatatable({ dataset }: { dataset: Array }) { title="Events" titleIcon={Clock} disableSelect - emptyContentLabel="No event available." data-cy="docker-events-datatable" /> ); diff --git a/app/react/docker/images/ListView/ImagesDatatable/ImagesDatatable.tsx b/app/react/docker/images/ListView/ImagesDatatable/ImagesDatatable.tsx index 2fd0ed8c8..536b2c068 100644 --- a/app/react/docker/images/ListView/ImagesDatatable/ImagesDatatable.tsx +++ b/app/react/docker/images/ListView/ImagesDatatable/ImagesDatatable.tsx @@ -98,7 +98,6 @@ export function ImagesDatatable({ isLoading={imagesQuery.isLoading} settingsManager={tableState} columns={columns} - emptyContentLabel="No images found" renderTableSettings={() => ( )} - emptyContentLabel="No networks available." renderTableActions={(selectedRows) => (
hasWriteAccessQuery.authorized && ( diff --git a/app/react/docker/services/ItemView/TasksDatatable/TasksDatatable.tsx b/app/react/docker/services/ItemView/TasksDatatable/TasksDatatable.tsx index 5d1ce33b9..cc1e21a37 100644 --- a/app/react/docker/services/ItemView/TasksDatatable/TasksDatatable.tsx +++ b/app/react/docker/services/ItemView/TasksDatatable/TasksDatatable.tsx @@ -1,15 +1,15 @@ import { List } from 'lucide-react'; import { Datatable } from '@@/datatables'; -import { - BasicTableSettings, - type FilteredColumnsTableSettings, - filteredColumnsSettings, -} from '@@/datatables/types'; -import { useTableStateWithStorage } from '@@/datatables/useTableState'; -import { withMeta } from '@@/datatables/extend-options/withMeta'; import { mergeOptions } from '@@/datatables/extend-options/mergeOptions'; import { withColumnFilters } from '@@/datatables/extend-options/withColumnFilters'; +import { withMeta } from '@@/datatables/extend-options/withMeta'; +import { + BasicTableSettings, + filteredColumnsSettings, + type FilteredColumnsTableSettings, +} from '@@/datatables/types'; +import { useTableStateWithStorage } from '@@/datatables/useTableState'; import { useColumns } from './columns'; import { DecoratedTask } from './types'; @@ -45,7 +45,6 @@ export function TasksDatatable({ settingsManager={tableState} columns={columns} dataset={dataset} - emptyContentLabel="No task available." extendTableOptions={mergeOptions( withMeta({ table: 'tasks', serviceName }), withColumnFilters(tableState.columnFilters, tableState.setColumnFilters) diff --git a/app/react/docker/services/ListView/ServicesDatatable/TasksDatatable/TasksDatatable.tsx b/app/react/docker/services/ListView/ServicesDatatable/TasksDatatable/TasksDatatable.tsx index f89b38fc5..02de64df9 100644 --- a/app/react/docker/services/ListView/ServicesDatatable/TasksDatatable/TasksDatatable.tsx +++ b/app/react/docker/services/ListView/ServicesDatatable/TasksDatatable/TasksDatatable.tsx @@ -23,7 +23,6 @@ export function TasksDatatable({ columns={columns} dataset={dataset} search={search} - emptyContentLabel="No task matching filter." aria-label="Tasks table" data-cy="docker-service-tasks-nested-datatable" /> diff --git a/app/react/docker/swarm/SwarmView/NodesDatatable/NodesDatatable.tsx b/app/react/docker/swarm/SwarmView/NodesDatatable/NodesDatatable.tsx index edb1c2a0d..7fe68316d 100644 --- a/app/react/docker/swarm/SwarmView/NodesDatatable/NodesDatatable.tsx +++ b/app/react/docker/swarm/SwarmView/NodesDatatable/NodesDatatable.tsx @@ -51,7 +51,6 @@ export function NodesDatatable({ columns={columns} dataset={dataset || []} isLoading={!dataset} - emptyContentLabel="No node available" settingsManager={tableState} extendTableOptions={withMeta({ table: 'nodes', diff --git a/app/react/docker/volumes/ListView/VolumesDatatable/VolumesDatatable.tsx b/app/react/docker/volumes/ListView/VolumesDatatable/VolumesDatatable.tsx index 186af476d..59c49a5d9 100644 --- a/app/react/docker/volumes/ListView/VolumesDatatable/VolumesDatatable.tsx +++ b/app/react/docker/volumes/ListView/VolumesDatatable/VolumesDatatable.tsx @@ -58,7 +58,6 @@ export function VolumesDatatable({ dataset={dataset || []} isLoading={!dataset} settingsManager={tableState} - emptyContentLabel="No volume available." renderTableActions={(selectedItems) => ( )} diff --git a/app/react/edge/components/AssociatedEdgeEnvironmentsSelector.tsx b/app/react/edge/components/AssociatedEdgeEnvironmentsSelector.tsx index 8b766bdde..ba3569582 100644 --- a/app/react/edge/components/AssociatedEdgeEnvironmentsSelector.tsx +++ b/app/react/edge/components/AssociatedEdgeEnvironmentsSelector.tsx @@ -25,7 +25,6 @@ export function AssociatedEdgeEnvironmentsSelector({
void; } & AutomationTestingProps) { const tableState = useTableStateWithoutStorage('Name'); @@ -97,7 +95,6 @@ export function EdgeGroupAssociationTable({ onClick={() => onClickRow(row.original)} /> )} - emptyContentLabel={emptyContentLabel} data-cy={dataCy} disableSelect /> diff --git a/app/react/edge/edge-devices/WaitingRoomView/Datatable/Datatable.tsx b/app/react/edge/edge-devices/WaitingRoomView/Datatable/Datatable.tsx index 82c29aa55..ba494a22f 100644 --- a/app/react/edge/edge-devices/WaitingRoomView/Datatable/Datatable.tsx +++ b/app/react/edge/edge-devices/WaitingRoomView/Datatable/Datatable.tsx @@ -36,7 +36,6 @@ export function Datatable() { dataset={environments} title="Edge Devices Waiting Room" titleIcon={Box} - emptyContentLabel="No Edge Devices found" renderTableActions={(selectedRows) => ( )} diff --git a/app/react/edge/edge-groups/ListView/EdgeGroupsDatatable.tsx b/app/react/edge/edge-groups/ListView/EdgeGroupsDatatable.tsx index 3fdc48ed2..25cb560e9 100644 --- a/app/react/edge/edge-groups/ListView/EdgeGroupsDatatable.tsx +++ b/app/react/edge/edge-groups/ListView/EdgeGroupsDatatable.tsx @@ -24,7 +24,6 @@ export function EdgeGroupsDatatable() { columns={columns} dataset={edgeGroupsQuery.data || []} settingsManager={tableState} - emptyContentLabel="No Edge group available." isLoading={edgeGroupsQuery.isLoading} renderTableActions={(selectedItems) => ( diff --git a/app/react/edge/edge-jobs/ListView/EdgeJobsDatatable.tsx b/app/react/edge/edge-jobs/ListView/EdgeJobsDatatable.tsx index 32fd5f23b..ae0c2940c 100644 --- a/app/react/edge/edge-jobs/ListView/EdgeJobsDatatable.tsx +++ b/app/react/edge/edge-jobs/ListView/EdgeJobsDatatable.tsx @@ -23,7 +23,6 @@ export function EdgeJobsDatatable() { isLoading={jobsQuery.isLoading} dataset={jobsQuery.data || []} settingsManager={tableState} - emptyContentLabel="No Edge jobs available." title="Edge Jobs" titleIcon={Clock} renderTableActions={(selectedItems) => ( diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx index d53f3fa00..3cb5ed775 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx @@ -111,7 +111,6 @@ export function EnvironmentsDatatable() { page={page} onPageChange={setPage} totalCount={environmentsQuery.totalCount} - emptyContentLabel="No environment available." disableSelect description={
diff --git a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/EdgeStacksDatatable.tsx b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/EdgeStacksDatatable.tsx index d3e720672..7dd8e35af 100644 --- a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/EdgeStacksDatatable.tsx +++ b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/EdgeStacksDatatable.tsx @@ -36,7 +36,6 @@ export function EdgeStacksDatatable() { dataset={edgeStacksQuery.data || []} initialTableState={getColumnVisibilityState(tableState.hiddenColumns)} settingsManager={tableState} - emptyContentLabel="No stack available." isLoading={edgeStacksQuery.isLoading} renderTableSettings={(tableInstance) => ( row.podName} // use pod name because it's unique (name is not unique) diff --git a/app/react/kubernetes/applications/DetailsView/PlacementsDatatable/PlacementsDatatable.tsx b/app/react/kubernetes/applications/DetailsView/PlacementsDatatable/PlacementsDatatable.tsx index 47585cbc3..100619cf9 100644 --- a/app/react/kubernetes/applications/DetailsView/PlacementsDatatable/PlacementsDatatable.tsx +++ b/app/react/kubernetes/applications/DetailsView/PlacementsDatatable/PlacementsDatatable.tsx @@ -64,7 +64,6 @@ export function PlacementsDatatable({ /> )} - emptyContentLabel="No node available." renderSubRow={(row) => ( )} diff --git a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/ApplicationsStacksDatatable.tsx b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/ApplicationsStacksDatatable.tsx index 51e354da7..a9b62551b 100644 --- a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/ApplicationsStacksDatatable.tsx +++ b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/ApplicationsStacksDatatable.tsx @@ -70,7 +70,6 @@ export function ApplicationsStacksDatatable({ )} noWidget - emptyContentLabel="No stack available." description={
diff --git a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/ConfigureForm.tsx b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/ConfigureForm.tsx index c51138017..102a108a6 100644 --- a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/ConfigureForm.tsx +++ b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/ConfigureForm.tsx @@ -180,8 +180,8 @@ function InnerForm({ values={values.ingressClasses} initialValues={initialValues.ingressClasses} isLoading={isIngressClassesLoading} - noIngressControllerLabel="No supported ingress controllers found." view="cluster" + noIngressControllerLabel="No supported ingress controllers found." />
diff --git a/app/react/kubernetes/cluster/HomeView/NodesDatatable/NodesDatatable.tsx b/app/react/kubernetes/cluster/HomeView/NodesDatatable/NodesDatatable.tsx index a3990c55f..f3032f4b7 100644 --- a/app/react/kubernetes/cluster/HomeView/NodesDatatable/NodesDatatable.tsx +++ b/app/react/kubernetes/cluster/HomeView/NodesDatatable/NodesDatatable.tsx @@ -53,7 +53,6 @@ export function NodesDatatable() { kubernetesEndpointsQuery.isLoading || environmentQuery.isLoading } - emptyContentLabel="No Nodes found" title="Nodes" titleIcon={HardDrive} getRowId={(row) => row.metadata?.uid ?? ''} diff --git a/app/react/kubernetes/cluster/RegistryAccessView/AccessTable.tsx b/app/react/kubernetes/cluster/RegistryAccessView/AccessTable.tsx index 3a9bac7a1..19c3b31f1 100644 --- a/app/react/kubernetes/cluster/RegistryAccessView/AccessTable.tsx +++ b/app/react/kubernetes/cluster/RegistryAccessView/AccessTable.tsx @@ -35,7 +35,6 @@ export function AccessTable({ titleIcon={UserX} dataset={dataset} columns={columns} - emptyContentLabel="No namespace has been authorized yet." settingsManager={tableState} renderTableActions={(selectedItems) => ( `${row.Name}-${row.ClassName}-${row.Type}`} @@ -94,11 +93,18 @@ export function IngressClassDatatable({ function renderIngressClassDescription() { return ( -
-
{description}
- {initialValues && values && isUnsavedChanges(initialValues, values) && ( - Unsaved changes. +
+ {!isLoading && values && values.length === 0 && ( + {noIngressControllerLabel} )} +
+
{description}
+ {initialValues && + values && + isUnsavedChanges(initialValues, values) && ( + Unsaved changes. + )} +
); } diff --git a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatableAngular.tsx b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatableAngular.tsx index 921115766..248fdaa4a 100644 --- a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatableAngular.tsx +++ b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatableAngular.tsx @@ -27,7 +27,6 @@ interface Props { initialIngressControllers: IngressControllerClassMap[] | undefined; allowNoneIngressClass: boolean; isLoading: boolean; - noIngressControllerLabel: string; view: string; } @@ -40,7 +39,6 @@ export function IngressClassDatatableAngular({ ingressControllers, allowNoneIngressClass, isLoading, - noIngressControllerLabel, view, }: Props) { const tableState = useTableState(settingsStore, storageKey); @@ -99,7 +97,6 @@ export function IngressClassDatatableAngular({ dataset={ingControllerFormValues || []} columns={columns} isLoading={isLoading} - emptyContentLabel={noIngressControllerLabel} title="Ingress Controllers" titleIcon={Route} getRowId={(row) => `${row.Name}-${row.ClassName}-${row.Type}`} diff --git a/app/react/kubernetes/components/EventsDatatable/EventsDatatable.tsx b/app/react/kubernetes/components/EventsDatatable/EventsDatatable.tsx index 66068e319..d2f705c5f 100644 --- a/app/react/kubernetes/components/EventsDatatable/EventsDatatable.tsx +++ b/app/react/kubernetes/components/EventsDatatable/EventsDatatable.tsx @@ -31,7 +31,6 @@ export function EventsDatatable({ columns={columns} settingsManager={tableState} isLoading={isLoading} - emptyContentLabel="No event available." title="Events" titleIcon={History} getRowId={(row) => row.metadata?.uid || ''} diff --git a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/ConfigMapsDatatable.tsx b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/ConfigMapsDatatable.tsx index 8f2942920..600b0bdb4 100644 --- a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/ConfigMapsDatatable.tsx +++ b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/ConfigMapsDatatable.tsx @@ -104,7 +104,6 @@ export function ConfigMapsDatatable() { columns={columns} settingsManager={tableState} isLoading={configMapsQuery.isLoading || namespacesQuery.isLoading} - emptyContentLabel="No ConfigMaps found" title="ConfigMaps" titleIcon={FileCode} getRowId={(row) => row.metadata?.uid ?? ''} diff --git a/app/react/kubernetes/configs/ListView/SecretsDatatable/SecretsDatatable.tsx b/app/react/kubernetes/configs/ListView/SecretsDatatable/SecretsDatatable.tsx index f0e560696..55192d9d7 100644 --- a/app/react/kubernetes/configs/ListView/SecretsDatatable/SecretsDatatable.tsx +++ b/app/react/kubernetes/configs/ListView/SecretsDatatable/SecretsDatatable.tsx @@ -104,7 +104,6 @@ export function SecretsDatatable() { columns={columns} settingsManager={tableState} isLoading={secretsQuery.isLoading || namespacesQuery.isLoading} - emptyContentLabel="No secrets found" title="Secrets" titleIcon={Lock} getRowId={(row) => row.metadata?.uid ?? ''} diff --git a/app/react/kubernetes/ingresses/IngressDatatable/IngressDatatable.tsx b/app/react/kubernetes/ingresses/IngressDatatable/IngressDatatable.tsx index cbd31eb81..e79da16e1 100644 --- a/app/react/kubernetes/ingresses/IngressDatatable/IngressDatatable.tsx +++ b/app/react/kubernetes/ingresses/IngressDatatable/IngressDatatable.tsx @@ -89,7 +89,6 @@ export function IngressDatatable() { dataset={ingressesWithIsSystem} columns={columns} isLoading={ingressesQuery.isLoading || namespacesQuery.isLoading} - emptyContentLabel="No supported ingresses found" title="Ingresses" titleIcon={Route} getRowId={(row) => row.Name + row.Type + row.Namespace} diff --git a/app/react/kubernetes/namespaces/components/NamespaceInnerForm.tsx b/app/react/kubernetes/namespaces/components/NamespaceInnerForm.tsx index 878117403..e9b7d3f6c 100644 --- a/app/react/kubernetes/namespaces/components/NamespaceInnerForm.tsx +++ b/app/react/kubernetes/namespaces/components/NamespaceInnerForm.tsx @@ -83,10 +83,10 @@ export function NamespaceInnerForm({ onChange={(classes) => setFieldValue('ingressClasses', classes)} values={values.ingressClasses} description="Enable the ingress controllers that users can select when publishing applications in this namespace." - noIngressControllerLabel="No ingress controllers available in the cluster. Go to the cluster setup view to configure and allow the use of ingress controllers in the cluster." view="namespace" isLoading={ingressClassesQuery.isLoading} initialValues={initialValues.ingressClasses} + noIngressControllerLabel="No ingress controllers available in the cluster. Go to the cluster setup view to configure and allow the use of ingress controllers in the cluster." /> )} diff --git a/app/react/kubernetes/services/ServicesView/ServicesDatatable/ServicesDatatable.tsx b/app/react/kubernetes/services/ServicesView/ServicesDatatable/ServicesDatatable.tsx index 193859fc9..3a81f9f75 100644 --- a/app/react/kubernetes/services/ServicesView/ServicesDatatable/ServicesDatatable.tsx +++ b/app/react/kubernetes/services/ServicesView/ServicesDatatable/ServicesDatatable.tsx @@ -84,7 +84,6 @@ export function ServicesDatatable() { columns={columns} settingsManager={tableState} isLoading={servicesQuery.isLoading || namespacesQuery.isLoading} - emptyContentLabel="No services found" title="Services" titleIcon={Shuffle} getRowId={(row) => row.UID} diff --git a/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx b/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx index 835c4b635..9fcdbd377 100644 --- a/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx +++ b/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx @@ -60,7 +60,6 @@ export function AccessDatatable({ roles: rolesState, })} isRowSelectable={({ original: item }) => !inheritFrom || !item.Inherited} - emptyContentLabel="No authorized users or teams." renderTableActions={(selectedItems) => ( <> diff --git a/app/react/portainer/account/AccountView/HelmRepositoryDatatable/HelmRepositoryDatatable.tsx b/app/react/portainer/account/AccountView/HelmRepositoryDatatable/HelmRepositoryDatatable.tsx index fd9af775a..2402709e4 100644 --- a/app/react/portainer/account/AccountView/HelmRepositoryDatatable/HelmRepositoryDatatable.tsx +++ b/app/react/portainer/account/AccountView/HelmRepositoryDatatable/HelmRepositoryDatatable.tsx @@ -70,7 +70,6 @@ export function HelmRepositoryDatatable() { renderTableActions={(selectedRows) => ( )} - emptyContentLabel="No Helm repository found" isLoading={helmReposQuery.isLoading} isRowSelectable={(row) => !row.original.Global} data-cy="helm-repositories-datatable" diff --git a/app/react/portainer/environments/TagsView/TagsDatatable.tsx b/app/react/portainer/environments/TagsView/TagsDatatable.tsx index c754badf8..95f631a75 100644 --- a/app/react/portainer/environments/TagsView/TagsDatatable.tsx +++ b/app/react/portainer/environments/TagsView/TagsDatatable.tsx @@ -36,7 +36,6 @@ export function TagsDatatable({ dataset={dataset || []} columns={columns} isLoading={!dataset} - emptyContentLabel="No tag available." settingsManager={tableState} renderTableActions={(selectedItems) => ( void; } & AutomationTestingProps) { const tableState = useTableStateWithoutStorage('Name'); @@ -61,7 +59,6 @@ export function GroupAssociationTable({ onClick={onClickRow ? () => onClickRow(row.original) : undefined} /> )} - emptyContentLabel={emptyContentLabel} data-cy={dataCy} disableSelect /> diff --git a/app/react/portainer/environments/update-schedules/ListView/ListView.tsx b/app/react/portainer/environments/update-schedules/ListView/ListView.tsx index d7035ef31..36a79cbd5 100644 --- a/app/react/portainer/environments/update-schedules/ListView/ListView.tsx +++ b/app/react/portainer/environments/update-schedules/ListView/ListView.tsx @@ -70,7 +70,6 @@ export function ListView() { settingsManager={tableState} title="Update & rollback" titleIcon={Clock} - emptyContentLabel="No schedules found" isLoading={listQuery.isLoading} renderTableActions={(selectedRows) => ( diff --git a/app/react/portainer/notifications/NotificationsView.tsx b/app/react/portainer/notifications/NotificationsView.tsx index cbd286419..814896431 100644 --- a/app/react/portainer/notifications/NotificationsView.tsx +++ b/app/react/portainer/notifications/NotificationsView.tsx @@ -47,7 +47,6 @@ export function NotificationsView() { titleIcon={Bell} dataset={userNotifications} settingsManager={tableState} - emptyContentLabel="No notifications found" renderTableActions={(selectedRows) => ( )} diff --git a/app/react/portainer/registries/CreateView/GitlabProjectsTable/GitlabProjectsTable.tsx b/app/react/portainer/registries/CreateView/GitlabProjectsTable/GitlabProjectsTable.tsx index 13832cc56..ac51c0127 100644 --- a/app/react/portainer/registries/CreateView/GitlabProjectsTable/GitlabProjectsTable.tsx +++ b/app/react/portainer/registries/CreateView/GitlabProjectsTable/GitlabProjectsTable.tsx @@ -38,7 +38,6 @@ export function GitlabProjectTable({ columns={columns} dataset={dataset} settingsManager={tableState} - emptyContentLabel="No projects available." title="Gitlab projects" titleIcon={ListIcon} extendTableOptions={withControlledSelected( diff --git a/app/react/portainer/registries/repositories/ItemView/TagsDatatable/TagsDatatable.tsx b/app/react/portainer/registries/repositories/ItemView/TagsDatatable/TagsDatatable.tsx index 73b3af73f..3b94ae46d 100644 --- a/app/react/portainer/registries/repositories/ItemView/TagsDatatable/TagsDatatable.tsx +++ b/app/react/portainer/registries/repositories/ItemView/TagsDatatable/TagsDatatable.tsx @@ -35,7 +35,6 @@ export function TagsDatatable({ dataset={dataset || []} isLoading={!dataset} settingsManager={tableState} - emptyContentLabel="No tags available." renderTableActions={(selectedItems) => advancedFeaturesAvailable && ( diff --git a/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPGroupsTable.tsx b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPGroupsTable.tsx index 808a2e42b..a70d6c79f 100644 --- a/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPGroupsTable.tsx +++ b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPGroupsTable.tsx @@ -22,7 +22,6 @@ export function LDAPGroupsTable({ dataset }: { dataset?: Value[] }) { title="Groups" titleIcon={Users} settingsManager={tableState} - emptyContentLabel="No groups found." disableSelect data-cy="ldap-groups-datatable" /> diff --git a/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx index f7597b5ac..6c888865b 100644 --- a/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx +++ b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx @@ -21,7 +21,6 @@ export function LDAPUsersTable({ dataset }: { dataset?: string[] }) { title="Users" titleIcon={Users} settingsManager={tableState} - emptyContentLabel="No users found." disableSelect data-cy="ldap-users-datatable" /> diff --git a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatable.tsx b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatable.tsx index ee76542ec..43803a6fc 100644 --- a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatable.tsx +++ b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatable.tsx @@ -31,7 +31,6 @@ export function FDOProfilesDatatable({ title="Device Profiles" titleIcon={List} disableSelect={!isFDOEnabled} - emptyContentLabel="No profiles found" getRowId={(row) => row.id.toString()} isLoading={isLoading} renderTableActions={(selectedItems) => ( diff --git a/app/react/portainer/users/RolesView/AccessViewer/EffectiveAccessViewerDatatable.tsx b/app/react/portainer/users/RolesView/AccessViewer/EffectiveAccessViewerDatatable.tsx index 969f771a6..f0a91ebbd 100644 --- a/app/react/portainer/users/RolesView/AccessViewer/EffectiveAccessViewerDatatable.tsx +++ b/app/react/portainer/users/RolesView/AccessViewer/EffectiveAccessViewerDatatable.tsx @@ -12,6 +12,14 @@ export function EffectiveAccessViewerDatatable({ }) { const tableState = useTableStateWithStorage('access-viewer', 'Environment'); + if (dataset?.length === 0) { + return ( + + The selected user does not have access to any environments. + + ); + } + return ( Effective role for each environment will be displayed for the selected - user + user. } - emptyContentLabel={ - dataset - ? 'The selected user does not have access to any environment(s)' - : 'Select a user to show associated access and role' - } disableSelect data-cy="effective-access-viewer-datatable" /> diff --git a/app/react/portainer/users/RolesView/RbacRolesDatatable.tsx b/app/react/portainer/users/RolesView/RbacRolesDatatable.tsx index 5c74a96c4..0c377b537 100644 --- a/app/react/portainer/users/RolesView/RbacRolesDatatable.tsx +++ b/app/react/portainer/users/RolesView/RbacRolesDatatable.tsx @@ -34,7 +34,6 @@ export function RbacRolesDatatable({ dataset={dataset || []} columns={columns} isLoading={!dataset} - emptyContentLabel="No role available." settingsManager={tableState} disableSelect data-cy="rbac-roles-datatable" diff --git a/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx b/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx index 61e62bb39..a02974bf2 100644 --- a/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx +++ b/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx @@ -47,7 +47,6 @@ export function TeamsDatatable({ teams, isAdmin }: Props) { /> ) } - emptyContentLabel="No teams found" data-cy="teams-datatable" /> );