~/Config/AppNodeJs/{owenrId}-plugins/{mkey}/{field}-query.js

var dayjs = require('../../Plugins/dayjs/dayjs.min.js');
var crypto = require('crypto');
var paramBody = require('./{{field}}-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 (argParams._dataFromType === "databalse") {
        //
    } else if (argParams._dataFromType === "configfile") {
        //
    } else if (argParams._dataFromType === "merge") {
        //
    } else if (argParams._dataFromType === "json") {
        //
    }
    callback(null, argParams);
};

文档更新时间: 2021-08-22 08:00   作者:admin