diff --git a/app/portainer/react/components/switch-field.ts b/app/portainer/react/components/switch-field.ts index 3c8a0ea0f..aa33f278c 100644 --- a/app/portainer/react/components/switch-field.ts +++ b/app/portainer/react/components/switch-field.ts @@ -8,6 +8,7 @@ export const switchField = r2a(SwitchField, [ 'label', 'name', 'labelClass', + 'fieldClass', 'dataCy', 'disabled', 'onChange', diff --git a/app/portainer/settings/general/ssl-certificate/ssl-certificate.html b/app/portainer/settings/general/ssl-certificate/ssl-certificate.html index 4af607819..08b37c7eb 100644 --- a/app/portainer/settings/general/ssl-certificate/ssl-certificate.html +++ b/app/portainer/settings/general/ssl-certificate/ssl-certificate.html @@ -1,22 +1,27 @@
- +
-

- +

+ Forcing HTTPs only will cause Portainer to stop listening on the HTTP port. Any edge agent environment that is using HTTP will no longer be available.

- - - -
+
+ +
- Provide a new SSL Certificate to replace the existing one that is used for HTTPS connections. + Provide a new SSL Certificate to replace the existing one that is used for HTTPS connections.
@@ -28,7 +33,7 @@ {{ $ctrl.formValues.certFile.name }} - +
@@ -49,7 +54,7 @@ {{ $ctrl.formValues.keyFile.name }} - +
@@ -61,7 +66,6 @@ -
+
+
@@ -205,24 +205,23 @@
- +
Backup configuration
-
-
- -
+
+
@@ -321,18 +320,24 @@
Security settings
- -
-
- +
@@ -340,7 +345,7 @@
-

This field is required.

+

This field is required.

@@ -381,11 +386,10 @@
Security settings
- -
+ +
@@ -393,7 +397,7 @@
- +
@@ -401,7 +405,7 @@
-

This field is required.

+

This field is required.

diff --git a/app/portainer/views/settings/settingsController.js b/app/portainer/views/settings/settingsController.js index 4206642f1..13ee6a71c 100644 --- a/app/portainer/views/settings/settingsController.js +++ b/app/portainer/views/settings/settingsController.js @@ -1,7 +1,7 @@ import angular from 'angular'; -import { buildOption } from '@/portainer/components/BoxSelector'; import { FeatureId } from '@/portainer/feature-flags/enums'; +import { options } from './options'; angular.module('portainer.app').controller('SettingsController', [ '$scope', @@ -14,10 +14,8 @@ angular.module('portainer.app').controller('SettingsController', [ 'Blob', function ($scope, $state, Notifications, SettingsService, StateManager, BackupService, FileSaver) { $scope.s3BackupFeatureId = FeatureId.S3_BACKUP_SETTING; - $scope.backupOptions = [ - buildOption('backup_file', 'fa fa-download', 'Download backup file', '', 'file'), - buildOption('backup_s3', 'fa fa-upload', 'Store in S3', 'Define a cron schedule', 's3', FeatureId.S3_BACKUP_SETTING), - ]; + + $scope.backupOptions = options; $scope.state = { isDemo: false, diff --git a/app/react/components/form-components/SwitchField/SwitchField.tsx b/app/react/components/form-components/SwitchField/SwitchField.tsx index 1072eef98..87d88d154 100644 --- a/app/react/components/form-components/SwitchField/SwitchField.tsx +++ b/app/react/components/form-components/SwitchField/SwitchField.tsx @@ -16,6 +16,7 @@ export interface Props { tooltip?: string; labelClass?: string; switchClass?: string; + fieldClass?: string; dataCy?: string; disabled?: boolean; featureId?: FeatureId; @@ -31,6 +32,7 @@ export function SwitchField({ label, name, labelClass, + fieldClass, dataCy, disabled, onChange, @@ -41,10 +43,10 @@ export function SwitchField({ const toggleName = name ? `toggle_${name}` : ''; return ( -