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.esm.js
CHANGED
@@ -55897,6 +55897,11 @@ var RunCard = function (_a) {
|
|
55897
55897
|
}, 1000);
|
55898
55898
|
return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
|
55899
55899
|
}, [run, getDuration]);
|
55900
|
+
var daysSinceFinished = useMemo(function () {
|
55901
|
+
if (!run || !run.status.finished_at)
|
55902
|
+
return undefined;
|
55903
|
+
return dayjs_min().diff(dayjs_min(run.status.finished_at), 'day');
|
55904
|
+
}, [run]);
|
55900
55905
|
/**
|
55901
55906
|
* Manage hover effect
|
55902
55907
|
*/
|
@@ -56147,7 +56152,10 @@ var RunCard = function (_a) {
|
|
56147
56152
|
} },
|
56148
56153
|
React__default.createElement(XOctagon$1, { style: { display: 'inline', margin: '0 5px 0 0' } }),
|
56149
56154
|
" Cancel"),
|
56150
|
-
React__default.createElement(Button, { style: { marginRight: '0.75rem' }, disabled: !run || !
|
56155
|
+
React__default.createElement(Button, { style: { marginRight: '0.75rem' }, disabled: !run || !run.status || !daysSinceFinished ||
|
56156
|
+
![dist$1.RunStatusEnum.Failed, dist$1.RunStatusEnum.Cancelled].includes(run.status.status) ||
|
56157
|
+
// Cannot retry runs that are more than 14 days old because the workspace is deleted
|
56158
|
+
daysSinceFinished >= 14, onClick: function (e) {
|
56151
56159
|
e.stopPropagation();
|
56152
56160
|
if (!run)
|
56153
56161
|
return;
|