Skip to content

Commit 033dca2

Browse files
authored
Refactor Redis CLI components (#10)
1 parent 1d357cd commit 033dca2

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/redis-cli-panel/AutoScrollingTextArea.tsx renamed to src/redis-cli-panel/components/auto-scrolling-text-area.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TextArea } from '@grafana/ui';
77
type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
88

99
/**
10-
* Auto scrolling Textarea
10+
* Auto scrolling text area
1111
*/
1212
export default class AutoScrollingTextArea extends React.Component<TextareaProps & { autoScroll?: boolean }, {}> {
1313
element: HTMLTextAreaElement | null | undefined;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './auto-scrolling-text-area';
2+
export * from './redis-cli-panel';

src/redis-cli-panel/RedisCLIPanel.tsx renamed to src/redis-cli-panel/components/redis-cli-panel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { css, cx } from 'emotion';
22
import React, { ChangeEvent } from 'react';
3-
import AutoScrollingTextarea from 'redis-cli-panel/AutoScrollingTextArea';
43
import { Observable } from 'rxjs';
54
import { map as map$, switchMap as switchMap$ } from 'rxjs/operators';
65
import { DataFrame, DataQueryRequest, DataQueryResponse, PanelProps } from '@grafana/data';
76
import { getDataSourceSrv } from '@grafana/runtime';
87
import { Button } from '@grafana/ui';
9-
import { Help } from './help';
10-
import { Styles } from './styles';
11-
import { HelpCommand, PanelOptions, RedisQuery } from './types';
8+
import { Help } from '../help';
9+
import { Styles } from '../styles';
10+
import { HelpCommand, PanelOptions, RedisQuery } from '../types';
11+
import AutoScrollingTextarea from './auto-scrolling-text-area';
1212

1313
/**
1414
* Redis CLI Panel

src/redis-cli-panel/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PanelPlugin } from '@grafana/data';
2-
import { RedisCLIPanel } from './RedisCLIPanel';
2+
import { RedisCLIPanel } from './components';
33
import { PanelOptions } from './types';
44

55
/**

0 commit comments

Comments
 (0)