TWSD-1311 - Starting date is not showing correctly on monitoring graph of real and virtual service, group in monitoring center.
Review Request #1198 — Created Nov. 27, 2025 and submitted
| Information | |
|---|---|
| shuinvy | |
| APV10 | |
| rel_apv_10_7 | |
| TWSD-1311 | |
| Reviewers | |
| austin, kevin.poh, lucille, mingji | |
Change the way of time range in frontend and backend
The root cause is we use time diff for start_time/end_time originally,
and the time is different from browser(frontend) and API(backend), so there is delay in API (In my machine is 6 mins).
How to fix it:
I use UTC timestamp and add parameter timezone_offset to API to count the time range instead of time diff.
1. Modify chart.coffee file for start_time and end_time calculation and add parameter timezone_offset.
2. Modify widget-statistics.coffee file for modify usage of chart component. Remove time diff mechanism, just transfer datetime that user choosed to UTC timestamp. and calculate and set timezone_offset.
3. There are 2 type of chart: LineChart and LineChartWithCtrl, so I modified 2 places.
4. Modify ajax.py file for API changes. Calculate local time by timezone_offset that user gave(otherwise, 0 is UTC+0)
5. There are 2 type of API: ModelAjaxHandler.get_statistics_data and ObjectAjaxHandler.get_statistics_data so I need to modified both function.
6. I remove some space or useless code:
tmp_data = []
There is no place use this variable.
