Skip to content

Commit 822c966

Browse files
Fixing according to copilot review
1 parent c56bc06 commit 822c966

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/components/Graphs/CustomNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const CustomNode: React.FC<CustomNodeProps> = ({ data }) => (
2727
<div className={styles.nodeLabel} title={data.label}>
2828
{data.label}
2929
</div>
30-
{data.type && <div className={styles.nodeType}>{data.type}</div>}
30+
{data.type && <div>{data.type}</div>}
3131
</div>
3232
</div>
3333
<div className={styles.yamlButtonWrapper}>

src/components/Graphs/Graph.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ const Graph: React.FC = () => {
288288
</ReactFlow>
289289
</div>
290290
<Legend
291-
nodes={nodes.map((n) => n.data as unknown as NodeData)}
291+
nodes={nodes.map((n) => n.data as NodeData)}
292292
colorBy={colorBy}
293293
providers={providers?.items || []}
294294
generateColorMap={generateColorMap}

src/components/Graphs/graphUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import {
66
ProviderConfigItem,
77
} from './types';
88

9-
export const getStatusFromConditions = (conditions?: Condition[]): string => {
9+
export type StatusType = 'ERROR' | 'OK';
10+
11+
export const getStatusFromConditions = (
12+
conditions?: Condition[],
13+
): StatusType => {
1014
if (!conditions || !Array.isArray(conditions)) return 'ERROR';
1115
const relevant = conditions.find(
1216
(c) => c.type === 'Ready' || c.type === 'Healthy',

src/components/Graphs/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface Condition {
2-
type: unknown;
2+
type: 'Ready' | 'Synced' | unknown;
33
status: 'True' | 'False';
44
lastTransitionTime: string;
55
}

0 commit comments

Comments
 (0)