Skip to content

Commit

Permalink
🐛 Add tooltip for unlink jira ticket
Browse files Browse the repository at this point in the history
Signed-off-by: ibolton336 <ibolton@redhat.com>
  • Loading branch information
ibolton336 committed Dec 19, 2023
1 parent 413eea0 commit e875ea1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
3 changes: 2 additions & 1 deletion client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@
"taskInProgressForTags": "A new analysis is in-progress. Tags may be updated upon completion.",
"toTagApplication": "Either no tags exist yet or you may not have permission to view any. If you have permission, try creating a new custom tag.",
"unsavedChanges": "Are you sure you want to close the assessment? Any unsaved changes will be lost.",
"noAnswers": "Are you sure you want to close the assessment? There are no answers to save."
"noAnswers": "Are you sure you want to close the assessment? There are no answers to save.",
"unlinkTicket": "Unlink from Jira"
},
"proposedActions": {
"refactor": "Refactor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Grid,
GridItem,
Spinner,
Tooltip,
} from "@patternfly/react-core";
import { Application } from "@app/api/models";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
Expand Down Expand Up @@ -187,11 +188,17 @@ export const ApplicationDetailFields: React.FC<{
isLoading ? (
<Spinner role="status" size="sm" />
) : (
<Button
variant="link"
icon={<UnlinkIcon />}
onClick={() => deleteTicket(matchingTicket.id)}
/>
<Tooltip
content={t("message.unlinkTicket")}
position="top"
entryDelay={1000}
>
<Button
variant="link"
icon={<UnlinkIcon />}
onClick={() => deleteTicket(matchingTicket.id)}
/>
</Tooltip>
)
) : null}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Toolbar,
ToolbarContent,
ToolbarItem,
Tooltip,
} from "@patternfly/react-core";
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
import alignment from "@patternfly/react-styles/css/utilities/Alignment/alignment";
Expand Down Expand Up @@ -165,11 +166,17 @@ export const WaveStatusTable: React.FC<IWaveStatusTableProps> = ({
</Td>
<Td className={alignment.textAlignRight}>
{ticket?.id && (
<Button
variant="link"
icon={<UnlinkIcon />}
onClick={() => deleteTicket(ticket.id)}
/>
<Tooltip
content={t("message.unlinkTicket")}
position="top"
entryDelay={1000}
>
<Button
variant="link"
icon={<UnlinkIcon />}
onClick={() => deleteTicket(ticket.id)}
/>
</Tooltip>
)}
<Button
type="button"
Expand Down

0 comments on commit e875ea1

Please sign in to comment.