Skip to content

Commit

Permalink
Merge pull request #659 from getredash/fixes_151118
Browse files Browse the repository at this point in the history
Add footer to the layout, to have links to docs & GitHub
  • Loading branch information
arikfr committed Nov 18, 2015
2 parents 3a6c159 + a3d0590 commit 7a95dec
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
17 changes: 17 additions & 0 deletions rd_ui/app/index.html
Expand Up @@ -120,6 +120,23 @@
<edit-dashboard-form dashboard="newDashboard" id="new_dashboard_dialog"></edit-dashboard-form>
<div ng-view></div>

{% raw %}
<div class="container-fluid footer">
<hr/>
<div class="container">
<div class="row">
<div class="col-md-3">
re:dash <span ng-bind="version"></span>
</div>
<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 %}

<script src="/bower_components/jquery/jquery.js"></script>

<!-- build:js /scripts/plugins.js -->
Expand Down
2 changes: 1 addition & 1 deletion rd_ui/app/scripts/controllers/controllers.js
Expand Up @@ -151,14 +151,14 @@
}

var MainCtrl = function ($scope, $location, Dashboard, notifications) {
$scope.version = clientConfig.version;
if (clientConfig.clientSideMetrics) {
$scope.$on('$locationChangeSuccess', function(event, newLocation, oldLocation) {
// This will be called once per actual page load.
Bucky.sendPagePerformance();
});
}


$scope.dashboards = [];
$scope.reloadDashboards = function () {
Dashboard.query(function (dashboards) {
Expand Down
13 changes: 13 additions & 0 deletions rd_ui/app/styles/redash.css
Expand Up @@ -435,3 +435,16 @@ div.table-name {
.log-container {
margin-bottom: 50px;
}

/* Footer */

.footer {
color: #818d9f;
padding-bottom: 30px;
}

.footer a {
color: #818d9f;
margin-left: 20px;
}

3 changes: 2 additions & 1 deletion rd_ui/app/views/index.html
Expand Up @@ -17,4 +17,5 @@ <h2>Dashboards</h2>
<a href="/admin/status" class="list-group-item">Status</a>
</div>
</div>
</div>
</div>

5 changes: 3 additions & 2 deletions redash/handlers/static.py
Expand Up @@ -4,7 +4,7 @@
from flask import render_template, send_from_directory, current_app
from flask_login import current_user, login_required

from redash import settings
from redash import settings, __version__
from redash.wsgi import app


Expand Down Expand Up @@ -41,7 +41,8 @@ def index(**kwargs):
'allowScriptsInUserInput': settings.ALLOW_SCRIPTS_IN_USER_INPUT,
'highChartsTurboThreshold': settings.HIGHCHARTS_TURBO_THRESHOLD,
'dateFormat': settings.DATE_FORMAT,
'dateTimeFormat': "{0} HH:mm".format(settings.DATE_FORMAT)
'dateTimeFormat': "{0} HH:mm".format(settings.DATE_FORMAT),
'version': __version__
}

return render_template("index.html", user=json.dumps(user), name=settings.NAME,
Expand Down

0 comments on commit 7a95dec

Please sign in to comment.