Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for quickrange to use datemath to parse datetime strings #6782

Merged
merged 7 commits into from
May 24, 2024

Conversation

paulstn
Copy link
Contributor

@paulstn paulstn commented May 13, 2024

Description

provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.
related to: kavilla/qlDashboards#4

Issues Resolved

Screenshot

Testing the changes

Changelog

  • fix: Quickrange selection fix

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 6782.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 67.35%. Comparing base (972cf10) to head (adaf17e).
Report is 3 commits behind head on main.

Files Patch % Lines
src/plugins/data/common/data_frames/utils.ts 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6782      +/-   ##
==========================================
- Coverage   67.56%   67.35%   -0.21%     
==========================================
  Files        3428     3443      +15     
  Lines       67343    67795     +452     
  Branches    10996    11032      +36     
==========================================
+ Hits        45498    45666     +168     
- Misses      19176    19434     +258     
- Partials     2669     2695      +26     
Flag Coverage Δ
Linux_1 33.07% <14.28%> (+0.02%) ⬆️
Linux_2 ?
Linux_3 ?
Linux_4 ?
Windows_1 33.12% <14.28%> (+0.05%) ⬆️
Windows_2 55.09% <14.28%> (-0.02%) ⬇️
Windows_3 45.19% <85.71%> (+0.01%) ⬆️
Windows_4 34.81% <14.28%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Paul Sebastian <[email protected]>

describe('Data Frame Utils', () => {
describe('formatTimePickerDate function', () => {
Date.now = jest.fn(() => new Date('2024-05-04T12:30:00.000Z'));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kavilla is this fine for mocking the time or is there another preferred option?

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
@paulstn paulstn requested a review from kavilla May 24, 2024 19:11
@kavilla kavilla merged commit 347639f into opensearch-project:main May 24, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 24, 2024
provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.

Signed-off-by: Paul Sebastian <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 347639f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@paulstn paulstn deleted the discover-ppl-quick-range branch May 24, 2024 20:05
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 30, 2024
provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.

Signed-off-by: Paul Sebastian <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 347639f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request May 30, 2024
…6868)

provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.



---------



(cherry picked from commit 347639f)

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
LDrago27 pushed a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 3, 2024
…rch-project#6782)

provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.

Signed-off-by: Paul Sebastian <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Jun 4, 2024
…6834)

provides a formatting util function meant to convert quick range time (such as 'now-15m') to datetimes that can be understood.



---------



(cherry picked from commit 347639f)

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants