mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(invite): began work on invited signup view, also added backdrop to login view, #2353
This commit is contained in:
parent
6088f83408
commit
4ac652b127
@ -22,6 +22,7 @@ func Register(r *macaron.Macaron) {
|
||||
r.Post("/login", bind(dtos.LoginCommand{}), wrap(LoginPost))
|
||||
r.Get("/login/:name", OAuthLogin)
|
||||
r.Get("/login", LoginView)
|
||||
r.Get("/signup/invited", Index)
|
||||
|
||||
// authed views
|
||||
r.Get("/profile/", reqSignedIn, Index)
|
||||
@ -39,6 +40,7 @@ func Register(r *macaron.Macaron) {
|
||||
r.Get("/dashboard/*", reqSignedIn, Index)
|
||||
|
||||
// sign up
|
||||
r.Get("/signup", Index)
|
||||
r.Post("/api/user/signup", bind(m.CreateUserCommand{}), wrap(SignUp))
|
||||
|
||||
// reset password
|
||||
|
@ -6,6 +6,7 @@ define([
|
||||
'./inspectCtrl',
|
||||
'./jsonEditorCtrl',
|
||||
'./loginCtrl',
|
||||
'./invitedCtrl',
|
||||
'./resetPasswordCtrl',
|
||||
'./sidemenuCtrl',
|
||||
'./errorCtrl',
|
||||
|
19
public/app/controllers/invitedCtrl.js
Normal file
19
public/app/controllers/invitedCtrl.js
Normal file
@ -0,0 +1,19 @@
|
||||
define([
|
||||
'angular',
|
||||
],
|
||||
function (angular) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('grafana.controllers');
|
||||
|
||||
module.controller('InvitedCtrl', function($scope, contextSrv) {
|
||||
|
||||
contextSrv.sidemenu = false;
|
||||
|
||||
$scope.init = function() {
|
||||
};
|
||||
|
||||
$scope.init();
|
||||
|
||||
});
|
||||
});
|
@ -1,4 +1,6 @@
|
||||
<div class="container">
|
||||
<div class="login-page-background">
|
||||
</div>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
|
89
public/app/partials/signup_invited.html
Normal file
89
public/app/partials/signup_invited.html
Normal file
@ -0,0 +1,89 @@
|
||||
<div class="container">
|
||||
|
||||
<div class="login-page-background">
|
||||
</div>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
<div class="login-box-logo">
|
||||
<img src="img/logo_transparent_200x75.png">
|
||||
</div>
|
||||
|
||||
<div class="login-inner-box">
|
||||
|
||||
<form name="loginForm" class="login-form">
|
||||
<div class="tight-from-container">
|
||||
<div class="tight-form" ng-if="loginMode">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 78px">
|
||||
<strong>User</strong>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" name="username" class="tight-form-input last" required ng-model='formModel.user' placeholder="email or username" style="width: 253px">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="tight-form" ng-if="loginMode">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 78px">
|
||||
<strong>Password</strong>
|
||||
</li>
|
||||
<li>
|
||||
<input type="password" name="password" class="tight-form-input last" required ng-model="formModel.password" id="inputPassword" style="width: 253px" placeholder="password">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="tight-form" ng-if="!loginMode">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 79px">
|
||||
<strong>Email</strong>
|
||||
</li>
|
||||
<li>
|
||||
<input type="email" class="tight-form-input last" required ng-model='formModel.email' placeholder="email" style="width: 253px">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="tight-form" ng-if="!loginMode">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 79px">
|
||||
<strong>Password</strong>
|
||||
</li>
|
||||
<li>
|
||||
<input type="password" class="tight-form-input last" watch-change="formModel.password = inputValue;" ng-minlength="4" required ng-model='formModel.password' placeholder="password" style="width: 253px">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!loginMode" style="margin-left: 97px; width: 254px;">
|
||||
<password-strength password="formModel.password"></password-strength>
|
||||
</div>
|
||||
|
||||
<div class="login-submit-button-row">
|
||||
<button type="submit" class="btn" ng-click="submit();" ng-class="{'btn-inverse': !loginForm.$valid, 'btn-primary': loginForm.$valid}">
|
||||
{{submitBtnText}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 50px">
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -97,6 +97,10 @@ define([
|
||||
templateUrl: 'app/partials/login.html',
|
||||
controller : 'LoginCtrl',
|
||||
})
|
||||
.when('/signup/invited', {
|
||||
templateUrl: 'app/partials/signup_invited.html',
|
||||
controller : 'InvitedCtrl',
|
||||
})
|
||||
.when('/user/password/send-reset-email', {
|
||||
templateUrl: 'app/partials/reset_password.html',
|
||||
controller : 'ResetPasswordCtrl',
|
||||
|
@ -365,3 +365,19 @@
|
||||
color: @orange;
|
||||
}
|
||||
|
||||
.signup-page-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url(/img/background_tease.jpg);
|
||||
|
||||
.signup-logo-container {
|
||||
width: 150px;
|
||||
margin: 0 auto;
|
||||
padding: 80px 0;
|
||||
}
|
||||
}
|
||||
|
@ -93,4 +93,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.login-page-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url(/img/background_tease.jpg);
|
||||
opacity: 0.15;
|
||||
z-index: -1;
|
||||
}
|
||||
|
BIN
public/img/background_tease.jpg
Normal file
BIN
public/img/background_tease.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 KiB |
Loading…
Reference in New Issue
Block a user