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
b5ad2ebe
Unverified
Commit
b5ad2ebe
authored
Jul 22, 2019
by
Ryan McKinley
Committed by
GitHub
Jul 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo: fix threshodsWithoutKey (#18228)
parent
ea0cee4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx
+2
-2
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx
+2
-2
No files found.
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx
View file @
b5ad2ebe
import
React
,
{
ChangeEvent
}
from
'react'
;
import
React
,
{
ChangeEvent
}
from
'react'
;
import
{
mount
}
from
'enzyme'
;
import
{
mount
}
from
'enzyme'
;
import
{
ThresholdsEditor
,
Props
,
threshodsWithoutKey
}
from
'./ThresholdsEditor'
;
import
{
ThresholdsEditor
,
Props
,
thresho
l
dsWithoutKey
}
from
'./ThresholdsEditor'
;
import
{
colors
}
from
'../../utils'
;
import
{
colors
}
from
'../../utils'
;
const
setup
=
(
propOverrides
?:
Partial
<
Props
>
)
=>
{
const
setup
=
(
propOverrides
?:
Partial
<
Props
>
)
=>
{
...
@@ -21,7 +21,7 @@ const setup = (propOverrides?: Partial<Props>) => {
...
@@ -21,7 +21,7 @@ const setup = (propOverrides?: Partial<Props>) => {
};
};
function
getCurrentThresholds
(
editor
:
ThresholdsEditor
)
{
function
getCurrentThresholds
(
editor
:
ThresholdsEditor
)
{
return
threshodsWithoutKey
(
editor
.
state
.
thresholds
);
return
thresho
l
dsWithoutKey
(
editor
.
state
.
thresholds
);
}
}
describe
(
'Render'
,
()
=>
{
describe
(
'Render'
,
()
=>
{
...
...
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx
View file @
b5ad2ebe
...
@@ -155,7 +155,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
...
@@ -155,7 +155,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
onChange
=
()
=>
{
onChange
=
()
=>
{
const
{
thresholds
}
=
this
.
state
;
const
{
thresholds
}
=
this
.
state
;
this
.
props
.
onChange
(
threshodsWithoutKey
(
thresholds
));
this
.
props
.
onChange
(
thresho
l
dsWithoutKey
(
thresholds
));
};
};
renderInput
=
(
threshold
:
ThresholdWithKey
)
=>
{
renderInput
=
(
threshold
:
ThresholdWithKey
)
=>
{
...
@@ -231,7 +231,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
...
@@ -231,7 +231,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
}
}
}
}
export
function
threshodsWithoutKey
(
thresholds
:
ThresholdWithKey
[]):
Threshold
[]
{
export
function
thresho
l
dsWithoutKey
(
thresholds
:
ThresholdWithKey
[]):
Threshold
[]
{
return
thresholds
.
map
(
t
=>
{
return
thresholds
.
map
(
t
=>
{
const
{
key
,
...
rest
}
=
t
;
const
{
key
,
...
rest
}
=
t
;
return
rest
;
// everything except key
return
rest
;
// everything except key
...
...
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