mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Influx: Adds start page for logs in Explore (#17521)
* Influx: Adds start page for logs in Explore Closes #17499 * Influx: Rebased with master and removed conditional display of cheat sheet in explore Cheat sheet now displays during both Metrics and Logs mode, though this is only temporary.
This commit is contained in:
parent
151fe240fc
commit
2a47c315df
@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
const CHEAT_SHEET_ITEMS = [
|
||||
{
|
||||
title: 'Getting started',
|
||||
label:
|
||||
'Start by selecting a measurement and field from the dropdown above. You can then use the tag selector to further narrow your search.',
|
||||
},
|
||||
];
|
||||
|
||||
export default (props: any) => (
|
||||
<div>
|
||||
<h2>InfluxDB Cheat Sheet</h2>
|
||||
{CHEAT_SHEET_ITEMS.map(item => (
|
||||
<div className="cheat-sheet-item" key={item.title}>
|
||||
<div className="cheat-sheet-item__title">{item.title}</div>
|
||||
<div className="cheat-sheet-item__label">{item.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
@ -0,0 +1,13 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { ExploreStartPageProps } from '@grafana/ui';
|
||||
import InfluxCheatSheet from './InfluxCheatSheet';
|
||||
|
||||
export default class InfluxStartPage extends PureComponent<ExploreStartPageProps> {
|
||||
render() {
|
||||
return (
|
||||
<div className="grafana-info-box grafana-info-box--max-lg">
|
||||
<InfluxCheatSheet onClickExample={this.props.onClickExample} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
import InfluxDatasource from './datasource';
|
||||
import { InfluxQueryCtrl } from './query_ctrl';
|
||||
import { InfluxLogsQueryField } from './components/InfluxLogsQueryField';
|
||||
import InfluxStartPage from './components/InfluxStartPage';
|
||||
|
||||
import {
|
||||
createChangeHandler,
|
||||
createResetHandler,
|
||||
@ -31,4 +33,5 @@ export const plugin = new DataSourcePlugin(InfluxDatasource)
|
||||
.setConfigCtrl(InfluxConfigCtrl)
|
||||
.setQueryCtrl(InfluxQueryCtrl)
|
||||
.setAnnotationQueryCtrl(InfluxAnnotationsQueryCtrl)
|
||||
.setExploreLogsQueryField(InfluxLogsQueryField);
|
||||
.setExploreLogsQueryField(InfluxLogsQueryField)
|
||||
.setExploreStartPage(InfluxStartPage);
|
||||
|
Loading…
Reference in New Issue
Block a user