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
c712b4f8
Commit
c712b4f8
authored
Oct 01, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SeriesOverrides: Fixed issue with color picker
parent
fc228200
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
public/app/plugins/panel/graph/series_overrides_ctrl.ts
+12
-8
No files found.
public/app/plugins/panel/graph/series_overrides_ctrl.ts
View file @
c712b4f8
...
...
@@ -6,6 +6,7 @@ export function SeriesOverridesCtrl($scope: any, $element: JQuery, popoverSrv: a
$scope
.
overrideMenu
=
[];
$scope
.
currentOverrides
=
[];
$scope
.
override
=
$scope
.
override
||
{};
$scope
.
colorPickerModel
=
{};
$scope
.
addOverrideOption
=
(
name
:
string
,
propertyName
:
string
,
values
:
any
)
=>
{
const
option
=
{
...
...
@@ -45,22 +46,25 @@ export function SeriesOverridesCtrl($scope: any, $element: JQuery, popoverSrv: a
$scope
.
override
[
'color'
]
=
color
;
$scope
.
updateCurrentOverrides
();
$scope
.
ctrl
.
render
();
// update picker model so that the picker UI will also update
$scope
.
colorPickerModel
.
series
.
color
=
color
;
};
$scope
.
openColorSelector
=
(
color
:
any
)
=>
{
const
fakeSeries
=
{
color
};
$scope
.
colorPickerModel
=
{
autoClose
:
true
,
colorSelected
:
$scope
.
colorSelected
,
series
:
{
color
},
};
popoverSrv
.
show
({
element
:
$element
.
find
(
'.dropdown'
)[
0
],
position
:
'top center'
,
openOn
:
'click'
,
template
:
'<series-color-picker-popover color="color" onColorChange="colorSelected" />'
,
template
:
'<series-color-picker-popover color="
series.
color" onColorChange="colorSelected" />'
,
classNames
:
'drop-popover drop-popover--transparent'
,
model
:
{
autoClose
:
true
,
colorSelected
:
$scope
.
colorSelected
,
series
:
fakeSeries
,
color
,
},
model
:
$scope
.
colorPickerModel
,
onClose
:
()
=>
{
$scope
.
ctrl
.
render
();
},
...
...
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