Allow visiting the original provider URL (#42)

Instead of truncating the original URL of each provider in the job configuration to 60 characters and losing a lot of context information, put a link to the original URL in the provider table which can be opened directly to verify what is being scraped by Fredy.
This commit is contained in:
Jochen Schalanda
2022-01-25 14:20:42 +01:00
committed by GitHub
parent c831057fba
commit e5627e1d02

View File

@@ -12,10 +12,6 @@ const emptyTable = () => {
);
};
const truncate = (str, n) => {
return str.length > n ? str.substr(0, n - 1) + '…' : str;
};
const content = (providerData, onRemove) => {
return (
<Fragment>
@@ -23,7 +19,11 @@ const content = (providerData, onRemove) => {
return (
<Table.Row key={data.id}>
<Table.Cell>{data.name}</Table.Cell>
<Table.Cell>{truncate(data.url, 60)}</Table.Cell>
<Table.Cell>
<a href={data.url} target="_blank" rel="noopener noreferrer">
Visit site
</a>
</Table.Cell>
<Table.Cell>
<div style={{ float: 'right' }}>
<Button circular color="red" icon="trash" onClick={() => onRemove(data.id)} />