Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology lookup URI broken #182

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/components/PolicyTopologyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
};

try {
const response = await fetch('/api/plugins/kuadrant-console/config.js');
const response = await fetch('/api/plugins/kuadrant-console-plugin/config.js');
if (!response.ok) {
if (response.status === 404) {
console.warn('config.js not found (running locally perhaps). Falling back to defaults.');
Expand All @@ -66,7 +66,7 @@
configScript.innerHTML = script;
document.head.appendChild(configScript);

return (window as any).kuadrant_config || defaultConfig;

Check warning on line 69 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
} catch (error) {
console.error('Error loading config.js:', error);
return defaultConfig;
Expand All @@ -78,12 +78,12 @@
};

// Convert DOT graph to PatternFly node/edge models
const parseDotToModel = (dotString: string): { nodes: any[]; edges: any[] } => {

Check warning on line 81 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 81 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
try {
const graph = dot.read(dotString);
const nodes: any[] = [];

Check warning on line 84 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const edges: any[] = [];

Check warning on line 85 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const groups: any[] = [];

Check warning on line 86 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const connectedNodeIds = new Set<string>();

const shapeMapping: { [key: string]: NodeShape } = {
Expand Down Expand Up @@ -234,7 +234,7 @@
}
};

const CustomNode: React.FC<any> = ({

Check warning on line 237 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
element,
onSelect,
selected,
Expand Down Expand Up @@ -345,7 +345,7 @@
window.location.href = url;
};

const customLayoutFactory = (type: string, graph: any): any => {

Check warning on line 348 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 348 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
return new DagreLayout(graph, {
rankdir: 'TB',
nodesep: 20,
Expand Down
Loading