Skip to content

Commit 7762c3e

Browse files
committed
Grafana api key section commented out temporarily
Upon load of the graphscontainer component an event call is made to electron (health request) which calls the mongo fetch function which grabs all the health data stored inside of the individual services databases. Inside of the mongoFetch function there is a call for the grafana api key database. In the microservices portion of the app grafana is not used so there is no key. This was causing an error and preventing data flow. This portion is being commented out temporarily so that more specific controls can be made to differentiate between apps that use docker (and thus grafana) and microservices
1 parent 88a527d commit 7762c3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

electron/routes/dataHelpers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ const mongoFetch = async (
3535
try {
3636
//We are creating models to populate with data for each service
3737
const testModel = HealthModelFunc(serviceName);
38-
const grafanaAPIKey = await GrafanaAPIKeyModel.find({});
38+
// const grafanaAPIKey = await GrafanaAPIKeyModel.find({});
3939
let result = await testModel.aggregate(aggregator);
40-
console.log({result})
41-
for (let i = 0; i < result.length; i++) {
42-
result[i].token = grafanaAPIKey[0].token;
43-
}
40+
// console.log({result})
41+
// for (let i = 0; i < result.length; i++) {
42+
// result[i].token = grafanaAPIKey[0].token;
43+
// }
4444
result = [{ [serviceName]: result }];
4545
return result;
4646
} catch (error) {

0 commit comments

Comments
 (0)