2018-06-29 14:05:09 +03:00
|
|
|
<html lang="en-us">
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
window.__env = {
|
2018-09-27 14:40:32 +03:00
|
|
|
consoleMode: "server",
|
2018-09-14 16:27:46 +03:00
|
|
|
urlPrefix: "/console",
|
2018-12-18 12:39:01 +03:00
|
|
|
consolePath: "{{consolePath}}",
|
2019-02-14 12:37:47 +03:00
|
|
|
isAccessKeySet: {{isAdminSecretSet}},
|
|
|
|
isAdminSecretSet: {{isAdminSecretSet}},
|
2019-05-16 10:45:29 +03:00
|
|
|
enableTelemetry: {{enableTelemetry}},
|
|
|
|
assetsPath: "https://graphql-engine-cdn.hasura.io/console/assets",
|
|
|
|
assetsVersion: "{{assetsVersion}}",
|
|
|
|
cdnAssets: {{cdnAssets}},
|
2018-06-29 14:05:09 +03:00
|
|
|
};
|
2019-05-16 10:45:29 +03:00
|
|
|
window.__env.versionedAssetsPath = window.__env.assetsPath;
|
2018-06-29 14:05:09 +03:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<style>
|
|
|
|
.mainContent {
|
|
|
|
display: 'none';
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity .20s linear;
|
|
|
|
}
|
|
|
|
.mainContent.show {
|
|
|
|
display: 'block';
|
|
|
|
opacity: 1;
|
|
|
|
transition: opacity .20s linear;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div id="loading">
|
|
|
|
<div class="page-loading" style="
|
|
|
|
min-height: 100vh;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-family: sans-serif;
|
|
|
|
justify-content: center;
|
|
|
|
">
|
|
|
|
<span class="" style="
|
|
|
|
font-size: 2em;
|
|
|
|
margin-top: -3em;
|
|
|
|
color: #848484;
|
|
|
|
">
|
|
|
|
Loading...
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="content" class="mainContent"></div>
|
2019-05-16 10:45:29 +03:00
|
|
|
|
|
|
|
<script>
|
2019-05-16 12:08:44 +03:00
|
|
|
// helper functions
|
2019-05-16 10:45:29 +03:00
|
|
|
const loadIcon = (url) => {
|
|
|
|
linkElem = document.createElement('link');
|
|
|
|
linkElem.rel = 'icon';
|
2019-05-29 07:33:29 +03:00
|
|
|
linkElem.type = 'image/png';
|
2019-05-16 10:45:29 +03:00
|
|
|
linkElem.href = url;
|
|
|
|
document.head.append(linkElem);
|
|
|
|
};
|
|
|
|
const loadCSS = (url) => {
|
|
|
|
linkElem = document.createElement('link');
|
|
|
|
linkElem.rel = 'stylesheet';
|
|
|
|
linkElem.charset = 'UTF-8';
|
|
|
|
linkElem.href = url;
|
|
|
|
document.body.append(linkElem);
|
|
|
|
};
|
|
|
|
const loadScript = (url) => {
|
|
|
|
scriptElem = document.createElement('script');
|
|
|
|
scriptElem.charset = 'UTF-8';
|
|
|
|
scriptElem.src = url;
|
|
|
|
document.body.append(scriptElem);
|
|
|
|
};
|
|
|
|
const prependSlash = (str) => str === '' ? '' : '/' + str;
|
2019-05-16 12:08:44 +03:00
|
|
|
const loadAssets = () => {
|
2019-05-16 10:45:29 +03:00
|
|
|
loadCSS(window.__env.assetsPath + '/common/css/font-awesome.min.css.gz');
|
2019-05-29 07:33:29 +03:00
|
|
|
loadIcon(window.__env.assetsPath + '/common/img/favicon_green.png');
|
2019-05-16 10:45:29 +03:00
|
|
|
loadCSS(window.__env.versionedAssetsPath + '/main.css.gz');
|
|
|
|
loadScript(window.__env.versionedAssetsPath + '/main.js.gz');
|
|
|
|
loadScript(window.__env.versionedAssetsPath + '/vendor.js.gz');
|
2019-05-16 12:08:44 +03:00
|
|
|
};
|
2019-05-16 10:45:29 +03:00
|
|
|
|
|
|
|
// if cdnAssets is set to false, load assets from server instead of cdn
|
|
|
|
if (window.__env.cdnAssets === false) {
|
|
|
|
window.__env.assetsPath =
|
|
|
|
window.location.pathname.slice(
|
|
|
|
0, window.location.pathname.lastIndexOf(window.__env.consolePath)
|
|
|
|
) + '/console/assets';
|
|
|
|
// set the path to get versioned assets from server
|
|
|
|
window.__env.versionedAssetsPath = window.__env.assetsPath + '/versioned';
|
|
|
|
|
|
|
|
// otherwise load from cdn itself
|
|
|
|
} else {
|
|
|
|
// set the path (cdn-based) to get assets from
|
|
|
|
window.__env.versionedAssetsPath = window.__env.assetsPath + prependSlash(window.__env.assetsVersion);
|
|
|
|
}
|
2019-05-16 12:08:44 +03:00
|
|
|
// load the assets now
|
|
|
|
loadAssets();
|
2019-05-16 10:45:29 +03:00
|
|
|
</script>
|
2018-06-29 14:05:09 +03:00
|
|
|
</body>
|
2018-09-14 16:27:46 +03:00
|
|
|
</html>
|