diff --git a/frontend/projects/ui/src/app/pages/server-routes/server-show/server-show.page.ts b/frontend/projects/ui/src/app/pages/server-routes/server-show/server-show.page.ts
index 066a91950..a913da86f 100644
--- a/frontend/projects/ui/src/app/pages/server-routes/server-show/server-show.page.ts
+++ b/frontend/projects/ui/src/app/pages/server-routes/server-show/server-show.page.ts
@@ -172,13 +172,16 @@ export class ServerShowPage {
}
private async restart() {
+ const action = 'Restart'
+
const loader = await this.loadingCtrl.create({
- message: 'Restarting...',
+ message: `Beginning ${action}...`,
})
await loader.present()
try {
await this.embassyApi.restartServer({})
+ this.presentAlertInProgress(action, ` until ${action} completes.`)
} catch (e: any) {
this.errToast.present(e)
} finally {
@@ -187,13 +190,19 @@ export class ServerShowPage {
}
private async shutdown() {
+ const action = 'Shutdown'
+
const loader = await this.loadingCtrl.create({
- message: 'Shutting down...',
+ message: `Beginning ${action}...`,
})
await loader.present()
try {
await this.embassyApi.shutdownServer({})
+ this.presentAlertInProgress(
+ action,
+ '.
You will need to physcally power cycle the device to regain connectivity.',
+ )
} catch (e: any) {
this.errToast.present(e)
} finally {
@@ -202,13 +211,16 @@ export class ServerShowPage {
}
private async systemRebuild() {
+ const action = 'System Rebuild'
+
const loader = await this.loadingCtrl.create({
- message: 'Hard Restarting...',
+ message: `Beginning ${action}...`,
})
await loader.present()
try {
await this.embassyApi.systemRebuild({})
+ this.presentAlertInProgress(action, ` until ${action} completes.`)
} catch (e: any) {
this.errToast.present(e)
} finally {
@@ -238,7 +250,7 @@ export class ServerShowPage {
}
}
- async presentAlertLatest() {
+ private async presentAlertLatest() {
const alert = await this.alertCtrl.create({
header: 'Up to date!',
message: 'You are on the latest version of EmbassyOS.',
@@ -254,6 +266,21 @@ export class ServerShowPage {
alert.present()
}
+ private async presentAlertInProgress(verb: string, message: string) {
+ const alert = await this.alertCtrl.create({
+ header: `${verb} In Progress...`,
+ message: `Stopping all services gracefully. This can take a while.
Your Embassy will then ♫ play a melody ♫ and become unreachable${message}`,
+ buttons: [
+ {
+ text: 'OK',
+ role: 'cancel',
+ cssClass: 'enter-click',
+ },
+ ],
+ })
+ alert.present()
+ }
+
settings: ServerSettings = {
Backups: [
{