Skip to content

Commit

Permalink
fix(matchexpr): fix bug in evaluator List view (#1278)
Browse files Browse the repository at this point in the history
(cherry picked from commit 875e7ac)
  • Loading branch information
andrewazores authored and mergify[bot] committed Jun 11, 2024
1 parent e969457 commit a94fbc0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ const ListView: React.FC<{ alertOptions?: AlertOptions }> = ({ alertOptions, ...
isHidden={!expanded.includes(connectUrl)}
>
<EntityDetails
entity={{ getData: () => target }}
entity={{ getData: () => ({ target }) }}
columnModifier={{ default: '3Col' }}
alertOptions={alertOptions}
className="topology__list-view__entity-details"
Expand Down
1 change: 1 addition & 0 deletions src/app/Shared/Services/api.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ export enum NodeType {
ENDPOINT = 'Endpoint',
// Standalone targets
TARGET = 'Target',
NODE = 'Node', // Default/fallback for unknown
}

interface _AbstractNode {
Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Shared/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const DiscoveryTreeContext = React.createContext(DEFAULT_EMPTY_UNIVERSE);

export const COLLAPSE_EXEMPTS = [NodeType.NAMESPACE, NodeType.REALM, NodeType.UNIVERSE];

export const nodeTypeToAbbr = (type: NodeType): string => {
export const nodeTypeToAbbr = (type: NodeType = NodeType.NODE): string => {
// Keep uppercases (or uppercase whole word if none) and retain first 4 charaters.
return (type.replace(/[^A-Z]/g, '') || type.toUpperCase()).slice(0, 4);
};
Expand Down

0 comments on commit a94fbc0

Please sign in to comment.