Skip to content

Commit b8b3627

Browse files
committed
Commented out two cnsl.logs in SvcOverview; adding cnsl.logs in route-trace. Tested taht 3-pt route displays time difference data.
1 parent cb2b7a0 commit b8b3627

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

app/charts/route-trace.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import CommunicationsContext from '../context/OverviewContext';
55

66
const RouteLocations = (props) => {
77
const communicationsData = useContext(CommunicationsContext).overviewData;
8-
8+
console.log('commData (from overviewContxt):', communicationsData);
9+
910
// initialize an empty object resObj. This object will store the microservice names as values and its corresponding correlatingId or correlatingid as keys. The microservice names will be stored in array within the order it was to the database.
1011
const resObj = {};
1112

1213
if (communicationsData.length > 0 && communicationsData[0]._id) {
1314
// Sort the communication array from latest to earliest document
1415
communicationsData.sort((a, b) => {
16+
// Note that a newer date obj IS GREATER THAN an older date obj.
17+
// The following lines sort the array from OLDEST to NEWEST.
1518
if (new Date(a.timeSent) > new Date(b.timeSent)) return 1;
1619
if (new Date(a.timeSent) < new Date(b.timeSent)) return -1;
1720
return 0;
@@ -60,6 +63,8 @@ const RouteLocations = (props) => {
6063
// Each elem in tracePoints is an array of arrays, which contain objects (each of which is a data point).
6164
const tracePoints = Object.values(resObj);
6265
const position = communicationsData[0].correlatingid ? 0 : tracePoints.length - 1;
66+
console.log('tracePoints arr:', tracePoints);
67+
console.log('position for tracePoints:', position);
6368

6469
const resArray = [];
6570

app/components/ServiceOverview.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ const ServiceOverview = (props) => {
2626
// IPC listener responsible for retrieving infomation from asynchronous main process message.
2727
ipcRenderer.on('overviewResponse', (event, data) => {
2828
// Adds to state and context.
29-
console.log(JSON.parse(data));
29+
// console.log(JSON.parse(data));
3030
setOverviewState(Object.values(JSON.parse(data)));
3131
serviceComponents.overviewData = JSON.parse(data);
3232
});
3333
}, []);
3434

35-
console.log('overviewstate: ', overviewState);
35+
// console.log('overviewstate: ', overviewState);
3636
// Add routes to the display
3737
// Hook used to toggle whether or not the Modal component renders
3838
const [modalDisplay, toggleModalDisplay] = useState(false);

0 commit comments

Comments
 (0)