PromucFlow_constructor/app/client/public/index.html

253 lines
9.3 KiB
HTML
Raw Normal View History

2019-01-21 15:11:10 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1"
/>
<title>Appsmith</title>
<style>
#loader {
position: fixed;
left: 0;
top: 0;
height: 4px;
background: #d7d7d7;
transition: all ease-in 0.3s;
}
</style>
chore: Exporting basic frontend telemetrics to new relic (#28436) ## Description Exporting release frontend tele-metrics to new relic. #### PR fixes following issue(s) Fixes #28445 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-30 04:42:47 +00:00
<script>
// '' (empty strings), 'false' are falsy
// could return either boolean or string based on value
const parseConfig = (config) => {
if (
(config.startsWith("{") && config.startsWith("}")) ||
chore: Exporting basic frontend telemetrics to new relic (#28436) ## Description Exporting release frontend tele-metrics to new relic. #### PR fixes following issue(s) Fixes #28445 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-30 04:42:47 +00:00
config.indexOf("__") === 0 ||
config.indexOf("$") === 0 ||
config.indexOf("%") === 0
)
return "";
chore: Exporting basic frontend telemetrics to new relic (#28436) ## Description Exporting release frontend tele-metrics to new relic. #### PR fixes following issue(s) Fixes #28445 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-30 04:42:47 +00:00
const result = config.trim();
if (result.toLowerCase() === "false" || result === "") {
return false;
} else if (result.toLowerCase() === "true") {
return true;
}
chore: Exporting basic frontend telemetrics to new relic (#28436) ## Description Exporting release frontend tele-metrics to new relic. #### PR fixes following issue(s) Fixes #28445 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-30 04:42:47 +00:00
return result;
};
const CLOUD_HOSTING = parseConfig('{{env "APPSMITH_CLOUD_HOSTING"}}');
const AIRGAPPED = parseConfig('{{env "APPSMITH_AIRGAP_ENABLED"}}');
const REO_CLIENT_ID = parseConfig('{{env "APPSMITH_REO_CLIENT_ID"}}');
chore: Exporting basic frontend telemetrics to new relic (#28436) ## Description Exporting release frontend tele-metrics to new relic. #### PR fixes following issue(s) Fixes #28445 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-30 04:42:47 +00:00
</script>
<script>
window.__APPSMITH_CHUNKS_TO_PRELOAD =
<%=
(function () {
// This code emits URLs to be preloaded as soon as the main bundle loads.
// If you code-split away some files and need to preload them as well, heres how to do that:
// 1) Give your import a name (use the `webpackChunkName` comment: `import(/* webpackChunkName: "my-name" */ "./my-file")`)
// 2) Add the name into the `chunksToPreload` array below
let chunksToPreload = {
'edit-mode': [...getChunkUrls("AppIDE"), ...getChunkUrls("global-search")],
'view-mode': getChunkUrls("AppViewer")
};
return JSON.stringify(chunksToPreload);
function getChunkUrls(chunkName) {
return compilation.namedChunkGroups.get(chunkName).chunks.flatMap(chunk => [...chunk.files]);
}
})()
%>
</script>
<!-- Start of Reo Javascript -->
<script type="text/javascript">
if (CLOUD_HOSTING && REO_CLIENT_ID) {
!function(){var e,t,n;e=REO_CLIENT_ID,t=function(){Reo.init({clientID:REO_CLIENT_ID})},(n=document.createElement("script")).src="https://static.reo.dev/"+e+"/reo.js",n.async=!0,n.onload=t,document.head.appendChild(n)}();
}
</script>
<!-- End of Reo Javascript -->
</head>
<body class="appsmith-light-theme">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="loader" style="width: 30vw"></div>
<!--
To keep zIndex for tooltips higher than app comments, todo remove when migrating to Tooltip2
Currently the className does not apply to the portal root, so we're unable to work with z-indexes based on that
-->
<div id="header-root"></div>
<div id="root"></div>
<div
id="date-picker-control"
style="position: relative; z-index: 1000"
></div>
<script type="text/javascript">
// Ref: https://github.com/Modernizr/Modernizr/blob/94592f279a410436530c7c06acc42a6e90c20150/feature-detects/storage/localstorage.js
const getIsLocalStorageSupported = () => {
try {
window.localStorage.setItem("test", "testA");
window.localStorage.removeItem("test");
return true;
} catch (e) {
return false;
}
};
const isLocalStorageSupported = getIsLocalStorageSupported();
const handleLocalStorageNotSupportedError = () => {
console.error("Localstorage storage is not supported on your device.");
};
const localStorageUtil = {
getItem: (key) => {
if (!isLocalStorageSupported) {
handleLocalStorageNotSupportedError();
return;
}
return window.localStorage.getItem(key);
},
removeItem: (key) => {
if (!isLocalStorageSupported) {
handleLocalStorageNotSupportedError();
return;
}
return window.localStorage.removeItem(key);
},
setItem: (key, value) => {
if (!isLocalStorageSupported) {
handleLocalStorageNotSupportedError();
return;
}
return window.localStorage.setItem(key, value);
},
};
window.addEventListener("DOMContentLoaded", (event) => {
document.getElementById("loader").style.width = "50vw";
});
const registerPageServiceWorker = () => {
if (
"serviceWorker" in navigator &&
// Disable the service worker in Cypress tests. We primarily do this to make
// the Performance/LinkRelPreload_Spec.js test work (as it collects URLs all network requests,
// and service worker requests fail it.) But, anecdotally, disabling the service worker
// also seems to make the tests a bit faster, as the network load is lower.
!window.Cypress
) {
window.addEventListener("load", function () {
navigator.serviceWorker
.register("/pageService.js")
.catch((error) => {
console.error("Service Worker Registration failed: " + error);
});
2020-05-05 12:16:51 +00:00
});
}
};
registerPageServiceWorker();
</script>
<script type="text/javascript">
const LOG_LEVELS = ["debug", "error"];
const CONFIG_LOG_LEVEL_INDEX = LOG_LEVELS.indexOf(
parseConfig('{{env "APPSMITH_CLIENT_LOG_LEVEL"}}'),
);
const INTERCOM_APP_ID =
parseConfig("%REACT_APP_INTERCOM_APP_ID%") ||
parseConfig('{{env "APPSMITH_INTERCOM_APP_ID"}}');
const DISABLE_INTERCOM = parseConfig('{{env "APPSMITH_DISABLE_INTERCOM"}}');
// Initialize the Intercom library
if (INTERCOM_APP_ID.length && !DISABLE_INTERCOM) {
(function () {
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic("reattach_activator");
ic("update", w.intercomSettings);
} else {
var d = document;
var i = function () {
i.c(arguments);
};
i.q = [];
i.c = function (args) {
i.q.push(args);
};
w.Intercom = i;
var l = function () {
var s = d.createElement("script");
s.type = "text/javascript";
s.async = true;
s.src = "https://widget.intercom.io/widget/" + INTERCOM_APP_ID;
var x = d.getElementsByTagName("script")[0];
x.parentNode.insertBefore(s, x);
};
if (document.readyState === "complete") {
l();
} else if (w.attachEvent) {
w.attachEvent("onload", l);
} else {
w.addEventListener("load", l, false);
}
}
})();
}
2020-05-05 12:16:51 +00:00
window.SENTRY_CONFIG = parseConfig('{{env "APPSMITH_SENTRY_DSN"}}');
window.APPSMITH_FEATURE_CONFIGS = {
sentry: {
dsn: parseConfig('{{env "APPSMITH_SENTRY_DSN"}}'),
release: parseConfig('{{env "APPSMITH_SENTRY_RELEASE"}}'),
environment: parseConfig('{{env "APPSMITH_SENTRY_ENVIRONMENT"}}'),
},
smartLook: {
id: parseConfig('{{env "APPSMITH_SMART_LOOK_ID"}}'),
},
segment: {
apiKey: parseConfig('{{env "APPSMITH_SEGMENT_KEY"}}'),
ceKey: parseConfig('{{env "APPSMITH_SEGMENT_CE_KEY"}}'),
},
observability: {
chore: add grafana faro sdk (CE) (#38301) ## Description - Remove new relic browser agent - Add faro sdk to capture frontend perf metrics and traces. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12490844984> > Commit: c9d4264027467bf33e1de519eb69c7762b6e7f75 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12490844984&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 25 Dec 2024 09:33:26 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 ## Summary by CodeRabbit - **New Features** - Introduced new environment variable `APPSMITH_HOSTNAME` for dynamic hostname configuration in HTML files. - Enhanced telemetry capabilities with new imports and updated types for better observability. - Added `tracingUrl` under the observability section in configuration files for improved telemetry tracking. - **Bug Fixes** - Adjusted telemetry data handling to utilize new `Attributes` type for improved consistency. - **Documentation** - Updated import paths for various telemetry-related components to reflect new module organization. - **Chores** - Removed deprecated telemetry configurations and streamlined build processes. - Updated Nginx configuration to reflect new telemetry parameters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-26 05:07:41 +00:00
deploymentName: parseConfig('{{env "APPSMITH_DEPLOYMENT_NAME"}}'),
serviceInstanceId: parseConfig('{{env "APPSMITH_HOSTNAME"}}'),
tracingUrl: parseConfig('{{env "APPSMITH_FRONTEND_TRACING_URL"}}'),
chore: added new relic OTLP exporter (#28480) ## Description - Added new relic OTLP exporter to export eval traces, click event and api calls. - Conditionally loading both browser agent and OTLP scripts based on env variables. #### PR fixes following issue(s) Fixes #28504 and #28506 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-11-06 09:35:17 +00:00
},
fusioncharts: {
licenseKey: parseConfig('{{env "APPSMITH_FUSIONCHARTS_LICENSE_KEY"}}'),
},
mixpanel: {
enabled: parseConfig('{{env "APPSMITH_SEGMENT_KEY"}}'),
apiKey: parseConfig('{{env "APPSMITH_MIXPANEL_KEY"}}'),
},
logLevel:
CONFIG_LOG_LEVEL_INDEX > -1
? LOG_LEVELS[CONFIG_LOG_LEVEL_INDEX]
: LOG_LEVELS[1],
cloudHosting: CLOUD_HOSTING,
appVersion: {
chore: Include version in all requests (#37551) We're adding `x-appsmith-version` to every request from the client. If server sees a request with a `x-appsmith-version` that doesn't match its own, it rejects. If the server sees a request _without_ any `x-appsmith-version` header, we don't reject it... for now. On the client, when server responds with the "version mismatch" error, we trigger the "There's a new version, please refresh" toast UI flow. This is a step towards removing our dependency on websockets and client&mdash;RTS connection. ## Automation /test sanity ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12029721517> > Commit: c4321f7addb2be9c0ca6a7fe64308f13f931a1c8 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12029721517&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Tue, 26 Nov 2024 12:28:32 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 ## Release Notes - **New Features** - Introduced a custom header for API requests to include application version. - Added specific error handling for 400 Bad Request errors, enhancing user feedback on version mismatches. - **Improvements** - Enhanced error handling for version mismatches, providing clearer error messages. - Simplified version update handling, focusing on logging and user prompts without state management. - Improved default handling for application version configuration to prevent undefined values. - **Chores** - Removed outdated version state management functions to streamline code. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Pawan Kumar <pawan@appsmith.com>
2024-11-27 07:28:28 +00:00
id: parseConfig('{{env "APPSMITH_VERSION_ID"}}') || "UNKNOWN",
sha: parseConfig('{{env "APPSMITH_VERSION_SHA"}}'),
releaseDate: parseConfig('{{env "APPSMITH_VERSION_RELEASE_DATE"}}'),
},
intercomAppID: INTERCOM_APP_ID,
mailEnabled: parseConfig('{{env "APPSMITH_MAIL_ENABLED"}}'),
googleRecaptchaSiteKey: parseConfig('{{env "APPSMITH_RECAPTCHA_SITE_KEY"}}'),
hideWatermark: parseConfig('{{env "APPSMITH_HIDE_WATERMARK"}}'),
disableIframeWidgetSandbox: parseConfig(
'{{env "APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX"}}',
),
customerPortalUrl:
parseConfig('{{env "APPSMITH_CUSTOMER_PORTAL_URL"}}') ||
"https://customer.appsmith.com",
pricingUrl:
parseConfig('{{env "APPSMITH_PRICING_URL"}}') ||
"https://www.appsmith.com/pricing",
};
</script>
</body>
</html>