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

Link AnalysisRunnerGrid with BillingCostByAnalysis #833

Merged
merged 2 commits into from
Jun 24, 2024
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
4 changes: 3 additions & 1 deletion web/src/pages/billing/BillingCostByAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const BillingCostByAnalysis: React.FunctionComponent = () => {
}))

const [searchByType, setSearchByType] = React.useState<SearchType>(
(searchParams.get('searchType') as SearchType) ?? SearchType[0]
(SearchType[
parseInt(searchParams.get('searchType') ?? '0', 10)
] as unknown as SearchType) ?? SearchType[0]
)

// use navigate and update url params
Expand Down
17 changes: 14 additions & 3 deletions web/src/pages/project/AnalysisRunnerView/AnalysisRunnerGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { Table as SUITable, Popup, Checkbox } from 'semantic-ui-react'
import { Table as SUITable, Popup, Checkbox, Button, Label, Icon } from 'semantic-ui-react'
import _, { Dictionary } from 'lodash'
import Table from '../../../shared/components/Table'
import sanitiseValue from '../../../shared/utilities/sanitiseValue'
Expand Down Expand Up @@ -56,13 +56,24 @@ const MAIN_FIELDS: IMainField[] = [
cursor: 'pointer',
}}
>
{log.arGuid.substring(0, 7)}
<a
href={`${`/billing/costByAnalysis?searchType=0&searchTxt=${log.arGuid}`}`}
rel="noopener noreferrer"
target="_blank"
>
{log.arGuid.substring(0, 7)}
</a>
</span>
}
hoverable
position="bottom center"
>
{log.arGuid}
<Button as="div" labelPosition="left">
<Label basic>{log.arGuid}</Label>
<Button icon onClick={() => navigator.clipboard.writeText(log.arGuid)}>
<Icon name="copy" />
</Button>
</Button>
</Popup>
),
},
Expand Down
Loading