From 72d953220756e1ebf03c2a4d3aa108e2fc11a969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 5 Jan 2015 10:46:16 +0100 Subject: [PATCH] updated login view with build info --- src/app/components/settings.js | 7 ++++++- src/app/controllers/loginCtrl.js | 7 +++++++ src/app/partials/login.html | 28 ++++++++++++++++++++-------- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/app/components/settings.js b/src/app/components/settings.js index 5bb1280130a..9bef2757d9f 100644 --- a/src/app/components/settings.js +++ b/src/app/components/settings.js @@ -26,7 +26,12 @@ function (_, crypto) { unsaved_changes_warning : true, search : { max_results: 100 }, admin : {}, - appSubUrl: "" + appSubUrl: "", + buildInfo: { + version: 'master', + commit: 'NA', + buildstamp: new Date().getTime() + } }; // This initializes a new hash on purpose, to avoid adding parameters to diff --git a/src/app/controllers/loginCtrl.js b/src/app/controllers/loginCtrl.js index f193aba0047..b0787d35b16 100644 --- a/src/app/controllers/loginCtrl.js +++ b/src/app/controllers/loginCtrl.js @@ -11,6 +11,13 @@ function (angular, config) { $scope.loginModel = {}; $scope.grafana.sidemenu = false; + // build info view model + $scope.buildInfo = { + version: config.buildInfo.version, + commit: config.buildInfo.commit, + buildstamp: new Date(config.buildInfo.buildstamp * 1000) + }; + $scope.init = function() { if ($routeParams.logout) { $scope.logout(); diff --git a/src/app/partials/login.html b/src/app/partials/login.html index 8522b7f625c..119b8dc6553 100644 --- a/src/app/partials/login.html +++ b/src/app/partials/login.html @@ -10,17 +10,17 @@
- + - + - + - +
@@ -42,4 +42,16 @@
+
+ +
+ +
+ + + +