Skip to content

Commit 13a502d

Browse files
committed
health buttons are rendering below microservice details button
1 parent dac3530 commit 13a502d

3 files changed

Lines changed: 8 additions & 21 deletions

File tree

app/components/ServiceDetails.jsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React, { useState } from 'react';
22
import Modal from './Modal.jsx';
3-
import pieChart from '../assets/pieChart.png';
4-
import memoryChart from '../assets/memoryChart.png';
5-
import tempChart from '../assets/tempChart.png';
6-
import speedChart from '../assets/speedChart.png';
7-
import latencyChart from '../assets/latencyChart.png';
8-
import processingChart from '../assets/processingChart.png';
93

104
// Renders charts created with health and communication data for a selected database.
115
const ServiceDetails = (props) => {
@@ -26,7 +20,6 @@ const ServiceDetails = (props) => {
2620
const buttonProperties = [
2721
{ id: 'request', alt: 'Request Data', src: 'app/assets/pieChart.png' },
2822
{ id: 'response', alt: 'Response Data', src: 'app/assets/pieChart.png' },
29-
// { id: 'routes', alt: 'Route Trace', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
3023
{ id: 'speed', alt: 'Speed Data', src: 'app/assets/speedChart.png' },
3124
{ id: 'processes', alt: 'Processes Data', src: 'app/assets/processingChart.png' },
3225
{ id: 'latency', alt: 'Latency Data', src: 'app/assets/latencyChart.png' },

app/components/ServiceOverview.jsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,10 @@ const ServiceOverview = (props) => {
175175
return componentButtons;
176176
};
177177

178-
if (detailsSelected) return detailsSelected;
179-
180178
return (
181179
<div className="mainContainer">
182-
<div>
183-
<h1 className="overviewTitle">Microservices Overview</h1>
184-
</div>
185-
<div className="servicesList">{serviceList()}</div>
186-
<br />
187-
<h1>Microservices Communications</h1>
180+
<h1 className="overviewTitle">Microservices Overview</h1>
181+
<h2>Communications Data</h2>
188182
{modalDisplay ? (
189183
<Modal
190184
chartTitle={chartTitle}
@@ -200,7 +194,9 @@ const ServiceOverview = (props) => {
200194
{routes}
201195
{traffic}
202196
</div>
203-
197+
<div className="servicesList">{serviceList()}</div>
198+
<br />
199+
{detailsSelected || null}
204200
</div>
205201
);
206202
};

app/index.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ margin-top: -100px;
7676

7777
.mainContainer {
7878
font-family: Arial, Helvetica, sans-serif;
79-
display: grid;
80-
grid-template-columns: 100%;
81-
grid-template-rows: 33% 33% 33%;
82-
justify-items: center;
79+
display: flex;
80+
flex-direction: column;
8381
align-items: center;
8482
color: white;
8583
}
@@ -123,7 +121,7 @@ margin-top: -100px;
123121
}
124122

125123
.overviewTitle {
126-
margin-top: 80px;
124+
margin-top: 40px;
127125
}
128126

129127
.leftTopContainer {

0 commit comments

Comments
 (0)