-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from target/vt-augment-and-additional-updates
Adding VT Augment Support, Many UX Changes
- Loading branch information
Showing
63 changed files
with
3,234 additions
and
1,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
ui/src/components/FileOverviews/EmailOverview/EmailOverviewLanding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import { Collapse, Typography, Tag } from 'antd'; | ||
import EmailOverviewCard from './EmailOverviewCard'; | ||
|
||
const { Text } = Typography; | ||
|
||
const EmailOverviewLanding = ({ selectedNodeData, expandAll }) => { | ||
const [activeKey, setActiveKey] = useState([]); | ||
|
||
useEffect(() => { | ||
setActiveKey(expandAll ? ["1"] : []); | ||
}, [expandAll]); | ||
|
||
if (!selectedNodeData || !selectedNodeData.scan || !selectedNodeData.scan.email) { | ||
return null; | ||
} | ||
|
||
const emailData = selectedNodeData.scan.email; | ||
const subjectPreview = emailData.subject && emailData.subject.length > 0 | ||
? `${emailData.subject.substring(0, 47)}...` | ||
: "No Subject"; | ||
const attachmentsCount = emailData.total && emailData.total.attachments; | ||
|
||
return ( | ||
<Collapse | ||
activeKey={activeKey} | ||
onChange={(keys) => setActiveKey(keys)} | ||
style={{ width: "100%", marginBottom: "10px" }} | ||
> | ||
<Collapse.Panel | ||
header={ | ||
<div | ||
style={{ | ||
display: "flex", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
}} | ||
> | ||
<div style={{ display: "flex", alignItems: "center" }}> | ||
<div> | ||
<Text strong>Email</Text> | ||
<div style={{ fontSize: "smaller", color: "#888" }}>{subjectPreview}</div> | ||
</div> | ||
</div> | ||
<div> | ||
<Tag color="default"> | ||
<b>Attachments: {attachmentsCount}</b> | ||
</Tag> | ||
<Tag | ||
color={emailData.base64_thumbnail ? "success" : "error"} | ||
> | ||
<b>{emailData.base64_thumbnail ? "Preview Available" : "No Preview"}</b> | ||
</Tag> | ||
</div> | ||
</div> | ||
} | ||
key="1" | ||
> | ||
<EmailOverviewCard data={selectedNodeData} /> | ||
</Collapse.Panel> | ||
</Collapse> | ||
); | ||
}; | ||
|
||
export default EmailOverviewLanding; |
2 changes: 1 addition & 1 deletion
2
...ts/FileComponents/ExiftoolOverviewCard.js → .../ExiftoolOverview/ExiftoolOverviewCard.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
ui/src/components/FileOverviews/ExiftoolOverview/ExiftoolOverviewLanding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import { Collapse, Typography } from 'antd'; | ||
import FileExiftoolCard from './ExiftoolOverviewCard'; | ||
|
||
const { Text } = Typography; | ||
|
||
const ExiftoolOverviewLanding = ({ selectedNodeData, expandAll }) => { | ||
const [activeKey, setActiveKey] = useState([]); | ||
|
||
useEffect(() => { | ||
setActiveKey(expandAll ? ["1"] : []); | ||
}, [expandAll]); | ||
|
||
if (!selectedNodeData || !selectedNodeData.scan || !selectedNodeData.scan.exiftool) { | ||
return null; | ||
} | ||
|
||
const metadataCount = Object.keys(selectedNodeData.scan.exiftool).length; | ||
|
||
return ( | ||
<Collapse | ||
activeKey={activeKey} | ||
onChange={(keys) => setActiveKey(keys)} | ||
style={{ width: "100%", marginBottom: "10px" }} | ||
> | ||
<Collapse.Panel | ||
header={ | ||
<div> | ||
<Text strong>File Metadata</Text> | ||
<div style={{ fontSize: "smaller", color: "#888" }}> | ||
Metadata Count: {metadataCount} | ||
</div> | ||
</div> | ||
} | ||
key="1" | ||
> | ||
<FileExiftoolCard data={selectedNodeData} /> | ||
</Collapse.Panel> | ||
</Collapse> | ||
); | ||
}; | ||
|
||
export default ExiftoolOverviewLanding; |
Oops, something went wrong.