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
7eac56bc
Commit
7eac56bc
authored
Oct 10, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pie and table options to adhoc terms facet from table micro-panel
parent
cf29ef2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
src/app/panels/table/micropanel.html
+15
-1
src/app/panels/table/module.js
+2
-2
src/app/services/fields.js
+1
-1
No files found.
src/app/panels/table/micropanel.html
View file @
7eac56bc
...
@@ -47,6 +47,19 @@
...
@@ -47,6 +47,19 @@
<div
class=
"row-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span12"
>
<div
class=
"span12"
>
<h5>
Facets
</h5>
<h5>
Facets
</h5>
<button
class=
"btn"
ng-click=
"termsModal(field);dismiss();"
><i
class=
"icon-list-ol"
></i>
Terms
</button>
<!--<button class="btn" ng-click="termsModal(field,'pie');dismiss();"><i class="icon-list-ol"></i> Terms</button>-->
<div
class=
"btn-group"
>
<a
class=
"btn dropdown-toggle pointer"
data-toggle=
"dropdown"
>
<i
class=
"icon-list-ol"
></i>
Terms
<span
class=
"caret"
></span>
</a>
<ul
class=
"dropdown-menu"
>
<li><a
ng-click=
"termsModal(field,'bar');dismiss();"
>
Bar
</a></li>
<li><a
ng-click=
"termsModal(field,'pie');dismiss();"
>
Pie
</a></li>
<li><a
ng-click=
"termsModal(field,'table');dismiss();"
>
Table
</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/panels/table/module.js
View file @
7eac56bc
...
@@ -96,10 +96,10 @@ function (angular, app, _, kbn, moment) {
...
@@ -96,10 +96,10 @@ function (angular, app, _, kbn, moment) {
// Create a percent function for the view
// Create a percent function for the view
$scope
.
percent
=
kbn
.
to_percent
;
$scope
.
percent
=
kbn
.
to_percent
;
$scope
.
termsModal
=
function
(
field
)
{
$scope
.
termsModal
=
function
(
field
,
chart
)
{
$scope
.
modalField
=
field
;
$scope
.
modalField
=
field
;
showModal
(
showModal
(
'{"height":"
200px","chart":"bar
","field":"'
+
field
+
'"}'
,
'terms'
);
'{"height":"
300px","chart":"'
+
chart
+
'
","field":"'
+
field
+
'"}'
,
'terms'
);
};
};
$scope
.
statsModal
=
function
(
field
)
{
$scope
.
statsModal
=
function
(
field
)
{
...
...
src/app/services/fields.js
View file @
7eac56bc
...
@@ -75,7 +75,7 @@ function (angular, _, config) {
...
@@ -75,7 +75,7 @@ function (angular, _, config) {
ret
=
{};
ret
=
{};
for
(
var
attr
in
obj
){
for
(
var
attr
in
obj
){
// For now only support multi field on the top level
// For now only support multi field on the top level
// and if
if
there is a default field set.
// and if there is a default field set.
if
(
obj
[
attr
][
'type'
]
===
'multi_field'
)
{
if
(
obj
[
attr
][
'type'
]
===
'multi_field'
)
{
ret
[
attr
]
=
obj
[
attr
][
'fields'
][
attr
]
||
obj
[
attr
];
ret
[
attr
]
=
obj
[
attr
][
'fields'
][
attr
]
||
obj
[
attr
];
continue
;
continue
;
...
...
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