mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prevent submitting the datasource form in Loki's datasource configuration page (#31823)
This commit is contained in:
@@ -38,6 +38,12 @@ describe('DerivedFields', () => {
|
||||
expect(wrapper.find(Button).filterWhere((button: any) => button.contains('Show example log message')).length).toBe(
|
||||
1
|
||||
);
|
||||
expect(
|
||||
wrapper
|
||||
.find(Button)
|
||||
.filterWhere((button: any) => button.contains('Show example log message'))
|
||||
.getDOMNode()
|
||||
).toHaveAttribute('type', 'button');
|
||||
expect(wrapper.find(DerivedField).length).toBe(2);
|
||||
});
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export const DerivedFields = (props: Props) => {
|
||||
</Button>
|
||||
|
||||
{value && value.length > 0 && (
|
||||
<Button variant="secondary" onClick={() => setShowDebug(!showDebug)}>
|
||||
<Button variant="secondary" type="button" onClick={() => setShowDebug(!showDebug)}>
|
||||
{showDebug ? 'Hide example log message' : 'Show example log message'}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user