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(orchestrator):implement filters #386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LiorSoffer
Copy link
Contributor

resolve FLPATH-1989

Screencast.from.2025-02-04.19-10-12.mp4

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Feb 4, 2025

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator workspaces/orchestrator/plugins/orchestrator patch v2.5.1

Copy link

sonarqubecloud bot commented Feb 4, 2025

Comment on lines +118 to +121
const currentDate = new Date();
const endOfToday = new Date(currentDate);
endOfToday.setHours(23, 59, 59, 999);

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm not wrong, new Date() uses the tz in which the system is running. Can you please double check if it's ok?
what if the user tz is different from system tz?

}
return undefined;
}, [statusSelectorValue, workflowId]);
return filters[0] || undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

why filters[0]? can't be there more than one valid filter?

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good to me since if (filters.length > 1) above handles that case

<Selector
label="Status"
items={statuses}
onChange={value_ => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
onChange={value_ => {
onChange={value => {

<Selector
label="Started"
items={started}
onChange={value_ => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise. Please check other occurrences of this pattern as well.

}
return undefined;
}, [statusSelectorValue, workflowId]);
return filters[0] || undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good to me since if (filters.length > 1) above handles that case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants