diff --git a/public/app/features/logs/components/panel/LogListControls.test.tsx b/public/app/features/logs/components/panel/LogListControls.test.tsx index 2950f635f4c..b6de426a911 100644 --- a/public/app/features/logs/components/panel/LogListControls.test.tsx +++ b/public/app/features/logs/components/panel/LogListControls.test.tsx @@ -32,7 +32,7 @@ describe('LogListControls', () => { ); expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument(); - expect(screen.getByLabelText('Oldest logs first')).toBeInTheDocument(); + expect(screen.getByLabelText(/oldest logs first/)).toBeInTheDocument(); expect(screen.getByLabelText('Deduplication')).toBeInTheDocument(); expect(screen.getByLabelText('Display levels')).toBeInTheDocument(); expect(screen.getByLabelText('Show timestamps')).toBeInTheDocument(); @@ -68,7 +68,7 @@ describe('LogListControls', () => { expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument(); expect(screen.getByLabelText('Scroll to top')).toBeInTheDocument(); expect(screen.getByLabelText('Display levels')).toBeInTheDocument(); - expect(screen.queryByLabelText('Oldest logs first')).not.toBeInTheDocument(); + expect(screen.queryByLabelText(/oldest logs first/)).not.toBeInTheDocument(); expect(screen.queryByLabelText('Deduplication')).not.toBeInTheDocument(); expect(screen.queryByLabelText('Show timestamps')).not.toBeInTheDocument(); expect(screen.queryByLabelText('Wrap lines')).not.toBeInTheDocument(); @@ -83,7 +83,7 @@ describe('LogListControls', () => { ); expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument(); - expect(screen.getByLabelText('Oldest logs first')).toBeInTheDocument(); + expect(screen.getByLabelText(/oldest logs first/)).toBeInTheDocument(); expect(screen.getByLabelText('Deduplication')).toBeInTheDocument(); expect(screen.getByLabelText('Display levels')).toBeInTheDocument(); expect(screen.getByLabelText('Show timestamps')).toBeInTheDocument(); @@ -132,7 +132,7 @@ describe('LogListControls', () => { ); - await userEvent.click(screen.getByLabelText('Oldest logs first')); + await userEvent.click(screen.getByLabelText(/oldest logs first/)); expect(onLogOptionsChange).toHaveBeenCalledTimes(1); expect(onLogOptionsChange).toHaveBeenCalledWith('sortOrder', LogsSortOrder.Descending); }); diff --git a/public/app/features/logs/components/panel/LogListControls.tsx b/public/app/features/logs/components/panel/LogListControls.tsx index 83c5fe477a7..86333d6297e 100644 --- a/public/app/features/logs/components/panel/LogListControls.tsx +++ b/public/app/features/logs/components/panel/LogListControls.tsx @@ -226,8 +226,8 @@ export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props) onClick={onSortOrderClick} tooltip={ sortOrder === LogsSortOrder.Descending - ? t('logs.logs-controls.newest-first', 'Newest logs first') - : t('logs.logs-controls.oldest-first', 'Oldest logs first') + ? t('logs.logs-controls.newest-first', 'Sorted by newest logs first - Click to show oldest first') + : t('logs.logs-controls.oldest-first', 'Sorted by oldest logs first - Click to show newest first') } size="lg" /> diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 4bdc795cc83..bd428b4369f 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -6231,8 +6231,8 @@ "escape-newlines": "Fix incorrectly escaped newline and tab sequences in log lines", "hide-timestamps": "Hide timestamps", "hide-unique-labels": "Hide unique labels", - "newest-first": "Newest logs first", - "oldest-first": "Oldest logs first", + "newest-first": "Sorted by newest logs first - Click to show oldest first", + "oldest-first": "Sorted by oldest logs first - Click to show newest first", "prettify-json": "Expand JSON logs", "remove-escaping": "Remove escaping", "scroll-bottom": "Scroll to bottom",