diff --git a/src/js/client.js b/src/js/client.js index 504c5a895..f09727a97 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -218,6 +218,14 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout region: null, size: null }; + this._features = { + userMaxCount: Infinity, + appMaxCount: 2, // unused checked on the appstore side, but just for completeness + externalLdap: true, + eventLog: true, + privateDockerRegistry: true, + branding: true + }; this._installedApps = []; this._installedAppsById = {}; this._appTags = []; @@ -365,6 +373,10 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout return this._config; }; + Client.prototype.getFeatures = function () { + return this._features; + }; + Client.prototype.setToken = function (accessToken) { if (!accessToken) localStorage.removeItem('token'); else localStorage.token = accessToken; diff --git a/src/views/activity.html b/src/views/activity.html index be1a00157..289395ae1 100644 --- a/src/views/activity.html +++ b/src/views/activity.html @@ -23,28 +23,33 @@
-
-
-

- - - - - - - - - - - - - - - - - - -
TimeSourceDetails
{{ eventLog.raw.creationTime | prettyDate }}{{ eventLog.source }}
{{ eventLog.raw.data | json }}
-
+
+
+
+ This features is only available in the business plan. +
+
+

+ + + + + + + + + + + + + + + + + + +
TimeSourceDetails
{{ eventLog.raw.creationTime | prettyDate }}{{ eventLog.source }}
{{ eventLog.raw.data | json }}
+
+
diff --git a/src/views/activity.js b/src/views/activity.js index a9b295624..105be9da4 100644 --- a/src/views/activity.js +++ b/src/views/activity.js @@ -7,6 +7,7 @@ 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 = []; diff --git a/src/views/settings.html b/src/views/settings.html index a98c858b4..d23bfc24e 100644 --- a/src/views/settings.html +++ b/src/views/settings.html @@ -351,8 +351,16 @@ Cloudron can pull and install apps from private docker registry.
+
-
+ +
+
+ This features is only available in the business plan. +
+
+ +
Server address
@@ -360,16 +368,19 @@ {{ registryConfig.currentConfig.serverAddress || 'Not set' }}
-
+ +
Username
{{ registryConfig.currentConfig.username || registryConfig.currentConfig.email || 'Not set' }}
-
+
+
-
+ +
diff --git a/src/views/settings.js b/src/views/settings.js index 7bebf2132..bddb3e130 100644 --- a/src/views/settings.js +++ b/src/views/settings.js @@ -2,7 +2,6 @@ /* global angular:false */ /* global $:false */ -/* global moment */ angular.module('Application').controller('SettingsController', ['$scope', '$location', '$rootScope', '$timeout', 'Client', function ($scope, $location, $rootScope, $timeout, Client) { Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); }); @@ -10,6 +9,7 @@ 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; diff --git a/src/views/users.html b/src/views/users.html index 3d4daa0b5..871dc4c0a 100644 --- a/src/views/users.html +++ b/src/views/users.html @@ -352,8 +352,8 @@

Users -

@@ -485,91 +485,98 @@

-
-
- Provider -
-
- {{ externalLdap.currentConfig.provider }} -
+
+ This features is only available in the business plan.
-
-
- Server URL +
+
+
+ Provider +
+
+ {{ externalLdap.currentConfig.provider }} +
-
- {{ externalLdap.currentConfig.url }} -
-
-
-
- Base DN +
+
+ Server URL +
+
+ {{ externalLdap.currentConfig.url }} +
-
- {{ externalLdap.currentConfig.baseDn }} -
-
-
-
- Filter +
+
+ Base DN +
+
+ {{ externalLdap.currentConfig.baseDn }} +
-
- {{ externalLdap.currentConfig.filter }} -
-
-
-
- Username Field +
+
+ Filter +
+
+ {{ externalLdap.currentConfig.filter }} +
-
- {{ externalLdap.currentConfig.usernameField || 'uid' }} -
-
-
-
- Auth +
+
+ Username Field +
+
+ {{ externalLdap.currentConfig.usernameField || 'uid' }} +
-
- {{ externalLdap.currentConfig.bindDn ? 'Yes' : 'No' }} -
-
-
-
- Automatically create users when they login to Cloudron +
+
+ Auth +
+
+ {{ externalLdap.currentConfig.bindDn ? 'Yes' : 'No' }} +
-
- {{ externalLdap.currentConfig.autoCreate ? 'Yes' : 'No' }} -
-
-
-
-
-
-
+
+
+ Automatically create users when they login to Cloudron +
+
+ {{ externalLdap.currentConfig.autoCreate ? 'Yes' : 'No' }} +
+
+ +
+
+
+
+
+
+
+
+ +
+
+

{{ externalLdap.message }}

+

+

{{ externalLdap.errorMessage }}
+

+
+ +
+ + + Show Logs
-
-
-

{{ externalLdap.message }}

-

-

{{ externalLdap.errorMessage }}
-

-
- -
- - - Show Logs -
-
diff --git a/src/views/users.js b/src/views/users.js index c5bf7d915..eb1ac9963 100644 --- a/src/views/users.js +++ b/src/views/users.js @@ -24,6 +24,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio $scope.groupsById = { }; $scope.config = Client.getConfig(); $scope.userInfo = Client.getUserInfo(); + $scope.features = Client.getFeatures(); $scope.allUsers = [];