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
c39f9ed2
Commit
c39f9ed2
authored
Jan 12, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More work on refactoring and changing graph axis edit view, #1331
parent
3a27b610
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
19 deletions
+30
-19
src/app/directives/dropdown.typeahead.js
+1
-1
src/app/directives/ngModelOnBlur.js
+12
-0
src/app/panels/graph/axisEditor.html
+16
-6
src/app/panels/graph/module.js
+0
-5
src/test/specs/seriesOverridesCtrl-specs.js
+1
-7
No files found.
src/app/directives/dropdown.typeahead.js
View file @
c39f9ed2
...
...
@@ -37,7 +37,7 @@ function (angular, app, _, $) {
if
(
attrs
.
ngModel
)
{
$scope
.
$watch
(
'model'
,
function
(
newValue
)
{
_
.
each
(
$scope
.
menuItems
,
function
(
item
){
_
.
each
(
$scope
.
menuItems
,
function
(
item
)
{
_
.
each
(
item
.
submenu
,
function
(
subItem
)
{
if
(
subItem
.
value
===
newValue
)
{
$button
.
html
(
subItem
.
text
);
...
...
src/app/directives/ngModelOnBlur.js
View file @
c39f9ed2
...
...
@@ -22,5 +22,17 @@ function (angular) {
});
}
};
})
.
directive
(
'emptyToNull'
,
function
()
{
return
{
restrict
:
'A'
,
require
:
'ngModel'
,
link
:
function
(
scope
,
elm
,
attrs
,
ctrl
)
{
ctrl
.
$parsers
.
push
(
function
(
viewValue
)
{
if
(
viewValue
===
""
)
{
return
null
;
}
return
viewValue
;
});
}
};
});
});
src/app/panels/graph/axisEditor.html
View file @
c39f9ed2
...
...
@@ -19,19 +19,24 @@
Grid Max
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
empty-to-null
ng-model=
"panel.grid.leftMax"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Min
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
empty-to-null
ng-model=
"panel.grid.leftMin"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Label
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
value=
""
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
ng-model=
"panel.leftYAxisLabel"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Show
...
...
@@ -56,19 +61,24 @@
Grid Max
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
empty-to-null
ng-model=
"panel.grid.rightMax"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Min
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
empty-to-null
ng-model=
"panel.grid.rightMin"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Label
</li>
<li>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
value=
""
>
<input
type=
"text"
class=
"input-small grafana-target-segment-input"
placeholder=
"auto"
ng-model=
"panel.rightYAxisLabel"
ng-change=
"render()"
ng-model-onblur
>
</li>
<li
class=
"grafana-target-segment"
>
Show
...
...
src/app/panels/graph/module.js
View file @
c39f9ed2
...
...
@@ -268,11 +268,6 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
$scope
.
render
();
};
$scope
.
toggleGridMinMax
=
function
(
key
)
{
$scope
.
panel
.
grid
[
key
]
=
_
.
toggle
(
$scope
.
panel
.
grid
[
key
],
null
,
0
);
$scope
.
render
();
};
$scope
.
addSeriesOverride
=
function
(
override
)
{
$scope
.
panel
.
seriesOverrides
.
push
(
override
||
{});
};
...
...
src/test/specs/seriesOverridesCtrl-specs.js
View file @
c39f9ed2
...
...
@@ -16,15 +16,9 @@ define([
ctx
.
scope
.
render
=
function
()
{};
});
describe
(
'Controller should init overrideMenu'
,
function
()
{
it
(
'click should include option and value index'
,
function
()
{
expect
(
ctx
.
scope
.
overrideMenu
[
1
].
submenu
[
1
].
click
).
to
.
be
(
'menuItemSelected(1,1)'
);
});
});
describe
(
'When setting an override'
,
function
()
{
beforeEach
(
function
()
{
ctx
.
scope
.
setOverride
(
1
,
0
);
ctx
.
scope
.
setOverride
(
{
propertyName
:
'lines'
},
{
value
:
true
}
);
});
it
(
'should set override property'
,
function
()
{
...
...
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