runIndicator function
Future
runIndicator(
- dynamic indicatorID
)
Implementation
Future runIndicator(var indicatorID) async {
final localMaster =
(await getGeigerApi('', GeigerApi.masterId, Declaration.doShareData))
!;
Storage.controller = localMaster.getStorage();
Storage.geigerIndicatorUUID = indicatorID;
log("=======================indicator ID"+ Storage.geigerIndicatorUUID);
await createLocal();
await initPlugin();
await setValueListener();
await checkExistNodes();
await getRecommendation();
await getRisk();
log(Storage.getValuePath.length.toString());
await getMetrics(Types.users, Storage.userUUID);
await updateScoreNode(Types.users, Types.geigerScoreUser);
await updateRecommendationNode(Types.users);
await getMetrics(Types.devices, Storage.deviceUUID);
await updateScoreNode(Types.devices, Types.geigerScoreDevice);
await updateRecommendationNode(Types.devices);
await getDevices();
await getEmployees();
await crtAggregateScore();
await updateScoreNode(Types.users, Types.geigerScoreAggregate);
updateScoreMSENode();
}