From b81687922c00e144b627153adf55be1da0530427 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Wed, 11 Feb 2026 00:30:52 +0100 Subject: [PATCH] bootstrapper to public api added maintenance mode config --- .../Bootstrap/Install-AutopilotMonitor.ps1 | 7 +-- .../public/maintenance.html | 46 +++++++++++++++++++ .../staticwebapp.config.README.json | 12 +++++ .../staticwebapp.config.json | 9 ++++ 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 src/Web/autopilot-monitor-web/public/maintenance.html create mode 100644 src/Web/autopilot-monitor-web/staticwebapp.config.README.json create mode 100644 src/Web/autopilot-monitor-web/staticwebapp.config.json diff --git a/scripts/Bootstrap/Install-AutopilotMonitor.ps1 b/scripts/Bootstrap/Install-AutopilotMonitor.ps1 index 822f0664..c8cde89c 100644 --- a/scripts/Bootstrap/Install-AutopilotMonitor.ps1 +++ b/scripts/Bootstrap/Install-AutopilotMonitor.ps1 @@ -35,11 +35,12 @@ [CmdletBinding()] param( [Parameter(Mandatory = $false)] - [string]$ApiBaseUrl = "http://localhost:7071", + #[string]$ApiBaseUrl = "http://localhost:7071", + [string]$ApiBaseUrl = "https://autopilotmonitor-func.azurewebsites.net", [Parameter(Mandatory = $false)] - [string]$AgentDownloadUrl = "https://yourcdn.blob.core.windows.net/agent/AutopilotMonitor-Agent.zip", - + [string]$AgentDownloadUrl = "https://autopilotmonitor.blob.core.windows.net/agent/AutopilotMonitor-Agent.zip", + [Parameter(Mandatory = $false)] [int]$MaxOsAgeHours = 5 ) diff --git a/src/Web/autopilot-monitor-web/public/maintenance.html b/src/Web/autopilot-monitor-web/public/maintenance.html new file mode 100644 index 00000000..f11d3831 --- /dev/null +++ b/src/Web/autopilot-monitor-web/public/maintenance.html @@ -0,0 +1,46 @@ + + + + + + Under Maintenance – Autopilot Monitor + + + +
+
🔧
+

Under Maintenance

+

Website is currently undergoing maintenance.
Please check back later.

+
+ + diff --git a/src/Web/autopilot-monitor-web/staticwebapp.config.README.json b/src/Web/autopilot-monitor-web/staticwebapp.config.README.json new file mode 100644 index 00000000..f9ca2281 --- /dev/null +++ b/src/Web/autopilot-monitor-web/staticwebapp.config.README.json @@ -0,0 +1,12 @@ +Copy below content to `src/Web/autopilot-monitor-web/staticwebapp.config.json` to enable maintenance mode for the web application. +This will serve a maintenance page for all routes. + +{ + "routes": [ + { + "route": "/*", + "serve": "/maintenance.html", + "statusCode": 503 + } + ] +} diff --git a/src/Web/autopilot-monitor-web/staticwebapp.config.json b/src/Web/autopilot-monitor-web/staticwebapp.config.json new file mode 100644 index 00000000..258c259e --- /dev/null +++ b/src/Web/autopilot-monitor-web/staticwebapp.config.json @@ -0,0 +1,9 @@ +{ + "routes": [ + { + "route": "/*", + "serve": "/maintenance.html", + "statusCode": 503 + } + ] +}