From 2cd5d55b00930d68b84fd959cc1b327a8c4d2675 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Thu, 22 Jun 2023 21:08:04 +0700 Subject: [PATCH] fix(edge/stacks): fix ui issues [EE-5578] (#9070) --- .../EditEdgeStackForm/EditEdgeStackForm.tsx | 40 ++++++++++-------- .../components/PrivateRegistryFieldset.tsx | 41 +++++++++++-------- .../queries/useCreateStackFromFileContent.ts | 10 +++-- 3 files changed, 56 insertions(+), 35 deletions(-) diff --git a/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/EditEdgeStackForm.tsx b/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/EditEdgeStackForm.tsx index 24d277547..0bae932ac 100644 --- a/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/EditEdgeStackForm.tsx +++ b/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/EditEdgeStackForm.tsx @@ -183,23 +183,31 @@ function InnerForm({ /> {values.deploymentType === DeploymentType.Compose && ( <> - setFieldValue('prePullImage', value)} - /> +
+
+ setFieldValue('prePullImage', value)} + /> +
+
- setFieldValue('retryDeploy', value)} - /> +
+
+ setFieldValue('retryDeploy', value)} + /> +
+
)} diff --git a/app/react/edge/edge-stacks/components/PrivateRegistryFieldset.tsx b/app/react/edge/edge-stacks/components/PrivateRegistryFieldset.tsx index 6a50d3e19..0eb3ea908 100644 --- a/app/react/edge/edge-stacks/components/PrivateRegistryFieldset.tsx +++ b/app/react/edge/edge-stacks/components/PrivateRegistryFieldset.tsx @@ -1,4 +1,5 @@ import { useState, useEffect } from 'react'; +import { RefreshCw } from 'lucide-react'; import { Registry } from '@/react/portainer/registries/types'; @@ -75,26 +76,34 @@ export function PrivateRegistryFieldset({ {checked && ( <> {method !== 'repository' && ( - <> - - If you make any changes to the image urls in your yaml, please - reload or select registry manually - - - - + + If you make any changes to the image urls in your yaml, please + reload or select registry manually + )} + {!errorMessage ? ( - registry.Id === selected + )} + options={registries} + getOptionLabel={(registry) => registry.Name} + getOptionValue={(registry) => registry.Id.toString()} + onChange={(value) => onSelect(value?.Id)} + className="w-full" + /> + {method !== 'repository' && ( +