feat(setting): display custom banner option as the limited feature for be (#7590)

pull/7643/head
Oscar Zhou 2022-09-09 13:29:30 +12:00 committed by GitHub
parent d95a67a567
commit 9375e577b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View File

@ -31,4 +31,5 @@ export enum FeatureId {
CONTAINER_WEBHOOK = 'container-webhook',
POD_SECURITY_POLICY_CONSTRAINT = 'pod-security-policy-constraint',
HIDE_DOCKER_HUB_ANONYMOUS = 'hide-docker-hub-anonymous',
CUSTOM_LOGIN_BANNER = 'custom-login-banner',
}

View File

@ -36,6 +36,7 @@ export async function init(edition: Edition) {
[FeatureId.CONTAINER_WEBHOOK]: Edition.BE,
[FeatureId.POD_SECURITY_POLICY_CONSTRAINT]: Edition.BE,
[FeatureId.HIDE_DOCKER_HUB_ANONYMOUS]: Edition.BE,
[FeatureId.CUSTOM_LOGIN_BANNER]: Edition.BE,
};
state.currentEdition = currentEdition;

View File

@ -61,6 +61,21 @@
<a href="https://www.portainer.io/documentation/in-app-analytics-and-privacy-policy/" target="_blank">privacy policy</a>.
</div>
</div>
<!-- login screen banner -->
<div class="form-group">
<por-switch-field
label="'Login screen banner'"
name="'toggle_login_banner'"
feature-id="customBannerFeatureId"
checked="$formValues.customLoginBanner"
on-change="(onToggleCustomLoginBanner)"
field-class="'col-sm-12'"
label-class="'col-sm-2'"
></por-switch-field>
</div>
<!-- !login screen banner -->
<!-- templates -->
<div class="col-sm-12 form-section-title"> App Templates </div>
<div>

View File

@ -13,6 +13,7 @@ angular.module('portainer.app').controller('SettingsController', [
'FileSaver',
'Blob',
function ($scope, $state, Notifications, SettingsService, StateManager, BackupService, FileSaver) {
$scope.customBannerFeatureId = FeatureId.CUSTOM_LOGIN_BANNER;
$scope.s3BackupFeatureId = FeatureId.S3_BACKUP_SETTING;
$scope.backupOptions = options;