Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
f60330d1
Commit
f60330d1
authored
Jun 17, 2016
by
LE GAC Renaud
Browse files
Restore the duration computation.
parent
834beadc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
modules/selector.py
modules/selector.py
+2
-2
static/track_events/src/reprDuration.js
static/track_events/src/reprDuration.js
+2
-2
No files found.
modules/selector.py
View file @
f60330d1
...
...
@@ -214,7 +214,7 @@ class MySelector(SelectorActiveItems):
row (gluon.dal.Row): row of the history table.
Returns:
datetime.timedelta:
float: in seconds
"""
value
=
timedelta
(
seconds
=
0
)
...
...
@@ -232,7 +232,7 @@ class MySelector(SelectorActiveItems):
elif
start
and
end
and
end
<
now
:
value
=
end
-
start
return
value
return
value
.
total_seconds
()
def
_fte
(
self
,
row
):
"""Compute the full time equivalent of the person associated
...
...
static/track_events/src/reprDuration.js
View file @
f60330d1
...
...
@@ -2,7 +2,7 @@
* Convert a duration in nanosecond into a string.
*
* @param {Number} value
* The duration in
nano
seconds
* The duration in seconds
*
* @return {String}
* The duration express as the number of year + the number of months e.g. "3y + 09m"
...
...
@@ -12,7 +12,7 @@ function reprDuration(value) {
"
use strict
"
;
var
duration
=
value
/
1
.
E9
,
var
duration
=
value
,
month
,
nd
,
nm
,
...
...
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