Skip to content

Commit

Permalink
fix(ui): improve pod grouping ux
Browse files Browse the repository at this point in the history
Signed-off-by: ashutosh16 <[email protected]>
  • Loading branch information
ashutosh16 committed Aug 2, 2023
1 parent 2ffcb1c commit a6fcb53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function groupNodes(nodes: ResourceTreeNode[], graph: dagre.graphlib.Graph) {
nodeIds.forEach((nodeId: string) => {
const index = nodes.findIndex(node => nodeId === node.uid || nodeId === nodeKey(node));
const graphNode = graph.node(nodeId);
if (!graphNode.podGroup && index > -1) {
if (!graphNode?.podGroup && index > -1) {
groupedNodeIds.push(nodeId);
} else {
podGroupIds.push(nodeId);
Expand Down
2 changes: 2 additions & 0 deletions ui/src/app/applications/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,9 @@ export function getUsrMsgToDisplay(appName: string, msgKey: string, usrMessages:
return {appName, msgKey, messages: userMsgs[msgKey], display: false, duration: 1} as appModels.UserMessages;
}
}

type UserMsgType = {[key: string]: string};

export const userMsgs: UserMsgType = {
groupNodes: `Since the number of pods has surpassed the threshold pod count of 15, you will now be switched to the group node view.
If you prefer the tree view, you can simply click on the Group Nodes toolbar button to deselect the current view.`
Expand Down

0 comments on commit a6fcb53

Please sign in to comment.