Commit e3ac86cb authored by 刘松's avatar 刘松

修改 count

parent a3e17d25
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -86,13 +86,13 @@ class DashBoard extends React.Component{ ...@@ -86,13 +86,13 @@ class DashBoard extends React.Component{
for(let i = 0; i < userResult.length; i++){ for(let i = 0; i < userResult.length; i++){
let item = userResult[i]['_id']; let item = userResult[i]['_id'];
let _id = item ? item['year'] + (item['month'] < 9 ? '0'+item['month'] : item['month']) + (item['day'] < 9 ? '0'+item['day'] : item['day']) : 'unkown'; let _id = item ? item['year'] + (item['month'] <= 9 ? '0'+item['month'] : item['month']) + (item['day'] <= 9 ? '0'+item['day'] : item['day']) : 'unkown';
map[_id] = map[_id] || {}; map[_id] = map[_id] || {};
map[_id]['user'] = userResult[i]['count'] map[_id]['user'] = userResult[i]['count']
} }
for(let i = 0; i < upstreamResult.length; i++){ for(let i = 0; i < upstreamResult.length; i++){
let item = upstreamResult[i]['_id']; let item = upstreamResult[i]['_id'];
let _id = item ? item['year'] + (item['month'] < 9 ? '0'+item['month'] : item['month']) + (item['day'] < 9 ? '0'+item['day'] : item['day']) : 'unkown'; let _id = item ? item['year'] + (item['month'] <= 9 ? '0'+item['month'] : item['month']) + (item['day'] <= 9 ? '0'+item['day'] : item['day']) : 'unkown';
map[_id] = map[_id] || {}; map[_id] = map[_id] || {};
map[_id]['upstream'] = upstreamResult[i]['count'] map[_id]['upstream'] = upstreamResult[i]['count']
} }
......
module.exports = { module.exports = {
host: '0.0.0.0', host: '0.0.0.0',
port: process.env.PORT ? process.env.PORT : 9401, port: process.env.PORT ? process.env.PORT : 9401,
mongo:'mongodb://10.10.10.55/distribution' mongo:'mongodb://127.0.0.1:27017/distribution'
}; };
\ No newline at end of file
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
try { try {
module.exports = require('./config_current.js'); module.exports = require('./config_current.js');
} catch (err) { } catch (err) {
module.exports = require('./config_default.js'); module.exports = require('./config.default.js');
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment