Loki: Rename "explain" toggle to "explain query" (#61150)

* feat: rename explain toggle to explain query

* test: correct failing test for explain toggle

* docs: update documentation on explain query toggle

* fix: update capitalization
This commit is contained in:
Gareth Dawson 2023-01-10 12:35:12 +00:00 committed by GitHub
parent bda13a1b5d
commit 114c8b64aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -125,9 +125,9 @@ To re-order operations manually, drag the operation box by its name and drop it
In same cases the query editor can detect which operations would be most appropriate for a selected log stream. In such cases it will show a hint next to the `+ Operations` button. Click on the hint to add the operations to your query.
### Explain mode
### Explain query
Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations.
This section is only shown if the `Explain query` switch from the query editor top toolbar is set to `on`. It shows a step by step explanation of all query parts and the operations.
### Raw query

View File

@ -107,7 +107,7 @@ describe('LokiQueryEditorSelector', () => {
it('Can enable explain', async () => {
renderWithMode(QueryEditorMode.Builder);
expect(screen.queryByText(EXPLAIN_LABEL_FILTER_CONTENT)).not.toBeInTheDocument();
screen.getByLabelText('Explain').click();
screen.getByLabelText('Explain query').click();
expect(await screen.findByText(EXPLAIN_LABEL_FILTER_CONTENT)).toBeInTheDocument();
});

View File

@ -136,7 +136,7 @@ export const LokiQueryEditor = React.memo<LokiQueryEditorProps>((props) => {
Label browser
</Button>
</Stack>
<QueryHeaderSwitch label="Explain" value={explain} onChange={onExplainChange} />
<QueryHeaderSwitch label="Explain query" value={explain} onChange={onExplainChange} />
<FlexItem grow={1} />
{app !== CoreApp.Explore && (
<Button