Skip to content

Commit a69b7c1

Browse files
committed
error helperrequest/response fixed
1 parent f5f6f3d commit a69b7c1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

app/context/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function healthTransformer(healthData: HealthDataObject[]) {
4444
// grab the key string from the current service object
4545
const serviceName = Object.keys(serviceObj)[0];
4646
const serviceElements = serviceObj[serviceName];
47-
console.log('serviceElements: ', serviceElements);
47+
console.log('helpers.ts ln 47 serviceElements: ', serviceElements);
4848
// add the serviceName as a key on the serviceMetricsObject and assign it an empty object
4949
serviceMetricsObject[serviceName] = {};
5050
// loop through the elements of the current service
@@ -96,7 +96,7 @@ export function eventTransformer(eventData: MetricObject[]) {
9696
// in that same object, if the key 'time' doesn't exist yet, assign it a key of 'time' with the value as an array that includes the time value
9797
// if it does exist aready, push the current time value into the time array
9898
if (!eventMetricsObject[category][metric].time) eventMetricsObject[category][metric].time = [time];
99-
eventMetricsObject[category][metric].time.push(time);
99+
eventMetricsObject[category][metric].time.push(time);
100100
});
101101
// return the eventMetricsObject
102102
return eventMetricsObject;

electron/routes/data.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ipcMain.on('servicesRequest', async (message: Electron.IpcMainEvent) => {
9797
console.log('Hi, inside data.ts line 97 - servicesRequest. Fetching services...');
9898

9999
// Mongo Database
100-
console.log('CurrentDataBase TYPE:', currentDatabaseType);
100+
console.log('data.ts line 100 CurrentDataBase TYPE:', currentDatabaseType);
101101
if (currentDatabaseType === 'MongoDB' ) {
102102
// Get all documents from the services collection
103103
//>>>>>
@@ -161,8 +161,9 @@ ipcMain.on('healthRequest', async (message: Electron.IpcMainEvent, service: stri
161161

162162
// Mongo Database
163163
if (currentDatabaseType === 'MongoDB') {
164+
console.log('data.ts ln 164: database', currentDatabaseType, 'service', service)
164165
result = await mongoFetch(service);
165-
console.log('database', currentDatabaseType, 'service', service)
166+
console.log('data.ts ln 166 result:', result, result[0][`${service}`][0])
166167
}
167168

168169
// SQL Database
@@ -174,7 +175,7 @@ ipcMain.on('healthRequest', async (message: Electron.IpcMainEvent, service: stri
174175
// result = await pool.query(query);
175176
// result = result.rows;
176177
}
177-
console.log('result data.ts line 177', result, result[0][`orders-containerinfos`][0])
178+
console.log('result data.ts line 177', result)
178179
// Async event emitter - send response'
179180

180181
message.sender.send('healthResponse', JSON.stringify(result));

0 commit comments

Comments
 (0)