Skip to content

Commit

Permalink
Add missing actions
Browse files Browse the repository at this point in the history
Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 committed Nov 2, 2023
1 parent c26ded6 commit 9f6d2fe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"createTag": "Create tag",
"createTagCategory": "Create tag category",
"createTags": "Create tags",
"cancelAnalysis": "Cancel analysis",
"delete": "Delete",
"discardAssessment": "Discard assessment/review",
"downloadCsvTemplate": "Download CSV template",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ export const ApplicationsTable: React.FC = () => {
items: applications || [],
columnNames: {
name: "Name",
description: "Description",
businessService: "Business Service",
assessment: "Assessment",
review: "Review",
Expand All @@ -298,17 +297,10 @@ export const ApplicationsTable: React.FC = () => {
isSortEnabled: true,
isPaginationEnabled: true,
isActiveItemEnabled: true,
sortableColumns: [
"name",
"description",
"businessService",
"tags",
"effort",
],
sortableColumns: ["name", "businessService", "tags", "effort"],
initialSort: { columnKey: "name", direction: "asc" },
getSortValues: (app) => ({
name: app.name,
description: app.description || "",
businessService: app.businessService?.name || "",
tags: app.tags?.length || 0,
effort: app.effort || 0,
Expand Down Expand Up @@ -353,16 +345,6 @@ export const ApplicationsTable: React.FC = () => {
})),
logicOperator: "OR",
},
{
key: "description",
title: t("terms.description"),
type: FilterType.search,
placeholderText:
t("actions.filterBy", {
what: t("terms.description").toLowerCase(),
}) + "...",
getItemValue: (item) => item.description || "",
},
{
key: "businessService",
title: t("terms.businessService"),
Expand Down Expand Up @@ -755,7 +737,6 @@ export const ApplicationsTable: React.FC = () => {
<Tr>
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "name" })} width={15} />
<Th {...getThProps({ columnKey: "description" })} width={15} />
<Th
{...getThProps({ columnKey: "businessService" })}
width={15}
Expand Down Expand Up @@ -816,13 +797,6 @@ export const ApplicationsTable: React.FC = () => {
>
{application.name}
</Td>
<Td
width={15}
{...getTdProps({ columnKey: "description" })}
modifier="truncate"
>
{application.description}
</Td>
<Td
width={15}
modifier="truncate"
Expand Down Expand Up @@ -921,6 +895,31 @@ export const ApplicationsTable: React.FC = () => {
onClick: () =>
setApplicationDependenciesToManage(application),
},
{
title: t("actions.manageCredentials"),
onClick: () =>
setSaveApplicationsCredentialsModalState([
application,
]),
},
{
title: t("actions.analysisDetails"),
onClick: () =>
setTaskToView({
name: application.name,
task: getTask(application)?.id,
}),
},
...(isTaskCancellable(application) &&
tasksReadAccess &&
tasksWriteAccess
? [
{
title: t("actions.cancelAnalysis"),
onClick: () => cancelAnalysis(application),
},
]
: []),
]}
/>
</Td>
Expand Down

0 comments on commit 9f6d2fe

Please sign in to comment.