Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f0264ebe
Commit
f0264ebe
authored
Oct 10, 2019
by
Łukasz Siatka
Committed by
Lukas Siatka
Oct 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explore: updates live button to responsive button
parent
8d9197be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
public/app/features/explore/ExploreToolbar.tsx
+1
-0
public/app/features/explore/LiveTailButton.tsx
+9
-7
No files found.
public/app/features/explore/ExploreToolbar.tsx
View file @
f0264ebe
...
...
@@ -304,6 +304,7 @@ export class UnConnectedExploreToolbar extends PureComponent<Props, {}> {
<
LiveTailControls
exploreId=
{
exploreId
}
>
{
controls
=>
(
<
LiveTailButton
splitted=
{
splitted
}
isLive=
{
isLive
}
isPaused=
{
isPaused
}
start=
{
controls
.
start
}
...
...
public/app/features/explore/LiveTailButton.tsx
View file @
f0264ebe
...
...
@@ -4,6 +4,7 @@ import { css } from 'emotion';
import
memoizeOne
from
'memoize-one'
;
import
tinycolor
from
'tinycolor2'
;
import
{
CSSTransition
}
from
'react-transition-group'
;
import
{
ResponsiveButton
}
from
'./ResponsiveButton'
;
import
{
GrafanaTheme
,
useTheme
,
Tooltip
}
from
'@grafana/ui'
;
...
...
@@ -96,6 +97,7 @@ const defaultLiveTooltip = () => {
};
type
LiveTailButtonProps
=
{
splitted
:
boolean
;
start
:
()
=>
void
;
stop
:
()
=>
void
;
pause
:
()
=>
void
;
...
...
@@ -104,7 +106,7 @@ type LiveTailButtonProps = {
isPaused
:
boolean
;
};
export
function
LiveTailButton
(
props
:
LiveTailButtonProps
)
{
const
{
start
,
pause
,
resume
,
isLive
,
isPaused
,
stop
}
=
props
;
const
{
start
,
pause
,
resume
,
isLive
,
isPaused
,
stop
,
splitted
}
=
props
;
const
theme
=
useTheme
();
const
styles
=
getStyles
(
theme
);
...
...
@@ -113,17 +115,17 @@ export function LiveTailButton(props: LiveTailButtonProps) {
return
(
<>
<
Tooltip
content=
{
defaultLiveTooltip
}
placement=
"bottom"
>
<
button
className=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
<
ResponsiveButton
splitted=
{
splitted
}
buttonClassName=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
[
`btn--radius-right-0 ${styles.noRightBorderStyle}`
]:
isLive
,
[
styles
.
isLive
]:
isLive
&&
!
isPaused
,
[
styles
.
isPaused
]:
isLive
&&
isPaused
,
})
}
iconClassName=
{
classNames
(
'fa'
,
isPaused
||
!
isLive
?
'fa-play'
:
'fa-pause'
)
}
onClick=
{
onClickMain
}
>
<
i
className=
{
classNames
(
'fa'
,
isPaused
||
!
isLive
?
'fa-play'
:
'fa-pause'
)
}
/>
<
span
>
Live
</
span
>
</
button
>
title=
{
'
\
xa0Live'
}
/>
</
Tooltip
>
<
CSSTransition
mountOnEnter=
{
true
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment