Skip to content

Commit

Permalink
Merge pull request #116 from EventStore/redirect-if-projections-disabled
Browse files Browse the repository at this point in the history
👍
  • Loading branch information
pgermishuys committed Feb 22, 2016
2 parents 89769e0 + 7431047 commit 136d3db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/modules/projections/controllers/ProjectionsListCtrl.js
Expand Up @@ -3,9 +3,14 @@ define(['./_module'], function (app) {
'use strict';

return app.controller('ProjectionsListCtrl', [
'$scope', 'ProjectionsService', 'ProjectionsMapper', 'poller', 'MessageService',
function ($scope, projectionsService, projectionsMapper, pollerProvider, msg) {
'$rootScope', '$scope', 'ProjectionsService', 'ProjectionsMapper', 'poller', 'MessageService', '$state',
function ($rootScope, $scope, projectionsService, projectionsMapper, pollerProvider, msg, $state) {

if(!$rootScope.projectionsAllowed) {
msg.failure('Projections are not enabled on the node');
$state.go('dashboard.list');
}

var all = pollerProvider.create({
interval: 2000,
action: projectionsService.all,
Expand Down

0 comments on commit 136d3db

Please sign in to comment.