mirror of
https://github.com/fleetdm/fleet
synced 2026-04-22 22:17:21 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #33173 # Details This PR updates the "Setting up your device" page which appears in Linux and Windows (and as of https://github.com/fleetdm/fleet/issues/30117, MacOS) setup experiences. Front-end updates: * Lots of renaming of things that were software-specific to now more generically refer to "setup step" * Removed the "My Device" heading * Moved the info button inside the table header * Added status of setup script run to the table * Updated the empty state to not refer specifically to software * Added optional `setup_only` query param to the `/device` page which, if set, will always show the "setting up your device" page even if all setup is complete. Normally as soon as setup finishes, the front-end redirects to the regular My Device page. In the case of MacOS setup experience, we don't want this to happen as we expect to either 1) keep the setup experience up indefinitely if we're blocking device setup on software install failure, or 2) close the setup dialog on successful completion. This query param is also handy for testing. * Added new "Configuration complete" state to be shown when all setup steps are finished (successfully or not). This is only applicable on MacOS, since other platforms will redirect to the My Device page when finished. This PR also includes one small backend change to the `/device/{token}/setup_experience/status` API endpoint, to have it return a `scripts` array alongside the existing `software` array. This endpoint is not documented publicly. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [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/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests Updated existing DeviceUserPage tests that check the SettingUpYourDevice content, and added new tests for the new scripts content and the new query param. - [X] QA'd all new/changed functionality manually <img width="1028" height="867" alt="Screenshot 2025-10-02 at 7 20 28 PM" src="https://github.com/user-attachments/assets/7adab2c2-dac1-4463-96fc-13094da2c379" /> (note that as of now we'd only have at most one script, showing multiple here to demonstrate the different states) <img width="1031" height="524" alt="Screenshot 2025-10-02 at 7 22 01 PM" src="https://github.com/user-attachments/assets/bedaa840-d7ef-4b6f-8daf-6ac3b447594f" /> <img width="1222" height="760" alt="image" src="https://github.com/user-attachments/assets/42cf82d5-53e0-4c4d-b60e-9ac2cc86af68" /> --------- Co-authored-by: Ian Littman <iansltx@gmail.com>
21 lines
494 B
TypeScript
21 lines
494 B
TypeScript
import Graphic from "components/Graphic/Graphic";
|
|
import React from "react";
|
|
|
|
const baseClass = "setup-script-process-cell";
|
|
|
|
interface ISetupScriptProcessCell {
|
|
name: string;
|
|
}
|
|
|
|
const SetupScriptProcessCell = ({ name }: ISetupScriptProcessCell) => {
|
|
return (
|
|
<span className={baseClass}>
|
|
<Graphic name="file-sh" className={`${baseClass}__icon`} />
|
|
<div>
|
|
Run <b>{name || "Unknown script"}</b>
|
|
</div>
|
|
</span>
|
|
);
|
|
};
|
|
|
|
export default SetupScriptProcessCell;
|