Skip to content

Commit

Permalink
Frontend fixes (#2495)
Browse files Browse the repository at this point in the history
* fix description

* fix id column
  • Loading branch information
carellamartina committed Aug 29, 2024
1 parent f750c29 commit 868615c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable react/prop-types */
import React from "react";
import { UncontrolledTooltip } from "reactstrap";

import {
DefaultColumnFilter,
SelectOptionsFilter,
LinkOpenViewIcon,
DateHoverable,
CopyToClipboardButton,
} from "@certego/certego-ui";
Expand All @@ -24,12 +24,21 @@ export const investigationTableColumns = [
disableSortBy: true,
Cell: ({ value: id }) => (
<div className="d-flex flex-column justify-content-center">
<p>#{id}</p>
<LinkOpenViewIcon
id={id}
<a
id={`investigation-${id}`}
href={`/investigation/${id}`}
tooltip="View investigation report"
/>
target="_blank"
rel="noreferrer"
>
#{id}
</a>
<UncontrolledTooltip
target={`investigation-${id}`}
placement="top"
fade={false}
>
View Investigation Report
</UncontrolledTooltip>
</div>
),
Filter: DefaultColumnFilter,
Expand Down
18 changes: 11 additions & 7 deletions frontend/src/components/jobs/table/jobTableColumns.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* eslint-disable react/prop-types */
import React from "react";
import { Input } from "reactstrap";
import { Input, UncontrolledTooltip } from "reactstrap";
import classnames from "classnames";

import {
DefaultColumnFilter,
SelectOptionsFilter,
LinkOpenViewIcon,
DateHoverable,
CopyToClipboardButton,
} from "@certego/certego-ui";
Expand Down Expand Up @@ -35,12 +34,17 @@ export const jobTableColumns = [
disableSortBy: true,
Cell: ({ value: id }) => (
<div className="d-flex flex-column justify-content-center">
<p>#{id}</p>
<LinkOpenViewIcon
id={id}
<a
id={`job-${id}`}
href={`/jobs/${id}/${JobResultSections.VISUALIZER}`}
tooltip="View Job Report"
/>
target="_blank"
rel="noreferrer"
>
#{id}
</a>
<UncontrolledTooltip target={`job-${id}`} placement="top" fade={false}>
View Job Report
</UncontrolledTooltip>
</div>
),
Filter: DefaultColumnFilter,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/plugins/types/Pivots.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Pivots() {
return (
<PluginWrapper
heading="Pivots"
description="Pivots are designed to create a job from another job"
description="Pivots are designed to create a job from another job."
stateSelector={stateSelector}
columns={pivotTableColumns}
type={PluginsTypes.PIVOT}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/plugins/types/PluginWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export default function PluginWrapper({
<small className="text-muted">{dataList?.length} total</small>
</h1>
<span className="text-muted">
{description} Fore more info check the{" "}
{description} For more info check the{" "}
<Link
to="https://intelowlproject.github.io/docs/IntelOwl/usage/#plugins-framework"
target="_blank"
>
official doc
official doc.
</Link>
</span>
</Col>
Expand Down
15 changes: 9 additions & 6 deletions frontend/tests/utils/observables.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ describe("Observable validators tests", () => {
});
});

test.each(["test.exe", "test.pdf,", ",test.js,", "256.256.256.256", "google(.)com"])(
"test invalid domains (%s)",
(valueToValidate) => {
expect(observableValidators(valueToValidate)).toBeNull();
},
);
test.each([
"test.exe",
"test.pdf,",
",test.js,",
"256.256.256.256",
"google(.)com",
])("test invalid domains (%s)", (valueToValidate) => {
expect(observableValidators(valueToValidate)).toBeNull();
});

test.each([
"40ff44d9e619b17524bf3763204f9cbb",
Expand Down

0 comments on commit 868615c

Please sign in to comment.