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
b6cdb0f8
Commit
b6cdb0f8
authored
Aug 15, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some expensive bindings from timepicker to controller
parent
472969ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
src/app/panels/text/module.js
+0
-1
src/app/panels/timepicker/module.html
+1
-7
src/app/panels/timepicker/module.js
+12
-4
No files found.
src/app/panels/text/module.js
View file @
b6cdb0f8
...
...
@@ -64,7 +64,6 @@ function (angular, app, _, require) {
.
replace
(
/</g
,
'<'
);
if
(
converter
)
{
console
.
log
(
"markdown render cached"
);
$scope
.
updateContent
(
converter
.
makeHtml
(
text
));
}
else
{
...
...
src/app/panels/timepicker/module.html
View file @
b6cdb0f8
...
...
@@ -16,13 +16,7 @@
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle timepicker-dropdown"
data-toggle=
"dropdown"
href=
""
bs-tooltip=
"time.tooltip"
data-placement=
"bottom"
ng-click=
"dismiss();"
>
<span
ng-show=
"filter.time"
>
<span
class=
"pointer"
ng-hide=
"panel.now"
>
{{time.from.date | date:'MMM d, y HH:mm:ss'}}
</span>
<span
class=
"pointer"
ng-show=
"panel.now"
>
{{time.from.date | moment:'ago'}}
</span>
to
<span
class=
"pointer"
ng-hide=
"panel.now"
>
{{time.to.date | date:'MMM d, y HH:mm:ss'}}
</span>
<span
class=
"pointer"
ng-show=
"panel.now"
>
{{time.to.date | moment:'ago'}}
</span>
</span>
<span
ng-show=
"filter.time"
ng-bind=
"time.rangeString"
></span>
<span
ng-hide=
"filter.time"
>
Time filter
</span>
<span
ng-show=
"dashboard.refresh"
class=
"text-warning"
>
refreshed every {{dashboard.refresh}}
</span>
<i
class=
"icon-caret-down"
></i>
...
...
src/app/panels/timepicker/module.js
View file @
b6cdb0f8
...
...
@@ -172,10 +172,7 @@ function (angular, app, _, moment, kbn) {
};
var
getScopeTimeObj
=
function
(
from
,
to
)
{
var
model
=
{
from
:
getTimeObj
(
from
),
to
:
getTimeObj
(
to
),
};
var
model
=
{
from
:
getTimeObj
(
from
),
to
:
getTimeObj
(
to
),
};
if
(
model
.
from
.
date
)
{
model
.
tooltip
=
moment
(
model
.
from
.
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
+
' <br>to<br>'
;
...
...
@@ -185,6 +182,17 @@ function (angular, app, _, moment, kbn) {
model
.
tooltip
=
'Click to set time filter'
;
}
if
(
$scope
.
filter
.
time
)
{
if
(
$scope
.
panel
.
now
)
{
model
.
rangeString
=
moment
(
model
.
from
.
date
).
fromNow
()
+
' to '
+
moment
(
model
.
to
.
date
).
fromNow
();
}
else
{
model
.
rangeString
=
moment
(
model
.
from
.
date
).
format
(
'MMM D, YYYY hh:mm:ss'
)
+
' to '
+
moment
(
model
.
to
.
date
).
format
(
'MMM D, YYYY hh:mm:ss'
);
}
}
return
model
;
};
...
...
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