123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <meta name="robots" content="NONE,NOARCHIVE" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title><%= htmlWebpackPlugin.options.title || 'Sentry Dev'%></title>
- <script>
- function __sentryMark(name) {
- if (!window.performance || typeof window.performance.mark !== 'function') { return; }
- window.performance.mark(name);
- }
- __sentryMark('head-start');
- </script>
- <script type="text/javascript">
- try {
- function extractSlug() {
- // XXX: If you change this also change its sibilings in:
- // - static/app/utils/extractSlug.tsx
- // - webpack.config.ts
- // NB: This RegExp is not exactly the same as the other two
- var knownDomains = /\.(?:localhost|dev\.getsentry\.net|sentry\.dev)(?:\:\d*)?$/;
- if (window.location.host.match(knownDomains)) {
- var domainParts = window.location.host.split('.');
- var slug = domainParts.shift();
- return slug;
- }
- var pathReg = /\/organizations\/(.+?(?=(\/|$)))(\/|$)/i;
- var matches = pathReg.exec(window.location.pathname);
- if (matches) {
- return matches[1];
- }
- console.error(`Could not extract an organization slug from ${window.location}. Assuming 'sentry'`);
- return 'sentry';
- }
- var slug = extractSlug();
- var preloadPromises = { orgSlug: slug };
- function promiseRequest(url) {
- return new Promise(function (resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url);
- xhr.onload = function () {
- try {
- this.status >= 200 && this.status < 300
- ? resolve([JSON.parse(xhr.response), this.statusText, xhr])
- : reject([this.status, this.statusText]);
- } catch(e) {
- reject();
- }
- };
- xhr.onerror = function () {
- reject([this.status, this.statusText]);
- };
- xhr.send();
- });
- }
- function makeUrl(suffix) {
- return '/api/0/organizations/' + slug + suffix;
- }
- window.__sentry_preload = preloadPromises;
- if (slug !== 'new') {
- preloadPromises.organization = promiseRequest(makeUrl('/?detailed=0'));
- preloadPromises.projects = promiseRequest(makeUrl('/projects/?all_projects=1&collapse=latestDeploys'));
- preloadPromises.teams = promiseRequest(makeUrl('/teams/'));
- }
- } catch(err) {
- console.error(err)
- }
- </script>
- </head>
- <body>
- <% if (htmlWebpackPlugin.options.unsupportedBrowser) { %>
- <style>.unsupported-browser { display: none; }</style>
- <div class="unsupported-browser">
- Sorry, your browser is not supported. Please upgrade to
- the latest version or switch your browser to use this site.
- See <a href="http://outdatedbrowser.com/">outdatedbrowser.com</a>
- for options.
- </div>
- <% } %>
- <div id="blk_router">
- <div class="loading triangle">
- <div class="loading-mask"></div>
- <div class="loading-indicator" data-test-id="loading-indicator">
- <img src="<%=require('sentry-images/sentry-loader.svg')%>" />
- </div>
- <div class="loading-message">
- <p>Please wait while we load an obnoxious amount of JavaScript.</p>
- <p>
- <small>You may need to disable adblocking extensions to load Sentry.</small>
- </p>
- </div>
- </div>
- </div>
- <% if (htmlWebpackPlugin.options.window) { %>
- <script>
- <% for (var varName in htmlWebpackPlugin.options.window) { %>
- window['<%=varName%>'] = <%= JSON.stringify(htmlWebpackPlugin.options.window[varName]) %>;
- <% } %>
- </script>
- <% } %>
- </body>
- </html>
|