+
+ Please add CNAME record to your domain. Details of
+ the CNAME records are:
+
+
+
+
+ Record Type: CNAME
+
+
+
+ Name:
+ {selectedDashboardDomain?.fullDomain}
+
+
+
+ Content:
+ {StatusPageCNameRecord}
+
+
+
+
+ Once you have done this, it should take 24 hours to
+ automatically verify.
+
+
+ ) : (
+
+
+ Custom Domains not enabled for this OneUptime
+ installation. Please contact your server admin to
+ enable this feature. To enable this feature, if you
+ are using Docker compose, the
+ STATUS_PAGE_CNAME_RECORD environment variable
+ must be set when starting the OneUptime cluster. If
+ you are using Helm and Kubernetes then set
+ statusPage.cnameRecord in the values.yaml file.
+
+
+ )
+ }
+ submitButtonText={"Verify CNAME"}
+ onClose={() => {
+ setShowCnameModal(false);
+ setError("");
+ return setSelectedDashboardDomain(null);
+ }}
+ isLoading={verifyCnameLoading}
+ error={error}
+ onSubmit={async () => {
+ try {
+ setVerifyCnameLoading(true);
+ setError("");
+
+ const response:
+ | HTTPResponse
+ | HTTPErrorResponse =
+ await API.get({
+ url: URL.fromString(
+ APP_API_URL.toString(),
+ ).addRoute(
+ `/${
+ new DashboardDomain().crudApiPath
+ }/verify-cname/${selectedDashboardDomain?.id?.toString()}`,
+ ),
+ data: {},
+ headers: ModelAPI.getCommonHeaders(),
+ });
+
+ if (response.isFailure()) {
+ throw response;
+ }
+
+ setShowCnameModal(false);
+ setRefreshToggle(
+ OneUptimeDate.getCurrentDate().toString(),
+ );
+ setSelectedDashboardDomain(null);
+ } catch (err) {
+ setError(API.getFriendlyMessage(err));
+ }
+
+ setVerifyCnameLoading(false);
+ }}
+ />
+ )}
+
+ {showOrderSSLModal && selectedDashboardDomain && (
+
+ Please click on the button below to order SSL for this
+ domain. We will use LetsEncrypt to order a certificate.
+ This process is secure and completely free. The
+ certificate takes 3 hours to provision after its been
+ ordered.
+
+ ) : (
+
+
+ Custom Domains not enabled for this OneUptime
+ installation. Please contact your server admin to
+ enable this feature.
+
+
+ )
+ }
+ submitButtonText={"Order Free SSL"}
+ onClose={() => {
+ setShowOrderSSLModal(false);
+ setError("");
+ return setSelectedDashboardDomain(null);
+ }}
+ isLoading={orderSslLoading}
+ error={error}
+ onSubmit={async () => {
+ try {
+ setOrderSslLoading(true);
+ setError("");
+
+ const response:
+ | HTTPResponse
+ | HTTPErrorResponse =
+ await API.get({
+ url: URL.fromString(
+ APP_API_URL.toString(),
+ ).addRoute(
+ `/${
+ new DashboardDomain().crudApiPath
+ }/order-ssl/${selectedDashboardDomain?.id?.toString()}`,
+ ),
+ data: {},
+ headers: ModelAPI.getCommonHeaders(),
+ });
+
+ if (response.isFailure()) {
+ throw response;
+ }
+
+ setShowOrderSSLModal(false);
+ setRefreshToggle(
+ OneUptimeDate.getCurrentDate().toString(),
+ );
+ setSelectedDashboardDomain(null);
+ } catch (err) {
+ setError(API.getFriendlyMessage(err));
+ }
+
+ setOrderSslLoading(false);
+ }}
+ />
+ )}
+ >
+