PromucFlow_constructor/app/client/public/404.html
Shrikant Sharat Kandula 7a0f654b8e
chore: Fix env varibles in 404.html (#37672)
Environment variables in `404.html` page aren't getting replaced with
their values. This PR fixes that.


## Automation

/test sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12005727044>
> Commit: 56b10fddf2ee7ed180ed59845b6f0223cd26b06a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12005727044&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.Sanity
> Spec: 
> It seems like **no tests ran** 😔. We are not able to recognize it,
please check <a
href="https://github.com/appsmithorg/appsmith/actions/runs/12005727044"
target="_blank">workflow here</a>.
> <hr>Mon, 25 Nov 2024 08:48:10 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Improved dynamic retrieval of environment variables for better
integration with environment-specific settings in the 404 error page.
- Enhanced handling of HTML files, including the 404 page, during the
configuration process.

- **Bug Fixes**
- Improved error handling for missing SSL certificates and custom
domains.

- **Documentation**
- Updated logic for processing HTML files to ensure correct paths and
configurations are applied.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-26 11:41:01 +05:30

79 lines
5.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon"
href="https://res.cloudinary.com/dwpfockn8/image/upload/v1597920848/favicons/favicon-orange_pxfmdc.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Appsmith</title>
<link rel="stylesheet" href="404.css">
<link rel="stylesheet" href="./font-style.css">
<script>
// Function to ensure we parse the config correctly and handle any falsy values
// '' (empty strings), 'false' are falsy
// could return either boolean or string based on value
const parseConfig = (config) => {
if (config.indexOf("__") === 0 || config.indexOf("$") === 0 || config.indexOf("%") === 0)
return "";
const result = config.trim();
if (result.toLowerCase() === "false" || result === "") {
return false;
} else if (result.toLowerCase() === "true") {
return true;
}
return result;
}
const smartLookId = parseConfig('{{env "APPSMITH_SMART_LOOK_ID"}}');
const sentryDSN = parseConfig('{{env "APPSMITH_SENTRY_DSN"}}');
</script>
<script type='text/javascript'>
if(smartLookId) {
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', smartLookId, { region: 'eu' });
smartlook("track", "UserReached404");
}
</script>
<script id="sentryScript"></script>
<script>
if(sentryDSN) {
const sentryURL = `https://js.sentry-cdn.com/${sentryDSN}.min.js`;
document.getElementById('sentryScript').src = sentryURL;
document.getElementById("sentryScript").crossorigin = "anonymous";
}
</script>
</head>
<body>
<div class="header-root">
<header class="appsmith-header">
<div class="appsmith-logo">
<svg viewBox="0 0 923 283" xmlns="http://www.w3.org/2000/svg"><g fill="#1a1a1a"><path d="m580.51 93.21a9.45 9.45 0 0 1 -2.93-7 10 10 0 0 1 10-10 9.45 9.45 0 0 1 7 2.93 9.77 9.77 0 0 1 2.86 7.08 9.45 9.45 0 0 1 -2.93 7 9.6 9.6 0 0 1 -6.94 2.86 9.78 9.78 0 0 1 -7.06-2.87z"></path><path d="m122.81 178.78q-1.29-2.29-2-9-7.44 10.74-23.75 10.73-12.17 0-19.39-5.86t-7.22-16.32q0-20.17 28.33-23l11.16-1c3.72-.47 6.39-1.36 8-2.64a7 7 0 0 0 2.43-5.8q0-4.72-3.07-6.94t-10.38-2.22q-7.86 0-11.3 2.65c-2.29 1.77-3.63 4.79-4 9.09h-17.75q1.57-25.18 33.2-25.19 30.77 0 30.76 22.18v39.35q0 9.74 3 14zm-7.73-15.78q5.3-4.65 5.29-13.38v-6.72c-1.71 1.53-4.53 2.53-8.44 3l-9.73 1.1q-7.2.87-10.2 3.37a8.79 8.79 0 0 0 -3.08 7.23 9 9 0 0 0 3.19 7.4q3.23 2.64 9.23 2.64 8.45-.03 13.74-4.64z"></path><path d="m227.26 113.67q8.88 10.59 8.87 28.19t-8.87 28q-9 10.59-24.18 10.59t-22.9-11.3v37.63h-18v-101.84h17.31v10.59q8-12.3 23.61-12.31 15.15 0 24.16 10.45zm-28.47 51.94q8.86 0 14-6.44t5-17.88q0-11.31-4.94-17.25t-14.09-5.94q-9 0-14 6.16t-5 17.6q0 11.58 5.15 17.6 4.86 6.15 13.88 6.15z"></path><path d="m320 113.67q8.88 10.59 8.87 28.19t-8.87 28q-9 10.59-24.18 10.59t-22.9-11.3v37.63h-18v-101.84h17.32v10.59q8-12.3 23.61-12.31 15.09 0 24.15 10.45zm-28.47 51.94q8.86 0 14-6.44t5-17.88q0-11.31-4.94-17.25t-14.09-5.94q-9 0-14 6.16t-5 17.6q0 11.58 5.16 17.6 4.8 6.15 13.82 6.15z"></path><path d="m345.13 155.31h17.6q.72 6.87 4.51 9.73t11.95 2.86q14.6 0 14.6-8.87a7 7 0 0 0 -3.15-6.15q-3.15-2.15-11.31-3.58l-8.44-1.43q-24.18-4-24.18-22.32 0-10.45 8-16.39t22.61-5.94q31.62 0 32.63 25h-17q-.29-6.57-4.15-9.37t-11.45-2.79q-12.88 0-12.88 8.59a6.75 6.75 0 0 0 2.86 5.79q2.87 2.07 9.45 3.22l9.3 1.43q13.45 2.43 19.53 7.73t6.08 14.74q0 11.16-8.58 17.17t-24.19 6q-32.34.05-33.79-25.42z"></path><path d="m535.09 110.38q6.79 7.16 6.8 19.6v48.8h-18v-45.94q0-14-12.74-14a13.9 13.9 0 0 0 -11.15 4.92q-4.21 4.93-4.22 14.38v40.64h-17.86v-45.94q0-14-12.87-14a13.73 13.73 0 0 0 -10.95 4.94q-4.23 4.93-4.22 14.38v40.64h-18v-73.86h17.46v10.59q7.57-12.3 21-12.31 16.89 0 22.9 13.74 8.29-13.74 22.89-13.74 12.17 0 18.96 7.16z"></path><path d="m680 118.68h-23v39.92q0 3.57 1.93 5t6.47 1.4h13.17v13.74c-3.91.38-14.07.57-16.46.57q-12 0-17.53-4.51t-5.51-14.38v-41.74h-16.74v-13.74h16.74v-24.65h17.93v24.65h23z"></path><path d="m760.66 110.16q6.95 6.95 6.94 19.68v48.94h-18v-45.94q0-14-13.88-14a15.65 15.65 0 0 0 -11.72 4.92q-4.78 4.93-4.79 13.66v41.36h-18v-98.49h18v34.52q8.44-11.58 22.46-11.59 12.06 0 18.99 6.94z"></path></g><path d="m782.16 203.1v-13.74h70.4v13.74z" fill="#ff6d2d"></path><path d="m596.75 165.04v-60.1h-37.91v13.74h19.89v46.36h-19.89v13.74h57.8v-13.74z" fill="#1a1a1a"></path></svg>
</div>
</header>
</div>
<div class="main">
<img src="404-image.png" alt="404 image" class="not-found-img"/>
<p class="bold-text">We couldnt load some JavaScript files for the operation.</p>
<p>A refresh usually works, but sometimes, it may take us a bit to get those files for you. <br> We'll auto-refresh this page every two minutes.</p>
<div class="button-container">
<span class="button primary" onclick="refresh()">Refresh</span>
</div>
</div>
</body>
<script type="application/javascript">
setTimeout(() => {
refresh();
},120000);
function refresh() {
history.back();
}
</script>
</html>