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: {}, };