diff --git a/public/app/features/explore/LiveLogs.tsx b/public/app/features/explore/LiveLogs.tsx index 0dbef3c0829..b73d5e1296d 100644 --- a/public/app/features/explore/LiveLogs.tsx +++ b/public/app/features/explore/LiveLogs.tsx @@ -119,14 +119,14 @@ class LiveLogs extends PureComponent { {this.rowsToRender().map((row: LogRowModel) => { return ( - - + + ); })} diff --git a/public/app/features/explore/LogsMetaRow.tsx b/public/app/features/explore/LogsMetaRow.tsx index 3f256ef0db1..0a117f43deb 100644 --- a/public/app/features/explore/LogsMetaRow.tsx +++ b/public/app/features/explore/LogsMetaRow.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { LogsDedupStrategy, LogsMetaItem, LogsMetaKind, LogRowModel } from '@grafana/data'; -import { Button, Tooltip, Icon, LogLabels } from '@grafana/ui'; +import { Button, Tooltip, LogLabels } from '@grafana/ui'; import { MAX_CHARACTERS } from '@grafana/ui/src/components/Logs/LogRowMessage'; import { MetaInfoText, MetaItemProps } from './MetaInfoText'; @@ -77,8 +77,7 @@ export const LogsMetaRow: React.FC = React.memo( placement="right" > ), @@ -106,11 +105,7 @@ LogsMetaRow.displayName = 'LogsMetaRow'; function renderMetaItem(value: any, kind: LogsMetaKind) { if (kind === LogsMetaKind.LabelsMap) { - return ( - - - - ); + return ; } else if (kind === LogsMetaKind.Error) { return {value}; } diff --git a/public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx b/public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx index f0a14352681..1f7a7d50409 100644 --- a/public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx +++ b/public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx @@ -34,39 +34,37 @@ export interface Props { const getStyles = stylesFactory((theme: GrafanaTheme, height: number) => { const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4; - /* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */ - const cardWidth = '100% - 134px'; - const sliderHeight = `${height - 180}px`; return { container: css` display: flex; - .label-slider { - font-size: ${theme.typography.size.sm}; - &:last-of-type { - margin-top: ${theme.spacing.lg}; - } - &:first-of-type { - font-weight: ${theme.typography.weight.semibold}; - margin-bottom: ${theme.spacing.md}; - } + `, + labelSlider: css` + font-size: ${theme.typography.size.sm}; + &:last-of-type { + margin-top: ${theme.spacing.lg}; + } + &:first-of-type { + font-weight: ${theme.typography.weight.semibold}; + margin-bottom: ${theme.spacing.md}; } `, containerContent: css` - width: calc(${cardWidth}); + /* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */ + width: calc(100% - 134px); `, containerSlider: css` width: 129px; margin-right: ${theme.spacing.sm}; - .slider { - bottom: 10px; - height: ${sliderHeight}; - width: 129px; - padding: ${theme.spacing.sm} 0; - } `, - slider: css` + fixedSlider: css` position: fixed; `, + slider: css` + bottom: 10px; + height: ${height - 180}px; + width: 129px; + padding: ${theme.spacing.sm} 0; + `, selectors: css` display: flex; justify-content: space-between; @@ -175,10 +173,10 @@ export function RichHistoryQueriesTab(props: Props) { return (
-
-
Filter history
-
{mapNumbertoTimeInSlider(richHistorySearchFilters.from)}
-
+
+
Filter history
+
{mapNumbertoTimeInSlider(richHistorySearchFilters.from)}
+
-
{mapNumbertoTimeInSlider(richHistorySearchFilters.to)}
+
{mapNumbertoTimeInSlider(richHistorySearchFilters.to)}
diff --git a/public/app/features/explore/RichHistory/RichHistorySettingsTab.tsx b/public/app/features/explore/RichHistory/RichHistorySettingsTab.tsx index 122f25a1b63..2a6103f3fd3 100644 --- a/public/app/features/explore/RichHistory/RichHistorySettingsTab.tsx +++ b/public/app/features/explore/RichHistory/RichHistorySettingsTab.tsx @@ -26,9 +26,9 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { return { container: css` font-size: ${theme.typography.size.sm}; - .space-between { - margin-bottom: ${theme.spacing.lg}; - } + `, + spaceBetween: css` + margin-bottom: ${theme.spacing.lg}; `, input: css` max-width: 200px; @@ -78,7 +78,6 @@ export function RichHistorySettingsTab(props: RichHistorySettingsProps) {
@@ -89,7 +88,10 @@ export function RichHistorySettingsTab(props: RichHistorySettingsProps) { Grafana will keep entries up to {selectedOption?.label}. )} - + {supportedFeatures().onlyActiveDataSource && ( - + = ({ timeInMs, className, humanize }) => { - return {formatTime(timeInMs, humanize)}; + return {formatTime(timeInMs, humanize)}; }; const formatTime = (timeInMs: number, humanize = false): string => { diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index 4291c09b9e0..5392c918b3c 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -9,16 +9,6 @@ margin-right: 4px; } -// TODO: move to public/app/features/explore/Time.tsx -.navbar .elapsed-time { - position: absolute; - left: 0; - right: 0; - top: 48px; - text-align: center; - font-size: 11px; -} - .graph-legend { flex-wrap: wrap; }
{dateTimeFormat(row.timeEpochMs, { timeZone })}{row.hasAnsi ? : row.entry}{dateTimeFormat(row.timeEpochMs, { timeZone })}{row.hasAnsi ? : row.entry}