-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dialog to create/edit new connection
- added layout components - added connection reducer
- Loading branch information
Showing
18 changed files
with
372 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { RedisConnection } from '../types'; | ||
|
||
export const SET_ACTIVE_CONNECTION = 'SET_ACTIVE_CONNECTION'; | ||
|
||
export const setActiveConnection = (connection: RedisConnection) => { | ||
return { | ||
type: SET_ACTIVE_CONNECTION, | ||
payload: connection | ||
}; | ||
}; |
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 |
---|---|---|
|
@@ -21,3 +21,7 @@ | |
.resultViewer { | ||
flex: 3; | ||
} | ||
|
||
.editorHeader { | ||
height: 80px; | ||
} |
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,9 @@ | ||
.listItemContainer { | ||
margin: 8px; | ||
display: inline-flex; | ||
} | ||
|
||
.connectionName { | ||
font-size: 1rem; | ||
margin-left: 8px; | ||
} |
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,30 @@ | ||
import React from 'react'; | ||
import { Icon } from '@blueprintjs/core'; | ||
import styles from './ConnectionList.css'; | ||
import { RedisConnection } from '../../types'; | ||
|
||
interface ListItemProps { | ||
connection: RedisConnection; | ||
} | ||
|
||
const ListItem: React.FC<ListItemProps> = ({ connection }) => { | ||
return ( | ||
<div className={styles.listItemContainer}> | ||
<Icon icon="chevron-down" iconSize={20} /> | ||
<div className={styles.connectionName}>{connection.name}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
interface Props { | ||
dataSource: Array<RedisConnection>; | ||
} | ||
|
||
const ConnectionList: React.FC<Props> = ({ dataSource }) => { | ||
const renderList = () => | ||
dataSource.map((item, index) => <ListItem connection={item} key={index} />); | ||
|
||
return <div>{renderList()}</div>; | ||
}; | ||
|
||
export default ConnectionList; |
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
Oops, something went wrong.