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
f13a15ae
Unverified
Commit
f13a15ae
authored
May 11, 2020
by
Torkel Ödegaard
Committed by
GitHub
May 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TablePanel: Fixed persisting column resize time series fields (#24505)
parent
34f61934
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
public/app/plugins/panel/table/TablePanel.tsx
+11
-4
No files found.
public/app/plugins/panel/table/TablePanel.tsx
View file @
f13a15ae
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Table
,
Select
}
from
'@grafana/ui'
;
import
{
Table
,
Select
}
from
'@grafana/ui'
;
import
{
FieldMatcherID
,
PanelProps
,
DataFrame
,
SelectableValue
,
getFrameDisplayTitle
}
from
'@grafana/data'
;
import
{
FieldMatcherID
,
PanelProps
,
DataFrame
,
SelectableValue
,
getFrameDisplayTitle
,
getFieldTitle
,
}
from
'@grafana/data'
;
import
{
Options
}
from
'./types'
;
import
{
Options
}
from
'./types'
;
import
{
css
}
from
'emotion'
;
import
{
css
}
from
'emotion'
;
import
{
config
}
from
'app/core/config'
;
import
{
config
}
from
'app/core/config'
;
...
@@ -27,12 +34,12 @@ export class TablePanel extends Component<Props> {
...
@@ -27,12 +34,12 @@ export class TablePanel extends Component<Props> {
return
;
return
;
}
}
const
field
Name
=
field
.
name
;
const
field
DisplayName
=
getFieldTitle
(
field
,
frame
,
data
.
series
)
;
const
matcherId
=
FieldMatcherID
.
byName
;
const
matcherId
=
FieldMatcherID
.
byName
;
const
propId
=
'custom.width'
;
const
propId
=
'custom.width'
;
// look for existing override
// look for existing override
const
override
=
overrides
.
find
(
o
=>
o
.
matcher
.
id
===
matcherId
&&
o
.
matcher
.
options
===
fieldName
);
const
override
=
overrides
.
find
(
o
=>
o
.
matcher
.
id
===
matcherId
&&
o
.
matcher
.
options
===
field
Display
Name
);
if
(
override
)
{
if
(
override
)
{
// look for existing property
// look for existing property
...
@@ -44,7 +51,7 @@ export class TablePanel extends Component<Props> {
...
@@ -44,7 +51,7 @@ export class TablePanel extends Component<Props> {
}
}
}
else
{
}
else
{
overrides
.
push
({
overrides
.
push
({
matcher
:
{
id
:
matcherId
,
options
:
fieldName
},
matcher
:
{
id
:
matcherId
,
options
:
field
Display
Name
},
properties
:
[{
id
:
propId
,
value
:
width
}],
properties
:
[{
id
:
propId
,
value
:
width
}],
});
});
}
}
...
...
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