Skip to content

Commit

Permalink
[UXD][AAP-25468] AWX - updates to Execution Environment section butto…
Browse files Browse the repository at this point in the history
…ns and actions (#2742)
  • Loading branch information
tiyiprh authored Jul 17, 2024
1 parent 28860f9 commit f6cb4da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/awx/resources/executionEnvironments.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe('Execution Environments', () => {
cy.filterTableByMultiSelect('name', arrayOfElementText);
cy.get('tbody tr').should('have.length', 5);
cy.getByDataCy('select-all').click();
cy.clickToolbarKebabAction('delete-selected-execution-environments');
cy.clickToolbarKebabAction('delete-execution-environments');
cy.clickModalConfirmCheckbox();
cy.intercept('DELETE', awxAPI`/execution_environments/*/`).as('deleteEE');
cy.clickModalButton('Delete execution environments');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PencilAltIcon, TrashIcon } from '@patternfly/react-icons';
import { CopyIcon, PencilAltIcon, TrashIcon } from '@patternfly/react-icons';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import {
Expand All @@ -18,7 +18,7 @@ import { AwxRoute } from '../../../main/AwxRoutes';
import { useDeleteExecutionEnvironments } from './useDeleteExecutionEnvironments';
import { usePostRequest } from '../../../../common/crud/usePostRequest';
import { awxAPI } from '../../../common/api/awx-utils';
import { AlertProps } from '@patternfly/react-core';
import { AlertProps, ButtonVariant } from '@patternfly/react-core';

type ExecutionEnvironmentActionOptions = {
onDelete: (executionEnvironments: ExecutionEnvironment[]) => void;
Expand All @@ -37,6 +37,7 @@ export function useExecutionEnvRowActions({ onDelete, onCopy }: ExecutionEnviron
type: PageActionType.Button,
selection: PageActionSelection.Single,
icon: PencilAltIcon,
variant: ButtonVariant.primary,
isPinned: true,
label: t('Edit execution environment'),
isDisabled: (executionEnvironment) => cannotEditResource(executionEnvironment, t),
Expand All @@ -48,7 +49,7 @@ export function useExecutionEnvRowActions({ onDelete, onCopy }: ExecutionEnviron
{
type: PageActionType.Button,
selection: PageActionSelection.Single,
icon: PencilAltIcon,
icon: CopyIcon,
isPinned: false,
label: t('Copy execution environment'),
isDisabled: (executionEnvironment) => cannotCopyResource(executionEnvironment, t),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function useExecutionEnvToolbarActions(view: IAwxView<ExecutionEnvironmen
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: TrashIcon,
label: t('Delete selected execution environments'),
label: t('Delete execution environments'),
isDisabled: (executionEnvironments) => cannotDeleteResources(executionEnvironments, t),
onClick: deleteExecutionEnvironments,
isDanger: true,
Expand Down

0 comments on commit f6cb4da

Please sign in to comment.