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
d2a54776
Commit
d2a54776
authored
Jan 24, 2019
by
Hugo Häggmark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed small issue with TimePicker dropdown position
parent
032a82fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
public/app/features/explore/Explore.tsx
+3
-0
public/app/features/explore/ExploreToolbar.tsx
+4
-12
public/sass/pages/_explore.scss
+6
-0
No files found.
public/app/features/explore/Explore.tsx
View file @
d2a54776
...
...
@@ -231,6 +231,8 @@ export class Explore extends React.PureComponent<ExploreProps> {
?
exploreDatasources
.
find
(
d
=>
d
.
name
===
datasourceInstance
.
name
)
:
undefined
;
const
timepicker
=
<
TimePicker
ref=
{
this
.
timepickerRef
}
range=
{
range
}
onChangeTime=
{
this
.
onChangeTime
}
/>;
return
(
<
div
className=
{
exploreClass
}
ref=
{
this
.
getRef
}
>
<
ExploreToolbar
...
...
@@ -241,6 +243,7 @@ export class Explore extends React.PureComponent<ExploreProps> {
range=
{
range
}
selectedDatasource=
{
selectedDatasource
}
splitted=
{
split
}
timepicker=
{
timepicker
}
onChangeDatasource=
{
this
.
onChangeDatasource
}
onClearAll=
{
this
.
onClickClear
}
onCloseSplit=
{
this
.
onClickCloseSplit
}
...
...
public/app/features/explore/ExploreToolbar.tsx
View file @
d2a54776
import
React
,
{
PureComponent
}
from
'react'
;
import
{
ExploreId
}
from
'app/types/explore'
;
import
{
DataSourceSelectItem
,
RawTimeRange
,
TimeRange
}
from
'@grafana/ui'
;
import
TimePicker
from
'./TimePicker'
;
import
{
DataSourcePicker
}
from
'app/core/components/Select/DataSourcePicker'
;
interface
Props
{
...
...
@@ -12,6 +11,7 @@ interface Props {
range
:
RawTimeRange
;
selectedDatasource
:
DataSourceSelectItem
;
splitted
:
boolean
;
timepicker
:
JSX
.
Element
;
onChangeDatasource
:
(
option
)
=>
void
;
onClearAll
:
()
=>
void
;
onCloseSplit
:
()
=>
void
;
...
...
@@ -56,22 +56,16 @@ const createSplittedClassName = (options: { splitted: boolean; className: string
};
export
class
ExploreToolbar
extends
PureComponent
<
Props
,
{}
>
{
/**
* Timepicker to control scanning
*/
timepickerRef
:
React
.
RefObject
<
TimePicker
>
;
constructor
(
props
)
{
super
(
props
);
this
.
timepickerRef
=
React
.
createRef
();
}
render
()
{
const
{
datasourceMissing
,
exploreId
,
loading
,
range
,
splitted
}
=
this
.
props
;
const
{
datasourceMissing
,
exploreId
,
loading
,
splitted
,
timepicker
}
=
this
.
props
;
const
toolbar
=
createSplittedClassName
({
splitted
,
className
:
'toolbar'
});
const
toolbarItem
=
createSplittedClassName
({
splitted
,
className
:
'toolbar-item'
});
const
toolbarHeader
=
createSplittedClassName
({
splitted
,
className
:
'toolbar-header'
});
const
timepicker
=
createSplittedClassName
({
splitted
,
className
:
'toolbar-content-item timepicker'
});
const
timepicker
Classes
=
createSplittedClassName
({
splitted
,
className
:
'toolbar-content-item timepicker'
});
return
(
<
div
className=
{
toolbar
}
>
...
...
@@ -121,9 +115,7 @@ export class ExploreToolbar extends PureComponent<Props, {}> {
})
}
</
div
>
)
:
null
}
<
div
className=
{
timepicker
}
>
<
TimePicker
ref=
{
this
.
timepickerRef
}
range=
{
range
}
onChangeTime=
{
this
.
props
.
onChangeTime
}
/>
</
div
>
<
div
className=
{
timepickerClasses
}
>
{
timepicker
}
</
div
>
<
div
className=
"toolbar-content-item"
>
<
button
className=
"btn navbar-button navbar-button--no-icon"
onClick=
{
this
.
props
.
onClearAll
}
>
Clear All
...
...
public/sass/pages/_explore.scss
View file @
d2a54776
...
...
@@ -2,6 +2,7 @@
display
:
none
;
}
.timepicker-splitted
,
.timepicker
{
display
:
flex
;
}
...
...
@@ -32,6 +33,10 @@
justify-content
:
space-between
;
height
:
auto
;
padding
:
0px
$dashboard-padding
;
border-bottom
:
1px
solid
#0000
;
transition-duration
:
0
.35s
;
transition-timing-function
:
ease-in-out
;
transition-property
:
box-shadow
,
border-bottom
;
}
.toolbar
{
...
...
@@ -44,6 +49,7 @@
.toolbar-item-splitted
,
.toolbar-item
{
position
:
relative
;
align-self
:
center
;
}
...
...
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