mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
chore(data-cy): require data-cy attributes [EE-6880] (#11453)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
This commit is contained in:
parent
3cad13388c
commit
d38085a560
538 changed files with 2571 additions and 595 deletions
|
@ -29,6 +29,7 @@ export function AutoScalingFormSection({
|
|||
{!isMetricsEnabled && <NoMetricsServerWarning />}
|
||||
<SwitchField
|
||||
disabled={!isMetricsEnabled}
|
||||
data-cy="k8sAppCreate-autoScaleSwitch"
|
||||
label="Enable auto scaling for this application"
|
||||
labelClass="col-sm-3 col-lg-2"
|
||||
checked={values.isUsed}
|
||||
|
@ -50,9 +51,9 @@ export function AutoScalingFormSection({
|
|||
}}
|
||||
/>
|
||||
{values.isUsed && (
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 w-full gap-x-4 gap-y-2 my-3">
|
||||
<div className="flex flex-col min-w-fit">
|
||||
<label htmlFor="min-instances" className="font-normal text-xs">
|
||||
<div className="my-3 grid w-full grid-cols-1 gap-x-4 gap-y-2 md:grid-cols-3">
|
||||
<div className="flex min-w-fit flex-col">
|
||||
<label htmlFor="min-instances" className="text-xs font-normal">
|
||||
Minimum instances
|
||||
</label>
|
||||
<Input
|
||||
|
@ -71,8 +72,8 @@ export function AutoScalingFormSection({
|
|||
/>
|
||||
{errors?.minReplicas && <FormError>{errors.minReplicas}</FormError>}
|
||||
</div>
|
||||
<div className="flex flex-col min-w-fit">
|
||||
<label htmlFor="max-instances" className="font-normal text-xs">
|
||||
<div className="flex min-w-fit flex-col">
|
||||
<label htmlFor="max-instances" className="text-xs font-normal">
|
||||
Maximum instances
|
||||
</label>
|
||||
<Input
|
||||
|
@ -90,10 +91,10 @@ export function AutoScalingFormSection({
|
|||
/>
|
||||
{errors?.maxReplicas && <FormError>{errors.maxReplicas}</FormError>}
|
||||
</div>
|
||||
<div className="flex flex-col min-w-fit">
|
||||
<div className="flex min-w-fit flex-col">
|
||||
<label
|
||||
htmlFor="cpu-threshold"
|
||||
className="font-normal text-xs flex items-center"
|
||||
className="flex items-center text-xs font-normal"
|
||||
>
|
||||
Target CPU usage (<b>%</b>)
|
||||
<Tooltip message="The autoscaler will ensure enough instances are running to maintain an average CPU usage across all instances." />
|
||||
|
@ -135,7 +136,10 @@ function NoMetricsServerWarning() {
|
|||
{isAdmin && (
|
||||
<>
|
||||
Server metrics features must be enabled in the{' '}
|
||||
<Link to="kubernetes.cluster.setup">
|
||||
<Link
|
||||
to="kubernetes.cluster.setup"
|
||||
data-cy="environment-configuration-view"
|
||||
>
|
||||
environment configuration view
|
||||
</Link>
|
||||
.
|
||||
|
|
|
@ -46,8 +46,7 @@ export function ConfigMapsFormSection({
|
|||
onChange={onChange}
|
||||
errors={errors}
|
||||
isDeleteButtonHidden
|
||||
deleteButtonDataCy="k8sAppCreate-configRemoveButton"
|
||||
addButtonDataCy="k8sAppCreate-configAddButton"
|
||||
data-cy="k8sAppCreate-config"
|
||||
disabled={configMaps.length === 0}
|
||||
addButtonError={
|
||||
configMaps.length === 0
|
||||
|
|
|
@ -74,6 +74,7 @@ export function ConfigurationItem({
|
|||
className={clsx('!ml-0', { active: !item.overriden })}
|
||||
onClick={() => onToggleOverride(false)}
|
||||
icon={RotateCw}
|
||||
data-cy={`k8sAppCreate-add${configurationType}AutoButton_${index}`}
|
||||
>
|
||||
Auto
|
||||
</Button>
|
||||
|
@ -83,6 +84,7 @@ export function ConfigurationItem({
|
|||
className={clsx('!ml-0 mr-1', { active: item.overriden })}
|
||||
onClick={() => onToggleOverride(true)}
|
||||
icon={List}
|
||||
data-cy={`k8sAppCreate-add${configurationType}OverrideButton_${index}`}
|
||||
>
|
||||
Override
|
||||
</Button>
|
||||
|
@ -92,8 +94,9 @@ export function ConfigurationItem({
|
|||
color="dangerlight"
|
||||
size="medium"
|
||||
onClick={onRemoveItem}
|
||||
className="!ml-0 vertical-center btn-only-icon"
|
||||
className="vertical-center btn-only-icon !ml-0"
|
||||
icon={Trash2}
|
||||
data-cy={`k8sAppCreate-remove${configurationType}Button_${index}`}
|
||||
/>
|
||||
</div>
|
||||
{!item.overriden && (
|
||||
|
|
|
@ -36,10 +36,15 @@ export function ConfigurationData({
|
|||
? overrideKeysErrors[keyIndex]
|
||||
: undefined;
|
||||
return (
|
||||
<div className="flex items-start gap-x-2 gap-y-2 flex-wrap">
|
||||
<div className="flex flex-wrap items-start gap-x-2 gap-y-2">
|
||||
<InputGroup size="small" className="min-w-[250px]">
|
||||
<InputGroup.Addon>Key</InputGroup.Addon>
|
||||
<InputGroup.Input type="text" value={value.key} disabled />
|
||||
<InputGroup.Input
|
||||
type="text"
|
||||
value={value.key}
|
||||
disabled
|
||||
data-cy={`k8sAppCreate-${dataCyType}KeyInput_${configurationIndex}_${keyIndex}`}
|
||||
/>
|
||||
</InputGroup>
|
||||
<InputGroup size="small">
|
||||
<InputGroup.ButtonWrapper>
|
||||
|
|
|
@ -46,8 +46,7 @@ export function SecretsFormSection({
|
|||
onChange={onChange}
|
||||
errors={errors}
|
||||
isDeleteButtonHidden
|
||||
deleteButtonDataCy="k8sAppCreate-secretRemoveButton"
|
||||
addButtonDataCy="k8sAppCreate-secretAddButton"
|
||||
data-cy="k8sAppCreate-secret"
|
||||
disabled={secrets.length === 0}
|
||||
addButtonError={
|
||||
secrets.length === 0
|
||||
|
|
|
@ -29,6 +29,7 @@ export function EditYamlFormSection({
|
|||
return (
|
||||
<div>
|
||||
<WebEditorForm
|
||||
data-cy="k8s-yaml-editor"
|
||||
value={values}
|
||||
readonly={!isAllowedToEdit}
|
||||
titleContent={<TitleContent isComposeFormat={isComposeFormat} />}
|
||||
|
|
|
@ -44,7 +44,7 @@ export function PersistedFolderItem({
|
|||
const formikError = isErrorType(error) ? error : undefined;
|
||||
|
||||
return (
|
||||
<div className="flex items-start flex-wrap gap-x-2 gap-y-2">
|
||||
<div className="flex flex-wrap items-start gap-x-2 gap-y-2">
|
||||
<div>
|
||||
<InputGroup
|
||||
size="small"
|
||||
|
@ -99,7 +99,7 @@ export function PersistedFolderItem({
|
|||
<InputGroup
|
||||
size="small"
|
||||
className={clsx(
|
||||
'min-w-fit flex',
|
||||
'flex min-w-fit',
|
||||
item.needsDeletion && 'striked'
|
||||
)}
|
||||
>
|
||||
|
@ -107,7 +107,7 @@ export function PersistedFolderItem({
|
|||
Requested size
|
||||
</InputGroup.Addon>
|
||||
<Input
|
||||
className="!rounded-none -mr-[1px] !w-20"
|
||||
className="-mr-[1px] !w-20 !rounded-none"
|
||||
type="number"
|
||||
placeholder="e.g. 20"
|
||||
min="0"
|
||||
|
|
|
@ -61,8 +61,7 @@ export function PersistedFoldersFormSection({
|
|||
isEdit && applicationValues.ApplicationType === 'StatefulSet'
|
||||
}
|
||||
canUndoDelete={isEdit}
|
||||
deleteButtonDataCy="k8sAppCreate-persistentFolderRemoveButton"
|
||||
addButtonDataCy="k8sAppCreate-persistentFolderAddButton"
|
||||
data-cy="k8sAppCreate-persistentFolder"
|
||||
disabled={storageClasses.length === 0}
|
||||
addButtonError={getAddButtonError(storageClasses)}
|
||||
isAddButtonHidden={!isAddPersistentFolderButtonShown}
|
||||
|
|
|
@ -42,7 +42,7 @@ export function PlacementFormSection({ values, onChange, errors }: Props) {
|
|||
following placement rules. Placement rules are based on node labels.
|
||||
</TextTip>
|
||||
)}
|
||||
<InputList
|
||||
<InputList<Placement>
|
||||
value={values.placements}
|
||||
onChange={(placements) => onChange({ ...values, placements })}
|
||||
renderItem={(item, onChange, index, error) => (
|
||||
|
@ -63,7 +63,7 @@ export function PlacementFormSection({ values, onChange, errors }: Props) {
|
|||
errors={errors?.placements}
|
||||
addLabel="Add rule"
|
||||
canUndoDelete
|
||||
deleteButtonDataCy="k8sAppCreate-deletePlacementButton"
|
||||
data-cy="k8sAppCreate-placement"
|
||||
disabled={Object.keys(availableNodeLabels).length === 0}
|
||||
addButtonError={
|
||||
Object.keys(availableNodeLabels).length === 0
|
||||
|
|
|
@ -32,7 +32,7 @@ export function PlacementItem({
|
|||
return (
|
||||
<div className="w-full">
|
||||
<div className="flex w-full gap-2">
|
||||
<div className="basis-1/2 grow">
|
||||
<div className="grow basis-1/2">
|
||||
<Select
|
||||
options={labelOptions}
|
||||
value={{ label: item.label, value: item.label }}
|
||||
|
@ -54,7 +54,7 @@ export function PlacementItem({
|
|||
<FormError>{placementError.label}</FormError>
|
||||
)}
|
||||
</div>
|
||||
<div className="basis-1/2 grow">
|
||||
<div className="grow basis-1/2">
|
||||
<Select
|
||||
options={valueOptions}
|
||||
value={valueOptions?.find((option) => option.value === item.value)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue