pollination-react-io 1.85.2 → 1.85.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.esm.js +9 -1
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -55924,6 +55924,11 @@ var RunCard = function (_a) {
|
|
55924
55924
|
}, 1000);
|
55925
55925
|
return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
|
55926
55926
|
}, [run, getDuration]);
|
55927
|
+
var daysSinceFinished = React.useMemo(function () {
|
55928
|
+
if (!run || !run.status.finished_at)
|
55929
|
+
return undefined;
|
55930
|
+
return dayjs_min().diff(dayjs_min(run.status.finished_at), 'day');
|
55931
|
+
}, [run]);
|
55927
55932
|
/**
|
55928
55933
|
* Manage hover effect
|
55929
55934
|
*/
|
@@ -56174,7 +56179,10 @@ var RunCard = function (_a) {
|
|
56174
56179
|
} },
|
56175
56180
|
React__default["default"].createElement(XOctagon$1, { style: { display: 'inline', margin: '0 5px 0 0' } }),
|
56176
56181
|
" Cancel"),
|
56177
|
-
React__default["default"].createElement(Button, { style: { marginRight: '0.75rem' }, disabled: !run || !
|
56182
|
+
React__default["default"].createElement(Button, { style: { marginRight: '0.75rem' }, disabled: !run || !run.status || !daysSinceFinished ||
|
56183
|
+
![dist$1.RunStatusEnum.Failed, dist$1.RunStatusEnum.Cancelled].includes(run.status.status) ||
|
56184
|
+
// Cannot retry runs that are more than 14 days old because the workspace is deleted
|
56185
|
+
daysSinceFinished >= 14, onClick: function (e) {
|
56178
56186
|
e.stopPropagation();
|
56179
56187
|
if (!run)
|
56180
56188
|
return;
|