Var Change

main
DenisN 2025-09-11 05:21:27 -04:00
parent 6cae690c05
commit 150534bbba
2 changed files with 15 additions and 4 deletions

View File

@ -56,9 +56,20 @@ export class ZvksmetricsController {
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')
async getPostMessage(@Body() inputMetrics: any): Promise<string> {
// console.log(inputMetrics);
console.log(inputMetrics);
let out: any = await this.metricsService.useStatusModel(inputMetrics);
return out;

View File

@ -109,8 +109,8 @@ export class ZvksmetricsService {
// let editedMetrics : K2Metrics = await this.getMetrics (inp, comlexCalc, scope);
let responseFromExporter: any = await this.sendMetrics(intermediate);
let responseFromExporter1: any = await this.sendMetrics(inp);
// let responseFromExporter2: any = await this.sendMetrics(integrate);
console.log(responseFromExporter1);
let responseFromExporter2: any = await this.sendMetrics(integrate);
console.log(responseFromExporter2);
prev = inp;
return responseFromExporter;
@ -297,7 +297,7 @@ export class ZvksmetricsService {
try {
let result: number = evaluate(formula, val);
console.log(metricName, result);
// console.log(metricName, result);
return result;
} catch {
return null;