2019-10-17 05:38:09 -07:00
|
|
|
import './globals';
|
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import App from './App';
|
2021-04-15 09:14:07 -07:00
|
|
|
import './themes/app.scss';
|
|
|
|
import './themes/light.scss';
|
|
|
|
import './themes/dark.scss';
|
2021-03-23 15:55:52 -07:00
|
|
|
import './fonts/codicon.ttf';
|
2020-02-08 02:00:48 -08:00
|
|
|
import { isPresent } from './utils';
|
2019-10-17 05:38:09 -07:00
|
|
|
|
2019-11-04 00:17:50 -08:00
|
|
|
// Declared/defined in public/index.html, value replaced by Prometheus when serving bundle.
|
2020-02-08 02:00:48 -08:00
|
|
|
declare const GLOBAL_CONSOLES_LINK: string;
|
2021-11-30 02:21:07 -08:00
|
|
|
declare const GLOBAL_AGENT_MODE: string;
|
2019-11-04 00:17:50 -08:00
|
|
|
|
2020-02-09 04:39:44 -08:00
|
|
|
let consolesLink: string | null = GLOBAL_CONSOLES_LINK;
|
2021-11-30 02:21:07 -08:00
|
|
|
const agentMode: string | null = GLOBAL_AGENT_MODE;
|
2020-02-09 04:39:44 -08:00
|
|
|
|
2020-02-08 02:00:48 -08:00
|
|
|
if (
|
|
|
|
GLOBAL_CONSOLES_LINK === 'CONSOLES_LINK_PLACEHOLDER' ||
|
|
|
|
GLOBAL_CONSOLES_LINK === '' ||
|
|
|
|
!isPresent(GLOBAL_CONSOLES_LINK)
|
|
|
|
) {
|
2020-02-09 04:39:44 -08:00
|
|
|
consolesLink = null;
|
2020-02-08 02:00:48 -08:00
|
|
|
}
|
|
|
|
|
2021-11-30 02:21:07 -08:00
|
|
|
ReactDOM.render(<App consolesLink={consolesLink} agentMode={agentMode === 'true'} />, document.getElementById('root'));
|