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
af9dc4c2
Commit
af9dc4c2
authored
Mar 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with OpenTSDB editor and checkboxes, Fixes #1559
parent
f817a8ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
src/app/directives/tip.js
+20
-0
src/app/plugins/datasource/opentsdb/partials/query.editor.html
+3
-12
src/css/less/tightform.less
+6
-0
No files found.
src/app/directives/tip.js
View file @
af9dc4c2
...
@@ -55,4 +55,24 @@ function (angular, kbn) {
...
@@ -55,4 +55,24 @@ function (angular, kbn) {
};
};
});
});
angular
.
module
(
'grafana.directives'
)
.
directive
(
'editorCheckbox'
,
function
(
$compile
)
{
return
{
restrict
:
'E'
,
link
:
function
(
scope
,
elem
,
attrs
)
{
var
ngchange
=
attrs
.
change
?
(
' ng-change="'
+
attrs
.
change
+
'"'
)
:
''
;
var
tip
=
attrs
.
tip
?
(
' <tip>'
+
attrs
.
tip
+
'</tip>'
)
:
''
;
var
template
=
'<label for="'
+
scope
.
$id
+
attrs
.
model
+
'" class="checkbox-label">'
+
attrs
.
text
+
tip
+
'</label>'
+
'<input class="cr1" id="'
+
scope
.
$id
+
attrs
.
model
+
'" type="checkbox" '
+
' ng-model="'
+
attrs
.
model
+
'"'
+
ngchange
+
' ng-checked="'
+
attrs
.
model
+
'"></input>'
+
' <label for="'
+
scope
.
$id
+
attrs
.
model
+
'" class="cr1"></label>'
;
elem
.
replaceWith
(
$compile
(
angular
.
element
(
template
))(
scope
));
}
};
});
});
});
src/app/plugins/datasource/opentsdb/partials/query.editor.html
View file @
af9dc4c2
...
@@ -131,10 +131,7 @@
...
@@ -131,10 +131,7 @@
</li>
</li>
<li
class=
"tight-form-item"
>
<li
class=
"tight-form-item"
>
Disable downsampling
<editor-checkbox
text=
"Disable downsampling"
model=
"target.disableDownsampling"
change=
"targetBlur()"
></editor-checkbox>
<input
class=
"cr1"
id=
"target.disableDownsampling"
type=
"checkbox"
ng-model=
"target.disableDownsampling"
ng-checked=
"target.disableDownsampling"
ng-change=
"targetBlur()"
>
<label
for=
"target.disableDownsampling"
class=
"cr1"
></label>
</li>
</li>
</ul>
</ul>
...
@@ -198,17 +195,11 @@
...
@@ -198,17 +195,11 @@
</li>
</li>
<li
class=
"tight-form-item"
style=
"width: 86px"
>
<li
class=
"tight-form-item"
style=
"width: 86px"
>
Rate
<editor-checkbox
text=
"Rate"
model=
"target.shouldComputeRate"
change=
"targetBlur()"
></editor-checkbox>
<input
class=
"cr1"
id=
"target.shouldComputeRate"
type=
"checkbox"
ng-model=
"target.shouldComputeRate"
ng-checked=
"target.shouldComputeRate"
ng-change=
"targetBlur()"
>
<label
for=
"target.shouldComputeRate"
class=
"cr1"
></label>
</li>
</li>
<li
class=
"tight-form-item"
ng-hide=
"!target.shouldComputeRate"
>
<li
class=
"tight-form-item"
ng-hide=
"!target.shouldComputeRate"
>
Counter
<editor-checkbox
text=
"Counter"
model=
"target.isCounter"
change=
"targetBlur()"
></editor-checkbox>
<input
class=
"cr1"
id=
"target.isCounter"
type=
"checkbox"
ng-model=
"target.isCounter"
ng-checked=
"target.isCounter"
ng-change=
"targetBlur()"
>
<label
for=
"target.isCounter"
class=
"cr1"
></label>
</li>
</li>
<li
class=
"tight-form-item"
ng-hide=
"!target.isCounter"
>
<li
class=
"tight-form-item"
ng-hide=
"!target.isCounter"
>
...
...
src/css/less/tightform.less
View file @
af9dc4c2
...
@@ -17,6 +17,12 @@
...
@@ -17,6 +17,12 @@
background: transparent;
background: transparent;
border: none;
border: none;
}
}
.checkbox-label {
display: inline;
padding-right: 4px;
margin-bottom: 0;
}
}
}
.spaced-form {
.spaced-form {
...
...
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