mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add links between classic and new UIs (#6191)
The links preserve the graph settings between the two UIs. Fixes https://github.com/prometheus/prometheus/issues/6162 Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
b5a16a8f86
commit
1c238ac086
|
@ -2,6 +2,10 @@ body {
|
||||||
padding-top: 10px; /* TODO remove */
|
padding-top: 10px; /* TODO remove */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.classic-ui-btn {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { Container } from 'reactstrap';
|
import {
|
||||||
|
Button,
|
||||||
|
Container,
|
||||||
|
Col,
|
||||||
|
Row,
|
||||||
|
} from 'reactstrap';
|
||||||
|
|
||||||
import PanelList from './PanelList';
|
import PanelList from './PanelList';
|
||||||
|
|
||||||
|
@ -10,6 +15,17 @@ class App extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Container fluid={true}>
|
<Container fluid={true}>
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<Button
|
||||||
|
className="float-right classic-ui-btn"
|
||||||
|
color="link"
|
||||||
|
onClick={() => {window.location.pathname = "../../graph"}}
|
||||||
|
size="sm">
|
||||||
|
Return to classic UI
|
||||||
|
</Button>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<PanelList />
|
<PanelList />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,6 +9,7 @@ body {
|
||||||
div.query-history {
|
div.query-history {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.query-history:hover {
|
div.query-history:hover {
|
||||||
|
@ -206,3 +207,7 @@ input[name="end_input"], input[name="range_input"] {
|
||||||
li.active, .dropdown-item:focus, .dropdown-item:hover {
|
li.active, .dropdown-item:focus, .dropdown-item:hover {
|
||||||
background-color: steelblue;
|
background-color: steelblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.new_ui_button {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
|
@ -24,10 +24,13 @@
|
||||||
|
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<div id="graph_container" class="container-fluid">
|
<div id="graph_container" class="container-fluid">
|
||||||
|
<div class="clearfix">
|
||||||
<div class="query-history">
|
<div class="query-history">
|
||||||
<i class="glyphicon glyphicon-unchecked"></i>
|
<i class="glyphicon glyphicon-unchecked"></i>
|
||||||
<button type="button" class="search-history" title="search previous queries">Enable query history</button>
|
<button type="button" class="search-history" title="search previous queries">Enable query history</button>
|
||||||
</div>
|
</div>
|
||||||
|
<button type="button" class="btn btn-link btn-sm new_ui_button" onclick="window.location.pathname='{{ pathPrefix }}/static/graph-new/app.html'">Try experimental React UI</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
Loading…
Reference in a new issue