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

feat: macOS setup experience - install software and run a script #23267

Merged
merged 48 commits into from
Oct 28, 2024

Conversation

jahzielv
Copy link
Contributor

@jahzielv jahzielv commented Oct 25, 2024

Related issue: #19372

These commits have all been reviewed in their respective PRs.

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added support on fleet's osquery simulator cmd/osquery-perf for new osquery data ingestion features.
  • Added/updated tests
  • If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
    • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
    • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).
  • Manual QA for all new/changed functionality
  • For Orbit and Fleet Desktop changes:
    • Orbit runs on macOS, Linux and Windows. Check if the orbit feature/bugfix should only apply to one platform (runtime.GOOS).
    • Manual QA must be performed in the three main OSs, macOS, Windows and Linux.
    • Auto-update manual QA, from released version of component to new version (see tools/tuf/test).

dantecatalfamo and others added 30 commits September 30, 2024 11:08
SwiftDialog interface for use in orbit. Built for the upcoming out of box experience later this sprint

---------

Co-authored-by: Jahziel Villasana-Espinoza <[email protected]>
> No issue, just updating an existing migration

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
> Related issue: #22637

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
relates to #22373

This implements the UI for the install software setup experience in the
UI. This includes:

**updating the nav sidebar**


![image](https://github.com/user-attachments/assets/91928a23-13cc-430b-b207-ba226df32b86)

**creating a new install software card**


![image](https://github.com/user-attachments/assets/8b4a9495-4119-4360-9f31-53ac41b83316)

**select software modal for selecting which software to install**


![image](https://github.com/user-attachments/assets/a3b4b786-ab8e-42b2-8feb-4b2a83e69af9)**


- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Manual QA for all new/changed functionality
> Related issue: #22376

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
relates to #22374

> NOTE: we still need integration with the API which will be done in
another PR.

>NOTE: Please review #22651 first,
as this PR is based off of that branch.

This adds the UI for uploading a setup experience script. this includes:

**setup experience script uploader:**


![image](https://github.com/user-attachments/assets/bec00594-9519-48a9-bce5-d90d282ad5fb)

**script card:**


![image](https://github.com/user-attachments/assets/35549f1c-c280-4293-8e4e-e36e2a3df16c)

**delete script modal:**


![image](https://github.com/user-attachments/assets/90be6bd3-6807-4adb-8709-2ec5893f7fad)

**script run preview:**


![image](https://github.com/user-attachments/assets/cb874986-e0eb-4e6e-bab3-b8325394894c)



<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
relates to #22817

API integration and some polish for the UI of the setup experience
feature.
set of tests for some important UI flows of the setup experience install
software and scripts.
…22843)

> Related issue: #22662

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

---------

Co-authored-by: dantecatalfamo <[email protected]>
Co-authored-by: Dante Catalfamo <[email protected]>
> Related issues: #22383, #22384

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
mna and others added 11 commits October 23, 2024 14:51
> No issue, just a bug found during testing

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [ ] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

Updated icon size:
![LWScreenShot 2024-10-24 at 7 15
13 AM](https://github.com/user-attachments/assets/cd1b0640-f602-414a-937d-c481b1ec7a44)
…3181)

> No issue, just some cleanup/bugfix

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
relates to #23180

fixes up some issues with showing the correct number of selected
software to install and also with the table row selection behaviour.

We've had to create a couple new props on the `TableContainer`
component; one called `defaultSelectedRows` and the other
`persistSelectedRows`.


`defaultSelectedRows` will allow you to specify the default rows that
are selected in the table on the initial render. This is done with an
object with the key being the index of the row and the value being a
boolean.

```tsx
// the first and third rows will be selected in this case
<TableContainer
  defaultSelectedRows={{0: true, 2: true}}
  ...
/>
```

`persistSelectedRows` will allow the row selections to persist across
search query changes. This defaults to false.

---------

Co-authored-by: gillespi314 <[email protected]>
> Related issue: #23161

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Rachael Shaw <[email protected]>
quick fix to allow downloading setup script
<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
> No issue, but realized guide had some mistakes

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
@jahzielv jahzielv marked this pull request as ready for review October 25, 2024 21:59
@jahzielv jahzielv requested review from a team as code owners October 25, 2024 21:59
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 56.33562% with 1020 lines in your changes missing coverage. Please review.

Project coverage is 63.22%. Comparing base (82d88bb) to head (9f32642).
Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
orbit/pkg/swiftdialog/run.go 0.00% 239 Missing ⚠️
orbit/pkg/setup_experience/setup_experience.go 0.00% 190 Missing ⚠️
server/datastore/mysql/setup_experience.go 80.21% 69 Missing and 25 partials ⚠️
ee/server/service/setup_experience.go 54.44% 64 Missing and 18 partials ⚠️
server/service/setup_experience.go 52.34% 58 Missing and 13 partials ⚠️
ee/server/service/orbit.go 60.00% 45 Missing and 17 partials ⚠️
server/service/client.go 82.09% 19 Missing and 10 partials ⚠️
frontend/services/entities/mdm.ts 20.00% 24 Missing ⚠️
server/service/orbit.go 55.76% 16 Missing and 7 partials ⚠️
server/service/client_scripts.go 66.12% 14 Missing and 7 partials ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23267      +/-   ##
==========================================
- Coverage   63.36%   63.22%   -0.14%     
==========================================
  Files        1538     1555      +17     
  Lines      144703   146879    +2176     
  Branches     3601     3622      +21     
==========================================
+ Hits        91688    92865    +1177     
- Misses      45783    46677     +894     
- Partials     7232     7337     +105     
Flag Coverage Δ
backend 64.08% <56.46%> (-0.17%) ⬇️
frontend 52.42% <54.42%> (+0.21%) ⬆️

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.

@georgekarrv georgekarrv merged commit d66a2a7 into main Oct 28, 2024
25 of 26 checks passed
@georgekarrv georgekarrv deleted the feat-setup-experience branch October 28, 2024 13:08
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.

7 participants