+
- {secret?.user?.name && (
+ {secret?.body?.user?.name && (
{initials}
@@ -199,10 +202,13 @@ export const GetHeaderCols = ({
)}
- {secret?.user?.name}
+ {secret?.body?.user?.name}
-
+
);
},
@@ -216,13 +222,15 @@ export const GetHeaderCols = ({
asc: (filteredSecrets: any[]) =>
_.orderBy(
filteredSecrets,
- (secret: any) => new Date(secret.created).getTime(),
+ (secret: Secret) =>
+ new Date(secret.body?.created || '').getTime(),
['asc'],
),
desc: (filteredSecrets: any[]) =>
_.orderBy(
filteredSecrets,
- (secret: any) => new Date(secret.created).getTime(),
+ (secret: Secret) =>
+ new Date(secret.body?.created || '').getTime(),
['desc'],
),
})}
@@ -236,18 +244,18 @@ export const GetHeaderCols = ({
),
testId: 'created_at',
width: '20%',
- renderRow: (secret: any) => (
+ renderRow: (secret: Secret) => (
-
+
- {formatDateToDisplayOnTable(secret.created)}
+ {formatDateToDisplayOnTable(secret.body?.created || '')}
),
diff --git a/src/ui/layouts/secrets/UpdateSecret/UpdateConfig/index.tsx b/src/ui/layouts/secrets/UpdateSecret/UpdateConfig/index.tsx
index 6ff83d2b6..d314e1460 100644
--- a/src/ui/layouts/secrets/UpdateSecret/UpdateConfig/index.tsx
+++ b/src/ui/layouts/secrets/UpdateSecret/UpdateConfig/index.tsx
@@ -36,7 +36,7 @@ export const UpdateConfig: React.FC<{
const workspaces = useSelector(workspaceSelectors.myWorkspaces);
const { secret } = useService({ secretId });
const [secretName, setSecretName] = useState(secret?.name);
- const [scope, setScope] = useState(secret?.scope);
+ const [scope, setScope] = useState(secret?.body?.scope);
const [inputFields, setInputFields] = useState([]) as any;
const [loading, setLoading] = useState(false);
const childStateRef = useRef(null);
@@ -45,7 +45,7 @@ export const UpdateConfig: React.FC<{
setInputFields(childStateRef.current as any);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [childStateRef]);
- const valuesIntoArray = Object.entries(secret?.values || {}).map(
+ const valuesIntoArray = Object.entries(secret?.body?.values || {}).map(
([key, value]) => ({
key,
value,
diff --git a/src/ui/layouts/secrets/UpdateSecret/getHeaderCols.tsx b/src/ui/layouts/secrets/UpdateSecret/getHeaderCols.tsx
index fdde2d581..b25686745 100644
--- a/src/ui/layouts/secrets/UpdateSecret/getHeaderCols.tsx
+++ b/src/ui/layouts/secrets/UpdateSecret/getHeaderCols.tsx
@@ -78,12 +78,12 @@ export const GetHeaderCols = ({
width: '15%',
renderRow: (secret: Secret) => (
-
+
- {secret.scope}
+ {secret.body?.scope}
-
+
),
},
@@ -129,16 +129,16 @@ export const GetHeaderCols = ({
width: '20%',
renderRow: (secret: Secret) => (
-
+
- {formatDateToDisplayOnTable(secret.created)}
+ {formatDateToDisplayOnTable(secret.body?.created)}
),