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
d4c40e43
Commit
d4c40e43
authored
Feb 21, 2019
by
Dominik Prokop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imports updates
parent
529c1ea5
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
71 additions
and
61 deletions
+71
-61
packages/grafana-ui/src/components/ColorPicker/ColorInput.tsx
+2
-2
packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx
+3
-24
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx
+1
-1
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx
+17
-3
packages/grafana-ui/src/components/ColorPicker/NamedColorsGroup.tsx
+2
-1
packages/grafana-ui/src/components/ColorPicker/SeriesColorPickerPopover.tsx
+1
-2
packages/grafana-ui/src/components/ColorPicker/warnAboutColorPickerPropsDeprecation.ts
+9
-0
packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx
+2
-2
packages/grafana-ui/src/components/FormField/FormField.tsx
+1
-1
packages/grafana-ui/src/components/Gauge/Gauge.tsx
+4
-4
packages/grafana-ui/src/components/Select/Select.tsx
+1
-1
packages/grafana-ui/src/components/Switch/Switch.tsx
+2
-2
packages/grafana-ui/src/components/ValueMappingsEditor/MappingRow.tsx
+3
-1
packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.tsx
+1
-1
packages/grafana-ui/src/index.ts
+0
-1
packages/grafana-ui/src/themes/ThemeContext.tsx
+1
-1
packages/grafana-ui/src/themes/index.ts
+3
-0
packages/grafana-ui/src/utils/colors.ts
+12
-8
packages/grafana-ui/src/utils/namedColorsPalette.ts
+2
-2
packages/grafana-ui/src/utils/processTimeSeries.ts
+2
-2
packages/grafana-ui/src/utils/storybook/withTheme.tsx
+1
-1
public/app/core/utils/explore.ts
+1
-1
No files found.
packages/grafana-ui/src/components/ColorPicker/ColorInput.tsx
View file @
d4c40e43
import
React
from
'react'
;
import
React
from
'react'
;
import
{
ColorPickerProps
}
from
'./ColorPicker'
;
import
{
ColorPickerProps
}
from
'./ColorPicker
Popover
'
;
import
tinycolor
from
'tinycolor2'
;
import
tinycolor
from
'tinycolor2'
;
import
{
debounce
}
from
'lodash
'
;
import
debounce
from
'lodash/debounce
'
;
interface
ColorInputState
{
interface
ColorInputState
{
previousColor
:
string
;
previousColor
:
string
;
...
...
packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx
View file @
d4c40e43
import
React
,
{
Component
,
createRef
}
from
'react'
;
import
React
,
{
Component
,
createRef
}
from
'react'
;
import
{
PopperController
}
from
'../Tooltip/PopperController'
;
import
{
PopperController
}
from
'../Tooltip/PopperController'
;
import
{
Popper
}
from
'../Tooltip/Popper'
;
import
{
Popper
}
from
'../Tooltip/Popper'
;
import
{
ColorPickerPopover
}
from
'./ColorPickerPopover'
;
import
{
ColorPickerPopover
,
ColorPickerProps
,
ColorPickerChangeHandler
}
from
'./ColorPickerPopover'
;
import
{
Themeable
}
from
'../../types'
;
import
{
getColorFromHexRgbOrName
}
from
'../../utils/namedColorsPalette'
;
import
{
getColorFromHexRgbOrName
}
from
'../../utils/namedColorsPalette'
;
import
{
SeriesColorPickerPopover
}
from
'./SeriesColorPickerPopover'
;
import
{
SeriesColorPickerPopover
}
from
'./SeriesColorPickerPopover'
;
import
propDeprecationWarning
from
'../../utils/propDeprecationWarning'
;
import
{
withTheme
}
from
'../../themes/ThemeContext'
;
type
ColorPickerChangeHandler
=
(
color
:
string
)
=>
void
;
export
interface
ColorPickerProps
extends
Themeable
{
color
:
string
;
onChange
:
ColorPickerChangeHandler
;
/**
* @deprecated Use onChange instead
*/
onColorChange
?:
ColorPickerChangeHandler
;
enableNamedColors
?:
boolean
;
children
?:
JSX
.
Element
;
}
export
const
warnAboutColorPickerPropsDeprecation
=
(
componentName
:
string
,
props
:
ColorPickerProps
)
=>
{
import
{
withTheme
}
from
'../../themes/ThemeContext'
;
const
{
onColorChange
}
=
props
;
if
(
onColorChange
)
{
propDeprecationWarning
(
componentName
,
'onColorChange'
,
'onChange'
);
}
};
export
const
colorPickerFactory
=
<
T
extends
ColorPickerProps
>
(
export
const
colorPickerFactory
=
<
T
extends
ColorPickerProps
>
(
popover: React.ComponentType
<
T
>
,
popover: React.ComponentType
<
T
>
,
...
...
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.test.tsx
View file @
d4c40e43
...
@@ -3,7 +3,7 @@ import { mount, ReactWrapper } from 'enzyme';
...
@@ -3,7 +3,7 @@ import { mount, ReactWrapper } from 'enzyme';
import
{
ColorPickerPopover
}
from
'./ColorPickerPopover'
;
import
{
ColorPickerPopover
}
from
'./ColorPickerPopover'
;
import
{
getColorDefinitionByName
,
getNamedColorPalette
}
from
'../../utils/namedColorsPalette'
;
import
{
getColorDefinitionByName
,
getNamedColorPalette
}
from
'../../utils/namedColorsPalette'
;
import
{
ColorSwatch
}
from
'./NamedColorsGroup'
;
import
{
ColorSwatch
}
from
'./NamedColorsGroup'
;
import
{
flatten
}
from
'lodash
'
;
import
flatten
from
'lodash/flatten
'
;
import
{
GrafanaThemeType
}
from
'../../types'
;
import
{
GrafanaThemeType
}
from
'../../types'
;
import
{
getTheme
}
from
'../../themes'
;
import
{
getTheme
}
from
'../../themes'
;
...
...
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx
View file @
d4c40e43
import
React
from
'react'
;
import
React
from
'react'
;
import
{
NamedColorsPalette
}
from
'./NamedColorsPalette'
;
import
{
NamedColorsPalette
}
from
'./NamedColorsPalette'
;
import
{
getColorName
,
getColorFromHexRgbOrName
}
from
'../../utils/namedColorsPalette'
;
import
{
getColorName
,
getColorFromHexRgbOrName
}
from
'../../utils/namedColorsPalette'
;
import
{
ColorPickerProps
,
warnAboutColorPickerPropsDeprecation
}
from
'./ColorPicker'
;
import
{
PopperContentProps
}
from
'../Tooltip/PopperController'
;
import
{
PopperContentProps
}
from
'../Tooltip/PopperController'
;
import
SpectrumPalette
from
'./SpectrumPalette'
;
import
SpectrumPalette
from
'./SpectrumPalette'
;
import
{
GrafanaThemeType
}
from
'../../types/theme'
;
import
{
GrafanaThemeType
,
Themeable
}
from
'../../types/theme'
;
import
{
warnAboutColorPickerPropsDeprecation
}
from
'./warnAboutColorPickerPropsDeprecation'
;
export
type
ColorPickerChangeHandler
=
(
color
:
string
)
=>
void
;
export
interface
ColorPickerProps
extends
Themeable
{
color
:
string
;
onChange
:
ColorPickerChangeHandler
;
/**
* @deprecated Use onChange instead
*/
onColorChange
?:
ColorPickerChangeHandler
;
enableNamedColors
?:
boolean
;
children
?:
JSX
.
Element
;
}
export
interface
Props
<
T
>
extends
ColorPickerProps
,
PopperContentProps
{
export
interface
Props
<
T
>
extends
ColorPickerProps
,
PopperContentProps
{
customPickers
?:
T
;
customPickers
?:
T
;
}
}
type
PickerType
=
'palette'
|
'spectrum'
;
type
PickerType
=
'palette'
|
'spectrum'
;
interface
CustomPickersDescriptor
{
export
interface
CustomPickersDescriptor
{
[
key
:
string
]:
{
[
key
:
string
]:
{
tabComponent
:
React
.
ComponentType
<
ColorPickerProps
>
;
tabComponent
:
React
.
ComponentType
<
ColorPickerProps
>
;
name
:
string
;
name
:
string
;
};
};
}
}
interface
State
<
T
>
{
interface
State
<
T
>
{
activePicker
:
PickerType
|
keyof
T
;
activePicker
:
PickerType
|
keyof
T
;
}
}
...
...
packages/grafana-ui/src/components/ColorPicker/NamedColorsGroup.tsx
View file @
d4c40e43
...
@@ -2,7 +2,8 @@ import React, { FunctionComponent } from 'react';
...
@@ -2,7 +2,8 @@ import React, { FunctionComponent } from 'react';
import
{
Themeable
}
from
'../../types'
;
import
{
Themeable
}
from
'../../types'
;
import
{
ColorDefinition
,
getColorForTheme
}
from
'../../utils/namedColorsPalette'
;
import
{
ColorDefinition
,
getColorForTheme
}
from
'../../utils/namedColorsPalette'
;
import
{
Color
}
from
'csstype'
;
import
{
Color
}
from
'csstype'
;
import
{
find
,
upperFirst
}
from
'lodash'
;
import
upperFirst
from
'lodash/upperFirst'
;
import
find
from
'lodash/find'
;
import
{
selectThemeVariant
}
from
'../../themes/selectThemeVariant'
;
import
{
selectThemeVariant
}
from
'../../themes/selectThemeVariant'
;
type
ColorChangeHandler
=
(
color
:
ColorDefinition
)
=>
void
;
type
ColorChangeHandler
=
(
color
:
ColorDefinition
)
=>
void
;
...
...
packages/grafana-ui/src/components/ColorPicker/SeriesColorPickerPopover.tsx
View file @
d4c40e43
import
React
,
{
FunctionComponent
}
from
'react'
;
import
React
,
{
FunctionComponent
}
from
'react'
;
import
{
ColorPickerPopover
}
from
'./ColorPickerPopover'
;
import
{
ColorPickerPopover
,
ColorPickerProps
}
from
'./ColorPickerPopover'
;
import
{
ColorPickerProps
}
from
'./ColorPicker'
;
import
{
PopperContentProps
}
from
'../Tooltip/PopperController'
;
import
{
PopperContentProps
}
from
'../Tooltip/PopperController'
;
import
{
Switch
}
from
'../Switch/Switch'
;
import
{
Switch
}
from
'../Switch/Switch'
;
import
{
withTheme
}
from
'../../themes/ThemeContext'
;
import
{
withTheme
}
from
'../../themes/ThemeContext'
;
...
...
packages/grafana-ui/src/components/ColorPicker/warnAboutColorPickerPropsDeprecation.ts
0 → 100644
View file @
d4c40e43
import
propDeprecationWarning
from
'../../utils/propDeprecationWarning'
;
import
{
ColorPickerProps
}
from
'./ColorPickerPopover'
;
export
const
warnAboutColorPickerPropsDeprecation
=
(
componentName
:
string
,
props
:
ColorPickerProps
)
=>
{
const
{
onColorChange
}
=
props
;
if
(
onColorChange
)
{
propDeprecationWarning
(
componentName
,
'onColorChange'
,
'onChange'
);
}
};
packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx
View file @
d4c40e43
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
_
from
'lodash
'
;
import
isNil
from
'lodash/isNil
'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
Scrollbars
from
'react-custom-scrollbars'
;
import
Scrollbars
from
'react-custom-scrollbars'
;
...
@@ -41,7 +41,7 @@ export class CustomScrollbar extends PureComponent<Props> {
...
@@ -41,7 +41,7 @@ export class CustomScrollbar extends PureComponent<Props> {
updateScroll
()
{
updateScroll
()
{
const
ref
=
this
.
ref
.
current
;
const
ref
=
this
.
ref
.
current
;
if
(
ref
&&
!
_
.
isNil
(
this
.
props
.
scrollTop
))
{
if
(
ref
&&
!
isNil
(
this
.
props
.
scrollTop
))
{
if
(
this
.
props
.
scrollTop
>
10000
)
{
if
(
this
.
props
.
scrollTop
>
10000
)
{
ref
.
scrollToBottom
();
ref
.
scrollToBottom
();
}
else
{
}
else
{
...
...
packages/grafana-ui/src/components/FormField/FormField.tsx
View file @
d4c40e43
import
React
,
{
InputHTMLAttributes
,
FunctionComponent
}
from
'react'
;
import
React
,
{
InputHTMLAttributes
,
FunctionComponent
}
from
'react'
;
import
{
FormLabel
}
from
'..'
;
import
{
FormLabel
}
from
'..
/FormLabel/FormLabel
'
;
export
interface
Props
extends
InputHTMLAttributes
<
HTMLInputElement
>
{
export
interface
Props
extends
InputHTMLAttributes
<
HTMLInputElement
>
{
label
:
string
;
label
:
string
;
...
...
packages/grafana-ui/src/components/Gauge/Gauge.tsx
View file @
d4c40e43
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
$
from
'jquery'
;
import
$
from
'jquery'
;
import
{
ValueMapping
,
Threshold
,
BasicGaugeColor
,
GrafanaThemeType
}
from
'../../types'
;
import
{
getMappedValue
}
from
'../../utils/valueMappings'
;
import
{
getMappedValue
}
from
'../../utils/valueMappings'
;
import
{
getColorFromHexRgbOrName
,
getValueFormat
}
from
'../../utils'
;
import
{
getColorFromHexRgbOrName
}
from
'../../utils/namedColorsPalette'
;
import
{
Themeable
}
from
'../../index'
;
import
{
Themeable
,
GrafanaThemeType
}
from
'../../types/theme'
;
import
{
ValueMapping
,
Threshold
,
BasicGaugeColor
}
from
'../../types/panel'
;
import
{
getValueFormat
}
from
'../../utils/valueFormats/valueFormats'
;
type
TimeSeriesValue
=
string
|
number
|
null
;
type
TimeSeriesValue
=
string
|
number
|
null
;
...
...
packages/grafana-ui/src/components/Select/Select.tsx
View file @
d4c40e43
...
@@ -16,7 +16,7 @@ import SelectOptionGroup from './SelectOptionGroup';
...
@@ -16,7 +16,7 @@ import SelectOptionGroup from './SelectOptionGroup';
import
IndicatorsContainer
from
'./IndicatorsContainer'
;
import
IndicatorsContainer
from
'./IndicatorsContainer'
;
import
NoOptionsMessage
from
'./NoOptionsMessage'
;
import
NoOptionsMessage
from
'./NoOptionsMessage'
;
import
resetSelectStyles
from
'./resetSelectStyles'
;
import
resetSelectStyles
from
'./resetSelectStyles'
;
import
{
CustomScrollbar
}
from
'..'
;
import
{
CustomScrollbar
}
from
'..
/CustomScrollbar/CustomScrollbar
'
;
export
interface
SelectOptionItem
{
export
interface
SelectOptionItem
{
label
?:
string
;
label
?:
string
;
...
...
packages/grafana-ui/src/components/Switch/Switch.tsx
View file @
d4c40e43
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
_
from
'lodash
'
;
import
uniqueId
from
'lodash/uniqueId
'
;
export
interface
Props
{
export
interface
Props
{
label
:
string
;
label
:
string
;
...
@@ -17,7 +17,7 @@ export interface State {
...
@@ -17,7 +17,7 @@ export interface State {
export
class
Switch
extends
PureComponent
<
Props
,
State
>
{
export
class
Switch
extends
PureComponent
<
Props
,
State
>
{
state
=
{
state
=
{
id
:
_
.
uniqueId
(
'check-'
),
id
:
uniqueId
(
),
};
};
internalOnChange
=
(
event
:
React
.
FormEvent
<
HTMLInputElement
>
)
=>
{
internalOnChange
=
(
event
:
React
.
FormEvent
<
HTMLInputElement
>
)
=>
{
...
...
packages/grafana-ui/src/components/ValueMappingsEditor/MappingRow.tsx
View file @
d4c40e43
import
React
,
{
ChangeEvent
,
PureComponent
}
from
'react'
;
import
React
,
{
ChangeEvent
,
PureComponent
}
from
'react'
;
import
{
MappingType
,
ValueMapping
}
from
'../../types'
;
import
{
MappingType
,
ValueMapping
}
from
'../../types'
;
import
{
FormField
,
FormLabel
,
Select
}
from
'..'
;
import
{
Select
}
from
'../Select/Select'
;
import
{
FormField
}
from
'../FormField/FormField'
;
import
{
FormLabel
}
from
'../FormLabel/FormLabel'
;
export
interface
Props
{
export
interface
Props
{
valueMapping
:
ValueMapping
;
valueMapping
:
ValueMapping
;
...
...
packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.tsx
View file @
d4c40e43
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import
MappingRow
from
'./MappingRow'
;
import
MappingRow
from
'./MappingRow'
;
import
{
MappingType
,
ValueMapping
}
from
'../../types'
;
import
{
MappingType
,
ValueMapping
}
from
'../../types'
;
import
{
PanelOptionsGroup
}
from
'..'
;
import
{
PanelOptionsGroup
}
from
'..
/PanelOptionsGroup/PanelOptionsGroup
'
;
export
interface
Props
{
export
interface
Props
{
valueMappings
:
ValueMapping
[];
valueMappings
:
ValueMapping
[];
...
...
packages/grafana-ui/src/index.ts
View file @
d4c40e43
...
@@ -2,4 +2,3 @@ export * from './components';
...
@@ -2,4 +2,3 @@ export * from './components';
export
*
from
'./types'
;
export
*
from
'./types'
;
export
*
from
'./utils'
;
export
*
from
'./utils'
;
export
*
from
'./themes'
;
export
*
from
'./themes'
;
export
*
from
'./themes/ThemeContext'
;
packages/grafana-ui/src/themes/ThemeContext.tsx
View file @
d4c40e43
import
React
from
'react'
;
import
React
from
'react'
;
import
{
GrafanaThemeType
,
Themeable
}
from
'../types'
;
import
{
getTheme
}
from
'./index'
;
import
{
getTheme
}
from
'./index'
;
import
{
GrafanaThemeType
,
Themeable
}
from
'../types/theme'
;
type
Omit
<
T
,
K
>
=
Pick
<
T
,
Exclude
<
keyof
T
,
K
>>
;
type
Omit
<
T
,
K
>
=
Pick
<
T
,
Exclude
<
keyof
T
,
K
>>
;
type
Subtract
<
T
,
K
>
=
Omit
<
T
,
keyof
K
>
;
type
Subtract
<
T
,
K
>
=
Omit
<
T
,
keyof
K
>
;
...
...
packages/grafana-ui/src/themes/index.ts
View file @
d4c40e43
import
darkTheme
from
'./dark'
;
import
darkTheme
from
'./dark'
;
import
lightTheme
from
'./light'
;
import
lightTheme
from
'./light'
;
import
{
GrafanaTheme
}
from
'../types/theme'
;
import
{
GrafanaTheme
}
from
'../types/theme'
;
import
{
ThemeContext
,
withTheme
}
from
'./ThemeContext'
;
let
themeMock
:
((
name
?:
string
)
=>
GrafanaTheme
)
|
null
;
let
themeMock
:
((
name
?:
string
)
=>
GrafanaTheme
)
|
null
;
...
@@ -12,3 +13,5 @@ export const mockTheme = (mock: (name?: string) => GrafanaTheme) => {
...
@@ -12,3 +13,5 @@ export const mockTheme = (mock: (name?: string) => GrafanaTheme) => {
themeMock
=
null
;
themeMock
=
null
;
};
};
};
};
export
{
ThemeContext
,
withTheme
};
packages/grafana-ui/src/utils/colors.ts
View file @
d4c40e43
import
_
from
'lodash'
;
import
map
from
'lodash/map'
;
import
sortBy
from
'lodash/sortBy'
;
import
flattenDeep
from
'lodash/flattenDeep'
;
import
chunk
from
'lodash/chunk'
;
import
zip
from
'lodash/zip'
;
import
tinycolor
from
'tinycolor2'
;
import
tinycolor
from
'tinycolor2'
;
export
const
PALETTE_ROWS
=
4
;
export
const
PALETTE_ROWS
=
4
;
...
@@ -69,16 +73,16 @@ export const colors = [
...
@@ -69,16 +73,16 @@ export const colors = [
];
];
function
sortColorsByHue
(
hexColors
:
string
[])
{
function
sortColorsByHue
(
hexColors
:
string
[])
{
const
hslColors
=
_
.
map
(
hexColors
,
hexToHsl
);
const
hslColors
=
map
(
hexColors
,
hexToHsl
);
const
sortedHSLColors
=
_
.
sortBy
(
hslColors
,
[
'h'
]);
const
sortedHSLColors
=
sortBy
(
hslColors
,
[
'h'
]);
const
chunkedHSLColors
=
_
.
chunk
(
sortedHSLColors
,
PALETTE_ROWS
);
const
chunkedHSLColors
=
chunk
(
sortedHSLColors
,
PALETTE_ROWS
);
const
sortedChunkedHSLColors
=
_
.
map
(
chunkedHSLColors
,
chunk
=>
{
const
sortedChunkedHSLColors
=
map
(
chunkedHSLColors
,
chunk
=>
{
return
_
.
sortBy
(
chunk
,
'l'
);
return
sortBy
(
chunk
,
'l'
);
});
});
const
flattenedZippedSortedChunkedHSLColors
=
_
.
flattenDeep
(
_
.
zip
(...
sortedChunkedHSLColors
));
const
flattenedZippedSortedChunkedHSLColors
=
flattenDeep
(
zip
(...
sortedChunkedHSLColors
));
return
_
.
map
(
flattenedZippedSortedChunkedHSLColors
,
hslToHex
);
return
map
(
flattenedZippedSortedChunkedHSLColors
,
hslToHex
);
}
}
function
hexToHsl
(
color
:
string
)
{
function
hexToHsl
(
color
:
string
)
{
...
...
packages/grafana-ui/src/utils/namedColorsPalette.ts
View file @
d4c40e43
import
{
flatten
}
from
'lodash
'
;
import
flatten
from
'lodash/flatten
'
;
import
{
GrafanaThemeType
}
from
'../types'
;
import
{
GrafanaThemeType
}
from
'../types
/theme
'
;
import
tinycolor
from
'tinycolor2'
;
import
tinycolor
from
'tinycolor2'
;
type
Hue
=
'green'
|
'yellow'
|
'red'
|
'blue'
|
'orange'
|
'purple'
;
type
Hue
=
'green'
|
'yellow'
|
'red'
|
'blue'
|
'orange'
|
'purple'
;
...
...
packages/grafana-ui/src/utils/processTimeSeries.ts
View file @
d4c40e43
// Libraries
// Libraries
import
_
from
'lodash
'
;
import
isNumber
from
'lodash/isNumber
'
;
import
{
colors
}
from
'./colors'
;
import
{
colors
}
from
'./colors'
;
...
@@ -75,7 +75,7 @@ export function processTimeSeries({ timeSeries, nullValueMode }: Options): TimeS
...
@@ -75,7 +75,7 @@ export function processTimeSeries({ timeSeries, nullValueMode }: Options): TimeS
}
}
if
(
currentValue
!==
null
)
{
if
(
currentValue
!==
null
)
{
if
(
_
.
isNumber
(
currentValue
))
{
if
(
isNumber
(
currentValue
))
{
total
+=
currentValue
;
total
+=
currentValue
;
allIsNull
=
false
;
allIsNull
=
false
;
nonNulls
++
;
nonNulls
++
;
...
...
packages/grafana-ui/src/utils/storybook/withTheme.tsx
View file @
d4c40e43
...
@@ -2,7 +2,7 @@ import React from 'react';
...
@@ -2,7 +2,7 @@ import React from 'react';
import
{
RenderFunction
}
from
'@storybook/react'
;
import
{
RenderFunction
}
from
'@storybook/react'
;
import
{
ThemeContext
}
from
'../../themes/ThemeContext'
;
import
{
ThemeContext
}
from
'../../themes/ThemeContext'
;
import
{
select
}
from
'@storybook/addon-knobs'
;
import
{
select
}
from
'@storybook/addon-knobs'
;
import
{
getTheme
}
from
'../../themes'
;
import
{
getTheme
}
from
'../../themes
/index
'
;
import
{
GrafanaThemeType
}
from
'../../types'
;
import
{
GrafanaThemeType
}
from
'../../types'
;
const
ThemableStory
:
React
.
FunctionComponent
<
{}
>
=
({
children
})
=>
{
const
ThemableStory
:
React
.
FunctionComponent
<
{}
>
=
({
children
})
=>
{
...
...
public/app/core/utils/explore.ts
View file @
d4c40e43
...
@@ -11,7 +11,7 @@ import { colors } from '@grafana/ui';
...
@@ -11,7 +11,7 @@ import { colors } from '@grafana/ui';
import
TableModel
,
{
mergeTablesIntoModel
}
from
'app/core/table_model'
;
import
TableModel
,
{
mergeTablesIntoModel
}
from
'app/core/table_model'
;
// Types
// Types
import
{
RawTimeRange
,
IntervalValues
,
DataQuery
,
DataSourceApi
}
from
'@grafana/ui
/src/types
'
;
import
{
RawTimeRange
,
IntervalValues
,
DataQuery
,
DataSourceApi
}
from
'@grafana/ui'
;
import
TimeSeries
from
'app/core/time_series2'
;
import
TimeSeries
from
'app/core/time_series2'
;
import
{
import
{
ExploreUrlState
,
ExploreUrlState
,
...
...
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