tango-app-api-audit 3.5.38 → 3.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1940,15 +1940,17 @@ export async function summaryCard( req, res ) {
|
|
|
1940
1940
|
tangoScore: 0,
|
|
1941
1941
|
tangoScoreTrend: 0,
|
|
1942
1942
|
trustScore: 0,
|
|
1943
|
+
trend: false,
|
|
1943
1944
|
};
|
|
1944
1945
|
if ( getOutput?.body?.aggregations?.all_docs?.wrapper?.buckets?.filtered ) {
|
|
1945
1946
|
const temp= getOutput?.body?.aggregations?.all_docs?.wrapper?.buckets?.filtered;
|
|
1946
1947
|
initialValue.totalFiles =temp?.totalFiles?.value;
|
|
1947
1948
|
initialValue.completedFiles =temp?.completedFiles?.doc_count;
|
|
1948
1949
|
initialValue.completedRatio =temp?.completedRatio?.value || 0;
|
|
1949
|
-
initialValue.tangoScore =temp?.tangoScore?.value || 0;
|
|
1950
|
+
initialValue.tangoScore =Math.round( temp?.tangoScore?.value || 0 );
|
|
1950
1951
|
initialValue.tangoScoreTrend =temp?.tangoScoreTrend?.value || 0;
|
|
1951
|
-
initialValue.trustScore =temp?.trustScore?.avg_val?.value == null ? 'NA':temp?.trustScore?.avg_val?.value;
|
|
1952
|
+
initialValue.trustScore =temp?.trustScore?.avg_val?.value == null || temp?.trustScore?.avg_val?.value === undefined ? 'NA':Math.round( temp?.trustScore?.avg_val?.value );
|
|
1953
|
+
initialValue.trend = initialValue.tangoScoreTrend < 0? false : true;
|
|
1952
1954
|
}
|
|
1953
1955
|
const result = initialValue;
|
|
1954
1956
|
|