Skip to content

Commit 9d2c908

Browse files
committed
setting to static data
1 parent f798766 commit 9d2c908

File tree

3 files changed

+81
-80
lines changed

3 files changed

+81
-80
lines changed

package-lock.json

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"elkjs": "^0.8.2",
1616
"eslint": "8.36.0",
1717
"eslint-config-next": "13.2.4",
18-
"next": "13.2.4",
18+
"next": "^13.2.4",
1919
"react": "18.2.0",
2020
"react-dom": "18.2.0",
2121
"reactflow": "^11.6.1",

src/initialNodes.tsx

+78-78
Original file line numberDiff line numberDiff line change
@@ -45,82 +45,82 @@ function getNodeStyle(value: HealthStatus) {
4545
return unhealtyNodeStyle;
4646
}
4747
}
48-
let data: ServiceState[];
49-
// const data = [
50-
// {
51-
// Id: "aac6b4e4-3d11-4e35-b778-05a65e6d7d02",
52-
// ParentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
53-
// Name: "PostGreSQL",
54-
// Url: null,
55-
// Status: Status.Degraded,
56-
// Description: "",
57-
// Metadata: null
58-
// } as ServiceState,
59-
// {
60-
// Id: "2a7052b0-f3f0-4be5-9c7b-b2be529ac1b0",
61-
// ParentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
62-
// Name: "Service Goias",
63-
// Url: null,
64-
// Status: Status.Healthy,
65-
// Description: "",
66-
// Metadata: null
67-
// } as ServiceState,
68-
// {
69-
// Id: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
70-
// ParentId: "5d27977c-0653-492f-9923-ff4cdc527cd8",
71-
// Name: "Service Amazonas",
72-
// Url: "www.amazonas.com/health",
73-
// Status: Status.Degraded,
74-
// Description: "",
75-
// Metadata: null
76-
// } as ServiceState,
77-
// {
78-
// Id: "f5599ae7-b455-4fce-92d6-628f4ed956a5",
79-
// ParentId: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
80-
// Name: "Service Sao Luis",
81-
// Url:null,
82-
// Status: Status.Unhealthy,
83-
// Description: "",
84-
// Metadata: null
85-
// } as ServiceState,
86-
// {
87-
// Id: "14461a0e-c1de-476c-b475-d2e511d1416e",
88-
// ParentId: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
89-
// Name: "Service Curitiba",
90-
// Url: null,
91-
// Status: Status.Healthy,
92-
// Description: "",
93-
// Metadata: null
94-
// } as ServiceState,
95-
// {
96-
// Id: "cdec9a40-f56b-4345-a3b1-f4a6c7451cdc",
97-
// ParentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
98-
// Name: "Service Campo Grande",
99-
// Url: "www.campogrande.com/health",
100-
// Status: Status.Healthy,
101-
// Description: "",
102-
// Metadata: null
103-
// } as ServiceState,
104-
// {
105-
// Id: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
106-
// ParentId: "5d27977c-0653-492f-9923-ff4cdc527cd8",
107-
// Name: "Service Fortaleza",
108-
// Url: "www.fortaleza.com/health",
109-
// Status: Status.Unhealthy,
110-
// Description: "",
111-
// Metadata: null
112-
// } as ServiceState,
113-
// {
114-
// Id: "5d27977c-0653-492f-9923-ff4cdc527cd8",
115-
// ParentId: null,
116-
// Name: "Gateway São Paulo",
117-
// Url: "www.saopaulo.com/health",
118-
// Status: Status.Degraded,
119-
// Description: "",
120-
// Metadata: null
121-
// } as ServiceState,
122-
123-
// ] as ServiceState[];
48+
// let data: ServiceState[];
49+
const data = [
50+
{
51+
id: "aac6b4e4-3d11-4e35-b778-05a65e6d7d02",
52+
parentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
53+
name: "PostGreSQL",
54+
url: null,
55+
healthStatus: HealthStatus.Degraded,
56+
description: "",
57+
tags: null
58+
} as ServiceState,
59+
{
60+
id: "2a7052b0-f3f0-4be5-9c7b-b2be529ac1b0",
61+
parentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
62+
name: "Service Goias",
63+
url: null,
64+
healthStatus: HealthStatus.Healthy,
65+
description: "",
66+
tags: null
67+
} as ServiceState,
68+
{
69+
id: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
70+
parentId: "5d27977c-0653-492f-9923-ff4cdc527cd8",
71+
name: "Service Amazonas",
72+
url: "www.amazonas.com/health",
73+
healthStatus: HealthStatus.Degraded,
74+
description: "",
75+
tags: null
76+
} as ServiceState,
77+
{
78+
id: "f5599ae7-b455-4fce-92d6-628f4ed956a5",
79+
parentId: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
80+
name: "Service Sao Luis",
81+
url:null,
82+
healthStatus: HealthStatus.Unhealthy,
83+
description: "",
84+
tags: null
85+
} as ServiceState,
86+
{
87+
id: "14461a0e-c1de-476c-b475-d2e511d1416e",
88+
parentId: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
89+
name: "Service Curitiba",
90+
url: null,
91+
healthStatus: HealthStatus.Healthy,
92+
description: "",
93+
tags: null
94+
} as ServiceState,
95+
{
96+
id: "cdec9a40-f56b-4345-a3b1-f4a6c7451cdc",
97+
parentId: "7f4a626e-6c09-402a-b380-ddcc43000a5f",
98+
name: "Service Campo Grande",
99+
url: "www.campogrande.com/health",
100+
healthStatus: HealthStatus.Healthy,
101+
description: "",
102+
tags: null
103+
} as ServiceState,
104+
{
105+
id: "9168cb47-a6e5-4957-93ee-2b4927d9f7fe",
106+
parentId: "5d27977c-0653-492f-9923-ff4cdc527cd8",
107+
name: "Service Fortaleza",
108+
url: "www.fortaleza.com/health",
109+
healthStatus: HealthStatus.Unhealthy,
110+
description: "",
111+
tags: null
112+
} as ServiceState,
113+
{
114+
id: "5d27977c-0653-492f-9923-ff4cdc527cd8",
115+
parentId: null,
116+
name: "Gateway São Paulo",
117+
url: "www.saopaulo.com/health",
118+
healthStatus: HealthStatus.Degraded,
119+
description: "",
120+
tags: null
121+
} as ServiceState,
122+
123+
] as ServiceState[];
124124

125125

126126

@@ -137,8 +137,8 @@ function getUsers(): Promise<ServiceState[]> {
137137

138138

139139
export async function pollData() {
140-
data = await getUsers()
141-
console.log(data);
140+
//data = await getUsers()
141+
//console.log(data);
142142
}
143143

144144
export function getData(): [Node[], Edge[]] {

0 commit comments

Comments
 (0)