hypertrace-ui
hypertrace-ui copied to clipboard
fix: added enhancements in TimeDuration class
Description
Added a few enhancements to the TimeDuration
class.
- Enabled support to query for
hours
,minutes
,seconds
,days
,months
,years
. - Exposed new logic for
Iso8601DurationString
conversion. The original one converted duration to seconds by default before computing. Exposed new one astoIso8601DurationStringMilitaryTime()
that persists the units as per military time. For eg, 2 hours 20minutes translates toPT2H20M
.
Testing
Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.
Checklist:
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] Any dependent changes have been merged and published in downstream modules
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.
Codecov Report
Merging #2061 (fa0942e) into main (a9be616) will decrease coverage by
0.13%
. The diff coverage is11.11%
.
@@ Coverage Diff @@
## main #2061 +/- ##
==========================================
- Coverage 83.13% 83.01% -0.13%
==========================================
Files 905 905
Lines 19904 19953 +49
Branches 2841 2854 +13
==========================================
+ Hits 16548 16563 +15
- Misses 3205 3233 +28
- Partials 151 157 +6
Impacted Files | Coverage Δ | |
---|---|---|
projects/common/src/time/time-duration.ts | 72.79% <11.11%> (-22.21%) |
:arrow_down: |
projects/components/src/icon/icon.component.ts | 86.27% <0.00%> (-0.57%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more