Skip to content

Commit 854b6f7

Browse files
committed
inlined communication modals
1 parent 1632351 commit 854b6f7

File tree

7 files changed

+23
-15
lines changed

7 files changed

+23
-15
lines changed

.DS_Store

0 Bytes
Binary file not shown.

app/assets/chartModal.png

22.9 KB
Loading

app/charts/microservice-traffic.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ const MicroServiceTraffic = (props) => {
7979
// return div with Bar component and Trace Points data
8080
return (
8181
<div>
82-
<h1>THIS IS FROM MS TRAFFIC</h1>
8382
<Bar
8483
data={myChart}
8584
width={100}

app/components/Modal.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ const Modal = (props) => {
1717
// Dictionary used to render proper data chart within Modal component upon rendering
1818
const dict = {
1919
request: <RequestTypesChart service={service} />,
20-
routes: <RouteTrace service={service} />,
20+
Routes: <RouteTrace service={service} />,
2121
response: <ResponseCodesChart service={service} />,
2222
speed: <SpeedChart service={service} />,
2323
processes: <ProcessesChart service={service} />,
2424
latency: <LatencyChart service={service} />,
25-
traffic: <MicroServiceTraffic service={service} />,
25+
Traffic: <MicroServiceTraffic service={service} />,
2626
temperature: <TemperatureChart service={service} />,
2727
memory: <MemoryChart service={service} />,
2828
};

app/components/ServiceDetails.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ const ServiceDetails = (props) => {
2323
const { currentMicroservice } = props;
2424

2525
// Dictionary used by the healthInfoButtons loop below
26-
// { id: 'request', alt: 'Request Data', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
2726

2827
const buttonProperties = [
2928
{ id: 'request', alt: 'Request Data', src: pieChart },
3029
{ id: 'response', alt: 'Response Data', src: pieChart },
31-
// { id: 'routes', alt: 'Route Trace', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
3230
{ id: 'speed', alt: 'Speed Data', src: speedChart},
3331
{ id: 'processes', alt: 'Processes Data', src: processingChart },
3432
{ id: 'latency', alt: 'Latency Data', src: latencyChart },

app/components/ServiceOverview.jsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import HealthInformationContext from '../context/DetailsContext';
44
import ServiceDetails from './ServiceDetails.jsx';
55
import Modal from './Modal.jsx';
66
import routeChart from '../assets/routeChart.png'
7+
import chartModal from '../assets/chartModal.png'
78

89
const { ipcRenderer } = window.require('electron');
910

@@ -41,12 +42,13 @@ const ServiceOverview = (props) => {
4142
// is grabbed from the onClick event via event.path[0].alt
4243
const [chartTitle, setChartTitle] = useState();
4344

44-
const routeButtonProperty = { traffic: {id: 'traffic', alt: 'Microservice Traffic', src: routeChart}, routes: {id: 'routes', alt: 'Route Trace', src: routeChart} };
45+
//route button AND traffic button property
46+
const routeButtonProperty = { traffic: {id: 'Traffic', alt: 'Microservice Traffic', src: chartModal}, routes: {id: 'Routes', alt: 'Route Trace', src: routeChart} };
4547

4648
const routes = [];
4749
const traffic = [];
4850
traffic.push (
49-
<div>
51+
5052
<div className="healthChartContainer">
5153
<input
5254
onClick={() => {
@@ -62,13 +64,13 @@ const ServiceOverview = (props) => {
6264
/>
6365
<br/>
6466
<div style={{color:'white', paddingLeft:'7px'}}>
65-
{routeButtonProperty.id}
67+
{routeButtonProperty.traffic.id}
6668
</div>
6769
</div>
68-
</div>
70+
6971
);
7072
routes.push(
71-
<div>
73+
7274
<div className="healthChartContainer">
7375
<input
7476
onClick={() => {
@@ -84,10 +86,10 @@ const ServiceOverview = (props) => {
8486
/>
8587
<br/>
8688
<div style={{color:'white', paddingLeft:'7px'}}>
87-
{routeButtonProperty.id}
89+
{routeButtonProperty.routes.id}
8890
</div>
8991
</div>
90-
</div>,
92+
9193
);
9294

9395
// Filters data received from IPC to the communications database to create a list of the services tracked in the provided database,
@@ -171,7 +173,8 @@ const ServiceOverview = (props) => {
171173
<div />
172174
<div className="servicesList">{serviceList()}</div>
173175
{/* adding the route tracer button */}
174-
<h3>Trace Last Route</h3>
176+
<br/>
177+
<h3>Microservices Communications</h3>
175178
{modalDisplay ? (
176179
<Modal
177180
chartTitle={chartTitle}
@@ -183,8 +186,10 @@ const ServiceOverview = (props) => {
183186
}}
184187
/>
185188
) : null}
186-
{routes}
187-
{traffic}
189+
<div id="routeAndTrafficDisplay">
190+
{routes}
191+
{traffic}
192+
</div>
188193
</div>
189194
);
190195
};

app/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ select {
258258
opacity: 0.7;
259259
}
260260

261+
#routeAndTrafficDisplay {
262+
display: inline-flex;
263+
}
264+
265+
261266
#microserviceHealthInfo {
262267
text-align: center;
263268
margin-top: 25px;
@@ -310,6 +315,7 @@ select {
310315
margin-right: 10px;
311316
}
312317

318+
313319
.RouteCircle {
314320
font-family: Arial, Helvetica, sans-serif;
315321
color: white;

0 commit comments

Comments
 (0)