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
cfceadc8
Commit
cfceadc8
authored
Oct 11, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'more' button to related fields section for users with large field counts
parent
da5bb8cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
src/app/components/kbn.js
+1
-1
src/app/panels/table/micropanel.html
+2
-3
src/app/panels/table/module.js
+1
-0
No files found.
src/app/components/kbn.js
View file @
cfceadc8
...
...
@@ -41,7 +41,7 @@ function($, _, moment) {
}
});
var
counts
=
_
.
countBy
(
_
.
without
(
field_array
,
field
),
function
(
field
){
return
field
;});
return
counts
;
return
_
.
map
(
counts
,
function
(
num
,
key
){
return
{
name
:
key
,
count
:
num
};})
;
};
kbn
.
recurse_field_dots
=
function
(
object
,
field
)
{
...
...
src/app/panels/table/micropanel.html
View file @
cfceadc8
...
...
@@ -42,13 +42,12 @@
<div
ng-repeat=
'field in micropanel.values'
bs-tooltip=
"field[0]+' ('+percent(field[1],data.length)+')'"
class=
"bar {{micropanelColor($index)}}"
ng-style=
"{width: percent(field[1],data.length)};"
></div>
</div>
<div>
<span
ng-repeat=
'(field,count) in micropanel.related track by $index'
><a
ng-click=
"toggle_field(field)"
>
{{field}}
</a>
({{Math.round((count / micropanel.count) * 100)}}%),
</span>
<span
ng-repeat=
"field in micropanel.related|orderBy:'count':true|limitTo:micropanel.limit track by $index"
><a
ng-click=
"toggle_field(field)"
>
{{field.name}}
</a>
({{Math.round((field.count / micropanel.count) * 100)}}%),
</span>
<a
class=
"link"
ng-show=
"micropanel.related.length > micropanel.limit"
ng-click=
"micropanel.limit = micropanel.limit + 10"
>
More
<i
class=
"icon-caret-right"
></i></a>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span12"
>
<h5>
Facets
</h5>
<!--<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
...
...
src/app/panels/table/module.js
View file @
cfceadc8
...
...
@@ -138,6 +138,7 @@ function (angular, app, _, kbn, moment) {
values
:
topFieldValues
.
counts
,
hasArrays
:
topFieldValues
.
hasArrays
,
related
:
kbn
.
get_related_fields
(
docs
,
field
),
limit
:
10
,
count
:
_
.
countBy
(
docs
,
function
(
doc
){
return
_
.
contains
(
_
.
keys
(
doc
),
field
);})[
'true'
]
};
};
...
...
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