Skip to content

Commit ecb329d

Browse files
committed
final dev changes
1 parent 768b080 commit ecb329d

5 files changed

Lines changed: 5 additions & 37 deletions

File tree

Main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ ipcMain.on('overviewRequest', (message, index) => {
140140
// Asynchronous event emitter used to transmit query results back to the render process.
141141
message.sender.send('overviewResponse', queryResults);
142142

143-
144143
});
145144
}
146145

@@ -180,7 +179,6 @@ ipcMain.on('detailsRequest', (message, index) => {
180179
).services[index][1];
181180

182181
if (databaseType === 'MongoDB') {
183-
connectMongoose(index);
184182
HealthInfoSchema.find({}, (err, data) => {
185183
if (err) {
186184
message.sender.send('detailsResponse', JSON.stringify(err));
@@ -192,7 +190,6 @@ ipcMain.on('detailsRequest', (message, index) => {
192190
}
193191

194192
if (databaseType === 'SQL') {
195-
const pool = connectSQL(index);
196193
const getHealth = 'SELECT * FROM healthInfo';
197194
pool.query(getHealth, (err, result) => {
198195
if (err) {

app/components/Modal.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ProcessesChart from '../charts/processes-chart.jsx';
66
import TemperatureChart from '../charts/temperature-chart.jsx';
77
import LatencyChart from '../charts/latency-chart.jsx';
88
import MemoryChart from '../charts/memory-chart.jsx';
9+
import RouteTrace from '../charts/route-trace.jsx';
910

1011
const Modal = (props) => {
1112
// Destructuring props to make linter happy
@@ -15,6 +16,7 @@ const Modal = (props) => {
1516
// Dictionary used to render proper data chart within Modal component upon rendering
1617
const dict = {
1718
request: <RequestTypesChart service={service} />,
19+
routes: <RouteTrace service={service} />,
1820
response: <ResponseCodesChart service={service} />,
1921
speed: <SpeedChart service={service} />,
2022
processes: <ProcessesChart service={service} />,

app/components/ServiceDetails.jsx

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const ServiceDetails = (props) => {
3131
const buttonProperties = [
3232
{ id: 'request', alt: 'Request Data', src: pieChart },
3333
{ id: 'response', alt: 'Response Data', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
34+
{ id: 'routes', alt: 'Route Trace', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
3435
{ id: 'speed', alt: 'Speed Data', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
3536
{ id: 'processes', alt: 'Processes Data', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
3637
{ id: 'latency', alt: 'Latency Data', src: 'https://st2.depositphotos.com/3894705/9581/i/950/depositphotos_95816620-stock-photo-round-button-shows-speedometer.jpg' },
@@ -86,38 +87,6 @@ const ServiceDetails = (props) => {
8687
<div id="healthGrid">
8788
{healthInfoButtons}
8889
</div>
89-
<div>
90-
<h3>Request Types</h3>
91-
<RequestTypesChart service={props.service} />
92-
</div>
93-
<div>
94-
<h3>Response Codes </h3>
95-
<ResponseCodesChart service={props.service} />
96-
</div>
97-
<div>
98-
<h3>Route Trace</h3>
99-
<RouteTrace service={props.service} />
100-
</div>
101-
<div>
102-
<h3>Speed Chart</h3>
103-
<SpeedChart service={props.service} />
104-
</div>
105-
<div>
106-
<h3>Processes Chart</h3>
107-
<ProcessesChart service={props.service} />
108-
</div>
109-
<div>
110-
<h3>Latency</h3>
111-
<LatencyChart service={props.service} />
112-
</div>
113-
<div>
114-
<h3>Temperature Chart</h3>
115-
<TemperatureChart service={props.service} />
116-
</div>
117-
<div>
118-
<h3>Memory Chart</h3>
119-
<MemoryChart service={props.service} />
120-
</div>
12190
</div>
12291
);
12392
};

model/mongoose-connect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const mongoose = require('mongoose');
22

33
// Mongoose connection wrapped in function that takes the index of the selected database as the parameter. This index is used to target the correct database for querying.
4-
const connectMongoose = (i, URI) => {
4+
const connectMongoose = (i,URI) => {
55
return mongoose.connect(URI, { useNewUrlParser: true, useUnifiedTopology: true }, (err) => {
66
if (err) console.log(err);
77
console.log('Connected to Mongo database!');

user/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"setupRequired":true, "services":["hard","coded","in"]}
1+
{"setupRequired":false,"services":[["micro1","MongoDB","mongodb+srv://jenaepen:pen1321!@jenae-6dyj0.mongodb.net/test?retryWrites=true&w=majority"],["micro2","SQL","postgres://heilucpy:7kaQsZKI-1Pe-Vuu_4TSbezjJvCBJ5ft@rajje.db.elephantsql.com:5432/heilucpy"]]}

0 commit comments

Comments
 (0)