Skip to content

Commit

Permalink
fix: Pass context to resource tree (#5468) (#9401)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Chong <kykchong@redhat.com>
  • Loading branch information
keithchong authored May 13, 2022
1 parent 1246e15 commit 1186fee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{nam
onClearFilter={clearFilter}
onGroupdNodeClick={groupdedNodeIds => openGroupNodeDetails(groupdedNodeIds)}
zoom={pref.zoom}
appContext={this.appContext}
nameDirection={this.state.truncateNameOnRight}
filters={pref.resourceFilter}
setTreeFilterGraph={setFilterGraph}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,8 @@ export const describeNode = (node: ResourceTreeNode) => {
};

function processPodGroup(targetPodGroup: ResourceTreeNode, child: ResourceTreeNode, props: ApplicationResourceTreeProps) {
const statusByKey = new Map<string, models.ResourceStatus>();
if (!targetPodGroup.podGroup) {
const fullName = nodeKey(targetPodGroup);
const status = statusByKey.get(fullName);
if ((targetPodGroup.parentRefs || []).length === 0) {
targetPodGroup.root = targetPodGroup;
}
Expand All @@ -340,7 +338,6 @@ function processPodGroup(targetPodGroup: ResourceTreeNode, child: ResourceTreeNo
...targetPodGroup,
info: (targetPodGroup.info || []).filter(i => !i.name.includes('Resource.')),
createdAt: targetPodGroup.createdAt,
resourceStatus: {health: targetPodGroup.health, status: status ? status.status : null},
renderMenu: () => props.nodeMenu(targetPodGroup),
kind: targetPodGroup.kind,
type: 'parentResource',
Expand Down

0 comments on commit 1186fee

Please sign in to comment.