[icinga-checkins] icinga.org: icingaweb2/master: Display ISO date and time when a connection was lost

git at icinga.org git at icinga.org
Mon Feb 22 11:28:39 CET 2016


Module: icingaweb2
Branch: master
Commit: a2a96be8c950ab5df0f943ccfd492cdb45bd4309
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=a2a96be8c950ab5df0f943ccfd492cdb45bd4309

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Mon Feb 22 11:24:19 2016 +0100

Display ISO date and time when a connection was lost

refs #10625

---

 public/js/icinga/loader.js |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js
index 8a6bf7f..323ca30 100644
--- a/public/js/icinga/loader.js
+++ b/public/js/icinga/loader.js
@@ -681,11 +681,17 @@
                     req.addToHistory = false;
                 } else {
                     if (this.failureNotice === null) {
+                        var now = new Date();
+                        var padString = this.icinga.utils.padString;
                         this.failureNotice = this.createNotice(
                             'error',
-                            'The connection to the Icinga web server was lost at ' +
-                            this.icinga.utils.timeShort() +
-                            '.',
+                            'The connection to the Icinga web server was lost at '
+                            + now.getFullYear()
+                            + '-' + padString(now.getMonth() + 1, 0, 2)
+                            + '-' + padString(now.getDate(), 0, 2)
+                            + ' ' + padString(now.getHours(), 0, 2)
+                            + ':' + padString(now.getMinutes(), 0, 2)
+                            + '.',
                             true
                         );
 



More information about the icinga-checkins mailing list