forked from neo4j/neo4j-browser
-
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.
Merge pull request neo4j#757 from pe4cey/auto-refresh-sysinfo
Add auto refresh to sysinfo frame
- Loading branch information
Showing
5 changed files
with
181 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (c) 2002-2018 "Neo4j, Inc" | ||
* Network Engine for Objects in Lund AB [http://neotechnology.com] | ||
* | ||
* This file is part of Neo4j. | ||
* | ||
* Neo4j is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import styled from 'styled-components' | ||
import { FrameButton } from 'browser-components/buttons' | ||
import styles from './toggleStyles.css' | ||
|
||
export const StatusbarWrapper = styled.div`width: 100%;` | ||
|
||
export const StyledStatusBar = styled.div` | ||
min-height: 39px; | ||
line-height: 39px; | ||
color: #788185; | ||
background-color: #fff; | ||
white-space: nowrap; | ||
font-size: 13px; | ||
position: relative; | ||
float: right; | ||
overflow: hidden; | ||
border-top: 1px solid #e6e9ef; | ||
margin-bottom: -39px; | ||
padding-left: 16px; | ||
margin-top: 0; | ||
width: 100%; | ||
` | ||
|
||
export const RefreshQueriesButton = styled(FrameButton)`float: right;` | ||
|
||
export const AutoRefreshSpan = styled.span` | ||
float: right; | ||
margin-right: 5px; | ||
` | ||
|
||
const ToggleLabel = styled.label`cursor: pointer;` | ||
|
||
export const AutoRefreshToggle = props => { | ||
return ( | ||
<ToggleLabel> | ||
AUTO-REFRESH | ||
<input | ||
type='checkbox' | ||
checked={props.checked} | ||
onClick={props.onClick} | ||
className={styles['toggle-check-input']} | ||
/> | ||
<span className={styles['toggle-check-text']} /> | ||
</ToggleLabel> | ||
) | ||
} |
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,51 @@ | ||
.toggle-check-input { | ||
width: 1px; | ||
height: 1px; | ||
position: absolute; | ||
display:none; | ||
} | ||
|
||
.toggle-check-text { | ||
display: inline-block; | ||
position: relative; | ||
text-transform: uppercase; | ||
background: #CCC; | ||
padding: 0.25em 0.5em 0.25em 1.75em; | ||
border-radius: 1em; | ||
width: 50px; | ||
height: 21px; | ||
color: #FFF; | ||
cursor: pointer; | ||
transition: background-color 0.15s; | ||
line-height: initial; | ||
} | ||
.toggle-check-text:after { | ||
content: ' '; | ||
display: block; | ||
background: #FFF; | ||
width: 1.1em; | ||
height: 1.1em; | ||
border-radius: 1em; | ||
position: absolute; | ||
left: 0.3em; | ||
top: 0.25em; | ||
transition: left 0.15s, margin-left 0.15s; | ||
} | ||
.toggle-check-text:before { | ||
font-size: 90%; | ||
content: 'OFF'; | ||
} | ||
.toggle-check-input:checked ~ .toggle-check-text { | ||
color: #319113; | ||
padding-left: 0.5em; | ||
padding-right: 2em; | ||
} | ||
.toggle-check-input:checked ~ .toggle-check-text:before { | ||
font-size: 90%; | ||
content: 'ON'; | ||
} | ||
|
||
.toggle-check-input:checked ~ .toggle-check-text:after { | ||
left: 100%; | ||
margin-left: -1.4em; | ||
} |
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