Use features from config object

This commit is contained in:
Johannes Zellner
2020-02-13 16:34:37 +01:00
parent a13414ddb9
commit 0a29f92384
7 changed files with 9 additions and 24 deletions
+2 -2
View File
@@ -25,10 +25,10 @@
<div>
<div class="col-md-10 col-md-offset-1">
<div class="card card-block" style="max-width: 100%">
<div ng-hide="features.eventLog">
<div ng-hide="config.features.eventLog">
<b class="text-danger">This features is only available in the business plan.</b>
</div>
<div ng-show="features.eventLog">
<div ng-show="config.features.eventLog">
<center ng-show="busy"><h2><i class="fa fa-circle-notch fa-spin"></i></h2></center>
<table ng-hide="busy" class="table table-condensed table-hover">
<thead>
-1
View File
@@ -7,7 +7,6 @@ angular.module('Application').controller('ActivityController', ['$scope', '$loca
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
$scope.config = Client.getConfig();
$scope.features = Client.getFeatures();
$scope.busy = false;
$scope.eventLogs = [];
+4 -4
View File
@@ -354,13 +354,13 @@
<br/>
<div class="row" ng-hide="features.privateDockerRegistry">
<div class="row" ng-hide="config.features.privateDockerRegistry">
<div class="col-xs-12">
<b class="text-danger">This features is only available in the business plan.</b>
</div>
</div>
<div class="row" ng-show="features.privateDockerRegistry">
<div class="row" ng-show="config.features.privateDockerRegistry">
<div class="col-xs-6">
<span class="text-muted">Server address</span>
</div>
@@ -369,7 +369,7 @@
</div>
</div>
<div class="row" ng-show="features.privateDockerRegistry">
<div class="row" ng-show="config.features.privateDockerRegistry">
<div class="col-xs-6">
<span class="text-muted">Username</span>
</div>
@@ -380,7 +380,7 @@
<br/>
<div class="row" ng-show="features.privateDockerRegistry">
<div class="row" ng-show="config.features.privateDockerRegistry">
<div class="col-xs-12">
<button class="btn btn-primary pull-right" ng-click="registryConfig.show()">Configure Registry</button>
</div>
-1
View File
@@ -9,7 +9,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.client = Client;
$scope.user = Client.getUserInfo();
$scope.config = Client.getConfig();
$scope.features = Client.getFeatures();
$scope.installedApps = Client.getInstalledApps();
$scope.subscription = null;
+3 -3
View File
@@ -352,7 +352,7 @@
<h1>Users
<sup><a ng-href="{{ config.webServerOrigin }}/documentation/user-management/#users" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup>
<button class="btn btn-primary btn-outline pull-right" ng-click="useradd.show()" ng-disabled="features.userMaxCount <= allUsers.length" uib-tooltip="{{ features.userMaxCount <= allUsers.length ? 'Subscription required': '' }}" tooltip-class="long nowrap" tooltip-placement="left">
<button class="btn btn-primary btn-outline pull-right" ng-click="useradd.show()" ng-disabled="config.features.userMaxCount <= allUsers.length" uib-tooltip="{{ config.features.userMaxCount <= allUsers.length ? 'Subscription required': '' }}" tooltip-class="long nowrap" tooltip-placement="left">
<i class="fa fa-user-plus"></i> New User
</button>
</h1>
@@ -485,11 +485,11 @@
</div>
<br/>
<div ng-hide="features.externalLdap">
<div ng-hide="config.features.externalLdap">
<b class="text-danger">This features is only available in the business plan.</b>
</div>
<div ng-show="features.externalLdap">
<div ng-show="config.features.externalLdap">
<div class="row">
<div class="col-xs-6">
<span class="text-muted">Provider</span>
-1
View File
@@ -24,7 +24,6 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.groupsById = { };
$scope.config = Client.getConfig();
$scope.userInfo = Client.getUserInfo();
$scope.features = Client.getFeatures();
$scope.allUsers = [];