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

UI – Add policy automation modal for running scripts #22436

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

jacobshandling
Copy link
Contributor

@jacobshandling jacobshandling commented Sep 26, 2024

#22118

ezgif-6-5b9641a684

  • Changes file added for user-visible changes in changes/,
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.20%. Comparing base (7fa51b6) to head (bddc7f2).
Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22436      +/-   ##
==========================================
- Coverage   65.21%   65.20%   -0.01%     
==========================================
  Files        1496     1496              
  Lines      117157   117162       +5     
  Branches     3480     3483       +3     
==========================================
  Hits        76399    76399              
- Misses      33640    33645       +5     
  Partials     7118     7118              
Flag Coverage Δ
frontend 52.36% <ø> (-0.03%) ⬇️

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.

Copy link
Member

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

Looks like once I wire up the API this should just work, or very close to do it.

Note that this review is just from the perspective of backend integration with a dash of UX, rather than a proper FE review; I figure @RachelElysia can do that once there are tests on this and API connectivity is confirmed.

Jacob Shandling and others added 2 commits September 27, 2024 15:59
Consistent with software installer behavior, and allows the backend to maintain PATCH semantics (not modifying script association when script ID is omitted on the payload)
@jacobshandling jacobshandling marked this pull request as ready for review September 30, 2024 17:17
@jacobshandling jacobshandling requested a review from a team as a code owner September 30, 2024 17:17
RachelElysia
RachelElysia previously approved these changes Sep 30, 2024
Copy link
Member

@RachelElysia RachelElysia left a comment

Choose a reason for hiding this comment

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

looks good!

Copy link
Member

@RachelElysia RachelElysia left a comment

Choose a reason for hiding this comment

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

lgtm!

@jacobshandling jacobshandling marked this pull request as draft October 2, 2024 23:27
@iansltx
Copy link
Member

iansltx commented Oct 3, 2024

I'm seeing one tweak: error display on script deletion. When a user tries to delete a script with associated policies, the API will 409 with:

{
  "message": "Couldn't delete. Policy automation uses this script. Please remove this script from associated policy automations and try again.",
  "errors": [
    {
      "name": "base",
      "reason": "Couldn't delete. Policy automation uses this script. Please remove this script from associated policy automations and try again."
    }
  ]
}

Can we pass that message through?

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

Successfully merging this pull request may close these issues.

5 participants