Skip to content

Commit f1bf287

Browse files
authored
Merge pull request #258 from EventStore/deprecate-atom
Show streams browser based on atomPub feature
2 parents 540ea70 + 081dcc5 commit f1bf287

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

src/js/config/routes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ define(['es-ui'], function (app) {
2121
$scope.notAdminMessage = 'You must be an admin to view this item';
2222
$scope.notAdminOrOpsMessage = 'You must be in the $admins or $ops group to view this item';
2323
$scope.projectionsNotRunningMessage = 'Projections are not running on Event Store';
24+
$scope.atomDisabledMessage = 'AtomPub over HTTP has been disabled on the server';
2425
}]
2526
});
2627
}]);

src/js/modules/security/controllers/SignInCtrl.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ define(['./_module'], function (app) {
2727
$rootScope.singleNode = true;
2828
$rootScope.esVersion = info.esVersion || '0.0.0.0';
2929
$rootScope.esVersion = $rootScope.esVersion === '0.0.0.0' ? 'development build' : $rootScope.esVersion;
30-
$rootScope.projectionsEnabled = info.features.projections === true;
31-
$rootScope.userManagementEnabled = info.features.userManagement === true;
30+
$rootScope.projectionsEnabled = info.features.projections === true;
31+
$rootScope.userManagementEnabled = info.features.userManagement === true;
32+
$rootScope.streamsBrowserEnabled = info.features.atomPub === true;
3233

3334
authService.getUserGroups($scope.log.username).then(function(groups) {
3435
authService.setCredentials($scope.log.username, $scope.log.password, $scope.log.server, groups);

src/js/modules/streams/controllers/StreamsListCtrl.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ define(['./_module'], function (app) {
55
return app.controller('StreamsListCtrl', [
66
'$rootScope', '$scope', '$state', 'StreamsService', 'MessageService',
77
function ($rootScope, $scope, $state, streamsService, msg) {
8-
98
function filter (entries) {
109
var filtered = {}, i = 0, length = entries.length, item, result = [];
1110

src/js/run.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ define(['es-ui'], function (app) {
3131
$rootScope.esVersion = $rootScope.esVersion === '0.0.0.0' ? 'development build' : $rootScope.esVersion;
3232
$rootScope.projectionsEnabled = info.features.projections === true;
3333
$rootScope.userManagementEnabled = info.features.userManagement === true;
34+
$rootScope.streamsBrowserEnabled = info.features.atomPub === true;
3435

3536
if($rootScope.isAdminOrOps) {
3637
scavengeNotificationService.start();

src/js/templates/templates.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/views/index.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1 class="site-title">
1212
<li ng-if="!singleNode" class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('clusterstatus') }">
1313
<a ui-sref="clusterstatus.list">Cluster Status</a>
1414
</li>
15-
<li class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('streams') }">
15+
<li ng-if="streamsBrowserEnabled" class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('streams') }">
1616
<a ui-sref="streams.list">Stream Browser</a>
1717
</li>
1818
<li ng-if="projectionsEnabled" class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('projections') }">

src/views/index.tpl.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ <h1 class="site-title">
1212
<li ng-if="!singleNode" class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('clusterstatus') }">
1313
<a ui-sref="clusterstatus.list">Cluster Status</a>
1414
</li>
15-
<li class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('streams') }">
16-
<a ui-sref="streams.list">Stream Browser</a>
15+
<li class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('streams') }" title="{{!streamsBrowserEnabled ? atomDisabledMessage : ''}}">
16+
<a ng-class="{'disabled':!streamsBrowserEnabled}" ui-sref="streams.list">Stream Browser</a>
1717
</li>
1818
<li class="site-nav__item" ng-class="{'site-nav__item--active': $state.includes('projections') }" title="{{!isAdminOrOps ? notAdminOrOpsMessage : !projectionsEnabled ? projectionsNotRunningMessage : ''}}">
1919
<a ng-class="{'disabled': !projectionsEnabled}" ui-sref="projections.list">Projections</a>

0 commit comments

Comments
 (0)