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: Apple App Store (VPP) apps #20643

Merged
merged 49 commits into from
Jul 25, 2024
Merged

feat: Apple App Store (VPP) apps #20643

merged 49 commits into from
Jul 25, 2024

Conversation

jahzielv
Copy link
Contributor

Related issue: #18867

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/updated tests
  • If database migrations are included, checked table schema to confirm autoupdate
  • Manual QA for all new/changed functionality

jahzielv and others added 30 commits July 2, 2024 11:46
# 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://fleetdm.com/docs/contributing/committing-changes#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
> Related issue: #19865 

# 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://fleetdm.com/docs/contributing/committing-changes#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] 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
part of #18867

# 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] 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`).
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
relates to #19866

> NOTE: API integration work still needs to be done, which will happen
in another PR.

This adds the ability to add, remove, or disable a VPP token in the
Fleet UI. This includes:

**Vpp integration page with VPP card:**


![image](https://github.com/fleetdm/fleet/assets/1153709/99b1ca9b-8872-447f-a085-b5385a2b7f7e)


![image](https://github.com/fleetdm/fleet/assets/1153709/1cdb80a2-1afe-4739-994c-fe7430449f13)


![image](https://github.com/fleetdm/fleet/assets/1153709/79ec7927-f905-48c4-b1b9-42d4d6b41028)

**VPP setup page with steps to set up VPP:**


![image](https://github.com/fleetdm/fleet/assets/1153709/dec203e4-01d3-4e1d-b493-be3772b72813)

**VPP setup page with VPP info:**


![image](https://github.com/fleetdm/fleet/assets/1153709/afccba29-e97b-4937-8235-4706e39d9333)

**Disable VPP modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/da4a2db3-7546-4f3b-8ec0-d77ad7bff19f)

**renew Vpp modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/8224f466-6aae-43bd-a120-3de5f0c90064)

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
Currently covers the ability to sync and verify config with fleet
server. Bulk API moved to its own ticket (#20278) while product decides
its capabilities
> Related issue: #19867 

# 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://fleetdm.com/docs/contributing/committing-changes#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] If database migrations are included, checked table schema to
confirm autoupdate
- [x] Manual QA for all new/changed functionality
> Related issue: #19870 

# 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
reading the [docs][1] I realized we're missing some recommendations for
error management.

the docs also note that certain operations like assignments happen
asynchronously and you must subscribe to events to get those errors.

this part wasn't estimated nor considered.

[1]:
https://developer.apple.com/documentation/devicemanagement/app_and_book_management/handling_error_responses

# 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] Added/updated tests
relates to #19869

> NOTE: API integration will be included in a separate PR

This adds the UI updates to support the new VPP feature on the software
pages. This includes the software titles page and software titles
details page. The new UI includes:

**Add Vpp apps tab in Add software modal:**


![image](https://github.com/user-attachments/assets/f1751b5d-1393-45b7-894c-fa6d067d27d2)

**Various updates to the SoftwareIcon component to support icons from an
external source:**


![image](https://github.com/user-attachments/assets/c860d776-170c-4f51-813e-34f83e479471)

**Various updates to the SoftwarePackageCard compont to support app
store apps.**


![image](https://github.com/user-attachments/assets/7bdd369d-6c95-47a6-8942-63ac3c694ffe)

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated testss:
- [x] Manual QA for all new/changed functionality
relates to #20536

quick update to the software titles page to integrate with new API
changes.


- [x] Manual QA for all new/changed functionality
…ds (#20553)

#20536 

# Checklist for submitter

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Added/updated tests

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
> Related issue: #19868 

# 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://fleetdm.com/docs/contributing/committing-changes#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

---------

Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
relates to #20612

This is the UI updates for the host details and device user pages for
the new VPP software feature.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
@jahzielv jahzielv requested review from georgekarrv and a team as code owners July 22, 2024 21:21
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 31.86120% with 216 lines in your changes missing coverage. Please review.

Project coverage is 55.19%. Comparing base (02b88e6) to head (a8aeb6b).
Report is 2 commits behind head on main.

Files Patch % Lines
...allDetails/AppInstallDetails/AppInstallDetails.tsx 8.33% 33 Missing ⚠️
...mponents/RenewVppTokenModal/RenewVppTokenModal.tsx 6.66% 28 Missing ⚠️
...e/cards/ActivityFeed/ActivityItem/ActivityItem.tsx 7.14% 26 Missing ⚠️
...ationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx 52.94% 24 Missing ⚠️
...Titles/SoftwareTable/SoftwareTitlesTableConfig.tsx 5.26% 18 Missing ⚠️
frontend/services/entities/mdm_apple.ts 16.66% 15 Missing ⚠️
...end/pages/hosts/details/cards/Software/helpers.tsx 29.41% 12 Missing ⚠️
...age/components/DisableVppModal/DisableVppModal.tsx 15.38% 11 Missing ⚠️
...s/Software/InstallStatusCell/InstallStatusCell.tsx 0.00% 10 Missing ⚠️
...onents/ActivityDetails/InstallDetails/constants.ts 40.00% 6 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20643      +/-   ##
==========================================
- Coverage   55.24%   55.19%   -0.05%     
==========================================
  Files        1423     1431       +8     
  Lines      133632   133698      +66     
  Branches     3218     3281      +63     
==========================================
- Hits        73823    73797      -26     
- Misses      53794    53892      +98     
+ Partials     6015     6009       -6     
Flag Coverage Δ
frontend 52.07% <31.86%> (-0.17%) ⬇️

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.

this re-arranges migrations so the VPP schema changes happen after
already merged migrations and commits the result of running `make
dump-test-schema` using mysql 8.

note that there are a bunch of seemingly unrelated changes in the diff,
but that's just the mysql 8 bump, the diff against `main` should be
smaller.
roperzh
roperzh previously approved these changes Jul 23, 2024
Copy link
Contributor

@roperzh roperzh left a comment

Choose a reason for hiding this comment

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

reviews of each PR were addressed independently when merging to the feature branch, approving to merge into main

this allows to filter hosts with pending, failed and installed VPP apps.

# 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] Manual QA for all new/changed functionality
roperzh
roperzh previously approved these changes Jul 23, 2024
> Related issue: #20662

# 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] Manual QA for all new/changed functionality
@jahzielv jahzielv merged commit 6a31d4e into main Jul 25, 2024
20 checks passed
@jahzielv jahzielv deleted the feat-vpp-apps-18867 branch July 25, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants