@ -34,39 +34,37 @@ export interface Props {
const getStyles = stylesFactory ( ( theme : GrafanaTheme , height : number ) = > {
const bgColor = theme . isLight ? theme.palette.gray5 : theme.palette.dark4 ;
/* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */
const cardWidth = '100% - 134px' ;
const sliderHeight = ` ${ height - 180 } px ` ;
return {
container : css `
display : flex ;
. label - slider {
font - size : $ { theme . typography . size . sm } ;
& : last - of - type {
margin - top : $ { theme . spacing . lg } ;
}
& : first - of - type {
font - weight : $ { theme . typography . weight . semibold } ;
margin - bottom : $ { theme . spacing . m d} ;
}
` ,
labelSlider : css `
font - size : $ { theme . typography . size . sm } ;
& : last - of - type {
margin - top : $ { theme . spacing . lg } ;
}
& : first - of - type {
font - weight : $ { theme . typography . weight . semibol d} ;
margin - bottom : $ { theme . spacing . md } ;
}
` ,
containerContent : css `
width : calc ( $ { cardWidth } ) ;
/* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */
width : calc ( 100 % - 134 px ) ;
` ,
containerSlider : css `
width : 129px ;
margin - right : $ { theme . spacing . sm } ;
. slider {
bottom : 10px ;
height : $ { sliderHeight } ;
width : 129px ;
padding : $ { theme . spacing . sm } 0 ;
}
` ,
s lider : css `
fixedSlider : css `
position : fixed ;
` ,
slider : css `
bottom : 10px ;
height : $ { height - 180 } px ;
width : 129px ;
padding : $ { theme . spacing . sm } 0 ;
` ,
selectors : css `
display : flex ;
justify - content : space - between ;
@ -175,10 +173,10 @@ export function RichHistoryQueriesTab(props: Props) {
return (
< div className = { styles . container } >
< div className = { styles . containerSlider } >
< div className = { styles . s lider} >
< div className = "label-slider" > Filter history < / div >
< div className = "label-slider" > { mapNumbertoTimeInSlider ( richHistorySearchFilters . from ) } < / div >
< div className = "slider" >
< div className = { styles . fixedS lider} >
< div className = { styles . labelSlider } > Filter history < / div >
< div className = { styles . labelSlider } > { mapNumbertoTimeInSlider ( richHistorySearchFilters . from ) } < / div >
< div className = { styles . slider } >
< RangeSlider
tooltipAlwaysVisible = { false }
min = { 0 }
@ -192,7 +190,7 @@ export function RichHistoryQueriesTab(props: Props) {
} }
/ >
< / div >
< div className = "label-slider" > { mapNumbertoTimeInSlider ( richHistorySearchFilters . to ) } < / div >
< div className = { styles . labelSlider } > { mapNumbertoTimeInSlider ( richHistorySearchFilters . to ) } < / div >
< / div >
< / div >