import PropTypes from 'prop-types'; import React, { useState } from 'react'; import { DropdownItem, Tabs, Tab, TabTitleText } from '@patternfly/react-core'; import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate'; import { translate as __ } from 'foremanReact/common/I18n'; import { foremanUrl } from 'foremanReact/common/helpers'; import { FINISHED_TAB, RUNNING_TAB, SCHEDULED_TAB, JOB_BASE_URL, } from './constants'; import RecentJobsTable from './RecentJobsTable'; const RecentJobsCard = ({ hostDetails: { name, id } }) => { const [activeTab, setActiveTab] = useState(FINISHED_TAB); const handleTabClick = (evt, tabIndex) => setActiveTab(tabIndex); return ( {__('View All Jobs')} , {__('View Finished Jobs')} , {__('View Running Jobs')} , {__('View Scheduled Jobs')} , ]} > {__('Finished')}} > {__('Running')}} > {__('Scheduled')}} > ); }; export default RecentJobsCard; RecentJobsCard.propTypes = { hostDetails: PropTypes.shape({ name: PropTypes.string, id: PropTypes.number, }), }; RecentJobsCard.defaultProps = { hostDetails: {}, };