From dff654b55615d20a10e2ece18c79cbf1967385da Mon Sep 17 00:00:00 2001 From: Schlangstedt Anne Date: Tue, 9 Aug 2022 11:58:02 +0200 Subject: [PATCH] fixed design issues and corrected graph throughput time calculation --- public/components/_base.scss | 1 - public/components/pages/process_graph/vis_graph.tsx | 2 +- public/components/pages/side_panel/panel.tsx | 2 +- server/graph_calculation/calculate_throughput_time.ts | 5 ++++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/components/_base.scss b/public/components/_base.scss index c48eca2..57baa6c 100644 --- a/public/components/_base.scss +++ b/public/components/_base.scss @@ -35,7 +35,6 @@ $font-size-small: 14px; .main-design-scope { width: 100%; height: 100%; - margin-bottom: 10px; } .main-design-scope p { diff --git a/public/components/pages/process_graph/vis_graph.tsx b/public/components/pages/process_graph/vis_graph.tsx index c5ad2e8..371e615 100644 --- a/public/components/pages/process_graph/vis_graph.tsx +++ b/public/components/pages/process_graph/vis_graph.tsx @@ -140,7 +140,7 @@ const VisGraphComponent = (props: VisGraphComponentProps) => { }, arrowStrikethrough: false, }, - height: '980px', + height: '1080px', physics: { enabled: false, }, diff --git a/public/components/pages/side_panel/panel.tsx b/public/components/pages/side_panel/panel.tsx index bb5fe83..65374bc 100644 --- a/public/components/pages/side_panel/panel.tsx +++ b/public/components/pages/side_panel/panel.tsx @@ -215,7 +215,7 @@ const PanelComponent = (props: PanelComponentProps) => { style={{ padding: '15px', height: '100%', width: '315px', minHeight: '746px' }} >
-
+
Logo
diff --git a/server/graph_calculation/calculate_throughput_time.ts b/server/graph_calculation/calculate_throughput_time.ts index 7b3840c..6a1cbb9 100644 --- a/server/graph_calculation/calculate_throughput_time.ts +++ b/server/graph_calculation/calculate_throughput_time.ts @@ -32,7 +32,10 @@ export function calculateGraphThroughputTime(nodes: VisNode[]) { } const sortedNodes = sortNodes(nodes, 'timestamp'); - const throughputTimeMilliseconds = sortedNodes[lastIndex].timestamp - sortedNodes[0].timestamp; + const throughputTimeMilliseconds = + (sortedNodes[lastIndex].endTime + ? sortedNodes[lastIndex].endTime + : sortedNodes[lastIndex].timestamp) - sortedNodes[0].timestamp; const throughputTimeSeconds = throughputTimeMilliseconds / 1000; return throughputTimeSeconds;