diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index 75a3dd57b..7d0020223 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -954,7 +954,7 @@ Global -

Application will be deployed as a DaemonSet with an instance on each node of the sdfh

+

Application will be deployed as a DaemonSet with an instance on each node of the cluster

diff --git a/app/portainer/components/form-components/web-editor-form/web-editor-form.html b/app/portainer/components/form-components/web-editor-form/web-editor-form.html index b644c2964..0eb061c7e 100644 --- a/app/portainer/components/form-components/web-editor-form/web-editor-form.html +++ b/app/portainer/components/form-components/web-editor-form/web-editor-form.html @@ -17,6 +17,7 @@         Enter - Find next
        Shift+Enter - Find previous
'" class-name="'[&>span]:!text-left'" + set-html-message="true" >         Shift+Enter - Find previous
'" class-name="'[&>span]:!text-left'" + set-html-message="true" >
diff --git a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js index c84d8c973..34dfe402b 100644 --- a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js +++ b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.controller.js @@ -2,8 +2,8 @@ import { FeatureId } from '@/react/portainer/feature-flags/enums'; class GitFormAutoUpdateFieldsetController { /* @ngInject */ - constructor($scope, clipboard) { - Object.assign(this, { $scope, clipboard }); + constructor($scope, clipboard, StateManager) { + Object.assign(this, { $scope, clipboard, StateManager }); this.onChangeAutoUpdate = this.onChangeField('RepositoryAutomaticUpdates'); this.onChangeMechanism = this.onChangeField('RepositoryMechanism'); @@ -29,6 +29,10 @@ class GitFormAutoUpdateFieldsetController { }); }; } + + $onInit() { + this.environmentType = this.StateManager.getState().endpoint.mode.provider; + } } export default GitFormAutoUpdateFieldsetController; diff --git a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html index 6408a9e0f..3c119e566 100644 --- a/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html +++ b/app/portainer/components/forms/git-form/git-form-auto-update-fieldset/git-form-auto-update-fieldset.html @@ -1,10 +1,16 @@ - + +
+ + + When enabled, at each polling interval or webhook invocation, if the git repo differs from what was stored locally on the last git pull, the changes are deployed. +
- Any changes to this stack or application made locally in Portainer will be overridden, which may cause service interruption. Do you wish to continue?Any changes to this stack or application that have been made locally via Portainer or directly in the cluster will be overwritten by the git repository content, which may + cause service interruption.
@@ -34,7 +41,13 @@
- +
{{ $ctrl.model.RepositoryWebhookURL | truncatelr }}
- +
-
- - When enabled, enforces automatic deployment at each interval or webhook invocation. -
-
- - When enabled, updates from the git repository will occur automatically at an interval or webhook. -
diff --git a/app/portainer/react/components/index.ts b/app/portainer/react/components/index.ts index 793ff68ce..a40d89bc6 100644 --- a/app/portainer/react/components/index.ts +++ b/app/portainer/react/components/index.ts @@ -52,7 +52,7 @@ export const componentsModule = angular ) .component( 'portainerTooltip', - r2a(Tooltip, ['message', 'position', 'className']) + r2a(Tooltip, ['message', 'position', 'className', 'setHtmlMessage']) ) .component('badge', r2a(Badge, ['type', 'className'])) .component('fileUploadField', fileUploadField) diff --git a/app/portainer/react/components/switch-field.ts b/app/portainer/react/components/switch-field.ts index e27260fcf..4b306328f 100644 --- a/app/portainer/react/components/switch-field.ts +++ b/app/portainer/react/components/switch-field.ts @@ -14,4 +14,5 @@ export const switchField = r2a(SwitchField, [ 'onChange', 'featureId', 'switchClass', + 'setTooltipHtmlMessage', ]); diff --git a/app/portainer/views/logout/logout.html b/app/portainer/views/logout/logout.html index 196e6fb62..b9f16d7c2 100644 --- a/app/portainer/views/logout/logout.html +++ b/app/portainer/views/logout/logout.html @@ -9,7 +9,7 @@
Logout in progress... - +
diff --git a/app/react/components/Tip/Tooltip/Tooltip.tsx b/app/react/components/Tip/Tooltip/Tooltip.tsx index 48f443e97..908e4f0e0 100644 --- a/app/react/components/Tip/Tooltip/Tooltip.tsx +++ b/app/react/components/Tip/Tooltip/Tooltip.tsx @@ -1,4 +1,6 @@ import { HelpCircle } from 'lucide-react'; +import { useMemo } from 'react'; +import sanitize from 'sanitize-html'; import { TooltipWithChildren, Position } from '../TooltipWithChildren'; @@ -6,12 +8,27 @@ export interface Props { position?: Position; message: string; className?: string; + setHtmlMessage?: boolean; } -export function Tooltip({ message, position = 'bottom', className }: Props) { +export function Tooltip({ + message, + position = 'bottom', + className, + setHtmlMessage, +}: Props) { + // allow angular views to set html messages for the tooltip + const htmlMessage = useMemo(() => { + if (setHtmlMessage) { + // eslint-disable-next-line react/no-danger + return
; + } + return null; + }, [setHtmlMessage, message]); + return ( diff --git a/app/react/components/Tip/TooltipWithChildren/TooltipWithChildren.tsx b/app/react/components/Tip/TooltipWithChildren/TooltipWithChildren.tsx index 4e6b7f4f0..853ad779c 100644 --- a/app/react/components/Tip/TooltipWithChildren/TooltipWithChildren.tsx +++ b/app/react/components/Tip/TooltipWithChildren/TooltipWithChildren.tsx @@ -15,7 +15,7 @@ export type Position = 'top' | 'right' | 'bottom' | 'left'; export interface Props { position?: Position; - message: string; + message: React.ReactNode; className?: string; children: React.ReactElement; heading?: string; diff --git a/app/react/components/form-components/Slider/Slider.module.css b/app/react/components/form-components/Slider/Slider.module.css index 6cd2af8d5..fef6ae831 100644 --- a/app/react/components/form-components/Slider/Slider.module.css +++ b/app/react/components/form-components/Slider/Slider.module.css @@ -53,4 +53,6 @@ box-shadow: 0 2px 4px 0 rgb(34 36 38 / 12%), 0 2px 10px 0 rgb(34 36 38 / 15%); padding: 8px 12px; text-align: center; + user-select: none; + cursor: pointer; } diff --git a/app/react/components/form-components/SwitchField/SwitchField.tsx b/app/react/components/form-components/SwitchField/SwitchField.tsx index df78067ad..6ddf6cfbf 100644 --- a/app/react/components/form-components/SwitchField/SwitchField.tsx +++ b/app/react/components/form-components/SwitchField/SwitchField.tsx @@ -20,6 +20,7 @@ export interface Props { dataCy?: string; disabled?: boolean; featureId?: FeatureId; + setTooltipHtmlMessage?: boolean; } export function SwitchField({ @@ -34,6 +35,7 @@ export function SwitchField({ onChange, featureId, switchClass, + setTooltipHtmlMessage, }: Props) { const toggleName = name ? `toggle_${name}` : ''; @@ -47,7 +49,9 @@ export function SwitchField({ )} > {label} - {tooltip && } + {tooltip && ( + + )}