Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI][v2] Fix UI issues #1075

Merged
merged 4 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ export const AWSTerraform = memo(() => {
region = "<AWS-REGION>; eg. us-east-1"
}

module "cloud-scanner_example_single-account-ecs" {
module "deepfence-cloud-scanner_example_single-account" {
source = "deepfence/cloud-scanner/aws//examples/single-account-ecs"
version = "0.1.0"
version = "0.3.0"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "${dfApiKey}"
name = "deepfence-cloud-scanner"
}

variable "image" {
type = string
default = "[quay.io/deepfenceio/cloud-scanner:1.5.0](http://quay.io/deepfenceio/cloud-scanner:1.5.0)"
}
`;

return (
<div className="w-full sm:w-1/2">
<Stepper>
<Step indicator={<HiViewGridAdd />} title="Teraform Cloud Formation">
<Step indicator={<HiViewGridAdd />} title="Teraform">
<div className={`${Typography.size.sm} dark:text-gray-200`}>
Connect to your AWS Cloud Account via Teraform. Find out more information by{' '}
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ export const AzureConnectorForm = () => {
? '---DEEPFENCE-API-KEY---'
: data?.api_token;
const code = `provider "azurerm" {
features {}
subscription_id = "<SUBSCRIPTION_ID eg. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>"
}

module "cloud-scanner_example_single-subscription" {
source = "deepfence/cloud-scanner/azure//examples/single-subscription"
version = "0.1.0"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "${dfApiKey}"
}
`;
features {}
subscription_id = "<SUBSCRIPTION_ID eg. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>"
}

module "cloud-scanner_example_single-subscription" {
source = "deepfence/cloud-scanner/azure//examples/single-subscription"
version = "0.2.0"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "${dfApiKey}"
name = "deepfence-cloud-scanner"
}

variable "image" {
type = string
default = "quay.io/deepfenceio/cloud-scanner:1.5.0"
}
`;

return (
<Stepper>
<Step indicator={<HiViewGridAdd />} title="Teraform Cloud Formation">
<Step indicator={<HiViewGridAdd />} title="Teraform">
<div className={`${Typography.size.sm} dark:text-gray-200`}>
Connect to your Azure Cloud Account via Teraform. Find out more information by{' '}
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,24 @@ provider "google-beta" {
}

module "cloud-scanner_example_single-project" {
source = "deepfence/cloud-scanner/gcp//examples/single-project"
version = "0.1.0"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "${dfApiKey}"
source = "deepfence/cloud-scanner/gcp//examples/single-project"
version = "0.2.0"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "${dfApiKey}"
name = "deepfence-cloud-scanner"
image_name = "[us-east1-docker.pkg.dev/deepfenceio/deepfence/cloud-scanner:latest](http://us-east1-docker.pkg.dev/deepfenceio/deepfence/cloud-scanner:latest)"
}

variable "image" {
type = string
default = "[us-east1-docker.pkg.dev/deepfenceio/deepfence/cloud-scanner:1.5.0](http://us-east1-docker.pkg.dev/deepfenceio/deepfence/cloud-scanner:1.5.0)"
}
`;

return (
<Stepper>
<Step indicator={<HiViewGridAdd />} title="Teraform Cloud Formation">
<Step indicator={<HiViewGridAdd />} title="Teraform">
<div className={`${Typography.size.sm} dark:text-gray-200`}>
Connect to your Google Cloud Account via Teraform. Find out more information by{' '}
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ const ScanResusltTable = () => {
<div className="truncate">{info.row.original.test_number}</div>
</DFLink>
),
header: () => 'Test ID',
header: () => 'ID',
minSize: 50,
size: 60,
maxSize: 65,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import cx from 'classnames';
import { useMemo, useState } from 'react';
import { IconContext } from 'react-icons';
import { FaPlay } from 'react-icons/fa';
import { HiDotsVertical } from 'react-icons/hi';
import { useSearchParams } from 'react-router-dom';
import {
Badge,
Button,
createColumnHelper,
Dropdown,
Expand All @@ -20,6 +17,7 @@ import {
ConfigureScanModal,
ConfigureScanModalProps,
} from '@/components/ConfigureScanModal';
import { ScanStatusBadge } from '@/components/ScanStatusBadge';
import { MalwareIcon } from '@/components/sideNavigation/icons/Malware';
import { SecretsIcon } from '@/components/sideNavigation/icons/Secrets';
import { VulnerabilityIcon } from '@/components/sideNavigation/icons/Vulnerability';
Expand Down Expand Up @@ -137,65 +135,17 @@ export const RegistryImageTagsTable = ({
}),
columnHelper.accessor('vulnerability_scan_status', {
header: () => 'Vulnerability Scan Status',
cell: (info) => (
<Badge
label={info.getValue().toUpperCase().replaceAll('_', ' ') || 'Not Scanned'}
className={cx({
'bg-green-100 dark:bg-green-600/10 text-green-600 dark:text-green-400':
info.getValue().toLowerCase() === 'completed',
'bg-red-100 dark:bg-red-600/10 text-red-600 dark:text-red-400':
info.getValue().toLowerCase() === 'error',
'bg-blue-100 dark:bg-blue-600/10 text-blue-600 dark:text-blue-400':
info.getValue().toLowerCase() === 'in_progress',
'bg-blue-100 dark:bg-blue-600/10 text-neutral-600 dark:text-neutral-400':
info.getValue().toLowerCase() === '' ||
info.getValue().toLowerCase() === 'not_scanned',
})}
size="sm"
/>
),
cell: (info) => <ScanStatusBadge status={info.getValue()} />,
maxSize: 50,
}),
columnHelper.accessor('malware_scan_status', {
header: () => 'Malware Scan Status',
cell: (info) => (
<Badge
label={info.getValue().toUpperCase().replaceAll('_', ' ') || 'Not Scanned'}
className={cx({
'bg-green-100 dark:bg-green-600/10 text-green-600 dark:text-green-400':
info.getValue().toLowerCase() === 'completed',
'bg-red-100 dark:bg-red-600/10 text-red-600 dark:text-red-400':
info.getValue().toLowerCase() === 'error',
'bg-blue-100 dark:bg-blue-600/10 text-blue-600 dark:text-blue-400':
info.getValue().toLowerCase() === 'in_progress',
'bg-blue-100 dark:bg-blue-600/10 text-neutral-600 dark:text-neutral-400':
info.getValue().toLowerCase() === '' ||
info.getValue().toLowerCase() === 'not_scanned',
})}
size="sm"
/>
),
cell: (info) => <ScanStatusBadge status={info.getValue()} />,
maxSize: 50,
}),
columnHelper.accessor('secret_scan_status', {
header: () => 'Secrets Scan Status',
cell: (info) => (
<Badge
label={info.getValue().toUpperCase().replaceAll('_', ' ') || 'Not Scanned'}
className={cx({
'bg-green-100 dark:bg-green-600/10 text-green-600 dark:text-green-400':
info.getValue().toLowerCase() === 'completed',
'bg-red-100 dark:bg-red-600/10 text-red-600 dark:text-red-400':
info.getValue().toLowerCase() === 'error',
'bg-blue-100 dark:bg-blue-600/10 text-blue-600 dark:text-blue-400':
info.getValue().toLowerCase() === 'in_progress',
'bg-blue-100 dark:bg-blue-600/10 text-neutral-600 dark:text-neutral-400':
info.getValue().toLowerCase() === '' ||
info.getValue().toLowerCase() === 'not_scanned',
})}
size="sm"
/>
),
cell: (info) => <ScanStatusBadge status={info.getValue()} />,
maxSize: 50,
}),
columnHelper.display({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const HeaderComponent = () => {
<div className="flex p-2 pl-2 w-full items-center shadow bg-white dark:bg-gray-800">
<Breadcrumb separator={<HiChevronRight />} transparent>
<BreadcrumbLink>
<DFLink to={'/registries'}>REGISTRIES</DFLink>
<DFLink to={'/registries'}>Registries</DFLink>
</BreadcrumbLink>
<BreadcrumbLink>
<DFLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ const UniqueVulnerabilities = () => {
];

return columns;
}, []);
}, [searchParams]);

return (
<div>
Expand Down