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
f8cef9b9
Commit
f8cef9b9
authored
Oct 07, 2019
by
Łukasz Siatka
Committed by
Lukas Siatka
Oct 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated live tail button - responsive fold
parent
33f8b36b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
12 deletions
+30
-12
public/app/features/explore/LiveTailButton.tsx
+18
-12
public/sass/pages/_explore.scss
+12
-0
No files found.
public/app/features/explore/LiveTailButton.tsx
View file @
f8cef9b9
...
...
@@ -5,7 +5,7 @@ import memoizeOne from 'memoize-one';
import
tinycolor
from
'tinycolor2'
;
import
{
CSSTransition
}
from
'react-transition-group'
;
import
{
GrafanaTheme
,
useTheme
}
from
'@grafana/ui'
;
import
{
GrafanaTheme
,
useTheme
,
Tooltip
}
from
'@grafana/ui'
;
const
getStyles
=
memoizeOne
((
theme
:
GrafanaTheme
)
=>
{
const
orangeLighter
=
tinycolor
(
theme
.
colors
.
orangeDark
)
...
...
@@ -91,6 +91,10 @@ const getStyles = memoizeOne((theme: GrafanaTheme) => {
};
});
const
defaultZoomOutTooltip
=
()
=>
{
return
<>
Live tailing
</>;
};
type
LiveTailButtonProps
=
{
start
:
()
=>
void
;
stop
:
()
=>
void
;
...
...
@@ -108,17 +112,19 @@ export function LiveTailButton(props: LiveTailButtonProps) {
return
(
<>
<
button
className=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
[
`btn--radius-right-0 ${styles.noRightBorderStyle}`
]:
isLive
,
[
styles
.
isLive
]:
isLive
&&
!
isPaused
,
[
styles
.
isPaused
]:
isLive
&&
isPaused
,
})
}
onClick=
{
onClickMain
}
>
<
i
className=
{
classNames
(
'fa'
,
isPaused
||
!
isLive
?
'fa-play'
:
'fa-pause'
)
}
/>
Live tailing
</
button
>
<
Tooltip
content=
{
defaultZoomOutTooltip
}
placement=
"bottom"
>
<
button
className=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
[
`btn--radius-right-0 ${styles.noRightBorderStyle}`
]:
isLive
,
[
styles
.
isLive
]:
isLive
&&
!
isPaused
,
[
styles
.
isPaused
]:
isLive
&&
isPaused
,
})
}
onClick=
{
onClickMain
}
>
<
i
className=
{
classNames
(
'fa'
,
isPaused
||
!
isLive
?
'fa-play'
:
'fa-pause'
)
}
/>
<
span
>
Live tailing
</
span
>
</
button
>
</
Tooltip
>
<
CSSTransition
mountOnEnter=
{
true
}
unmountOnExit=
{
true
}
...
...
public/sass/pages/_explore.scss
View file @
f8cef9b9
...
...
@@ -108,6 +108,18 @@
}
}
@media
only
screen
and
(
max-width
:
1400px
)
{
.explore-toolbar.splitted
{
.explore-toolbar-content-item
{
.navbar-button
{
span
{
display
:
none
;
}
}
}
}
}
@media
only
screen
and
(
max-width
:
1070px
)
{
.timepicker
{
.timepicker-rangestring
{
...
...
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