Var Change
parent
6cae690c05
commit
150534bbba
|
|
@ -56,9 +56,20 @@ export class ZvksmetricsController {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Заглушка для будующей API под интеграционные значения метрик
|
||||||
|
@Options('integrations/:code')
|
||||||
|
async showIntegrationFormula(@Param('code', ParseIntPipe) code: number): Promise<JSON> {
|
||||||
|
let ret: JSON = JSON.parse('{"result":"normalek"}');
|
||||||
|
if (code === 3333) {
|
||||||
|
return ret;
|
||||||
|
// return await this.metricsService.showIntegrationMetricsConfig('File Name');
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
@Post('input')
|
@Post('input')
|
||||||
async getPostMessage(@Body() inputMetrics: any): Promise<string> {
|
async getPostMessage(@Body() inputMetrics: any): Promise<string> {
|
||||||
// console.log(inputMetrics);
|
console.log(inputMetrics);
|
||||||
let out: any = await this.metricsService.useStatusModel(inputMetrics);
|
let out: any = await this.metricsService.useStatusModel(inputMetrics);
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,8 @@ export class ZvksmetricsService {
|
||||||
// let editedMetrics : K2Metrics = await this.getMetrics (inp, comlexCalc, scope);
|
// let editedMetrics : K2Metrics = await this.getMetrics (inp, comlexCalc, scope);
|
||||||
let responseFromExporter: any = await this.sendMetrics(intermediate);
|
let responseFromExporter: any = await this.sendMetrics(intermediate);
|
||||||
let responseFromExporter1: any = await this.sendMetrics(inp);
|
let responseFromExporter1: any = await this.sendMetrics(inp);
|
||||||
// let responseFromExporter2: any = await this.sendMetrics(integrate);
|
let responseFromExporter2: any = await this.sendMetrics(integrate);
|
||||||
console.log(responseFromExporter1);
|
console.log(responseFromExporter2);
|
||||||
prev = inp;
|
prev = inp;
|
||||||
|
|
||||||
return responseFromExporter;
|
return responseFromExporter;
|
||||||
|
|
@ -297,7 +297,7 @@ export class ZvksmetricsService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let result: number = evaluate(formula, val);
|
let result: number = evaluate(formula, val);
|
||||||
console.log(metricName, result);
|
// console.log(metricName, result);
|
||||||
return result;
|
return result;
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue