mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(ui/datatables): make empty table label consistent [EE-6499] (#11612)
This commit is contained in:
parent
02fbdfec36
commit
b7cde35c3d
56 changed files with 45 additions and 93 deletions
|
@ -23,7 +23,7 @@ interface Props {
|
|||
initialValues: IngressControllerClassMap[] | undefined;
|
||||
isLoading: boolean;
|
||||
noIngressControllerLabel: string;
|
||||
view: string;
|
||||
view: 'namespace' | 'cluster';
|
||||
}
|
||||
|
||||
export function IngressClassDatatable({
|
||||
|
@ -44,7 +44,6 @@ export function IngressClassDatatable({
|
|||
dataset={values || []}
|
||||
columns={columns}
|
||||
isLoading={isLoading}
|
||||
emptyContentLabel={noIngressControllerLabel}
|
||||
title="Ingress Controllers"
|
||||
titleIcon={Route}
|
||||
getRowId={(row) => `${row.Name}-${row.ClassName}-${row.Type}`}
|
||||
|
@ -94,11 +93,18 @@ export function IngressClassDatatable({
|
|||
|
||||
function renderIngressClassDescription() {
|
||||
return (
|
||||
<div className="text-muted flex w-full flex-col !text-xs">
|
||||
<div className="mt-1">{description}</div>
|
||||
{initialValues && values && isUnsavedChanges(initialValues, values) && (
|
||||
<TextTip>Unsaved changes.</TextTip>
|
||||
<div className="flex flex-col gap-3">
|
||||
{!isLoading && values && values.length === 0 && (
|
||||
<TextTip>{noIngressControllerLabel}</TextTip>
|
||||
)}
|
||||
<div className="text-muted flex w-full flex-col !text-xs">
|
||||
<div className="mt-1">{description}</div>
|
||||
{initialValues &&
|
||||
values &&
|
||||
isUnsavedChanges(initialValues, values) && (
|
||||
<TextTip>Unsaved changes.</TextTip>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue