Skip to main content
New

[MBI] Add days conversion to duration

Related products:Infra Monitoring - Reporting
  • Nov 18, 2026 4:28 PM UTC
  • 0 replies
  • 7 views

Forum|alt.badge.img+7

When there is a field duration, MBI auto-size the time up to hours.

It should auto-size upt to days.


Eg. not “Duration 381 h” but “Duration  15 days”

I edit the function stringDuration in file merethis.js and, hoping to have not break the reporting, obtained the result.

 

# diff merethis.js merethis.js.bck
350,354d349
< if (time / 86400 > 1) {
< var hours = Math.floor(time / 86400)
< str += hours+" "+reportContext.getMessage("duration.days", reportContext.getLocale())+" "
< time = time % 86400
< }
480c475
< }
---
> }
\ No newline at end of file

See the results in report ‘Hostgroups-Host-Current-Events’