2016-05-24 14:42:25 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-05-24 16:40:57 +02:00
|
|
|
angular.module('ffffng').factory('NodeInformationRetrievalJob', function (MonitoringService, Logger) {
|
2016-05-24 14:42:25 +02:00
|
|
|
return {
|
2016-06-21 14:55:02 +02:00
|
|
|
description: 'Fetches the nodes.json and calculates and stores the monitoring status for nodes with active monitoring.',
|
|
|
|
|
2016-06-03 23:42:17 +02:00
|
|
|
run: function (callback) {
|
2016-05-24 14:42:25 +02:00
|
|
|
MonitoringService.retrieveNodeInformation(function (err) {
|
|
|
|
if (err) {
|
2016-05-24 16:40:57 +02:00
|
|
|
Logger.tag('monitoring', 'information-retrieval').error('Error retrieving node data:', err);
|
2016-05-24 14:42:25 +02:00
|
|
|
}
|
2016-06-03 23:42:17 +02:00
|
|
|
|
|
|
|
callback();
|
2016-05-24 14:42:25 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|