/* * Copyright (c) 2025 by Christian Kellner. * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ import React from 'react'; import { Button, Empty, Table, Switch, Popover } from '@douyinfe/semi-ui'; import { IconAlertTriangle, IconDelete, IconDescend2, IconEdit, IconHistogram } from '@douyinfe/semi-icons'; import { IllustrationNoResult, IllustrationNoResultDark } from '@douyinfe/semi-illustrations'; import './JobTable.less'; const empty = ( } darkModeImage={} description="No jobs available. Why don't you create one? ;)" /> ); const getPopoverContent = (text) =>
{text}
; export default function JobTable({ jobs = {}, onJobRemoval, onJobStatusChanged, onJobEdit, onJobInsight, onListingRemoval, } = {}) { return ( { return ( onJobStatusChanged(job.id, checked)} checked={job.enabled} disabled={job.isOnlyShared} /> ); }, }, { title: 'Name', dataIndex: 'name', render: (name, job) => { if (job.isOnlyShared) { return (
{name}
); } else { return name; } }, }, { title: 'Listings', dataIndex: 'numberOfFoundListings', render: (value) => { return value || 0; }, }, { title: 'Provider', dataIndex: 'provider', render: (value) => { return value.length || 0; }, }, { title: 'Notification Adapter', dataIndex: 'notificationAdapter', render: (value) => { return value.length || 0; }, }, { title: '', dataIndex: 'tools', render: (_, job) => { return (
); }, }, ]} dataSource={jobs} /> ); }