From 999d4a0e2397c44863c04f87596a484ab4f41c39 Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Sat, 5 Oct 2019 12:34:42 +0300 Subject: [PATCH] gui: Better info for stalled and lengthy scans (fixes #5627) (#6061) --- gui/default/syncthing/core/syncthingController.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 154c2b400..611b3d933 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -853,6 +853,9 @@ angular.module('syncthing.core') // 32m 40s // 2h 32m // 4d 2h + // In case remaining scan time appears to be >31d, omit the + // details, i.e.: + // > 1 month if (!$scope.scanProgress[folder]) { return ""; @@ -872,6 +875,9 @@ angular.module('syncthing.core') var res = []; if (seconds >= 86400) { days = Math.floor(seconds / 86400); + if (days > 31) { + return '> 1 month'; + } res.push('' + days + 'd') seconds = seconds % 86400; }