Skip to content

Commit

Permalink
add C# for maintenance page (#1968)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- maintenance mode show static maintenance page
  • Loading branch information
peggy-quartech authored Dec 5, 2024
1 parent 4b3fca1 commit 647f883
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 160 deletions.
9 changes: 8 additions & 1 deletion src/Spd.Presentation.Licensing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@
app.UseRequestDecompression();
app.UseResponseCompression();
app.UseStaticFiles();
app.MapFallbackToFile("index.html");
if (app.Configuration.GetValue("MaintenanceMode", false))
{
app.MapFallbackToFile("maintenance/spd-unavailable.html");
}
else
{
app.MapFallbackToFile("index.html");
}
app.UseRouting();
app.UseObservabilityMiddleware();
app.UseHealthChecks();
Expand Down
319 changes: 160 additions & 159 deletions src/Spd.Presentation.Licensing/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,162 +1,163 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft.AspNetCore": "Warning",
"System.Net.Http.HttpClient": "Warning",
"Microsoft.OData.Extensions.Client": "Warning"
}
}
},
"UploadFile": {
"StreamFileFolder": "/tmp",
"MaxFileSizeMB": 25,
"AllowedExtensions": ".docx,.doc,.bmp,.jpeg,.jpg,.tif,.tiff,.png,.gif,.pdf,.html,.htm",
"MaxAllowedNumberOfFiles": 10
},
"Payments": {
"UnauthPersonalLicPaymentSuccessPath": "personal-licence/payment-success/",
"UnauthPersonalLicPaymentFailPath": "personal-licence/payment-fail/",
"UnauthPersonalLicPaymentCancelPath": "personal-licence/payment-cancel/",
"UnauthPersonalLicPaymentErrorPath": "personal-licence/payment-error/",
"AuthPersonalLicPaymentSuccessPath": "personal-licence/application/payment-success/",
"AuthPersonalLicPaymentFailPath": "personal-licence/application/payment-fail/",
"AuthPersonalLicPaymentCancelPath": "personal-licence/application/payment-cancel/",
"AuthPersonalLicPaymentErrorPath": "personal-licence/application/payment-error/",
"AuthBizLicPaymentSuccessPath": "business-licence/payment-success/",
"AuthBizLicPaymentFailPath": "business-licence/payment-fail/",
"AuthBizLicPaymentCancelPath": "business-licence/payment-cancel/",
"AuthBizLicPaymentErrorPath": "business-licence/payment-error/",
"MaxOnlinePaymentFailedTimes": 3
},
"InvalidWorkerLicenceCategoryMatrix": {
"ArmouredCarGuard": [
"ArmouredCarGuard",
"SecurityGuardUnderSupervision"
],
"ElectronicLockingDeviceInstaller": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmInstallerUnderSupervision": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmInstaller": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmMonitor": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityAlarmSales",
"SecurityGuard"
],
"SecurityAlarmResponse": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityGuard"
],
"SecurityAlarmSales": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmSales",
"SecurityGuardUnderSupervision",
"SecurityGuard"
],
"ClosedCircuitTelevisionInstaller": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"LocksmithUnderSupervision": [
"ElectronicLockingDeviceInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"Locksmith": [
"ElectronicLockingDeviceInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"PrivateInvestigatorUnderSupervision": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"PrivateInvestigator": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"FireInvestigator": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"SecurityConsultant": [
"SecurityConsultant",
"SecurityGuardUnderSupervision"
],
"SecurityGuardUnderSupervision": [
"ArmouredCarGuard",
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"PrivateInvestigator",
"PrivateInvestigatorUnderSupervision",
"FireInvestigator",
"SecurityConsultant",
"SecurityGuardUnderSupervision",
"SecurityGuard",
"BodyArmourSales"
],
"SecurityGuard": [
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityGuard",
"SecurityAlarmSales"
],
"BodyArmourSales": [
"SecurityGuardUnderSupervision",
"BodyArmourSales"
]
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft.AspNetCore": "Warning",
"System.Net.Http.HttpClient": "Warning",
"Microsoft.OData.Extensions.Client": "Warning"
}
}
},
"MaintenanceMode": false,
"UploadFile": {
"StreamFileFolder": "/tmp",
"MaxFileSizeMB": 25,
"AllowedExtensions": ".docx,.doc,.bmp,.jpeg,.jpg,.tif,.tiff,.png,.gif,.pdf,.html,.htm",
"MaxAllowedNumberOfFiles": 10
},
"Payments": {
"UnauthPersonalLicPaymentSuccessPath": "personal-licence/payment-success/",
"UnauthPersonalLicPaymentFailPath": "personal-licence/payment-fail/",
"UnauthPersonalLicPaymentCancelPath": "personal-licence/payment-cancel/",
"UnauthPersonalLicPaymentErrorPath": "personal-licence/payment-error/",
"AuthPersonalLicPaymentSuccessPath": "personal-licence/application/payment-success/",
"AuthPersonalLicPaymentFailPath": "personal-licence/application/payment-fail/",
"AuthPersonalLicPaymentCancelPath": "personal-licence/application/payment-cancel/",
"AuthPersonalLicPaymentErrorPath": "personal-licence/application/payment-error/",
"AuthBizLicPaymentSuccessPath": "business-licence/payment-success/",
"AuthBizLicPaymentFailPath": "business-licence/payment-fail/",
"AuthBizLicPaymentCancelPath": "business-licence/payment-cancel/",
"AuthBizLicPaymentErrorPath": "business-licence/payment-error/",
"MaxOnlinePaymentFailedTimes": 3
},
"InvalidWorkerLicenceCategoryMatrix": {
"ArmouredCarGuard": [
"ArmouredCarGuard",
"SecurityGuardUnderSupervision"
],
"ElectronicLockingDeviceInstaller": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmInstallerUnderSupervision": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmInstaller": [
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"SecurityAlarmMonitor": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityAlarmSales",
"SecurityGuard"
],
"SecurityAlarmResponse": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityGuard"
],
"SecurityAlarmSales": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmSales",
"SecurityGuardUnderSupervision",
"SecurityGuard"
],
"ClosedCircuitTelevisionInstaller": [
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"ClosedCircuitTelevisionInstaller",
"SecurityGuardUnderSupervision"
],
"LocksmithUnderSupervision": [
"ElectronicLockingDeviceInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"Locksmith": [
"ElectronicLockingDeviceInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"SecurityGuardUnderSupervision"
],
"PrivateInvestigatorUnderSupervision": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"PrivateInvestigator": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"FireInvestigator": [
"PrivateInvestigatorUnderSupervision",
"PrivateInvestigator",
"FireInvestigator",
"SecurityGuardUnderSupervision"
],
"SecurityConsultant": [
"SecurityConsultant",
"SecurityGuardUnderSupervision"
],
"SecurityGuardUnderSupervision": [
"ArmouredCarGuard",
"ElectronicLockingDeviceInstaller",
"SecurityAlarmInstallerUnderSupervision",
"SecurityAlarmInstaller",
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityAlarmSales",
"ClosedCircuitTelevisionInstaller",
"LocksmithUnderSupervision",
"Locksmith",
"PrivateInvestigator",
"PrivateInvestigatorUnderSupervision",
"FireInvestigator",
"SecurityConsultant",
"SecurityGuardUnderSupervision",
"SecurityGuard",
"BodyArmourSales"
],
"SecurityGuard": [
"SecurityAlarmMonitor",
"SecurityAlarmResponse",
"SecurityGuardUnderSupervision",
"SecurityGuard",
"SecurityAlarmSales"
],
"BodyArmourSales": [
"SecurityGuardUnderSupervision",
"BodyArmourSales"
]
}
}

0 comments on commit 647f883

Please sign in to comment.