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
1dba1942
Commit
1dba1942
authored
Jan 06, 2014
by
Torkel Odegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fixes and dashboard property cleanup
parent
d8cd5c15
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
106 deletions
+14
-106
src/app/dashboards/blank.json
+8
-24
src/app/directives/panelMenu.js
+0
-48
src/app/panels/timepicker/editor.html
+0
-4
src/app/panels/timepicker/module.js
+1
-2
src/app/services/dashboard.js
+2
-25
src/app/services/filterSrv.js
+3
-3
No files found.
src/app/dashboards/blank.json
View file @
1dba1942
{
"title"
:
"New Dashboard"
,
"services"
:
{
"query"
:
{
"list"
:
{
"0"
:
{
"query"
:
"*"
,
"alias"
:
""
,
"color"
:
"#7EB26D"
,
"id"
:
0
}
},
"ids"
:
[
0
]
},
"filter"
:
{
"list"
:
{},
"ids"
:
[]
"list"
:
[],
"time"
:
{
"from"
:
"now-5m"
,
"to"
:
"now"
}
}
},
"rows"
:
[
],
"rows"
:
[],
"editable"
:
true
,
"failover"
:
false
,
"index"
:
{
"interval"
:
"none"
,
"pattern"
:
"[logstash-]YYYY.MM.DD"
,
"default"
:
"_all"
,
"warm_fields"
:
false
}
"failover"
:
false
}
\ No newline at end of file
src/app/directives/panelMenu.js
deleted
100644 → 0
View file @
d8cd5c15
define
([
'angular'
],
function
(
angular
)
{
'use strict'
;
angular
.
module
(
'kibana.directives'
).
directive
(
'panelMenu'
,
[
'$parse'
,
'$compile'
,
'$timeout'
,
function
(
$parse
,
$compile
,
$timeout
)
{
var
buildTemplate
=
function
(
items
,
ul
)
{
if
(
!
ul
)
ul
=
[
'<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">'
,
'</ul>'
];
angular
.
forEach
(
items
,
function
(
item
,
index
)
{
if
(
item
.
divider
)
return
ul
.
splice
(
index
+
1
,
0
,
'<li class="divider"></li>'
);
var
li
=
'<li'
+
(
item
.
submenu
&&
item
.
submenu
.
length
?
' class="dropdown-submenu"'
:
''
)
+
'>'
+
'<a tabindex="-1" ng-href="'
+
(
item
.
href
||
''
)
+
'"'
+
(
item
.
click
?
'" ng-click="'
+
item
.
click
+
'"'
:
''
)
+
(
item
.
target
?
'" target="'
+
item
.
target
+
'"'
:
''
)
+
(
item
.
method
?
'" data-method="'
+
item
.
method
+
'"'
:
''
)
+
'>'
+
(
item
.
text
||
''
)
+
'</a>'
;
if
(
item
.
submenu
&&
item
.
submenu
.
length
)
li
+=
buildTemplate
(
item
.
submenu
).
join
(
'
\
n'
);
li
+=
'</li>'
;
ul
.
splice
(
index
+
1
,
0
,
li
);
});
return
ul
;
};
return
{
restrict
:
'EA'
,
scope
:
true
,
link
:
function
postLink
(
scope
,
iElement
,
iAttrs
)
{
var
getter
=
$parse
(
iAttrs
.
bsDropdown
),
items
=
getter
(
scope
);
$timeout
(
function
()
{
if
(
!
angular
.
isArray
(
items
))
{
}
var
dropdown
=
angular
.
element
(
buildTemplate
(
items
).
join
(
''
));
dropdown
.
insertAfter
(
iElement
);
$compile
(
iElement
.
next
(
'ul.dropdown-menu'
))(
scope
);
});
iElement
.
addClass
(
'dropdown-toggle'
).
attr
(
'data-toggle'
,
'dropdown'
);
}
};
}
]);
});
\ No newline at end of file
src/app/panels/timepicker/editor.html
View file @
1dba1942
...
...
@@ -8,9 +8,5 @@
<label
class=
"small"
>
Auto-refresh options
<small>
comma seperated
</small></label>
<input
type=
"text"
array-join
class=
"input-large"
ng-model=
"panel.refresh_intervals"
>
</div>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Time Field
</label>
<input
type=
"text"
class=
"input-small"
ng-model=
"panel.timefield"
>
</div>
</div>
</div>
src/app/panels/timepicker/module.js
View file @
1dba1942
...
...
@@ -38,9 +38,8 @@ function (angular, app, _, moment, kbn) {
status
:
"Stable"
,
time_options
:
[
'5m'
,
'15m'
,
'1h'
,
'6h'
,
'12h'
,
'24h'
,
'2d'
,
'7d'
,
'30d'
],
refresh_intervals
:
[
'5s'
,
'10s'
,
'30s'
,
'1m'
,
'5m'
,
'15m'
,
'30m'
,
'1h'
,
'2h'
,
'1d'
],
timefield
:
'@timestamp'
};
_
.
defaults
(
$scope
.
panel
,
_d
);
var
customTimeModal
=
$modal
({
...
...
src/app/services/dashboard.js
View file @
1dba1942
...
...
@@ -26,19 +26,8 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
failover
:
false
,
panel_hints
:
true
,
rows
:
[],
pulldowns
:
[
{
type
:
'query'
,
},
{
type
:
'filtering'
}
],
nav
:
[
{
type
:
'timepicker'
}
],
pulldowns
:
[
{
type
:
'filtering'
}
],
nav
:
[
{
type
:
'timepicker'
}
],
services
:
{},
loader
:
{
save_gist
:
false
,
...
...
@@ -54,12 +43,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
load_local
:
false
,
hide
:
false
},
index
:
{
interval
:
'none'
,
pattern
:
'_all'
,
default
:
'INDEX_MISSING'
,
warm_fields
:
true
},
refresh
:
false
};
...
...
@@ -136,7 +119,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
var
dash_defaults
=
function
(
dashboard
)
{
_
.
defaults
(
dashboard
,
_dash
);
_
.
defaults
(
dashboard
.
index
,
_dash
.
index
);
_
.
defaults
(
dashboard
.
loader
,
_dash
.
loader
);
var
filtering
=
_
.
findWhere
(
dashboard
.
pulldowns
,
{
type
:
'filtering'
});
...
...
@@ -158,11 +140,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
// Make sure the dashboard being loaded has everything required
dashboard
=
dash_defaults
(
dashboard
);
// If not using time based indices, use the default index
if
(
dashboard
.
index
.
interval
===
'none'
)
{
self
.
indices
=
[
dashboard
.
index
.
default
];
}
// Set the current dashboard
self
.
current
=
_
.
clone
(
dashboard
);
...
...
src/app/services/filterSrv.js
View file @
1dba1942
...
...
@@ -9,9 +9,6 @@ define([
var
module
=
angular
.
module
(
'kibana.services'
);
module
.
service
(
'filterSrv'
,
function
(
dashboard
,
$rootScope
,
$timeout
)
{
// Create an object to hold our service state on the dashboard
dashboard
.
current
.
services
.
filter
=
dashboard
.
current
.
services
.
filter
||
{};
// defaults
var
_d
=
{
list
:
[],
...
...
@@ -23,7 +20,10 @@ define([
// Call this whenever we need to reload the important stuff
this
.
init
=
function
()
{
dashboard
.
current
.
services
.
filter
=
dashboard
.
current
.
services
.
filter
||
{};
_
.
defaults
(
dashboard
.
current
.
services
.
filter
,
_d
);
self
.
list
=
dashboard
.
current
.
services
.
filter
.
list
;
self
.
time
=
dashboard
.
current
.
services
.
filter
.
time
;
...
...
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