Skip to content

Commit

Permalink
fix erros
Browse files Browse the repository at this point in the history
  • Loading branch information
Safouen Turki committed Oct 12, 2024
1 parent 04a432a commit c40dad7
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { Button } from "@/components/ui/button";
import {
Check,
Copy,
ExternalLink,
ImageOff,
MoreHorizontal,
Expand All @@ -38,6 +39,11 @@ import {
resourceColumns,
} from "@/modules/clusters/cluster-information/components/AddonsTable/Columns";
import { AddonColumn, AddonTableTypes } from "@/types/addonTable.types";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";

export const AddonsTable = ({
data,
Expand Down Expand Up @@ -194,6 +200,34 @@ export const AddonsTable = ({
},
)}
</TableCell>
) : column.keys == AddonTableTypes.FAILURE_MESSAGE ? (
<Tooltip>
<TooltipTrigger>
{row.failureMessage && (
<TableCell>
<Button
variant="ghost"
size="icon"
onClick={() =>
navigator.clipboard.writeText(
row.failureMessage,
)
}
className="ml-2"
>
<Copy className="h-4 w-4" />
<span className="sr-only">Copy</span>
</Button>
<span className=" break-words whitespace-normal">
{row.failureMessage}
</span>
</TableCell>
)}
<TooltipContent>
<p>{row.failureMessage}</p>
</TooltipContent>
</TooltipTrigger>
</Tooltip>
) : column.keys == AddonTableTypes.STATUS ? (
<TableCell>
<Badge className={colorFromStatus(row.status)}>
Expand Down

0 comments on commit c40dad7

Please sign in to comment.