Skip to content

Commit

Permalink
Merge branch 'beta-master' of github.com:AFP-Medialab/verification-pl…
Browse files Browse the repository at this point in the history
…ugin into jmafoster1/136-e2e-testing
  • Loading branch information
jmafoster1 committed Nov 20, 2024
2 parents d281c33 + 625cde1 commit aac57f2
Show file tree
Hide file tree
Showing 14 changed files with 1,099 additions and 601 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
stage ('Build Plugin') {
agent {
docker {
image 'node:18-buster-slim'
image 'node:22-alpine'
reuseNode true
}
}
Expand Down
48 changes: 23 additions & 25 deletions src/components/NavItems/Assistant/Assistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,34 +211,32 @@ const Assistant = () => {
</Grid2>

{/* text results */}
<Grid2
container
hidden={linkList.length === 0 && text === null && neResult === null}
>
{text ? (
<Grid2 size={{ xs: 12 }}>
<AssistantTextResult />
</Grid2>
) : null}
{text ? (
<Grid2 size={{ xs: 12 }}>
<AssistantTextResult />
</Grid2>
) : null}

{neResult ? (
<Grid2 size={{ xs: 12 }}>
<AssistantNEResult />
</Grid2>
) : null}
{/* named entity results */}
{text && neResult ? (
<Grid2 size={{ xs: 12 }}>
<AssistantNEResult />
</Grid2>
) : null}

{linkList.length !== 0 ? (
<Grid2 size={{ xs: 12 }}>
<AssistantLinkResult />
</Grid2>
) : null}
{/* extracted urls with url domain analysis */}
{text && linkList.length !== 0 ? (
<Grid2 size={{ xs: 12 }}>
<AssistantLinkResult />
</Grid2>
) : null}

{text ? (
<Grid2 size={{ xs: 12 }}>
<AssistantCredSignals />
</Grid2>
) : null}
</Grid2>
{/* credibility signals */}
{text ? (
<Grid2 size={{ xs: 12 }}>
<AssistantCredSignals />
</Grid2>
) : null}
</Grid2>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,91 +24,98 @@ const DbkfMediaResults = () => {
return (
<List disablePadding={true}>
{dbkfImageMatch
? dbkfImageMatch.map((value, key) => (
<ListItem key={key}>
<ListItemAvatar>
<ImageIconOutlined fontSize={"large"} />
</ListItemAvatar>
<ListItemText
primary={
<div>
? dbkfImageMatch
.filter(
(obj1, i, arr) =>
arr.findIndex((obj2) => obj2.id === obj1.id) === i,
)
.map((value, key) => (
<ListItem key={key}>
<ListItemAvatar>
<ImageIconOutlined fontSize={"large"} />
</ListItemAvatar>
<ListItemText
primary={
<div>
<Typography
variant={"body1"}
color={"textPrimary"}
component={"div"}
align={"left"}
>
{keyword("dbkf_image_warning") +
parseFloat(value.similarity).toFixed(2)}
</Typography>
<Box mb={0.5} />
</div>
}
secondary={
<Typography
variant={"body1"}
color={"textPrimary"}
variant={"caption"}
component={"div"}
align={"left"}
data-testid={"dbkf_image_warning_" + value.claimUrl}
color={"textSecondary"}
>
{keyword("dbkf_image_warning") +
" " +
parseFloat(value.similarity).toFixed(2)}
<a
href={value.claimUrl}
key={key}
target="_blank"
rel="noopener noreferrer"
>
{value.claimUrl}
</a>
</Typography>
<Box mb={0.5} />
</div>
}
secondary={
<Typography
variant={"caption"}
component={"div"}
color={"textSecondary"}
>
<a
href={value.claimUrl}
key={key}
target="_blank"
rel="noopener noreferrer"
>
{value.claimUrl}
</a>
</Typography>
}
/>
</ListItem>
))
}
/>
</ListItem>
))
: null}

{dbkfVideoMatch
? dbkfVideoMatch.map((value, key) => (
<ListItem key={key}>
<ListItemAvatar>
<DuoOutlined fontSize={"large"} />
</ListItemAvatar>
<ListItemText
primary={
<div>
? dbkfVideoMatch
.filter(
(obj1, i, arr) =>
arr.findIndex((obj2) => obj2.id === obj1.id) === i,
)
.map((value, key) => (
<ListItem key={key}>
<ListItemAvatar>
<DuoOutlined fontSize={"large"} />
</ListItemAvatar>
<ListItemText
primary={
<div>
<Typography
variant={"body1"}
color={"textPrimary"}
component={"div"}
align={"left"}
>
{keyword("dbkf_video_warning") +
" " +
parseFloat(value.similarity).toFixed(2)}
</Typography>
<Box mb={0.5} />
</div>
}
secondary={
<Typography
variant={"body1"}
color={"textPrimary"}
variant={"caption"}
component={"div"}
align={"left"}
data-testid={"dbkf_video_warning_" + value.claimUrl}
color={"textSecondary"}
>
{keyword("dbkf_video_warning") +
" " +
parseFloat(value.similarity).toFixed(2)}
<a
href={value.claimUrl}
key={key}
target="_blank"
rel="noopener noreferrer"
>
{value.claimUrl}
</a>
</Typography>
<Box mb={0.5} />
</div>
}
secondary={
<Typography
variant={"caption"}
component={"div"}
color={"textSecondary"}
>
<a
href={value.claimUrl}
key={key}
target="_blank"
rel="noopener noreferrer"
>
{value.claimUrl}
</a>
</Typography>
}
/>
</ListItem>
))
}
/>
</ListItem>
))
: null}
</List>
);
Expand Down
Loading

0 comments on commit aac57f2

Please sign in to comment.