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
f768808b
Commit
f768808b
authored
Feb 23, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed value dropdown not updating when it's current value updates, fixes #15566
parent
8f620824
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
public/app/core/directives/value_select_dropdown.ts
+8
-8
public/app/features/dashboard/components/SubMenu/template.html
+1
-1
No files found.
public/app/core/directives/value_select_dropdown.ts
View file @
f768808b
...
@@ -240,7 +240,7 @@ export class ValueSelectDropdownCtrl {
...
@@ -240,7 +240,7 @@ export class ValueSelectDropdownCtrl {
/** @ngInject */
/** @ngInject */
export
function
valueSelectDropdown
(
$compile
,
$window
,
$timeout
,
$rootScope
)
{
export
function
valueSelectDropdown
(
$compile
,
$window
,
$timeout
,
$rootScope
)
{
return
{
return
{
scope
:
{
variable
:
'='
,
onUpdated
:
'&'
},
scope
:
{
dashboard
:
'='
,
variable
:
'='
,
onUpdated
:
'&'
},
templateUrl
:
'public/app/partials/valueSelectDropdown.html'
,
templateUrl
:
'public/app/partials/valueSelectDropdown.html'
,
controller
:
'ValueSelectDropdownCtrl'
,
controller
:
'ValueSelectDropdownCtrl'
,
controllerAs
:
'vm'
,
controllerAs
:
'vm'
,
...
@@ -288,13 +288,13 @@ export function valueSelectDropdown($compile, $window, $timeout, $rootScope) {
...
@@ -288,13 +288,13 @@ export function valueSelectDropdown($compile, $window, $timeout, $rootScope) {
}
}
});
});
const
cleanUp
=
$rootScope
.
$on
(
'template-variable-value-updated'
,
()
=>
{
scope
.
vm
.
dashboard
.
on
(
scope
.
vm
.
updateLinkText
();
'template-variable-value-updated'
,
});
()
=>
{
scope
.
vm
.
updateLinkText
();
scope
.
$on
(
'$destroy'
,
()
=>
{
},
cleanUp
();
scope
}
);
);
scope
.
vm
.
init
();
scope
.
vm
.
init
();
},
},
...
...
public/app/features/dashboard/components/SubMenu/template.html
View file @
f768808b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<label
class=
"gf-form-label template-variable"
ng-hide=
"variable.hide === 1"
>
<label
class=
"gf-form-label template-variable"
ng-hide=
"variable.hide === 1"
>
{{variable.label || variable.name}}
{{variable.label || variable.name}}
</label>
</label>
<value-select-dropdown
ng-if=
"variable.type !== 'adhoc' && variable.type !== 'textbox'"
variable=
"variable"
on-updated=
"ctrl.variableUpdated(variable)"
></value-select-dropdown>
<value-select-dropdown
ng-if=
"variable.type !== 'adhoc' && variable.type !== 'textbox'"
dashboard=
"ctrl.dashboard"
variable=
"variable"
on-updated=
"ctrl.variableUpdated(variable)"
></value-select-dropdown>
<input
type=
"text"
ng-if=
"variable.type === 'textbox'"
ng-model=
"variable.query"
class=
"gf-form-input width-12"
ng-blur=
"variable.current.value != variable.query && variable.updateOptions() && ctrl.variableUpdated(variable);"
ng-keydown=
"$event.keyCode === 13 && variable.current.value != variable.query && variable.updateOptions() && ctrl.variableUpdated(variable);"
></input>
<input
type=
"text"
ng-if=
"variable.type === 'textbox'"
ng-model=
"variable.query"
class=
"gf-form-input width-12"
ng-blur=
"variable.current.value != variable.query && variable.updateOptions() && ctrl.variableUpdated(variable);"
ng-keydown=
"$event.keyCode === 13 && variable.current.value != variable.query && variable.updateOptions() && ctrl.variableUpdated(variable);"
></input>
</div>
</div>
<ad-hoc-filters
ng-if=
"variable.type === 'adhoc'"
variable=
"variable"
dashboard=
"ctrl.dashboard"
></ad-hoc-filters>
<ad-hoc-filters
ng-if=
"variable.type === 'adhoc'"
variable=
"variable"
dashboard=
"ctrl.dashboard"
></ad-hoc-filters>
...
...
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