Skip to content

Commit

Permalink
fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaban committed Dec 5, 2019
1 parent 66d16be commit dbbc9fd
Show file tree
Hide file tree
Showing 19 changed files with 690 additions and 849 deletions.
Binary file modified dhis2App/GOFR.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion dhis2App/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>GOFR</title><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel=stylesheet><link href=static/css/app.41aecb33f5e12a08100e95f4b28087cc.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/manifest.37a2ecbb1d1b7e6c9ada.js></script><script type=text/javascript src=static/js/vendor.a77b8c324a0590a283c6.js></script><script type=text/javascript src=static/js/app.0b58579594e6db1604a3.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>GOFR</title><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel=stylesheet><link href=static/css/app.e80fbd0b63c6aa97a8b0bbc202c664b7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/manifest.37a2ecbb1d1b7e6c9ada.js></script><script type=text/javascript src=static/js/vendor.a77b8c324a0590a283c6.js></script><script type=text/javascript src=static/js/app.ec33a6e680de61c306ba.js></script></body></html>
2 changes: 1 addition & 1 deletion facility-recon-backend/gui/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>GOFR</title><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel=stylesheet><link href=static/css/app.41aecb33f5e12a08100e95f4b28087cc.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/manifest.37a2ecbb1d1b7e6c9ada.js></script><script type=text/javascript src=static/js/vendor.a77b8c324a0590a283c6.js></script><script type=text/javascript src=static/js/app.0b58579594e6db1604a3.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>GOFR</title><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel=stylesheet><link href=static/css/app.e80fbd0b63c6aa97a8b0bbc202c664b7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/manifest.37a2ecbb1d1b7e6c9ada.js></script><script type=text/javascript src=static/js/vendor.a77b8c324a0590a283c6.js></script><script type=text/javascript src=static/js/app.ec33a6e680de61c306ba.js></script></body></html>

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions facility-recon-backend/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const formidable = require('formidable');
const winston = require('winston');
const https = require('https');
const http = require('http');
const URI = require('urijs');
const os = require('os');
const fs = require('fs');
const request = require('request');
Expand Down Expand Up @@ -114,8 +115,8 @@ app.use(bodyParser.urlencoded({
app.use(bodyParser.json());
// socket config - large documents can cause machine to max files open

https.globalAgent.maxSockets = 32;
http.globalAgent.maxSockets = 32;
// https.globalAgent.maxSockets = 32;
// http.globalAgent.maxSockets = 32;

const topOrgId = config.getConf('mCSD:fakeOrgId');
const topOrgName = config.getConf('mCSD:fakeOrgName');
Expand Down Expand Up @@ -2765,6 +2766,9 @@ if (cluster.isMaster) {
const name = mixin.toTitleCase(req.params.name);
winston.info(`Received request to delete data source with id ${id}`);
mongo.deleteDataSource(id, name, sourceOwner, userID, (err, response) => {
const dbName = name + userID;
const cacheUrl = URI(config.getConf('mCSD:url')).segment(dbName).segment('fhir').toString();
mcsd.cleanCache(`url_${cacheUrl}`, true);
if (err) {
res.status(500).json({
error: 'Unexpected error occured while deleting data source,please retry',
Expand Down Expand Up @@ -2870,15 +2874,18 @@ if (cluster.isMaster) {
});

app.delete('/deleteSourcePair', (req, res) => {
winston.info(`Received a request to delete data source pair with id ${req.params.id}`);
winston.info(`Received a request to delete data source pair with id ${req.params.pairId}`);
const {
pairId,
userID,
} = req.query;
const source1Name = mixin.toTitleCase(req.query.source1Name);
const source2Name = mixin.toTitleCase(req.query.source2Name);

const dbName = source1Name + userID + source2Name;
mongo.deleteSourcePair(pairId, dbName, (err, data) => {
const url = URI(config.getConf('mCSD:url')).segment(dbName).segment('fhir').toString();
mcsd.cleanCache(`url_${url}`, true);
if (err) {
winston.error(err);
return res.send(500).send(err);
Expand Down
Loading

0 comments on commit dbbc9fd

Please sign in to comment.