Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail committed Jan 14, 2021
1 parent cb85d56 commit 4ebf8c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/redis-cli-panel/components/redis-cli-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const RedisCLIPanel: React.FC<PanelProps<PanelOptions>> = ({
onOptionsChange,
replaceVariables,
}) => {
const { query, cli, output, help } = options;
const { query, raw, output, help } = options;
const styles = Styles();

/**
Expand Down Expand Up @@ -64,7 +64,7 @@ export const RedisCLIPanel: React.FC<PanelProps<PanelOptions>> = ({
* Run Query
*/
const res = await ((ds.query({
targets: [{ query: replaceVariables(query), cli: !options.cli }],
targets: [{ query: replaceVariables(query), cli: !options.raw }],
} as DataQueryRequest<RedisQuery>) as unknown) as Observable<DataQueryResponse>)
.pipe(
switchMap$((response) => {
Expand Down Expand Up @@ -197,9 +197,9 @@ export const RedisCLIPanel: React.FC<PanelProps<PanelOptions>> = ({
label="Raw"
labelClass="width-4"
tooltip="If checked, use raw formatting for replies."
checked={cli || false}
checked={raw || false}
onChange={(event: any) => {
onOptionsChange({ ...options, cli: event.currentTarget.checked });
onOptionsChange({ ...options, raw: event.currentTarget.checked });
}}
/>

Expand Down
4 changes: 2 additions & 2 deletions src/redis-cli-panel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export interface PanelOptions {
query: string;

/**
* CLI or Raw mode
* Raw or CLI mode
*
* @type {boolean}
*/
cli?: boolean;
raw?: boolean;

/**
* Command's output
Expand Down

0 comments on commit 4ebf8c1

Please sign in to comment.