@@ -75,16 +86,15 @@ export default function ProjectsList() {
{
Header: t('yaml.YAML'),
accessor: 'yaml',
- width: 85,
+ width: 75,
disableFilters: true,
- hAlign: 'Center',
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- Cell: (instance: any) => (
+ hAlign: 'Center' as const,
+ Cell: (instance: ProjectListCellInstance
) => (
@@ -100,9 +110,8 @@ export default function ProjectsList() {
accessor: 'options',
width: 60,
disableFilters: true,
- hAlign: 'Center',
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- Cell: (instance: any) => (
+ hAlign: 'Center' as const,
+ Cell: (instance: ProjectListCellInstance
) => (
{
+ const btnRef = useRef
(null);
+ const [popoverIsOpen, setPopoverIsOpen] = useState(false);
-export function ResourceStatusCell({ value, transitionTime }: StatusCellProps) {
+ const handleClose = () => {
+ setPopoverIsOpen(false);
+ };
+ const handleOpen = () => {
+ setPopoverIsOpen(true);
+ };
return (
-
+
+
+ }
+ text={isOk ? positiveText : negativeText}
+ onClick={handleOpen}
+ />
+
+ {message}
+
+
+
+
+ {timeAgo.format(new Date(transitionTime))}
+
+
+
+
);
-}
+};
diff --git a/src/components/Yaml/YamlViewButton.tsx b/src/components/Yaml/YamlViewButton.tsx
index 5e2add13..2e6b7d78 100644
--- a/src/components/Yaml/YamlViewButton.tsx
+++ b/src/components/Yaml/YamlViewButton.tsx
@@ -16,6 +16,7 @@ export const YamlViewButton: FC = ({ resourceObject }) => {
const [isOpen, setIsOpen] = useState(false);
const { t } = useTranslation();
const resource = resourceObject as Resource;
+
const yamlString = useMemo(() => {
return stringify(removeManagedFieldsProperty(resource));
}, [resource]);
diff --git a/src/lib/api/types/crossplane/listManagedResources.ts b/src/lib/api/types/crossplane/listManagedResources.ts
index f3e1e1ec..2ebd01e9 100644
--- a/src/lib/api/types/crossplane/listManagedResources.ts
+++ b/src/lib/api/types/crossplane/listManagedResources.ts
@@ -15,6 +15,8 @@ export type ManagedResourcesResponse = [
type: 'Ready' | 'Synced' | unknown;
status: 'True' | 'False';
lastTransitionTime: string;
+ message?: string;
+ reason?: string;
},
];
};
diff --git a/src/lib/api/types/crossplane/listProviders.ts b/src/lib/api/types/crossplane/listProviders.ts
index 6d4702ab..c20a807e 100644
--- a/src/lib/api/types/crossplane/listProviders.ts
+++ b/src/lib/api/types/crossplane/listProviders.ts
@@ -17,6 +17,8 @@ export type ProvidersListResponse = {
type: 'Healthy' | 'Installed' | unknown;
status: 'True' | 'False';
lastTransitionTime: string;
+ message?: string;
+ reason?: string;
},
];
};
diff --git a/src/lib/api/types/flux/listGitRepo.ts b/src/lib/api/types/flux/listGitRepo.ts
index 882b6ac0..b9fc6676 100644
--- a/src/lib/api/types/flux/listGitRepo.ts
+++ b/src/lib/api/types/flux/listGitRepo.ts
@@ -20,6 +20,8 @@ export type GitReposResponse = {
status: string;
type: string;
lastTransitionTime: string;
+ message?: string;
+ reason?: string;
},
];
};
diff --git a/src/lib/api/types/flux/listKustomization.ts b/src/lib/api/types/flux/listKustomization.ts
index 0efff18e..2f003594 100644
--- a/src/lib/api/types/flux/listKustomization.ts
+++ b/src/lib/api/types/flux/listKustomization.ts
@@ -17,9 +17,11 @@ export type KustomizationsResponse = {
};
conditions: [
{
+ message: string;
status: string;
type: string;
lastTransitionTime: string;
+ reason: string;
},
];
};