mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
* dynamically determine path prefix Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * minor changes per PR review Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * use Context for apiPath and pathPrefix Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * remove unhandled "/version" path Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * only process index once instead of on every req Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * remove unneeded tag fragment Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * switch api path to const Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * revert Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * update tests Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * linter updates Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * simplify Signed-off-by: James Ranson <james_ranson@cable.comcast.com> * updates per peer review Signed-off-by: James Ranson <james_ranson@cable.comcast.com>
22 lines
633 B
TypeScript
Executable file
22 lines
633 B
TypeScript
Executable file
import './globals';
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import App from './App';
|
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
import { isPresent } from './utils';
|
|
|
|
// Declared/defined in public/index.html, value replaced by Prometheus when serving bundle.
|
|
declare const GLOBAL_CONSOLES_LINK: string;
|
|
|
|
let consolesLink: string | null = GLOBAL_CONSOLES_LINK;
|
|
|
|
if (
|
|
GLOBAL_CONSOLES_LINK === 'CONSOLES_LINK_PLACEHOLDER' ||
|
|
GLOBAL_CONSOLES_LINK === '' ||
|
|
!isPresent(GLOBAL_CONSOLES_LINK)
|
|
) {
|
|
consolesLink = null;
|
|
}
|
|
|
|
ReactDOM.render(<App consolesLink={consolesLink} />, document.getElementById('root'));
|