Skip to content

Commit

Permalink
Grafana api key section commented out temporarily
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdtagg committed May 11, 2024
1 parent 88a527d commit 7762c3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions electron/routes/dataHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ const mongoFetch = async (
try {
//We are creating models to populate with data for each service
const testModel = HealthModelFunc(serviceName);
const grafanaAPIKey = await GrafanaAPIKeyModel.find({});
// const grafanaAPIKey = await GrafanaAPIKeyModel.find({});
let result = await testModel.aggregate(aggregator);
console.log({result})
for (let i = 0; i < result.length; i++) {
result[i].token = grafanaAPIKey[0].token;
}
// console.log({result})
// for (let i = 0; i < result.length; i++) {
// result[i].token = grafanaAPIKey[0].token;
// }
result = [{ [serviceName]: result }];
return result;
} catch (error) {
Expand Down

0 comments on commit 7762c3e

Please sign in to comment.