Removing ng-di on the server.
This commit is contained in:
parent
ddb2f47a9d
commit
8697d79ba5
37 changed files with 2838 additions and 2878 deletions
|
|
@ -1,26 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('ffffng').factory('StatisticsResource', function (
|
||||
Logger,
|
||||
NodeService,
|
||||
Resources,
|
||||
ErrorTypes
|
||||
) {
|
||||
return {
|
||||
get: function (req, res) {
|
||||
NodeService.getNodeStatistics(function (err, nodeStatistics) {
|
||||
if (err) {
|
||||
Logger.tag('statistics').error('Error getting statistics:', err);
|
||||
return Resources.error(res, {data: 'Internal error.', type: ErrorTypes.internalError});
|
||||
}
|
||||
const ErrorTypes = require('../utils/errorTypes')
|
||||
const Logger = require('../logger')
|
||||
const NodeService = require('../services/nodeService')
|
||||
const Resources = require('../utils/resources')
|
||||
|
||||
return Resources.success(
|
||||
res,
|
||||
{
|
||||
nodes: nodeStatistics
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
module.exports = {
|
||||
get (req, res) {
|
||||
NodeService.getNodeStatistics((err, nodeStatistics) => {
|
||||
if (err) {
|
||||
Logger.tag('statistics').error('Error getting statistics:', err);
|
||||
return Resources.error(res, {data: 'Internal error.', type: ErrorTypes.internalError});
|
||||
}
|
||||
|
||||
return Resources.success(
|
||||
res,
|
||||
{
|
||||
nodes: nodeStatistics
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue