pollination-react-io 1.56.1 → 1.56.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 +15 -14
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -14
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -38041,7 +38041,7 @@ var usePollinationPanel = function () {
|
|
38041
38041
|
return run;
|
38042
38042
|
}
|
38043
38043
|
catch (error) {
|
38044
|
-
|
38044
|
+
throw error;
|
38045
38045
|
}
|
38046
38046
|
}, [panel]);
|
38047
38047
|
var fetchLocalJob = React.useCallback(function (path) {
|
@@ -38056,7 +38056,8 @@ var usePollinationPanel = function () {
|
|
38056
38056
|
return job;
|
38057
38057
|
}
|
38058
38058
|
catch (error) {
|
38059
|
-
|
38059
|
+
// Do nothing. It is written at the end
|
38060
|
+
return undefined;
|
38060
38061
|
}
|
38061
38062
|
}, [panel]);
|
38062
38063
|
return {
|
@@ -48768,6 +48769,10 @@ var RunCard = function (_a) {
|
|
48768
48769
|
fallbackData: localRun ? undefined : _run,
|
48769
48770
|
errorRetryCount: 3,
|
48770
48771
|
onSuccess: function (run, key, config) {
|
48772
|
+
if (localRun) {
|
48773
|
+
var jobInfo = fetchLocalJob(_run.id);
|
48774
|
+
setLocalStudy(jobInfo);
|
48775
|
+
}
|
48771
48776
|
sendRun(run);
|
48772
48777
|
if (run.status.finished_at)
|
48773
48778
|
setStopRefresh(true);
|
@@ -48781,17 +48786,13 @@ var RunCard = function (_a) {
|
|
48781
48786
|
React.useEffect(function () {
|
48782
48787
|
if (!_run)
|
48783
48788
|
return;
|
48784
|
-
if (localRun)
|
48785
|
-
|
48786
|
-
|
48787
|
-
|
48788
|
-
|
48789
|
-
|
48790
|
-
|
48791
|
-
setStudy(d);
|
48792
|
-
})
|
48793
|
-
.catch(function () { setStudy(undefined); });
|
48794
|
-
}
|
48789
|
+
if (localRun)
|
48790
|
+
return;
|
48791
|
+
fetchJob(projectOwner, projectName, run.status.job_id)
|
48792
|
+
.then(function (d) {
|
48793
|
+
setStudy(d);
|
48794
|
+
})
|
48795
|
+
.catch(function () { setStudy(undefined); });
|
48795
48796
|
}, [_run]);
|
48796
48797
|
/**
|
48797
48798
|
* Refresh status
|
@@ -48850,7 +48851,7 @@ var RunCard = function (_a) {
|
|
48850
48851
|
setHover(__assign(__assign({}, initialValues), (_a = {}, _a[defaultTab] = true, _a)));
|
48851
48852
|
}, [defaultTab]);
|
48852
48853
|
if (error)
|
48853
|
-
return React__default["default"].createElement(
|
48854
|
+
return React__default["default"].createElement(Logo, null);
|
48854
48855
|
return (React__default["default"].createElement("div", { className: enableClick ? "grid-container ".concat(isReady && !run.status.finished_at && 'blink-effect')
|
48855
48856
|
: "grid-container disable-click ".concat(isReady && !run.status.finished_at && 'blink-effect'), tabIndex: 0, role: 'button', style: __assign({ borderColor: (_d = (_c = statusMap[status]) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : '#d0d7de' }, style), onClick: function () {
|
48856
48857
|
if (!enableClick)
|