fleet/orbit/pkg/useraction/mdm_migration.go
Roberto Dip 39dc3d8ab2
close the migration dialog only after unenrollment (#13512)
for #13450, this additionally adds minor UI/UX tweaks to the migration
flow:

1. Increased padding between the notification screenshot and the text
(hacked by using a PNG for the image as we can't add padding)
2. Centered the text
3. Made sure that all dialogs take over the screen
2023-08-29 09:44:42 -03:00

36 lines
1.2 KiB
Go

package useraction
import "github.com/fleetdm/fleet/v4/server/fleet"
// MDMMigrator represents the minimum set of methods a migration must implement
// in order to be used by Fleet Desktop.
type MDMMigrator interface {
// CanRun indicates if the migrator is able to run, for example, for macOS it
// checks if the swiftDialog executable is present.
CanRun() bool
// SetProps sets/updates the props.
SetProps(MDMMigratorProps)
// Show displays the dialog if there's no other dialog running.
Show() error
// ShowInterval is used to display dialogs at an interval. It displays
// the dialog if there's no other dialog running and a given interval
// (defined by the migrator itself) has passed since the last time the
// dialog was shown.
ShowInterval() error
// Exit tries to stop any processes started by the migrator.
Exit()
}
// MDMMigratorProps are props required to display the dialog. It's akin to the
// concept of props in UI frameworks like React.
type MDMMigratorProps struct {
OrgInfo fleet.DesktopOrgInfo
IsUnmanaged bool
}
// MDMMigratorHandler handles remote actions/callbacks that the migrator calls.
type MDMMigratorHandler interface {
NotifyRemote() error
ShowInstructions() error
}