Skip to content

Commit

Permalink
Merge pull request #1756 from akto-api-security/hotfix/fix_number_cou…
Browse files Browse the repository at this point in the history
…nt_test_editor

Fixing count of yaml templates
  • Loading branch information
avneesh-akto authored Nov 22, 2024
2 parents 39008f8 + 99731fe commit 0eb6e92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppsMinor, MarketingMinor, ResetMinor, CustomersMinor, EditMinor, NoteM
import GridRows from '../../../components/shared/GridRows'
import BannerRow from './BannerRow'
import { HOMEDASHBOARD_VIDEO_LENGTH, HOMEDASHBOARD_VIDEO_THUMBNAIL, HOMEDASHBOARD_VIDEO_URL } from '../../../../main/onboardingData'

import LocalStore from '../../../../main/LocalStorageStore'
function InfoComponent({title, items}) {
return(
<VerticalStack gap={4}>
Expand All @@ -16,6 +16,9 @@ function InfoComponent({title, items}) {
}

function DashboardBanner() {
const subCategoryMap = LocalStore.getState().subCategoryMap;
let defaultCount = Math.max(Object.keys(subCategoryMap).length,850);
defaultCount = Math.floor(defaultCount / 50) * 50

const productGuides = [
{
Expand All @@ -29,7 +32,7 @@ function DashboardBanner() {
title: "Start testing",
icon: MarketingMinor,
showRedirect: true,
description: "400+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs.",
description: defaultCount + "+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs.",
redirectUrl: "/dashboard/testing",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import DropdownSearch from '../../../components/shared/DropdownSearch'
import PersistStore from '../../../../main/PersistStore'
import { Box, Button, Popover, Text } from '@shopify/polaris'
import { useNavigate } from 'react-router-dom'
import LocalStore from '../../../../main/LocalStorageStore'

function SelectCollectionComponent() {
const [popoverActive, setPopoverActive] = useState(false)
Expand Down Expand Up @@ -52,10 +53,14 @@ function TestrunsBannerComponent({isInventory,onButtonClick}) {
.forEach(collection => {
urlsCount += collection.urlsCount}
)

const subCategoryMap = LocalStore.getState().subCategoryMap;
let defaultCount = Math.max(Object.keys(subCategoryMap).length,850);
defaultCount = Math.floor(defaultCount / 50) * 50
return (
<BannerLayout
title={"Test your APIs"}
text={"400+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs."}
text={defaultCount + "+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs."}
videoLength={TESTING_VIDEO_LENGTH}
// videoLink={TESTING_VIDEO_URL}
videoThumbnail={TESTING_VIDEO_THUMBNAIL}
Expand Down

0 comments on commit 0eb6e92

Please sign in to comment.