pollination-react-io 1.61.0 → 1.62.1
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/hooks/usePollinationPanel.d.ts +1 -0
- package/build/index.esm.js +36 -7
- package/build/index.esm.js.map +1 -1
- package/build/index.js +36 -7
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -38128,6 +38128,24 @@ var usePollinationPanel = function () {
|
|
38128
38128
|
return undefined;
|
38129
38129
|
}
|
38130
38130
|
};
|
38131
|
+
/**
|
38132
|
+
* Get array of ProjectJobInfo from DB
|
38133
|
+
* @param projectSlug Project slug
|
38134
|
+
* @returns Array of ProjectJobInfo
|
38135
|
+
*/
|
38136
|
+
var getJob = function (projectSlug) {
|
38137
|
+
if (!panel)
|
38138
|
+
return;
|
38139
|
+
try {
|
38140
|
+
var message = panel.GetJob(projectSlug);
|
38141
|
+
var arr = JSON.parse(message.data);
|
38142
|
+
return arr;
|
38143
|
+
}
|
38144
|
+
catch (error) {
|
38145
|
+
// Do nothing. It is written at the end
|
38146
|
+
return undefined;
|
38147
|
+
}
|
38148
|
+
};
|
38131
38149
|
return {
|
38132
38150
|
getFileBase64: getFileBase64,
|
38133
38151
|
saveFileBase64: saveFileBase64,
|
@@ -38137,7 +38155,8 @@ var usePollinationPanel = function () {
|
|
38137
38155
|
fetchLocalJob: fetchLocalJob,
|
38138
38156
|
fetchLocalLog: fetchLocalLog,
|
38139
38157
|
fileExplorer: fileExplorer,
|
38140
|
-
getPaginatedJob: getPaginatedJob
|
38158
|
+
getPaginatedJob: getPaginatedJob,
|
38159
|
+
getJob: getJob
|
38141
38160
|
};
|
38142
38161
|
};
|
38143
38162
|
|
@@ -48926,10 +48945,17 @@ var RunCard = function (_a) {
|
|
48926
48945
|
var _a;
|
48927
48946
|
setHover(__assign(__assign({}, initialValues), (_a = {}, _a[defaultTab] = true, _a)));
|
48928
48947
|
}, [defaultTab]);
|
48948
|
+
var localStudyURLname = React.useMemo(function () {
|
48949
|
+
if (!localStudy)
|
48950
|
+
return;
|
48951
|
+
return localStudy.name
|
48952
|
+
.replace(/[^a-zA-Z0-9]/g, '')
|
48953
|
+
.replace(/[ ()]/g, '');
|
48954
|
+
}, [localStudy]);
|
48929
48955
|
/**
|
48930
48956
|
* Rendering - if error
|
48931
48957
|
*/
|
48932
|
-
if (error)
|
48958
|
+
if (error || !run)
|
48933
48959
|
return loaderNode !== null && loaderNode !== void 0 ? loaderNode : React__default["default"].createElement(Logo, null);
|
48934
48960
|
/**
|
48935
48961
|
* Rendering - if CAD by web
|
@@ -48953,6 +48979,9 @@ var RunCard = function (_a) {
|
|
48953
48979
|
if (!localRun) {
|
48954
48980
|
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id);
|
48955
48981
|
}
|
48982
|
+
else {
|
48983
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/localStudies/").concat(localStudyURLname, "/?path=").concat(_run.id);
|
48984
|
+
}
|
48956
48985
|
} },
|
48957
48986
|
React__default["default"].createElement("div", { className: 'item1' },
|
48958
48987
|
React__default["default"].createElement("button", { className: 'link', style: { all: 'unset', cursor: 'pointer', marginRight: '0.75rem' }, title: 'Go to account page', onMouseOver: function (e) { return toggleHover('account', true); }, onMouseLeave: function (e) { return toggleHover('account', false); }, onClick: function (e) {
|
@@ -48970,7 +48999,10 @@ var RunCard = function (_a) {
|
|
48970
48999
|
if (!localRun) {
|
48971
49000
|
if (!projectOwner)
|
48972
49001
|
return;
|
48973
|
-
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName);
|
49002
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/tab=studies");
|
49003
|
+
}
|
49004
|
+
else {
|
49005
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/?tab=local+studies");
|
48974
49006
|
}
|
48975
49007
|
}, style: hover.project ? { all: 'unset', cursor: 'pointer', color: '#40a9ff' } : { all: 'unset', cursor: 'pointer' } }, projectName !== null && projectName !== void 0 ? projectName : '--')),
|
48976
49008
|
React__default["default"].createElement("div", { className: 'item2' },
|
@@ -49019,10 +49051,7 @@ var RunCard = function (_a) {
|
|
49019
49051
|
getTab(RunTabs.debug);
|
49020
49052
|
if (localRun) {
|
49021
49053
|
// Get study name
|
49022
|
-
var
|
49023
|
-
.replace(/[^a-zA-Z0-9]/g, '')
|
49024
|
-
.replace(/[ ()]/g, '');
|
49025
|
-
var path = "".concat(_run.id, "/").concat(cleanName, "/__logs__/logs.log");
|
49054
|
+
var path = "".concat(_run.id, "/").concat(localStudyURLname, "/__logs__/logs.log");
|
49026
49055
|
fileExplorer(path);
|
49027
49056
|
}
|
49028
49057
|
else {
|