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
a9cfb160
Commit
a9cfb160
authored
Aug 20, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added typeahead to series overrides, #425
parent
468c9a90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
src/app/components/timeSeries.js
+2
-0
src/app/panels/graph/seriesOverridesCtrl.js
+6
-0
src/app/panels/graph/styleEditor.html
+5
-3
No files found.
src/app/components/timeSeries.js
View file @
a9cfb160
...
@@ -12,6 +12,8 @@ function (_, kbn) {
...
@@ -12,6 +12,8 @@ function (_, kbn) {
}
}
function
matchSeriesOverride
(
aliasOrRegex
,
seriesAlias
)
{
function
matchSeriesOverride
(
aliasOrRegex
,
seriesAlias
)
{
if
(
!
aliasOrRegex
)
{
return
false
;
}
if
(
aliasOrRegex
[
0
]
===
'/'
)
{
if
(
aliasOrRegex
[
0
]
===
'/'
)
{
var
match
=
aliasOrRegex
.
match
(
new
RegExp
(
'^/(.*?)/(g?i?m?y?)$'
));
var
match
=
aliasOrRegex
.
match
(
new
RegExp
(
'^/(.*?)/(g?i?m?y?)$'
));
var
regex
=
new
RegExp
(
match
[
1
],
match
[
2
]);
var
regex
=
new
RegExp
(
match
[
1
],
match
[
2
]);
...
...
src/app/panels/graph/seriesOverridesCtrl.js
View file @
a9cfb160
...
@@ -44,6 +44,12 @@ define([
...
@@ -44,6 +44,12 @@ define([
$scope
.
render
();
$scope
.
render
();
};
};
$scope
.
getSeriesNames
=
function
()
{
return
_
.
map
(
$scope
.
legend
,
function
(
info
)
{
return
info
.
alias
;
});
};
$scope
.
updateCurrentOverrides
=
function
()
{
$scope
.
updateCurrentOverrides
=
function
()
{
$scope
.
currentOverrides
=
[];
$scope
.
currentOverrides
=
[];
_
.
each
(
$scope
.
overrideMenu
,
function
(
option
)
{
_
.
each
(
$scope
.
overrideMenu
,
function
(
option
)
{
...
...
src/app/panels/graph/styleEditor.html
View file @
a9cfb160
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
<div
class=
"grafana-target-inner"
>
<div
class=
"grafana-target-inner"
>
<ul
class=
"grafana-target-controls-left"
>
<ul
class=
"grafana-target-controls-left"
>
<li
class=
"grafana-target-segment
>"
<li
class=
"grafana-target-segment
"
>
<
i
class=
"icon-remove"
ng-click=
"removeSeriesOverride(override)"
></i>
<i
class=
"icon-remove
pointer
"
ng-click=
"removeSeriesOverride(override)"
></i>
</li>
</li>
</ul>
</ul>
...
@@ -84,7 +84,9 @@
...
@@ -84,7 +84,9 @@
<li>
<li>
<input
type=
"text"
<input
type=
"text"
ng-model=
"override.alias"
ng-model=
"override.alias"
ng-model-onblur
ng-change=
"render()"
bs-typeahead=
"getSeriesNames"
ng-blur=
"render()"
data-min-length=
0
data-items=
100
class=
"input-medium grafana-target-segment-input"
>
class=
"input-medium grafana-target-segment-input"
>
</li>
</li>
<li
class=
"grafana-target-segment"
ng-repeat=
"option in currentOverrides"
>
<li
class=
"grafana-target-segment"
ng-repeat=
"option in currentOverrides"
>
...
...
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