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
68b76578
Commit
68b76578
authored
Apr 05, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added global field list service for use in panel editor type ahead
parent
122d94f7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
6 deletions
+24
-6
js/controllers.js
+5
-1
js/services.js
+15
-0
panels/map/editor.html
+1
-1
panels/pie/editor.html
+1
-1
panels/table/editor.html
+1
-1
panels/table/module.js
+1
-2
No files found.
js/controllers.js
View file @
68b76578
...
...
@@ -3,7 +3,7 @@
'use strict'
;
angular
.
module
(
'kibana.controllers'
,
[])
.
controller
(
'DashCtrl'
,
function
(
$scope
,
$rootScope
,
$http
,
$timeout
,
ejsResource
,
eventBus
)
{
.
controller
(
'DashCtrl'
,
function
(
$scope
,
$rootScope
,
$http
,
$timeout
,
ejsResource
,
eventBus
,
fields
)
{
var
_d
=
{
title
:
""
,
...
...
@@ -14,7 +14,11 @@ angular.module('kibana.controllers', [])
$scope
.
init
=
function
()
{
$scope
.
config
=
config
;
// Make underscore.js available to views
$scope
.
_
=
_
;
// Provide a global list of all see fields
$scope
.
fields
=
fields
$scope
.
reset_row
();
$scope
.
clear_all_alerts
();
...
...
js/services.js
View file @
68b76578
...
...
@@ -68,6 +68,21 @@ angular.module('kibana.services', [])
}
})
/* Service: fields
Provides a global list of all seen fields for use in editor panels
*/
.
factory
(
'fields'
,
function
(
$rootScope
)
{
var
fields
=
{
list
:
[]
}
$rootScope
.
$on
(
'fields'
,
function
(
event
,
f
)
{
fields
.
list
=
_
.
union
(
f
.
data
.
all
,
fields
.
list
)
})
return
fields
;
})
.
service
(
'timer'
,
function
(
$timeout
)
{
// This service really just tracks a list of $timeout promises to give us a
// method for cancelling them all when we need to
...
...
panels/map/editor.html
View file @
68b76578
...
...
@@ -8,7 +8,7 @@
<div
class=
"span3"
>
<form>
<h6>
Field
</h6>
<input
type=
"text"
class=
"input-small"
ng-model=
"panel.field"
>
<input
bs-typeahead=
"fields.list"
type=
"text"
class=
"input-small"
ng-model=
"panel.field"
>
</form>
</div>
<div
class=
"span6"
>
...
...
panels/pie/editor.html
View file @
68b76578
...
...
@@ -4,7 +4,7 @@
<div
class=
"span4"
>
<form
style=
"margin-bottom: 0px"
>
<h6>
Field
</h6>
<input
type=
"text"
style=
"width:90%"
ng-model=
"panel.query.field"
>
<input
type=
"text"
style=
"width:90%"
bs-typeahead=
"fields.list"
ng-model=
"panel.query.field"
>
</form>
</div>
<div
class=
"span8"
>
...
...
panels/table/editor.html
View file @
68b76578
...
...
@@ -11,7 +11,7 @@
<div
class=
"span4"
>
<form
class=
"input-append"
>
<h6>
Add field
</h6>
<input
bs-typeahead=
"
all_fields
"
type=
"text"
class=
"input-small"
ng-model=
'newfield'
>
<input
bs-typeahead=
"
fields.list
"
type=
"text"
class=
"input-small"
ng-model=
'newfield'
>
<button
class=
"btn"
ng-click=
"toggle_field(newfield);newfield=''"
><i
class=
"icon-plus"
></i></button>
</form>
</div>
...
...
panels/table/module.js
View file @
68b76578
angular
.
module
(
'kibana.table'
,
[])
.
controller
(
'table'
,
function
(
$scope
,
eventBus
)
{
.
controller
(
'table'
,
function
(
$scope
,
eventBus
,
fields
)
{
// Set and populate defaults
var
_d
=
{
...
...
@@ -142,7 +142,6 @@ angular.module('kibana.table', [])
// This breaks, use $scope.data for this
$scope
.
all_fields
=
get_all_fields
(
$scope
.
data
);
broadcast_results
();
// If we're not sorting in reverse chrono order, query every index for
...
...
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