Skip to content

Commit

Permalink
Merge pull request #1709 from akto-api-security/hotfix/fix_minor_ui_bugs
Browse files Browse the repository at this point in the history
fixing test run result page
  • Loading branch information
Ark2307 authored Nov 11, 2024
2 parents cf46ff6 + 52d7471 commit 13e2e61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function LayoutWithTabs(props){
onSelect={setCurrentTab}
tabs={!props.disabledTabs ? props.tabs : props.tabs.filter(obj => !props.disabledTabs.includes(obj.id))}
>
{loading ? <SpinnerCentered/> : props.tabs[current].component }
{loading ? <SpinnerCentered/> : (props.tabs[current]?.component || null) }
</LegacyTabs>
)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, HorizontalStack, LegacyCard, Link, Text, VerticalStack } from '@shopify/polaris'
import { Button, HorizontalStack, LegacyCard, VerticalStack } from '@shopify/polaris'
import React from 'react'
import LineComponent from './LineComponent'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function TestRunResultFlyout(props) {
<Button removeUnderline plain monochrome onClick={() => openTest()}>
<Text variant="headingSm" alignment="start" breakWord>{selectedTestRunResult?.name}</Text>
</Button>
{severity.length > 0 ? (issueDetails?.testRunIssueStatus === 'IGNORED' ? <Badge size='small'>Ignored</Badge> : <Box className={`badge-wrapper-${severity.toUpperCase()}`}><Badge size="small" status={observeFunc.getColor(severity)}>{severity}</Badge></Box>) : null}
{(severity && severity?.length > 0) ? (issueDetails?.testRunIssueStatus === 'IGNORED' ? <Badge size='small'>Ignored</Badge> : <Box className={`badge-wrapper-${severity.toUpperCase()}`}><Badge size="small" status={observeFunc.getColor(severity)}>{severity}</Badge></Box>) : null}
</div>
</Box>
<HorizontalStack gap={"2"}>
Expand Down Expand Up @@ -394,7 +394,7 @@ function TestRunResultFlyout(props) {

const tabsComponent = (
<LayoutWithTabs
key="tab-comp"
key={issueDetails?.id}
tabs={issueDetails?.id ? [overviewTab,timelineTab,ValuesTab]: [attemptTab]}
currTab = {() => {}}
/>
Expand Down

0 comments on commit 13e2e61

Please sign in to comment.