-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ivana/codebase-discovery-changes-chores' of https://git…
…hub.com/grafana/github-datasource into ivana/codebase-discovery-changes-chores
- Loading branch information
Showing
15 changed files
with
72 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import QueryEditorIssues from './QueryEditorIssues'; | ||
import { render, screen } from '@testing-library/react'; | ||
import userEvent from '@testing-library/user-event'; | ||
import { components } from 'components/selectors'; | ||
|
||
describe('QueryEditorIssues', () => { | ||
it('should have CreatedAt, ClosedAt and UpdatedAt time field option', async () => { | ||
const props = { | ||
onChange: jest.fn(), | ||
}; | ||
render(<QueryEditorIssues {...props} />); | ||
expect(screen.getByText('Time Field')).toBeInTheDocument(); | ||
userEvent.click(screen.getByTestId(components.QueryEditor.Issues.timeFieldInput)); | ||
expect(await screen.findByText('CreatedAt')).toBeInTheDocument(); | ||
expect(await screen.findByText('ClosedAt')).toBeInTheDocument(); | ||
expect(await screen.findByText('UpdatedAt')).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,4 @@ | ||
import React, { useState } from 'react'; | ||
import { Input, InlineField } from '@grafana/ui'; | ||
|
||
import { LabelsOptions } from '../types'; | ||
import { RightColumnWidth, LeftColumnWidth } from './QueryEditor'; | ||
|
||
interface Props extends LabelsOptions { | ||
onChange: (value: LabelsOptions) => void; | ||
} | ||
|
||
const QueryEditorVulnerabilities = (props: Props) => { | ||
const [query, setQuery] = useState<string>(props.query || ''); | ||
return ( | ||
<> | ||
<InlineField labelWidth={LeftColumnWidth * 2} label="Query (optional)"> | ||
<Input | ||
width={RightColumnWidth} | ||
value={query} | ||
onChange={(el) => setQuery(el.currentTarget.value)} | ||
onBlur={(el) => props.onChange({ ...props, query: el.currentTarget.value })} | ||
/> | ||
</InlineField> | ||
</> | ||
); | ||
}; | ||
import React from 'react'; | ||
|
||
const QueryEditorVulnerabilities = () => <></>; | ||
export default QueryEditorVulnerabilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters