From 9855defeae248e92ccf5904f56f147555f65cbc2 Mon Sep 17 00:00:00 2001
From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com>
Date: Sat, 26 Mar 2022 15:46:43 +0100
Subject: [PATCH] format code
---
.../frontend/src/components/EntityGraph.tsx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/haesli_dashboard/frontend/src/components/EntityGraph.tsx b/haesli_dashboard/frontend/src/components/EntityGraph.tsx
index 7b45110..d133d53 100644
--- a/haesli_dashboard/frontend/src/components/EntityGraph.tsx
+++ b/haesli_dashboard/frontend/src/components/EntityGraph.tsx
@@ -37,7 +37,7 @@ const graphConfig = {
shapeId: '#empty', // relates to the type property of a node
shape: (
-
+
),
},
@@ -47,7 +47,7 @@ const graphConfig = {
shapeId: '#empty', // relates to the type property of a node
shape: (
-
+
),
},
@@ -63,20 +63,20 @@ type Props = {
const SPACE = 200;
const EntityGraph = ({ data }: Props) => {
- const queueTotal = data.queues.length * SPACE / 2;
+ const queueTotal = (data.queues.length * SPACE) / 2;
const queues = data.queues.map((q, i) => ({
id: q.name,
title: q.name,
y: 300,
- x: (i * SPACE) - queueTotal,
+ x: i * SPACE - queueTotal,
type: 'queue',
}));
- const exchTotal = data.exchanges.length * SPACE / 2;
+ const exchTotal = (data.exchanges.length * SPACE) / 2;
const exchanges = data.exchanges.map((e, i) => ({
id: e.name,
title: e.name,
y: 0,
- x: (i * SPACE) - exchTotal,
+ x: i * SPACE - exchTotal,
type: 'exchange',
}));
@@ -88,7 +88,7 @@ const EntityGraph = ({ data }: Props) => {
source: b.queue,
target: e.name,
label_to: `'${b.routingKey}'`,
- type: 'emptyEdge'
+ type: 'emptyEdge',
}));
const nodeTypes = graphConfig.nodeTypes;