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

Make scripts editable in Fleet UI #24195

Open
10 of 19 tasks
eugkuo opened this issue Nov 26, 2024 · 9 comments
Open
10 of 19 tasks

Make scripts editable in Fleet UI #24195

eugkuo opened this issue Nov 26, 2024 · 9 comments
Assignees
Labels
customer-flacourtia #g-orchestration Orchestration product group :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Milestone

Comments

@eugkuo
Copy link
Contributor

eugkuo commented Nov 26, 2024

Goal

User story
As an admin,
I want to be able to edit scripts within the Fleet UI
so that I can quickly fix typos or other errors without having to download and re-upload the script.

Key result

Every sprint, ship small UX improvements based on dogfooding or customer feedback

Original requests

Context

Changes

Product

Engineering

  • Either the FE or BE engineer should define the test-plan.
  • Implement FE per the Figma file above
  • Implement BE API changes per the link above
  • Feature guide changes: If script doc exists, Add a section in it to describe the edit ability.
  • Database schema migrations: not needed
  • Load testing: To be considered by the BE engineer depending on the DB changes.

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: Not needed
  • Risk level: Low
  • Risk description: Potential bug with the new ability to run bash scripts. Low potential to affect other scripts.

Manual testing steps

@xpkoala, please complete testplan together with @dantecatalfamo

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. QA (@____): Added comment to user story confirming successful completion of QA.
@eugkuo eugkuo added story A user story defining an entire feature :product Product Design department (shows up on 🦢 Drafting board) labels Nov 26, 2024
@eugkuo eugkuo self-assigned this Nov 26, 2024
@eugkuo eugkuo added the #g-endpoint-ops Endpoint ops product group label Nov 26, 2024
@eugkuo
Copy link
Contributor Author

eugkuo commented Nov 27, 2024

FYI @noahtalerman I've added this prototype to show editing scripts from the script library page.

@eugkuo
Copy link
Contributor Author

eugkuo commented Dec 2, 2024

FYI (to discuss) @noahtalerman I've updated the design and the prototype.

After thinking about this a little bit, I wanted to be clearer to people when text has been entered into the edit field (in case they accidentally did something.

So when people first hit the modal, the button at the bottom is . If they enter text or delete text the button changes to with a secondary button.

A few questions:

  1. Do we do any checks on the syntax or formatting of scripts when people are entering text or saving it?
  2. What type of error mesesaging could we see here? I've rendered a success message. If we have standard messages for this lmk (and if we have standard messages can I say "use standard messaging" without rendering them?

Thanks! Hope you had a great Thanksgiving!

@eugkuo
Copy link
Contributor Author

eugkuo commented Dec 3, 2024

FYI @noahtalerman

Updated the design and prototype so that the modal always displays "Cancel" and "Save" buttons in the interest of maintaining consistency with other areas where we surface editable querys (i.e. policies).

@noahtalerman noahtalerman added Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. and removed Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. labels Dec 3, 2024
@eugkuo eugkuo assigned sharon-fdm and unassigned eugkuo Dec 9, 2024
@iansltx
Copy link
Member

iansltx commented Dec 11, 2024

@eugkuo Can you add the PR for the new activity so it's apparent which fields that activity has? Or spec which fields the activity has if you want to avoid editing Go code (since the activity documentation is based off of the code)?

@eugkuo
Copy link
Contributor Author

eugkuo commented Dec 12, 2024

@iansltx Apologies for the oversight. Added it to the top comment. Here's a direct link as well: #24523

LMK if there's anything I've forgotten or missed.

@iansltx
Copy link
Member

iansltx commented Dec 12, 2024

I think we're good now for API/activity specs (subject to the follow-up API spec PR I filed). Thanks!

iansltx added a commit that referenced this issue Dec 12, 2024
For #24195.

The existing POST /scripts method uses a multipart request, and I figure
that since we use multipart for both create and edit on installers, we
want the same level of consistency on scripts.

If we _don't_ want this, and want a JSON payload instead, we probably
still want to rename `script_contents` to `script` for consistency with
the field name in the create API.
@lukeheath lukeheath added #g-orchestration Orchestration product group and removed #g-endpoint-ops Endpoint ops product group labels Dec 19, 2024
rachaelshaw pushed a commit that referenced this issue Dec 19, 2024
- `GET /activities` API design for the following user story:
  - #24195
@sharon-fdm sharon-fdm added :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. and removed :product Product Design department (shows up on 🦢 Drafting board) labels Jan 20, 2025
@sharon-fdm sharon-fdm added this to the 4.64.0-tentative milestone Jan 23, 2025
rachaelshaw added a commit that referenced this issue Feb 4, 2025
@sgress454
Copy link
Contributor

I can QA this

@sgress454
Copy link
Contributor

See #24601 (comment) for QA.

rachaelshaw added a commit that referenced this issue Feb 12, 2025
Removed from 4.63.0 docs release branch, now expected in 4.64.0 release
@noahtalerman
Copy link
Member

@sharon-fdm @dantecatalfamo this feature is looking good!

Heads up, it looks like we have a small unreleased bug for this one: #26323

@lukeheath lukeheath added :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-flacourtia #g-orchestration Orchestration product group :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Projects
None yet
Development

No branches or pull requests

7 participants