-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.html
83 lines (77 loc) · 3.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta
name="ui-version"
content="v%REACT_APP_VERSION% (%REACT_APP_GIT_SHA%)"
/>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#2d2a2e" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<% if (process.env.NODE_ENV === 'development') { %>
<link rel="icon" href="%PUBLIC_URL%/favicon-cc-app-dev.svg" />
<% } else { %>
<link rel="icon" href="%PUBLIC_URL%/favicon-cc-app.svg" />
<% } %>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<!-- The script is currently tightly coupled with the server -->
<script
src="%REACT_APP_CORE_API_URL%/%REACT_APP_OPEN_API_NAME%"
type="text/javascript"
></script>
<script
src="%REACT_APP_CORE_API_URL%/%REACT_APP_CORE_API_NAME%"
type="text/javascript"
></script>
<script>
(function () {
document.addEventListener('DOMContentLoaded', function () {
// If for some reason the API doesn't load, our app will not work. Write out a message to help the user.
if (!window.dh) {
document.getElementById('root').insertAdjacentHTML(
'afterbegin',
`<div class="modal d-block">
<div class="modal-dialog modal-dialog-centered theme-bg-light">
<div class="modal-content">
<div class="modal-body">
<h5 class="modal-title">Error: Unable to load API</h5>
<p class="text-break">Ensure the server is running and you are able to reach %REACT_APP_CORE_API_URL%/%REACT_APP_CORE_API_NAME%, then refresh the page.</p>
</div>
</div>
</div>
</div>`
);
}
});
})();
</script>
<title>Deephaven</title>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>