pollination-react-io 1.61.0 → 1.62.0
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 +31 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +31 -5
- 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,6 +48945,13 @@ 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
|
*/
|
@@ -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) {
|
@@ -49019,10 +49048,7 @@ var RunCard = function (_a) {
|
|
49019
49048
|
getTab(RunTabs.debug);
|
49020
49049
|
if (localRun) {
|
49021
49050
|
// 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");
|
49051
|
+
var path = "".concat(_run.id, "/").concat(localStudyURLname, "/__logs__/logs.log");
|
49026
49052
|
fileExplorer(path);
|
49027
49053
|
}
|
49028
49054
|
else {
|