Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderlz committed Mar 17, 2016
2 parents 629c16a + 9e6e913 commit c2f3c55
Show file tree
Hide file tree
Showing 64 changed files with 1,640 additions and 385 deletions.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
pre:
- pip install -r requirements_dev.txt
- pip install -r requirements.txt
- pip install pymongo==3.2.1
- if [ "$CIRCLE_BRANCH" = "master" ]; then make deps; fi
cache_directories:
- rd_ui/node_modules/
Expand Down
15 changes: 2 additions & 13 deletions rd_ui/app/app_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,8 @@ <h1><span class="glyphicon glyphicon-lock"></span></h1>
<hr>
Source: {{location}}
</div>
<div class="container-fluid footer hidden-print">
<hr/>
<div class="container">
<div class="row">
<a href="http://redash.io">re:dash</a> <span ng-bind="version"></span>
<small ng-if="newVersionAvailable" ng-cloak class="ng-cloak"><a href="http://version.redash.io/">(new re:dash version available)</a></small>
<div class="pull-right">
<a href="http://docs.redash.io/">Docs</a>
<a href="http://github.com/getredash/redash">Contribute</a>
</div>
</div>
</div>
</div>
{% endraw %}
{% include 'footer.html' %}
{% endif %}

{% include 'vendor_scripts.html' %}
Expand Down Expand Up @@ -121,6 +109,7 @@ <h1><span class="glyphicon glyphicon-lock"></span></h1>

{{ analytics|safe }}
</script>
{% include '_includes/tail.html' %}

</body>
</html>
Binary file added rd_ui/app/images/logo_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
153 changes: 57 additions & 96 deletions rd_ui/app/login.html
Original file line number Diff line number Diff line change
@@ -1,109 +1,70 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>{{name}} Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{% extends "signed_out_layout.html" %}
{% block content %}

<!-- build:css /styles/main_login.css -->
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="/styles/redash.css">
<link rel="stylesheet" href="/styles/login.css">
<!-- endbuild -->
<div class="row">
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-warning" role="alert">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}

<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
</head>
<body>
<div class="main">
{% if show_google_openid %}

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><img src="/images/redash_icon_small.png"/></a>
</div>
</div>
</nav>

<div class="container">
<div class="row">
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-warning" role="alert">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}

<div class="main">
{% if show_google_openid %}

<div class="row">
<a href="{{ google_auth_url }}"><img src="/google_login.png" class="login-button"/></a>
</div>

<div class="login-or">
<hr class="hr-or">
<span class="span-or">or</span>
</div>

{% endif %}

{% if show_saml_login %}

<div class="row">
<a href="/saml/login">SAML Login</a>
</div>

<div class="login-or">
<hr class="hr-or">
<span class="span-or">or</span>
</div>

{% endif %}
<a href="{{ google_auth_url }}"><img src="/google_login.png" class="login-button"/></a>
</div>

<form role="form" method="post" name="login">
<div class="form-group">
<label for="inputEmail">Email</label>
<input type="text" class="form-control" id="inputEmail" name="email" value="{{email}}">
</div>
<div class="form-group">
<!--<a class="pull-right" href="#">Forgot password?</a>-->
<label for="inputPassword">Password</label>
<input type="password" class="form-control" id="inputPassword" name="password">
</div>
<div class="checkbox pull-right">
<label>
<input type="checkbox" name="remember">
Remember me </label>
</div>
<div class="login-or">
<hr class="hr-or">
<span class="span-or">or</span>
</div>

<button type="submit" class="btn btn btn-primary">
Log In
</button>
</form>
{% endif %}

{% if show_saml_login %}

</div>
<div class="row">
<a href="/saml/login">SAML Login</a>
</div>

<div class="login-or">
<hr class="hr-or">
<span class="span-or">or</span>
</div>
</div>

<script src="/bower_components/jquery/jquery.js"></script>
{% endif %}

<form role="form" method="post" name="login">
<div class="form-group">
<label for="inputEmail">Email</label>
<input type="text" class="form-control" id="inputEmail" name="email" value="{{email}}">
</div>
<div class="form-group">
<!--<a class="pull-right" href="#">Forgot password?</a>-->
<label for="inputPassword">Password</label>
<input type="password" class="form-control" id="inputPassword" name="password">
</div>
<div class="checkbox pull-right">
<label>
<input type="checkbox" name="remember">
Remember me </label>
</div>

<button type="submit" class="btn btn btn-primary">
Log In
</button>
</form>


</div>
<div class="main text-center">
<hr>
<a href="{{ url_for("redash.forgot_password", org_slug=org_slug) }}">I forgot my password</a>
</div>

<script>
{{ analytics|safe }}
</script>
</div>

</body>
</html>
{% endblock %}
7 changes: 0 additions & 7 deletions rd_ui/app/public.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{base_href}}"><img src="/images/redash_icon_small.png"/></a>
</div>
</div>
Expand Down
11 changes: 10 additions & 1 deletion rd_ui/app/scripts/controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@
growl.addErrorMessage(message);
});
};

$scope.sendPasswordReset = function() {
$scope.disablePasswordResetButton = true;
$http.post('api/users/' + $scope.user.id + '/reset_password').success(function(user) {
$scope.disablePasswordResetButton = false;
growl.addSuccessMessage("The user should receive a link to reset his password by email soon.")
});
};
};

var NewUserCtrl = function ($scope, $location, growl, Events, User) {
Expand All @@ -328,8 +336,9 @@
}

$scope.user.$save(function(user) {
$scope.user = user;
$scope.user.created = true;
growl.addSuccessMessage("Saved.")
$location.path('/users/' + user.id).replace();
}, function(error) {
var message = error.data.message || "Failed saving.";
growl.addErrorMessage(message);
Expand Down
11 changes: 11 additions & 0 deletions rd_ui/app/scripts/directives/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@
}
}]);

directives.directive('emailSettingsWarning', function() {
return {
restrict: 'E',
template: '<p class="alert alert-warning" ng-if="showMailWarning">It looks like your mail server isn\'t configured, make sure to configure it for the {{function}} to work.</p>',
link: function(scope, elements, attrs) {
scope.showMailWarning = clientConfig.mailSettingsMissing && currentUser.isAdmin;
scope.function = attrs.function;
}
}
});

directives.directive('rdTabs', ['$location', function ($location) {
return {
restrict: 'E',
Expand Down
2 changes: 1 addition & 1 deletion rd_ui/app/scripts/directives/query_directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
link: function($scope) {
$scope.formatQuery = function formatQuery() {
$scope.queryFormatting = true;
$http.post('/api/queries/format', {
$http.post('api/queries/format', {
'query': $scope.query.query
}).success(function (response) {
$scope.query.query = response;
Expand Down
45 changes: 45 additions & 0 deletions rd_ui/app/signed_out_layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>{% block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- build:css /styles/main_login.css -->
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="/styles/redash.css">
<link rel="stylesheet" href="/styles/login.css">
<!-- endbuild -->

<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
</head>
<body>

<nav class="navbar navbar-default navbar-trans navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/"><img src="/images/logo_white.png"/></a>
</div>
</div>
</nav>

<div class="container content">
{% block content %}
{% endblock %}
</div>

<!-- build:js /scripts/layout_vendor.js -->
<script src="/bower_components/jquery/jquery.js"></script>
<!-- endbuild -->

<script>
{{ analytics|safe }}
</script>

</body>
</html>
54 changes: 53 additions & 1 deletion rd_ui/app/styles/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,56 @@ img.login-button {
display: block;
margin-left: auto;
margin-right: auto;
}
}

.navbar-brand {
padding: 0;
margin-top: 7px;
margin-left: 0 !important;
}

.navbar-brand img {
height: 60px !important;
}

.content {
padding-top: 20px;
}

.container-footer {
width: 100%;
margin-top: 20px;

padding-top:20px;
padding-bottom:20px;
background-color:#668899;
color:#FCFFF2;
}

.container-footer a {
color:#FCFFF2;
}

.navbar-brand {
padding: 0;
margin-top: 7px;
margin-left: 0 !important;
}
#main-header-links {
margin-top: 18px;
background-color:#668899;
}
.navbar-trans {
height: 79px;
padding: 0;
background-color:#668899;
border:0px;
color:#FCFFF2;
}
nav a, .container-footer a {
color:rgba(255,255,255,0.6) !important;
}
.header-link:hover {
color:#FCFFF2 !important;
}

1 change: 1 addition & 0 deletions rd_ui/app/views/alerts/edit.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="container">
<email-settings-warning function="alert emails"></email-settings-warning>
<ol class="breadcrumb">
<li><a href="alerts">Alerts</a></li>
<li class="active">{{alert.name || getDefaultName() || "New"}}</li>
Expand Down
Loading

0 comments on commit c2f3c55

Please sign in to comment.