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

Fleet UI: Add reminder banners for ABM and APNs expirations #19085

Merged
merged 3 commits into from
May 29, 2024

Conversation

RachelElysia
Copy link
Member

@RachelElysia RachelElysia commented May 16, 2024

Issue

Cerra #11544

Description

  • Surfaces Apple Push Notification service (APNs) certificate and Apple Business Manager (ABM) expiration to show:
    • a warning (starting 30 days before) banner or
    • an expired banner if the date has passed
  • Update Fleetctl warning and error messages
  • Logic on details host detail page to hide page-level banners if app-wide banner exists

Note: This PR builds on the license-expiration PR which should be reviewed and merged first as it will likely cause merge conflicts.

Screen recording

https://www.loom.com/share/79108625899a4418af7343536ec26d56?sid=18709263-d797-4c46-afa9-c79cf18f13da

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.
  • TODO: Manual QA for all new/changed functionality

@@ -65,8 +65,8 @@ export default {
MACADMINS: `/${API_VERSION}/fleet/macadmins`,

// MDM endpoints
MDM_APPLE: `/${API_VERSION}/fleet/mdm/apple`,
Copy link
Member Author

Choose a reason for hiding this comment

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

these endpoints (mdm/apple and mdm/apple_bm are deprecated and now /apns and /abm respectively

@RachelElysia RachelElysia changed the title Fleet UI: Add reminder banners fro ABM and APNs expiration Fleet UI: Add reminder banners for ABM and APNs expirations May 17, 2024
@RachelElysia RachelElysia added the ~assisting g-mdm This is an MDM bug and the Endpoint ops team is assisting label May 17, 2024
@RachelElysia RachelElysia marked this pull request as ready for review May 17, 2024 13:47
@RachelElysia RachelElysia requested a review from a team as a code owner May 17, 2024 13:47
@jacobshandling
Copy link
Contributor

👀

@@ -61,6 +63,8 @@ const App = ({ children, location }: IAppProps): JSX.Element => {
setCurrentUser,
setConfig,
setEnrollSecret,
setABMExpiry,
setAPNsExpiry,
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also cleanup sandbox code while we're at it

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't want to scope creep cleaning up the entire <SandboxGate/> in this banners PR estimated to be a 2 right before I took a week vacation.

@@ -1,33 +1,5 @@
.apple-bm-terms-message {
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

Copy link
Contributor

@jacobshandling jacobshandling 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. Are you convinced the MDM API calls are working/being handled right?

@@ -19,6 +19,8 @@ import {
intlFormat,
intervalToDuration,
isAfter,
isBefore,
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

Copy link
Member Author

Choose a reason for hiding this comment

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

grazie

/>
<div className={`${baseClass}--animation-disabled`}>
{renderAppWideBanner()}
<SandboxGate
Copy link
Contributor

Choose a reason for hiding this comment

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

we can take out the SandboxGate

Copy link
Member Author

Choose a reason for hiding this comment

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

Limiting scope as I'm leaving in 5 work hours.

{renderAppWideBanner()}
<SandboxGate
fallbackComponent={() => (
<SandboxExpiryMessage
Copy link
Contributor

Choose a reason for hiding this comment

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

and message

config?.license.expiration || ""
);

const showingAppWideBanner =
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if a more directly linked way to check this would be more bug-proof? Not a deal breaker.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I just built on what's already in there. Definitely consider a refactor if more time was allotted.

@RachelElysia RachelElysia merged commit 5c35a92 into main May 29, 2024
9 checks passed
@RachelElysia RachelElysia deleted the mdm-expiration-banners branch May 29, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~assisting g-mdm This is an MDM bug and the Endpoint ops team is assisting
Development

Successfully merging this pull request may close these issues.

None yet

4 participants