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
e0b58577
Commit
e0b58577
authored
Oct 28, 2015
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added relative time by default, removed checkbox
parent
af65a81d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
20 deletions
+5
-20
public/app/features/dashboard/dashboardSrv.js
+1
-1
public/app/panels/graph/graph.tooltip.js
+4
-15
public/app/panels/graph/styleEditor.html
+0
-4
No files found.
public/app/features/dashboard/dashboardSrv.js
View file @
e0b58577
...
...
@@ -226,7 +226,7 @@ function (angular, $, kbn, _, moment) {
moment
.
utc
(
date
).
format
(
format
);
};
p
.
formatRelativeDat
e
=
function
(
date
)
{
p
.
getRelativeTim
e
=
function
(
date
)
{
date
=
this
.
checkDate
(
date
);
...
...
public/app/panels/graph/graph.tooltip.js
View file @
e0b58577
...
...
@@ -32,12 +32,7 @@ function ($) {
};
this
.
showTooltip
=
function
(
absoluteTime
,
relativeTime
,
innerHtml
,
pos
)
{
var
body
;
if
(
typeof
relativeTime
===
'undefined'
)
{
body
=
'<div class="graph-tooltip small"><div class="graph-tooltip-time">'
+
absoluteTime
+
'</div> '
;
}
else
{
body
=
'<div class="graph-tooltip small"><div class="graph-tooltip-time">'
+
absoluteTime
+
'<br>('
+
relativeTime
+
')</div> '
;
}
var
body
=
'<div class="graph-tooltip small"><div class="graph-tooltip-time">'
+
absoluteTime
+
'<br>('
+
relativeTime
+
')</div> '
;
body
+=
innerHtml
+
'</div>'
;
$tooltip
.
html
(
body
).
place_tt
(
pos
.
pageX
+
20
,
pos
.
pageY
);
};
...
...
@@ -123,10 +118,7 @@ function ($) {
seriesHtml
=
''
;
if
(
scope
.
panel
.
tooltip
.
relativeTimestamp
)
{
relativeTime
=
dashboard
.
formatRelativeDate
(
seriesHoverInfo
.
time
);
}
relativeTime
=
dashboard
.
getRelativeTime
(
seriesHoverInfo
.
time
);
absoluteTime
=
dashboard
.
formatDate
(
seriesHoverInfo
.
time
);
for
(
i
=
0
;
i
<
seriesHoverInfo
.
length
;
i
++
)
{
...
...
@@ -163,15 +155,12 @@ function ($) {
value
=
series
.
formatValue
(
value
);
if
(
scope
.
panel
.
tooltip
.
relativeTimestamp
)
{
relativeTime
=
dashboard
.
formatRelativeDate
(
item
.
datapoint
[
0
]);
}
relativeTime
=
dashboard
.
getRelativeTime
(
item
.
datapoint
[
0
]);
absoluteTime
=
dashboard
.
formatDate
(
item
.
datapoint
[
0
]);
group
+=
'<div class="graph-tooltip-value">'
+
value
+
'</div>'
;
self
.
showTooltip
Other
(
absoluteTime
,
relativeTime
,
group
,
pos
);
self
.
showTooltip
(
absoluteTime
,
relativeTime
,
group
,
pos
);
}
// no hit
else
{
...
...
public/app/panels/graph/styleEditor.html
View file @
e0b58577
...
...
@@ -52,10 +52,6 @@
text=
"All series"
model=
"panel.tooltip.shared"
change=
"render()"
tip=
"Show all series on same tooltip and a x croshair to help follow all series"
>
</editor-opt-bool>
<editor-opt-bool
text=
"Relative timestamp"
model=
"panel.tooltip.relativeTimestamp"
change=
"render()"
tip=
"Shows elapsed time in relatively from the current timestamp. For example, 45 mins ago, 1 day 2 hours ago, etc."
>
</editor-opt-bool>
<div
class=
"editor-option"
ng-show=
"panel.stack"
>
<label
class=
"small"
>
Stacked Values
<tip>
How should the values in stacked charts to be calculated?
</tip></label>
<select
class=
"input-small"
ng-model=
"panel.tooltip.value_type"
ng-options=
"f for f in ['cumulative','individual']"
ng-change=
"render()"
></select>
...
...
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