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
f60f1c3f
Unverified
Commit
f60f1c3f
authored
Sep 29, 2020
by
Ryan McKinley
Committed by
GitHub
Sep 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: use Array.isArray rather than lodash (#27898)
parent
71a01a10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
packages/grafana-data/src/dataframe/MutableDataFrame.ts
+1
-2
packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx
+1
-2
No files found.
packages/grafana-data/src/dataframe/MutableDataFrame.ts
View file @
f60f1c3f
import
{
Field
,
DataFrame
,
DataFrameDTO
,
FieldDTO
,
FieldType
}
from
'../types/dataFrame'
;
import
{
Field
,
DataFrame
,
DataFrameDTO
,
FieldDTO
,
FieldType
}
from
'../types/dataFrame'
;
import
{
KeyValue
,
QueryResultMeta
}
from
'../types/data'
;
import
{
KeyValue
,
QueryResultMeta
}
from
'../types/data'
;
import
{
guessFieldTypeFromValue
,
guessFieldTypeForField
,
toDataFrameDTO
}
from
'./processDataFrame'
;
import
{
guessFieldTypeFromValue
,
guessFieldTypeForField
,
toDataFrameDTO
}
from
'./processDataFrame'
;
import
isArray
from
'lodash/isArray'
;
import
isString
from
'lodash/isString'
;
import
isString
from
'lodash/isString'
;
import
{
makeFieldParser
}
from
'../utils/fieldParser'
;
import
{
makeFieldParser
}
from
'../utils/fieldParser'
;
import
{
MutableVector
,
Vector
}
from
'../types/vector'
;
import
{
MutableVector
,
Vector
}
from
'../types/vector'
;
...
@@ -79,7 +78,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
...
@@ -79,7 +78,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
let
buffer
:
any
[]
|
undefined
=
undefined
;
let
buffer
:
any
[]
|
undefined
=
undefined
;
if
(
f
.
values
)
{
if
(
f
.
values
)
{
if
(
isArray
(
f
.
values
))
{
if
(
Array
.
isArray
(
f
.
values
))
{
buffer
=
f
.
values
as
any
[];
buffer
=
f
.
values
as
any
[];
}
else
{
}
else
{
buffer
=
(
f
.
values
as
Vector
).
toArray
();
buffer
=
(
f
.
values
as
Vector
).
toArray
();
...
...
packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx
View file @
f60f1c3f
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
isArray
from
'lodash/isArray'
;
import
difference
from
'lodash/difference'
;
import
difference
from
'lodash/difference'
;
import
{
Select
}
from
'../Select/Select'
;
import
{
Select
}
from
'../Select/Select'
;
...
@@ -55,7 +54,7 @@ export class StatsPicker extends PureComponent<Props> {
...
@@ -55,7 +54,7 @@ export class StatsPicker extends PureComponent<Props> {
onSelectionChange
=
(
item
:
SelectableValue
<
string
>
)
=>
{
onSelectionChange
=
(
item
:
SelectableValue
<
string
>
)
=>
{
const
{
onChange
}
=
this
.
props
;
const
{
onChange
}
=
this
.
props
;
if
(
isArray
(
item
))
{
if
(
Array
.
isArray
(
item
))
{
onChange
(
item
.
map
(
v
=>
v
.
value
));
onChange
(
item
.
map
(
v
=>
v
.
value
));
}
else
{
}
else
{
onChange
(
item
&&
item
.
value
?
[
item
.
value
]
:
[]);
onChange
(
item
&&
item
.
value
?
[
item
.
value
]
:
[]);
...
...
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