diff --git a/app/react/components/RadioGroup/RadioGroup.tsx b/app/react/components/RadioGroup/RadioGroup.tsx index f230db49a8..43cc191acc 100644 --- a/app/react/components/RadioGroup/RadioGroup.tsx +++ b/app/react/components/RadioGroup/RadioGroup.tsx @@ -31,7 +31,7 @@ export function RadioGroup({ key={option.value} className={ itemClassName ?? - 'col-sm-3 col-lg-2 control-label cursor-pointer !p-0 text-left font-normal' + 'control-label cursor-pointer !p-0 text-left font-normal' } > { tlsSkipVerify: bool(), polling: object({ enabled: bool().required().default(false), - interval: string() - .default('') - .when('enabled', { - is: true, - then: intervalValidation(), - }), + interval: string().default('').when('enabled', { + is: true, + then: intervalValidation(), + }), }), connectionOk: bool() .oneOf([true], 'The connection test must succeed before continuing.') diff --git a/app/react/portainer/gitops/workflows/ItemView/ItemView.test.tsx b/app/react/portainer/gitops/workflows/ItemView/ItemView.test.tsx index 81544b107f..73becb38e8 100644 --- a/app/react/portainer/gitops/workflows/ItemView/ItemView.test.tsx +++ b/app/react/portainer/gitops/workflows/ItemView/ItemView.test.tsx @@ -20,10 +20,12 @@ import { ItemView } from './ItemView'; const useCurrentStateAndParams = vi.fn(() => ({ params: { workflowId: 1 }, })); +const go = vi.fn(); vi.mock('@uirouter/react', async (importOriginal: () => Promise) => ({ ...(await importOriginal()), useCurrentStateAndParams: () => useCurrentStateAndParams(), + useRouter: () => ({ stateService: { go } }), })); // Avoid ui-router relative/unregistered state resolution in tests, same as WidgetTabs.test.tsx @@ -79,6 +81,7 @@ describe('ItemView', () => { }); function renderComponent(workflow: Workflow = mockWorkflowHealthy) { + go.mockClear(); useCurrentStateAndParams.mockReturnValue({ params: { workflowId: workflow.id }, }); diff --git a/app/react/portainer/gitops/workflows/ItemView/WorkflowResourceHeader.tsx b/app/react/portainer/gitops/workflows/ItemView/WorkflowResourceHeader.tsx index a6c1c84b9e..307f35bacb 100644 --- a/app/react/portainer/gitops/workflows/ItemView/WorkflowResourceHeader.tsx +++ b/app/react/portainer/gitops/workflows/ItemView/WorkflowResourceHeader.tsx @@ -1,20 +1,13 @@ -import { GitCommit, PenBoxIcon, PauseIcon, RefreshCwIcon } from 'lucide-react'; -import _ from 'lodash'; +import { GitCommit } from 'lucide-react'; import { Icon } from '@@/Icon'; import { ResourceDetailHeader } from '@@/ResourceDetailHeader/ResourceDetailHeader'; import { HeaderStats } from '@@/ResourceDetailHeader/HeaderStats'; import { ResourceStatBlock } from '@@/ResourceDetailHeader/ResourceStatBlock'; -import { ActionBarShell } from '@@/ResourceDetailHeader/ActionBarShell'; -import { Button } from '@@/buttons'; -import { DeleteButton } from '@@/buttons/DeleteButton'; -import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren'; import { Workflow } from '../types'; import { StatusBadge } from '../../components/StatusBadge'; -import { computeTargetRollup, effectiveWorkflowStatus } from '../status'; - -const COMING_SOON_MESSAGE = 'Coming soon'; +import { effectiveWorkflowStatus, computeTargetRollup } from '../status'; interface Props { workflow: Workflow; @@ -44,60 +37,6 @@ export function WorkflowResourceHeader({ workflow }: Props) { } - actionBar={ - -
- - - - - - - - - - - - - - - -
-
- - - - - -
-
- } /> ); }