mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
More minor changes
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
56b101e958
commit
096ba25ba9
|
@ -20,6 +20,12 @@ interface PanelListState {
|
||||||
timeDriftError: string | null;
|
timeDriftError: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const initialPanel = {
|
||||||
|
id: generateID(),
|
||||||
|
key: '0',
|
||||||
|
options: PanelDefaultOptions,
|
||||||
|
};
|
||||||
|
|
||||||
class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelListState> {
|
class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelListState> {
|
||||||
constructor(props: PathPrefixProps) {
|
constructor(props: PathPrefixProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -27,7 +33,7 @@ class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelLi
|
||||||
const urlPanels = decodePanelOptionsFromQueryString(window.location.search);
|
const urlPanels = decodePanelOptionsFromQueryString(window.location.search);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
panels: urlPanels.length ? urlPanels : [],
|
panels: urlPanels.length ? urlPanels : [initialPanel],
|
||||||
pastQueries: [],
|
pastQueries: [],
|
||||||
metricNames: [],
|
metricNames: [],
|
||||||
fetchMetricsError: null,
|
fetchMetricsError: null,
|
||||||
|
|
Loading…
Reference in a new issue