Commit 72d95322 by Torkel Ödegaard

updated login view with build info

parent d1b31bb3
......@@ -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
......
......@@ -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();
......
......@@ -10,17 +10,17 @@
<div class="login-inner-box">
<form name="loginForm">
<input type="text" required ng-model="loginModel.email" id="inputEmail" placeholder="Email">
<input type="text" required ng-model="loginModel.email" id="inputEmail" placeholder="Email">
<input type="password" required ng-model="loginModel.password" id="inputPassword" placeholder="Password">
<input type="password" required ng-model="loginModel.password" id="inputPassword" placeholder="Password">
<label class="checkbox">
<input type="checkbox" ng-model="loginModel.remember" ng-checked="login.remember"> Remember me
</label>
<label class="checkbox">
<input type="checkbox" ng-model="loginModel.remember" ng-checked="login.remember"> Remember me
</label>
<button type="submit" ng-click="login()" class="btn btn-success" style="margin-bottom: 20px">
Sign in
</button>
<button type="submit" ng-click="login()" class="btn btn-success" style="margin-bottom: 20px">
Sign in
</button>
</form>
<div class="alert alert-error" ng-show="loginError">
......@@ -42,4 +42,16 @@
</div>
</div>
<div class="clearfix"></div>
</div>
<div class="row" style="margin-top: 100px">
<div class="version-footer text-center small">
Grafana version: {{buildInfo.version}}, commit: {{buildInfo.commit}},
build date: {{buildInfo.buildstamp | date: 'yyyy-MM-dd HH:mm:ss' }}
</div>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment