mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
minor changes
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
77da5e7ab4
commit
cfb70cbf1a
|
@ -24,8 +24,10 @@ class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelLi
|
||||||
constructor(props: PathPrefixProps) {
|
constructor(props: PathPrefixProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
const urlPanels = decodePanelOptionsFromQueryString(window.location.search);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
panels: decodePanelOptionsFromQueryString(window.location.search),
|
panels: urlPanels,
|
||||||
pastQueries: [],
|
pastQueries: [],
|
||||||
metricNames: [],
|
metricNames: [],
|
||||||
fetchMetricsError: null,
|
fetchMetricsError: null,
|
||||||
|
@ -34,7 +36,7 @@ class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelLi
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
!this.state.panels.length && this.addPanel()
|
!this.state.panels.length && this.addPanel();
|
||||||
fetch(`${this.props.pathPrefix}/api/v1/label/__name__/values`, { cache: 'no-store' })
|
fetch(`${this.props.pathPrefix}/api/v1/label/__name__/values`, { cache: 'no-store' })
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
|
|
Loading…
Reference in a new issue