Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Check-related action buttons from Host Details page #1973

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions assets/js/components/HostDetails/HostDetails.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import React, { useState } from 'react';
import { get } from 'lodash';
import { EOS_CLEAR_ALL, EOS_PLAY_CIRCLE, EOS_SETTINGS } from 'eos-icons-react';

import { agentVersionWarning } from '@lib/agent';

import Button from '@components/Button';
import Table from '@components/Table';
import PageHeader from '@components/PageHeader';
import BackButton from '@components/BackButton';
import WarningBanner from '@components/Banners/WarningBanner';
import CleanUpButton from '@components/CleanUpButton';
import DeregistrationModal from '@components/DeregistrationModal';
import { canStartExecution } from '@components/ChecksSelection';
import Tooltip from '@components/Tooltip';

import SuseLogo from '@static/suse_logo.svg';
import CheckResultsOverview from '@components/CheckResultsOverview';
Expand Down Expand Up @@ -41,14 +37,11 @@ function HostDetails({
provider,
providerData,
sapInstances,
savingChecks,
saptuneStatus = {},
selectedChecks = [],
slesSubscriptions,
catalog,
lastExecution,
cleanUpHost,
requestHostChecksExecution,
navigate,
}) {
const [cleanUpModalOpen, setCleanUpModalOpen] = useState(false);
Expand Down Expand Up @@ -110,47 +103,6 @@ function HostDetails({
}}
/>
)}
<Button
type="primary-white"
className="inline-block mx-0.5 border-green-500 border"
size="small"
onClick={() => navigate(`/hosts/${hostID}/settings`)}
>
<EOS_SETTINGS className="inline-block fill-jungle-green-500" />{' '}
Check Selection
</Button>

<Button
type="primary-white"
className="mx-0.5 border-green-500 border"
size="small"
onClick={() => navigate(`/hosts/${hostID}/executions/last`)}
>
<EOS_CLEAR_ALL className="inline-block fill-jungle-green-500" />
Show Results
</Button>

<Tooltip
isEnabled={!canStartExecution(selectedChecks, savingChecks)}
content="Select some Checks first!"
place="bottom"
>
<Button
type="primary"
className="mx-1"
onClick={requestHostChecksExecution}
disabled={!canStartExecution(selectedChecks, savingChecks)}
>
<EOS_PLAY_CIRCLE
className={`${
canStartExecution(selectedChecks, savingChecks)
? 'fill-white'
: 'fill-gray-200'
} inline-block align-sub`}
/>{' '}
Start Execution
</Button>
</Tooltip>
</div>
</div>
<div className="pb-3">
Expand Down
6 changes: 3 additions & 3 deletions assets/js/components/HostDetails/HostDetails.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import HostDetails from './HostDetails';

describe('HostDetails component', () => {
describe('Checks execution', () => {
it('should show the Checks related action buttons', () => {
it.skip('should show the Checks related action buttons', () => {
renderWithRouter(<HostDetails agentVersion="1.0.0" />);

expect(
Expand All @@ -27,7 +27,7 @@ describe('HostDetails component', () => {
).toBeVisible();
});

it('should disable start execution button when checks are not selected', async () => {
it.skip('should disable start execution button when checks are not selected', async () => {
const user = userEvent.setup();

renderWithRouter(
Expand All @@ -41,7 +41,7 @@ describe('HostDetails component', () => {
expect(screen.getByText('Select some Checks first!')).toBeInTheDocument();
});

it('should enable start execution button when checks are selected', async () => {
it.skip('should enable start execution button when checks are selected', async () => {
const user = userEvent.setup();
const selectedChecks = [faker.animal.bear(), faker.animal.bear()];

Expand Down