Explore: Unification of logs/metrics/traces user interface (#25890)

Removes "Metrics"/"Logs" mode switcher from Explore, allowing for both
metrics and logs queries at the same time.

Co-authored-by: kay delaney <kay@grafana.com>
This commit is contained in:
Andrej Ocenas
2020-07-09 16:14:55 +02:00
committed by GitHub
parent be961c5466
commit 64bc85963b
52 changed files with 327 additions and 737 deletions

View File

@@ -10,7 +10,6 @@ import {
DataSourceApi,
dateMath,
DefaultTimeZone,
ExploreMode,
HistoryItem,
IntervalValues,
LogRowModel,
@@ -249,9 +248,6 @@ export function parseUrlState(initial: string | undefined): ExploreUrlState {
const metricProperties = ['expr', 'expression', 'target', 'datasource', 'query'];
const queries = parsedSegments.filter(segment => isSegment(segment, ...metricProperties));
const modeObj = parsedSegments.filter(segment => isSegment(segment, 'mode'))[0];
const mode = modeObj ? modeObj.mode : ExploreMode.Metrics;
const uiState = parsedSegments.filter(segment => isSegment(segment, 'ui'))[0];
const ui = uiState
? {
@@ -263,7 +259,7 @@ export function parseUrlState(initial: string | undefined): ExploreUrlState {
: DEFAULT_UI_STATE;
const originPanelId = parsedSegments.filter(segment => isSegment(segment, 'originPanelId'))[0];
return { datasource, queries, range, ui, mode, originPanelId };
return { datasource, queries, range, ui, originPanelId };
}
export function generateKey(index = 0): string {