-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: use same date filter in the UI and CLI #11840
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- UI should check against `metadata.creationTimestamp` and `status.finishedAt`, same as the CLI, not `status.startedAt` - this brings the UX of the CLI and the UI together and reduces a solid amount of user confusion about this - rename `minStartedAt` -> `createdAfter` and `maxStartedAt` -> `finishedBefore` - modify `nullSafeTimeFilter` to use the same logic as the Go back-end - remove the default 1 month filter on the UI - it was different from the CLI, buggy, and caused confusion for users - the date filter is also [entirely client-side](https://github.com/argoproj/argo-workflows/blob/caedd0ff7ade8211039f3dc858f74cd4eb2b1818/ui/src/app/workflows/components/workflows-list/workflows-list.tsx#L268), so the UI was just not showing Workflows it had already retrieved from the API - add "Created Since" and "Finished Before" as titles to the UI date filters - matches the CLI as well - fix CLI's internal name for `finished` to `finishedBefore` - it quite literally checks for [`.Before`](https://github.com/argoproj/argo-workflows/blob/f5e31f8f36b32883087f783cb1227490bbe36bbd/pkg/apis/workflow/v1alpha1/workflow_types.go#L230), and the flag (`--older`) and flag description says it does correctly as well, so it was just named incorrectly Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
agilgur5
force-pushed
the
fix-ui-date-filter
branch
from
September 19, 2023 01:10
b3ca6e5
to
676d951
Compare
3 tasks
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
isubasinghe
approved these changes
Sep 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and it works well! Nice work!
terrytangyuan
approved these changes
Sep 20, 2023
3 tasks
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
Mar 12, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9696 (hopefully final fix for that -- this is not a partial fix, but a holistic fix), fixes #11671
Follow-up to #11792
Motivation
Bring the UX of the CLI and the UI together and reduce a solid amount of user confusion about this
Modifications
UI should check against
metadata.creationTimestamp
andstatus.finishedAt
, same as the CLI, notstatus.startedAt
minStartedAt
->createdAfter
andmaxStartedAt
->finishedBefore
nullSafeTimeFilter
to use the same logic as the Go back-endremove the default 1 month filter on the UI
add "Created Since" and "Finished Before" as titles to the UI date filters
fix CLI's internal name for
finished
tofinishedBefore
.Before
, and the flag (--older
) and flag description are correct as well, so it was just named incorrectlyalso replace unrelated deprecated usage of
string.substr
withstring.substring
Verification
Manually tested locally: