added objectid timestamp to the user interface
the logic is done on the client.
This commit is contained in:
1 parent
100b7e1839
commit
41552040cc
4 files changed
+47
-13
No files matched your search
@@ -1,14 +1,22 @@
|
||||
root = this
|
||||
|
||||
root.services.factory('util', ['$http', '$rootScope', ($http, $rootScope)->
|
||||
service =
|
||||
service =
|
||||
get: (params...) ->
|
||||
$rootScope.$broadcast("loading")
|
||||
return $http.get(params...).
|
||||
finally( () ->
|
||||
$rootScope.$broadcast("loadingFinished")
|
||||
)
|
||||
|
||||
parseObjectId: (objectIdAsString) ->
|
||||
if objectIdAsString.length != 24
|
||||
throw new Error("object id string must be of length 24")
|
||||
ret =
|
||||
date: new Date(parseInt(objectIdAsString.substr(0, 8), 16) * 1000)
|
||||
machine: parseInt(objectIdAsString.substr(8, 14), 16)
|
||||
process: parseInt(objectIdAsString.substr(14, 18), 16)
|
||||
counter: parseInt(objectIdAsString.substr(18, 24), 16)
|
||||
|
||||
return service
|
||||
|
||||
]);
|
||||
]);
|
||||
Reference in new issue
Block a user