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
76267754
Unverified
Commit
76267754
authored
Apr 24, 2018
by
Marcus Efraimsson
Committed by
GitHub
Apr 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11695 from grafana/11508_variables_preview_values
allow to show more preview values for variables
parents
d36efddc
a4031402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
public/app/features/templating/editor_ctrl.ts
+6
-0
public/app/features/templating/partials/editor.html
+7
-4
No files found.
public/app/features/templating/editor_ctrl.ts
View file @
76267754
...
...
@@ -10,6 +10,7 @@ export class VariableEditorCtrl {
$scope
.
ctrl
=
{};
$scope
.
namePattern
=
/^
(?!
__
)
.*$/
;
$scope
.
_
=
_
;
$scope
.
optionsLimit
=
20
;
$scope
.
refreshOptions
=
[
{
value
:
0
,
text
:
'Never'
},
...
...
@@ -96,6 +97,7 @@ export class VariableEditorCtrl {
};
$scope
.
runQuery
=
function
()
{
$scope
.
optionsLimit
=
20
;
return
variableSrv
.
updateOptions
(
$scope
.
current
).
catch
(
err
=>
{
if
(
err
.
data
&&
err
.
data
.
message
)
{
err
.
message
=
err
.
data
.
message
;
...
...
@@ -165,6 +167,10 @@ export class VariableEditorCtrl {
$scope
.
removeVariable
=
function
(
variable
)
{
variableSrv
.
removeVariable
(
variable
);
};
$scope
.
showMoreOptions
=
function
()
{
$scope
.
optionsLimit
+=
20
;
};
}
}
...
...
public/app/features/templating/partials/editor.html
View file @
76267754
...
...
@@ -280,11 +280,14 @@
</div>
<div
class=
"gf-form-group"
ng-show=
"current.options.length"
>
<h5>
Preview of values
(shows max 20)
</h5>
<h5>
Preview of values
</h5>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
ng-repeat=
"option in current.options | limitTo: 20"
>
<span
class=
"gf-form-label"
>
{{option.text}}
</span>
</div>
<div
class=
"gf-form"
ng-repeat=
"option in current.options | limitTo: optionsLimit"
>
<span
class=
"gf-form-label"
>
{{option.text}}
</span>
</div>
<div
class=
"gf-form"
ng-if=
"current.options.length > optionsLimit"
>
<a
class=
"gf-form-label btn-secondary"
ng-click=
"showMoreOptions()"
>
Show more
</a>
</div>
</div>
</div>
...
...
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