Update Value Report.
This commit is contained in:
@@ -385,10 +385,7 @@ const getHistoryValueReportPivotDb = async (tableName, searchParams = {}) => {
|
||||
OPTION (MAXRECURSION 0);
|
||||
`;
|
||||
|
||||
const request = pool.request();
|
||||
request.timeout = 60000; // 60 detik
|
||||
|
||||
const result = await request.query(queryText, [from, to, interval]);
|
||||
const result = await pool.query(queryText, [from, to, interval]);
|
||||
|
||||
if (result.recordsets && result.recordsets.length >= 2) {
|
||||
console.log('Sample averaging data:');
|
||||
@@ -551,7 +548,7 @@ const getHistoryValueTrendingPivotDb = async (tableName, searchParams = {}) => {
|
||||
const tagList = Object.keys(rows[0]).filter(k => k !== timeKey);
|
||||
|
||||
const nivoData = tagList.map(tag => ({
|
||||
name: tag,
|
||||
id: tag,
|
||||
data: rows.map(row => ({
|
||||
x: row[timeKey],
|
||||
y: row[tag] !== null ? Number(row[tag]) : null
|
||||
|
||||
Reference in New Issue
Block a user