From 9e92f555419f359656c5d9a67fcb3c06c40402e5 Mon Sep 17 00:00:00 2001 From: AS <11219262+ashutosh16@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:53:46 -0800 Subject: [PATCH] fix(ui): add exec check to avoid API calls (#16168) * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> * bug: add parent ref node info on resource list Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> --------- Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> --- .../application-resource-list.tsx | 56 +++++++++++-------- .../resource-details/resource-details.tsx | 2 +- ui/src/app/applications/components/utils.tsx | 4 +- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/ui/src/app/applications/components/application-details/application-resource-list.tsx b/ui/src/app/applications/components/application-details/application-resource-list.tsx index e5cad1bc0a93b..c5519fc4b6ff9 100644 --- a/ui/src/app/applications/components/application-details/application-resource-list.tsx +++ b/ui/src/app/applications/components/application-details/application-resource-list.tsx @@ -31,35 +31,45 @@ export const ApplicationResourceList = ({ return null; } const parentNode = ((resources || []).length > 0 && (getResNode(tree.nodes, nodeKey(resources[0])) as ResourceNode)?.parentRefs?.[0]) || ({} as ResourceRef); + const searchParams = new URLSearchParams(window.location.search); + const view = searchParams.get('view'); + const ParentRefDetails = () => { + return Object.keys(parentNode).length > 0 ? ( +