diff --git a/messages/en-US.json b/messages/en-US.json
index 46c12d6c..13d002d1 100644
--- a/messages/en-US.json
+++ b/messages/en-US.json
@@ -2386,7 +2386,5 @@
"maintenanceTime": "e.g., 2 hours, Nov 1 at 5:00 PM",
"maintenanceEstimatedTimeDescription": "When you expect maintenance to be completed",
"editDomain": "Edit Domain",
- "editDomainDescription": "Select a domain for your resource",
- "maintenanceModeDisabledTooltip": "This feature requires a valid license to enable."
-
+ "editDomainDescription": "Select a domain for your resource"
}
diff --git a/src/app/[orgId]/settings/resources/[niceId]/general/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/general/page.tsx
index 82d319de..d9b79371 100644
--- a/src/app/[orgId]/settings/resources/[niceId]/general/page.tsx
+++ b/src/app/[orgId]/settings/resources/[niceId]/general/page.tsx
@@ -61,7 +61,13 @@ import { useSubscriptionStatusContext } from "@app/hooks/useSubscriptionStatusCo
import { useUserContext } from "@app/hooks/useUserContext";
import { Alert, AlertDescription } from "@app/components/ui/alert";
import { RadioGroup, RadioGroupItem } from "@app/components/ui/radio-group";
-import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@app/components/ui/tooltip";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger
+} from "@app/components/ui/tooltip";
+import { LicenseOrSubscriptionRequiredAlert } from "@app/components/SecurityFeaturesAlert";
export default function GeneralForm() {
const [formKey, setFormKey] = useState(0);
@@ -122,7 +128,7 @@ export default function GeneralForm() {
maintenanceModeType: z.enum(["forced", "automatic"]).optional(),
maintenanceTitle: z.string().max(255).optional(),
maintenanceMessage: z.string().max(2000).optional(),
- maintenanceEstimatedTime: z.string().max(100).optional(),
+ maintenanceEstimatedTime: z.string().max(100).optional()
})
.refine(
(data) => {
@@ -155,9 +161,12 @@ export default function GeneralForm() {
// enableProxy: resource.enableProxy || false
maintenanceModeEnabled: resource.maintenanceModeEnabled || false,
maintenanceModeType: resource.maintenanceModeType || "automatic",
- maintenanceTitle: resource.maintenanceTitle || "We'll be back soon!",
- maintenanceMessage: resource.maintenanceMessage || "We are currently performing scheduled maintenance. Please check back soon.",
- maintenanceEstimatedTime: resource.maintenanceEstimatedTime || "",
+ maintenanceTitle:
+ resource.maintenanceTitle || "We'll be back soon!",
+ maintenanceMessage:
+ resource.maintenanceMessage ||
+ "We are currently performing scheduled maintenance. Please check back soon.",
+ maintenanceEstimatedTime: resource.maintenanceEstimatedTime || ""
},
mode: "onChange"
});
@@ -193,7 +202,7 @@ export default function GeneralForm() {
const rawDomains = res.data.data.domains as DomainRow[];
const domains = rawDomains.map((domain) => ({
...domain,
- baseDomain: toUnicode(domain.baseDomain),
+ baseDomain: toUnicode(domain.baseDomain)
}));
setBaseDomains(domains);
setFormKey((key) => key + 1);
@@ -220,7 +229,9 @@ export default function GeneralForm() {
enabled: data.enabled,
name: data.name,
niceId: data.niceId,
- subdomain: data.subdomain ? toASCII(data.subdomain) : undefined,
+ subdomain: data.subdomain
+ ? toASCII(data.subdomain)
+ : undefined,
domainId: data.domainId,
proxyPort: data.proxyPort,
// ...(!resource.http && {
@@ -230,7 +241,8 @@ export default function GeneralForm() {
maintenanceModeType: data.maintenanceModeType,
maintenanceTitle: data.maintenanceTitle || null,
maintenanceMessage: data.maintenanceMessage || null,
- maintenanceEstimatedTime: data.maintenanceEstimatedTime || null,
+ maintenanceEstimatedTime:
+ data.maintenanceEstimatedTime || null
}
)
.catch((e) => {
@@ -261,7 +273,7 @@ export default function GeneralForm() {
maintenanceModeType: data.maintenanceModeType,
maintenanceTitle: data.maintenanceTitle || null,
maintenanceMessage: data.maintenanceMessage || null,
- maintenanceEstimatedTime: data.maintenanceEstimatedTime || null,
+ maintenanceEstimatedTime: data.maintenanceEstimatedTime || null
});
toast({
@@ -270,7 +282,9 @@ export default function GeneralForm() {
});
if (data.niceId && data.niceId !== resource?.niceId) {
- router.replace(`/${updated.orgId}/settings/resources/${data.niceId}/general`);
+ router.replace(
+ `/${updated.orgId}/settings/resources/${data.niceId}/general`
+ );
} else {
router.refresh();
}
@@ -355,11 +369,15 @@ export default function GeneralForm() {
name="niceId"
render={({ field }) => (