}
this.timerGetPrometheusDataSub = timer(0, this.timerTime).subscribe(() => {
selectedTime = this.updateTimeStamp(selectedTime);
-
for (const queryName in queries) {
if (queries.hasOwnProperty(queryName)) {
const query = queries[queryName];
queriesResults[queryName] !== '' &&
checkNan
) {
- queriesResults[queryName].forEach((valueArray: string[]) => {
- if (valueArray.includes('NaN')) {
- const index = valueArray.indexOf('NaN');
- if (index !== -1) {
- valueArray[index] = '0';
+ queriesResults[queryName].forEach((valueArray: any[]) => {
+ valueArray.forEach((val, index) => {
+ if (isNaN(parseFloat(val[1]))) {
+ valueArray[index][1] = '0';
}
- }
+ });
});
}
});