fix(web/releases): action status show rejections (#342)

* fix(releases): action status show rejections
This commit is contained in:
Ludvig Lundgren 2022-07-07 17:14:26 +02:00 committed by GitHub
parent 402596523d
commit 652bd8f6f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,22 +53,6 @@ const StatusCellMap: Record<string, StatusCellMapEntry> = {
}
};
// const GetReleaseStatusString = (releaseAction: ReleaseActionStatus) => {
// const items: Array<string> = [
// `action: ${releaseAction.action}`,
// `type: ${releaseAction.type}`,
// `status: ${releaseAction.status}`,
// `time: ${simplifyDate(releaseAction.timestamp)}`
// ];
// if (releaseAction.client != "")
// items.push(`client: ${releaseAction.client}`);
// if (releaseAction.filter != "")
// items.push(`filter: ${releaseAction.filter}`);
// if (releaseAction.rejections.length)
// items.push(`rejections: ${releaseAction.rejections}`);
// return items.join(" | ");
// };
export const ReleaseStatusCell = ({ value }: ReleaseStatusCellProps) => (
<div className="flex text-sm font-medium text-gray-900 dark:text-gray-300">
{value.map((v, idx) => (
@ -80,13 +64,14 @@ export const ReleaseStatusCell = ({ value }: ReleaseStatusCellProps) => (
)}
>
<Tooltip button={StatusCellMap[v.status].icon}>
<ol className="flex flex-col">
<ol className="flex flex-col max-w-sm">
<li className="py-1">Status: {v.status}</li>
<li className="py-1">Action: {v.action}</li>
<li className="py-1">Type: {v.type}</li>
{v.client && <li className="py-1">Client: {v.client}</li>}
{v.filter && <li className="py-1">Filter: {v.filter}</li>}
<li className="py-1">Time: {simplifyDate(v.timestamp)}</li>
{v.rejections.length > 0 && <li className="py-1">Rejections: <span className="break-all">{v.rejections.toString()}</span></li>}
</ol>
</Tooltip>
</div>