mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
updated login view with build info
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user