From fc5d4e50e87ab992d1d1496075be96cbb44f0919 Mon Sep 17 00:00:00 2001 From: Fabian Trampusch Date: Sat, 30 Apr 2016 18:29:17 +0200 Subject: [PATCH] Added duration to last successful run on home page --- .../Server/webroot/ngax/scripts/controllers/HomeController.js | 3 +++ Duplicati/Server/webroot/ngax/templates/home.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js index e69cf6256..12c40e917 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/HomeController.js @@ -44,4 +44,7 @@ backupApp.controller('HomeController', function ($scope, $location, BackupList, AppService.post('/backup/' + id + '/createreport'); }; + $scope.formatDuration = function(duration) { + return duration.substring(0, duration.length - duration.indexOf(".")); + }; }); \ No newline at end of file diff --git a/Duplicati/Server/webroot/ngax/templates/home.html b/Duplicati/Server/webroot/ngax/templates/home.html index f104bc1de..6fb1dd9b7 100644 --- a/Duplicati/Server/webroot/ngax/templates/home.html +++ b/Duplicati/Server/webroot/ngax/templates/home.html @@ -69,7 +69,7 @@
Last successful run:
-
{{item.Backup.Metadata.LastBackupFinished | date :'medium'}}
+
{{item.Backup.Metadata.LastBackupFinished | date :'medium'}} (took {{formatDuration(item.Backup.Metadata.LastDuration)}})
Never - Run now