-
Notifications
You must be signed in to change notification settings - Fork 415
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
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.
frontend/pages/policies/ManagePoliciesPage/components/RunScriptModal/RunScriptModal.tsx
Outdated
Show resolved
Hide resolved
frontend/pages/policies/ManagePoliciesPage/components/RunScriptModal/RunScriptModal.tsx
Outdated
Show resolved
Hide resolved
frontend/pages/policies/ManagePoliciesPage/components/RunScriptModal/RunScriptModal.tsx
Outdated
Show resolved
Hide resolved
...d/pages/policies/ManagePoliciesPage/components/InstallSoftwareModal/InstallSoftwareModal.tsx
Show resolved
Hide resolved
...d/pages/policies/ManagePoliciesPage/components/PolicyRunScriptModal/PolicyRunScriptModal.tsx
Show resolved
Hide resolved
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)
… into 22118-run-scripts-FE
frontend/pages/policies/ManagePoliciesPage/ManagePoliciesPage.tsx
Outdated
Show resolved
Hide resolved
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.
looks good!
frontend/pages/policies/ManagePoliciesPage/ManagePoliciesPage.tsx
Outdated
Show resolved
Hide resolved
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.
lgtm!
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? |
#22118
changes/
,