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
95860be9
Commit
95860be9
authored
Dec 12, 2013
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:elasticsearch/kibana
parents
0d6fdfd3
db34054c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
12 deletions
+31
-12
src/app/directives/kibanaSimplePanel.js
+10
-8
src/app/panels/histogram/module.html
+3
-3
src/app/panels/histogram/module.js
+1
-1
src/app/panels/histogram/timeSeries.js
+17
-0
No files found.
src/app/directives/kibanaSimplePanel.js
View file @
95860be9
...
@@ -60,14 +60,16 @@ function (angular, _) {
...
@@ -60,14 +60,16 @@ function (angular, _) {
loadController
(
name
);
loadController
(
name
);
});
});
$scope
.
$watch
(
attr
.
panel
,
function
(
panel
)
{
if
(
attr
.
panel
)
{
// If the panel attribute is specified, create a new scope. This ruins configuration
$scope
.
$watch
(
attr
.
panel
,
function
(
panel
)
{
// so don't do it with anything that needs to use editor.html
// If the panel attribute is specified, create a new scope. This ruins configuration
if
(
!
_
.
isUndefined
(
panel
))
{
// so don't do it with anything that needs to use editor.html
$scope
=
$scope
.
$new
();
if
(
!
_
.
isUndefined
(
panel
))
{
$scope
.
panel
=
angular
.
fromJson
(
panel
);
$scope
=
$scope
.
$new
();
}
$scope
.
panel
=
angular
.
fromJson
(
panel
);
});
}
});
}
}
}
};
};
});
});
...
...
src/app/panels/histogram/module.html
View file @
95860be9
...
@@ -44,10 +44,10 @@
...
@@ -44,10 +44,10 @@
<a
class=
'small'
ng-click=
'zoom(2)'
><i
class=
'icon-zoom-out'
></i>
Zoom Out
</a>
|
&
nbsp
<a
class=
'small'
ng-click=
'zoom(2)'
><i
class=
'icon-zoom-out'
></i>
Zoom Out
</a>
|
&
nbsp
</span>
</span>
<span
ng-show=
"panel.legend"
ng-repeat=
'series in legend'
class=
"histogram-legend"
>
<span
ng-show=
"panel.legend"
ng-repeat=
'series in legend'
class=
"histogram-legend"
>
<i
class=
'icon-circle'
ng-style=
"{color: series.color}"
></i>
<i
class=
'icon-circle'
ng-style=
"{color: series.
query.
color}"
></i>
<span
class=
'small histogram-legend-item'
>
<span
class=
'small histogram-legend-item'
>
<span
ng-if=
"panel.show_query"
>
{{series.
alias || series
.query}}
</span>
<span
ng-if=
"panel.show_query"
>
{{series.
query.alias || series.query
.query}}
</span>
<span
ng-if=
"!panel.show_query"
>
{{series.alias}}
</span>
<span
ng-if=
"!panel.show_query"
>
{{series.
query.
alias}}
</span>
<span
ng-show=
"panel.legend_counts"
>
({{series.hits}})
</span>
<span
ng-show=
"panel.legend_counts"
>
({{series.hits}})
</span>
</span>
</span>
</span>
</span>
...
...
src/app/panels/histogram/module.js
View file @
95860be9
...
@@ -425,7 +425,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -425,7 +425,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
hits
+=
entry
.
count
;
// Entire dataset level hits counter
$scope
.
hits
+=
entry
.
count
;
// Entire dataset level hits counter
});
});
$scope
.
legend
[
i
]
=
q
;
$scope
.
legend
[
i
]
=
{
query
:
q
,
hits
:
hits
}
;
data
[
i
]
=
{
data
[
i
]
=
{
info
:
q
,
info
:
q
,
...
...
src/app/panels/histogram/timeSeries.js
View file @
95860be9
...
@@ -101,6 +101,8 @@ function (_, Interval) {
...
@@ -101,6 +101,8 @@ function (_, Interval) {
strategy
=
this
.
_getAllFlotPairs
;
strategy
=
this
.
_getAllFlotPairs
;
}
else
if
(
this
.
opts
.
fill_style
===
'null'
)
{
}
else
if
(
this
.
opts
.
fill_style
===
'null'
)
{
strategy
=
this
.
_getNullFlotPairs
;
strategy
=
this
.
_getNullFlotPairs
;
}
else
if
(
this
.
opts
.
fill_style
===
'no'
)
{
strategy
=
this
.
_getNoZeroFlotPairs
;
}
else
{
}
else
{
strategy
=
this
.
_getMinFlotPairs
;
strategy
=
this
.
_getMinFlotPairs
;
}
}
...
@@ -211,6 +213,20 @@ function (_, Interval) {
...
@@ -211,6 +213,20 @@ function (_, Interval) {
return
result
;
return
result
;
};
};
/**
* ** called as a reduce stragegy in getFlotPairs() **
* Not fill zero's on either side of the current time, only the current time
* @return {array} An array of points to plot with flot
*/
ts
.
ZeroFilled
.
prototype
.
_getNoZeroFlotPairs
=
function
(
result
,
time
)
{
// add the current time
if
(
this
.
_data
[
time
]){
result
.
push
([
time
,
this
.
_data
[
time
]]);
}
return
result
;
};
return
ts
;
return
ts
;
});
});
\ No newline at end of file
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