Show in UI if new version available

This commit is contained in:
Arik Fraimovich
2015-11-30 16:38:42 +02:00
parent 5f33e7ea18
commit becb4decf1
2 changed files with 4 additions and 3 deletions

View File

@@ -125,9 +125,8 @@
<hr/>
<div class="container">
<div class="row">
<div class="col-md-3">
<a href="http://redash.io">re:dash</a> <span ng-bind="version"></span>
</div>
<a href="http://redash.io">re:dash</a> <span ng-bind="version"></span>
<small ng-if="newVersionAvailable"><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>

View File

@@ -152,6 +152,8 @@
var MainCtrl = function ($scope, $location, Dashboard, notifications) {
$scope.version = clientConfig.version;
$scope.newVersionAvailable = clientConfig.newVersionAvailable && currentUser.hasPermission("admin");
if (clientConfig.clientSideMetrics) {
$scope.$on('$locationChangeSuccess', function(event, newLocation, oldLocation) {
// This will be called once per actual page load.