2021-05-13 20:27:42 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import { format } from '../../services/time/timeService';
|
2023-03-20 08:52:13 +01:00
|
|
|
import { Card, Descriptions, Divider } from '@douyinfe/semi-ui';
|
|
|
|
|
import { IconBolt } from '@douyinfe/semi-icons';
|
2021-05-13 20:27:42 +02:00
|
|
|
export default function ProcessingTimes({ processingTimes }) {
|
2023-03-20 08:52:13 +01:00
|
|
|
const { Meta } = Card;
|
2021-05-13 20:27:42 +02:00
|
|
|
return (
|
2023-03-20 08:52:13 +01:00
|
|
|
<>
|
|
|
|
|
<Descriptions
|
|
|
|
|
row
|
|
|
|
|
size="small"
|
|
|
|
|
style={{
|
|
|
|
|
backgroundColor: '#35363c',
|
|
|
|
|
borderRadius: '4px',
|
|
|
|
|
padding: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Descriptions.Item itemKey="Processing Interval">{processingTimes.interval} min</Descriptions.Item>
|
2022-03-25 11:19:17 +01:00
|
|
|
{processingTimes.lastRun && (
|
2023-03-20 08:52:13 +01:00
|
|
|
<>
|
|
|
|
|
<Descriptions.Item itemKey="Last run">{format(processingTimes.lastRun)}</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item itemKey="Next run">
|
|
|
|
|
{format(processingTimes.lastRun + processingTimes.interval * 60000)}
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
</>
|
2022-03-25 11:19:17 +01:00
|
|
|
)}
|
2023-03-20 08:52:13 +01:00
|
|
|
</Descriptions>
|
|
|
|
|
|
2022-03-25 11:19:17 +01:00
|
|
|
{processingTimes.scrapingAntData != null && (
|
2023-03-20 08:52:13 +01:00
|
|
|
<>
|
|
|
|
|
<Divider margin="1rem" />
|
|
|
|
|
<Card
|
|
|
|
|
style={{ backgroundColor: '#35363c' }}
|
|
|
|
|
title={
|
|
|
|
|
<Meta
|
|
|
|
|
title="Remaining ScrapingAnt calls"
|
|
|
|
|
description="Information about your Scraping Ant Plan"
|
|
|
|
|
avatar={<IconBolt />}
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<p>Plan: {processingTimes.scrapingAntData.plan_name}</p>
|
|
|
|
|
<p>
|
2022-03-25 11:19:17 +01:00
|
|
|
Duration: {format(new Date(processingTimes.scrapingAntData.start_date))} -{' '}
|
|
|
|
|
{format(new Date(processingTimes.scrapingAntData.end_date))}
|
2023-03-20 08:52:13 +01:00
|
|
|
<br />
|
2022-03-25 11:19:17 +01:00
|
|
|
Credits: {processingTimes.scrapingAntData.remained_credits}/
|
2024-06-12 13:52:28 +02:00
|
|
|
{processingTimes.scrapingAntData.plan_total_credits}
|
2023-03-20 08:52:13 +01:00
|
|
|
</p>
|
2023-04-15 18:24:51 +02:00
|
|
|
If you want to scrape Immoscout or Immonet more often, you have to purchase a premium account of{' '}
|
2023-03-20 08:52:13 +01:00
|
|
|
<a href="https://scrapingant.com/" target="_blank" rel="noreferrer">
|
|
|
|
|
ScrapingAnt
|
|
|
|
|
</a>
|
|
|
|
|
. You can use the code <b>FREDY10</b> to get 10% off. (No affiliation, we are <b>not</b> getting paid to
|
|
|
|
|
recommend ScrapingAnt.)
|
|
|
|
|
</Card>
|
|
|
|
|
</>
|
2021-05-13 20:27:42 +02:00
|
|
|
)}
|
2023-03-20 08:52:13 +01:00
|
|
|
</>
|
2021-05-13 20:27:42 +02:00
|
|
|
);
|
|
|
|
|
}
|
2023-03-20 08:52:13 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|