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
  • Loading branch information
andrewazores authored Jun 11, 2024
1 parent 7ce8ee4 commit 875e7ac
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 875e7ac

Please sign in to comment.