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
61463aa1
Unverified
Commit
61463aa1
authored
Sep 11, 2020
by
Torkel Ödegaard
Committed by
GitHub
Sep 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transform: Fixed issue in labels to fields and update docs (#27501)
parent
6932b459
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
docs/sources/panels/transformations.md
+0
-0
packages/grafana-data/src/transformations/transformers/labelsToFields.test.ts
+10
-1
packages/grafana-data/src/transformations/transformers/labelsToFields.ts
+2
-0
No files found.
docs/sources/panels/transformations.md
View file @
61463aa1
This diff is collapsed.
Click to expand it.
packages/grafana-data/src/transformations/transformers/labelsToFields.test.ts
View file @
61463aa1
...
@@ -50,7 +50,16 @@ describe('Labels as Columns', () => {
...
@@ -50,7 +50,16 @@ describe('Labels as Columns', () => {
name
:
'A'
,
name
:
'A'
,
fields
:
[
fields
:
[
{
name
:
'time'
,
type
:
FieldType
.
time
,
values
:
[
1000
,
2000
]
},
{
name
:
'time'
,
type
:
FieldType
.
time
,
values
:
[
1000
,
2000
]
},
{
name
:
'Value'
,
type
:
FieldType
.
number
,
values
:
[
1
,
2
],
labels
:
{
location
:
'inside'
,
name
:
'Request'
}
},
{
name
:
'Value'
,
type
:
FieldType
.
number
,
values
:
[
1
,
2
],
labels
:
{
location
:
'inside'
,
name
:
'Request'
},
config
:
{
displayName
:
'Custom1'
,
displayNameFromDS
:
'Custom2'
,
},
},
],
],
});
});
...
...
packages/grafana-data/src/transformations/transformers/labelsToFields.ts
View file @
61463aa1
...
@@ -51,7 +51,9 @@ export const labelsToFieldsTransformer: DataTransformerInfo<LabelsToFieldsOption
...
@@ -51,7 +51,9 @@ export const labelsToFieldsTransformer: DataTransformerInfo<LabelsToFieldsOption
name
,
name
,
config
:
{
config
:
{
...
field
.
config
,
...
field
.
config
,
// we need to clear thes for this transform as these can contain label names that we no longer want
displayName
:
undefined
,
displayName
:
undefined
,
displayNameFromDS
:
undefined
,
},
},
labels
:
undefined
,
labels
:
undefined
,
});
});
...
...
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