//var dayjs = require('../../Plugins/dayjs/dayjs.min.js');
//var crypto = require('crypto');
//var paramBody = require('./capacity-count-query-body.js');
// crypto.createHash('md5').update(plaintext).digest("hex");
module.exports = function (callback, argJson, rmt, args) {
let argParams = JSON.parse(argJson);
if (argParams._dataFromType === "api") {
//var dateS = dayjs(argParams._currentDayS).unix();//.add(8, 'hour')
//var dateE = dayjs(argParams._currentDayE).unix();//.add(8, 'hour')
//argParams.dateS = dateS;
//argParams.dateE = dateE;
//var post_data = { ...{ "start": dateS, "end": dateE }, ...paramBody[argParams.spaceId] };
//argParams["_pueId"] = paramBody[argParams.spaceId].ids[0];
//var post_data_str = JSON.stringify(post_data);
//var check = crypto.createHash('md5').update(post_data_str).digest("hex");
//argParams["request_method"] = "post";
////argParams["header_content_type"]= "*/*;charset=UTF-8";
//argParams["request_post_data"] = post_data_str;
//argParams["request_header_data"] = JSON.stringify({ "Cookie": argParams["GJ_Cookie"], "check": check });
//argParams["request_url"] = argParams["GJ_ROOT_URL"] + `/api/v2/tsdb/orig/agg`;
} else if (paramsT._dataFromType === "configFile") {
//静态数据
} else {
//数据库
}
callback(null, argParams);
};
//{
// "code": 0,
// "success": true,
// "data": {
// "dataDate": {
// "name": "2021-05-27 15:00:00",
// "value": "2021-05-27T15:00:00"
// },
// "value": 2,
// "max": 3,
// "percent": 66
// }
//}
文档更新时间: 2021-07-04 08:00 作者:admin