fix(stacks): add app form stacks input [EE-6693] (#11104)

pull/11176/head
Ali 10 months ago committed by GitHub
parent cdf9197274
commit 56ae19c5ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -141,7 +141,7 @@ export const ngModule = angular
), ),
{ stackName: 'setStackName' } { stackName: 'setStackName' }
), ),
['setStackName', 'stackName', 'stacks', 'inputClassName'] ['setStackName', 'stackName', 'stacks', 'inputClassName', 'textTip']
) )
) )
.component( .component(

@ -169,6 +169,7 @@
ng-if="!ctrl.deploymentOptions.hideStacksFunctionality && ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" ng-if="!ctrl.deploymentOptions.hideStacksFunctionality && ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
stack-name="ctrl.formValues.StackName" stack-name="ctrl.formValues.StackName"
set-stack-name="(ctrl.onChangeStackName)" set-stack-name="(ctrl.onChangeStackName)"
text-tip="'Portainer can automatically bundle multiple applications inside a stack. Enter a name of a new stack or select an existing stack in the list. Leave empty to use the application name.'"
stacks="ctrl.stacks" stacks="ctrl.stacks"
input-class-name="'col-lg-10 col-sm-9'" input-class-name="'col-lg-10 col-sm-9'"
></kube-stack-name> ></kube-stack-name>
@ -226,9 +227,10 @@
<div ng-if="ctrl.formValues.ResourcePool"> <div ng-if="ctrl.formValues.ResourcePool">
<!-- #region STACK --> <!-- #region STACK -->
<kube-stack-name <kube-stack-name
ng-if="ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" ng-if="!ctrl.deploymentOptions.hideStacksFunctionality"
stack-name="ctrl.formValues.StackName" stack-name="ctrl.formValues.StackName"
set-stack-name="(ctrl.onChangeStackName)" set-stack-name="(ctrl.onChangeStackName)"
text-tip="'Portainer can automatically bundle multiple applications inside a stack. Enter a name of a new stack or select an existing stack in the list. Leave empty to use the application name.'"
stacks="ctrl.stacks" stacks="ctrl.stacks"
input-class-name="'col-lg-10 col-sm-9'" input-class-name="'col-lg-10 col-sm-9'"
></kube-stack-name> ></kube-stack-name>

@ -13,6 +13,7 @@ type Props = {
setStackName: (name: string) => void; setStackName: (name: string) => void;
stacks?: string[]; stacks?: string[];
inputClassName?: string; inputClassName?: string;
textTip?: string;
}; };
export function StackName({ export function StackName({
@ -20,6 +21,7 @@ export function StackName({
setStackName, setStackName,
stacks = [], stacks = [],
inputClassName, inputClassName,
textTip = "Enter or select a 'stack' name to group multiple deployments together, or else leave empty to ignore.",
}: Props) { }: Props) {
const { isAdmin } = useCurrentUser(); const { isAdmin } = useCurrentUser();
const stackResults = useMemo( const stackResults = useMemo(
@ -73,8 +75,7 @@ export function StackName({
</div> </div>
<TextTip className="mb-4" color="blue"> <TextTip className="mb-4" color="blue">
Enter or select a &apos;stack&apos; name to group multiple deployments {textTip}
together, or else leave empty to ignore.
</TextTip> </TextTip>
<div className="form-group"> <div className="form-group">
<label <label

Loading…
Cancel
Save