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
63358ede
Commit
63358ede
authored
Dec 10, 2013
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added zoom out global header
parent
5cdbbfa0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
3 deletions
+57
-3
src/app/controllers/all.js
+3
-1
src/app/controllers/zoom.js
+44
-0
src/app/dashboards/default.json
+6
-1
src/app/partials/dashLoader.html
+4
-1
No files found.
src/app/controllers/all.js
View file @
63358ede
...
...
@@ -2,5 +2,6 @@ define([
'./dash'
,
'./dashLoader'
,
'./row'
,
'./pulldown'
'./pulldown'
,
'./zoom'
],
function
()
{});
\ No newline at end of file
src/app/controllers/zoom.js
0 → 100644
View file @
63358ede
define
([
'angular'
,
'app'
,
'underscore'
],
function
(
angular
,
app
,
_
)
{
'use strict'
;
var
module
=
angular
.
module
(
'kibana.controllers'
);
module
.
controller
(
'ZoomCtrl'
,
function
(
$scope
,
filterSrv
)
{
// function $scope.zoom
// factor :: Zoom factor, so 0.5 = cuts timespan in half, 2 doubles timespan
$scope
.
zoom
=
function
(
factor
)
{
var
_range
=
filterSrv
.
timeRange
(
'last'
);
var
_timespan
=
(
_range
.
to
.
valueOf
()
-
_range
.
from
.
valueOf
());
var
_center
=
_range
.
to
.
valueOf
()
-
_timespan
/
2
;
var
_to
=
(
_center
+
(
_timespan
*
factor
)
/
2
);
var
_from
=
(
_center
-
(
_timespan
*
factor
)
/
2
);
// If we're not already looking into the future, don't.
if
(
_to
>
Date
.
now
()
&&
_range
.
to
<
Date
.
now
())
{
var
_offset
=
_to
-
Date
.
now
();
_from
=
_from
-
_offset
;
_to
=
Date
.
now
();
}
if
(
factor
>
1
)
{
filterSrv
.
removeByType
(
'time'
);
}
filterSrv
.
set
({
type
:
'time'
,
from
:
moment
.
utc
(
_from
).
toDate
(),
to
:
moment
.
utc
(
_to
).
toDate
(),
field
:
"@timestamp"
});
};
});
});
\ No newline at end of file
src/app/dashboards/default.json
View file @
63358ede
...
...
@@ -51,7 +51,12 @@
"default"
],
"type"
:
"graphite"
,
"spyable"
:
true
"spyable"
:
true
,
"targets"
:
[
{
"target"
:
"summarize(sum(prod.apps.tradera_site.*.counters.global.request_status.code_404.count), '30s')"
}
]
}
],
"notice"
:
true
...
...
src/app/partials/dashLoader.html
View file @
63358ede
...
...
@@ -4,6 +4,10 @@
}
</style>
<li>
<a
class=
'small'
ng-controller=
"ZoomCtrl"
ng-click=
'zoom(2)'
><i
class=
'icon-zoom-out'
></i>
Zoom Out
</a>
</li>
<li
ng-repeat=
"pulldown in dashboard.current.nav"
ng-controller=
"PulldownCtrl"
ng-show=
"pulldown.enable"
><kibana-simple-panel
type=
"pulldown.type"
ng-cloak
></kibana-simple-panel></li>
<li><a
bs-tooltip=
"'Goto saved default'"
data-placement=
"bottom"
href=
'#/dashboard'
><i
class=
'icon-home'
></i></a></li>
...
...
@@ -12,7 +16,6 @@
<i
class=
'icon-folder-open'
></i>
</a>
<ul
class=
"dropdown-menu"
style=
"padding:10px"
>
<li
ng-if=
'dashboard.current.loader.load_elasticsearch'
>
<form
class=
"nomargin"
>
...
...
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