Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

CNV-51884: The topology view of nmstate is broken on cnv2.engineering #116

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ jobs:
sudo install kubectl /usr/local/bin/kubectl
- name: Install podman
run: |
sudo apt-get -y install podman
sudo apt-get update
sudo apt-get -y install podman --fix-missing

- name: Create Cluster
run: |
Expand Down
8 changes: 4 additions & 4 deletions src/views/states/topology/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ const createNodes = (
const createEdges = (childNodes: NodeModel[]): EdgeModel[] => {
const edges: EdgeModel[] = [];

childNodes.forEach((sourceNode) => {
childNodes?.forEach((sourceNode) => {
// Find bridge connections
if (!isEmpty(sourceNode.data?.bridgePorts)) {
sourceNode.data?.bridgePorts.forEach((port) => {
sourceNode.data?.bridgePorts?.forEach((port) => {
const targetNode = childNodes.find(
(target) => target.label === port.name && target.id !== sourceNode.id,
);
Expand All @@ -83,7 +83,7 @@ const createEdges = (childNodes: NodeModel[]): EdgeModel[] => {

// Find bond connections
if (!isEmpty(sourceNode.data?.vlanBaseInterface)) {
sourceNode.data?.bondPorts.forEach((port) => {
sourceNode.data?.bondPorts?.forEach((port) => {
const targetNode = childNodes.find(
(target) => target.label === port && target.id !== sourceNode.id,
);
Expand Down Expand Up @@ -145,7 +145,7 @@ export const transformDataToTopologyModel = (
const nodes: NodeModel[] = [];
const edges: EdgeModel[] = [];

data.forEach((nodeState) => {
data?.forEach((nodeState) => {
const nnsName = nodeState.metadata.name;

const childNodes = createNodes(nnsName, nodeState.status.currentState.interfaces);
Expand Down
Loading