1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

fix(container) - correct since date for created containers (#822)

This commit is contained in:
Thomas Krzero 2017-04-27 20:40:37 +02:00 committed by Anthony Lapenna
parent 87250d13d7
commit 5a07638f4d
3 changed files with 13 additions and 3 deletions

View file

@ -23,6 +23,8 @@ function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, Ima
if (d.State.Running) {
$scope.activityTime = moment.duration(moment(d.State.StartedAt).utc().diff(moment().utc())).humanize();
} else if (d.State.Status === "created") {
$scope.activityTime = moment.duration(moment(d.Created).utc().diff(moment().utc())).humanize();
} else {
$scope.activityTime = moment.duration(moment().utc().diff(moment(d.State.FinishedAt).utc())).humanize();
}