Show "Installation completed" instead of "Initializing..." after reboot
When a user reboots after a remote installation, the backend shuts down and the D-Bus address file disappears, causing the UI to fall back to the "Initializing..." loading screen. Check the existing `isExiting` flag when the loading guard fires. If the installer is shutting down, show a static "Installation completed" message prompting the user to close the browser window, instead of the misleading "Initializing..." spinner.
This commit is contained in:
parent
75a3bfce89
commit
cd472cd02d
1 changed files with 12 additions and 0 deletions
|
|
@ -34,6 +34,15 @@ export const ApplicationLoading = () => (
|
|||
</PageSection>
|
||||
);
|
||||
|
||||
const ApplicationCompleted = () => (
|
||||
<PageSection className="installation-page--loading" hasBodyWrapper={false} type={PageSectionTypes.wizard}>
|
||||
<EmptyStatePanel
|
||||
title={_("Installation completed")}
|
||||
paragraph={_("You can close this browser window now.")}
|
||||
/>
|
||||
</PageSection>
|
||||
);
|
||||
|
||||
export const Application = ({ conf, dispatch, installationStatus, isFetching, onCritFail, osRelease, reportLinkURL, setShowStorage, showStorage }) => {
|
||||
const [storeInitialized, setStoreInitialized] = useState(false);
|
||||
const [currentStepId, setCurrentStepId] = useState();
|
||||
|
|
@ -76,6 +85,9 @@ export const Application = ({ conf, dispatch, installationStatus, isFetching, on
|
|||
|
||||
// Postpone rendering anything until we read the dbus address and the default configuration
|
||||
if (!address || !storeInitialized || !installationStatus) {
|
||||
if (isExiting()) {
|
||||
return <ApplicationCompleted />;
|
||||
}
|
||||
debug("Loading initial data...");
|
||||
return <ApplicationLoading />;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue