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

Allow scheduling same query more than once in UI #96

Merged
merged 3 commits into from
Dec 4, 2020

Conversation

zwass
Copy link
Member

@zwass zwass commented Dec 4, 2020

Fixes #88

@zwass zwass added the bug Something isn't working as documented label Dec 4, 2020
Copy link
Member

@noahtalerman noahtalerman left a comment

Choose a reason for hiding this comment

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

lgtm! The changes behave as expected when scheduling the same query in the UI.

@noahtalerman
Copy link
Member

Something to note: The query's name isn't updated in the UI until the page is reloaded (request is made to api/v1/kolide/packs/{id}/scheduled)

Immediately after adding a duplicate query. The new scheduled query is in the second row.
localhost_8080_packs_1 (6)

After page reload. The query's name is updated and moves to the third row.
localhost_8080_packs_1 (7)

@zwass
Copy link
Member Author

zwass commented Dec 4, 2020

Nice catch there. I think we are rendering the name field (the name used for scheduling the query) when it probably makes more sense to render query_name (the name of the query being referenced). Let me see if I can fix that.

@zwass
Copy link
Member Author

zwass commented Dec 4, 2020

Sorted that out
Screen Shot 2020-12-04 at 8 21 59 AM

@noahtalerman
Copy link
Member

Looks good. I agree that rendering the query_name makes more sense here.

@zwass zwass merged commit bb921bc into fleetdm:master Dec 4, 2020
@zwass zwass deleted the schedule-query-duplicates branch December 4, 2020 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented
Development

Successfully merging this pull request may close these issues.

Cannot add same query to pack more than once (results in 5xx)
2 participants