pollination-react-io 1.57.0 → 1.57.2
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/RunDetails/RunDetails.types.d.ts +8 -5
- package/build/index.esm.js +12 -13
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,20 +1,23 @@
|
|
1
|
-
import { Run
|
1
|
+
import { Run } from '@pollination-solutions/pollination-sdk';
|
2
2
|
import { CSSProperties } from 'react';
|
3
3
|
import { APIClient } from '../hooks';
|
4
4
|
import { FileCardProps } from './Cards/FileCard';
|
5
5
|
import { FolderCardProps } from './Cards/FolderCard';
|
6
6
|
export interface LocalRun {
|
7
|
-
meta: any;
|
8
|
-
status: any;
|
9
|
-
recipe: any;
|
10
7
|
id: string;
|
8
|
+
author: any;
|
9
|
+
owner: any;
|
10
|
+
recipe: any;
|
11
|
+
generation: any;
|
12
|
+
status: any;
|
13
|
+
meta: any;
|
14
|
+
name: string;
|
11
15
|
}
|
12
16
|
export interface RunDetailsProps {
|
13
17
|
projectOwner: string;
|
14
18
|
projectName: string;
|
15
19
|
run?: Run | LocalRun;
|
16
20
|
runId?: string;
|
17
|
-
authUser?: UserPrivate;
|
18
21
|
client?: APIClient;
|
19
22
|
style?: CSSProperties;
|
20
23
|
getFileCard?: (card: FileCardProps) => any;
|
package/build/index.esm.js
CHANGED
@@ -44751,7 +44751,7 @@ var CreateStudy = function (_a) {
|
|
44751
44751
|
var jobName_1 = toUnixPath(projectJobInfo.studyId).split('/').reverse()[0];
|
44752
44752
|
// Path is the full path of the local machine where the run input/output are
|
44753
44753
|
setTimeout(function () {
|
44754
|
-
window.location.href = "
|
44754
|
+
window.location.href = "".concat(basePath, "/").concat(projectJobInfo.accountName, "/projects/").concat(projectJobInfo.projectName, "/localStudies/").concat(jobName_1, "/?path=").concat(projectJobInfo.studyId);
|
44755
44755
|
}, 3000);
|
44756
44756
|
}
|
44757
44757
|
};
|
@@ -49571,25 +49571,24 @@ var RunContent = function (_a) {
|
|
49571
49571
|
|
49572
49572
|
var RunDetails = function (_a) {
|
49573
49573
|
var projectName = _a.projectName, projectOwner = _a.projectOwner, run = _a.run, // Cloud and Local
|
49574
|
-
runId = _a.runId
|
49575
|
-
|
49574
|
+
runId = _a.runId, // TODO: delete it if RUN JSON has the field
|
49575
|
+
client = _a.client, style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard;
|
49576
49576
|
var _b = useState([]), extraInputs = _b[0], setExtraInputs = _b[1];
|
49577
49577
|
var _c = useState([]), recipeInputs = _c[0], setRecipeInputs = _c[1];
|
49578
49578
|
var _d = useState([]), outputs = _d[0], setOutputs = _d[1];
|
49579
|
-
var _e = useState(), currRun = _e[0], setCurrRun = _e[1];
|
49580
|
-
useEffect(function () { return setCurrRun(run); }, [run]);
|
49581
49579
|
useEffect(function () {
|
49582
|
-
if (!
|
49580
|
+
if (!run)
|
49583
49581
|
return;
|
49584
49582
|
var recipeInputNames = [];
|
49585
|
-
if (
|
49586
|
-
recipeInputNames =
|
49583
|
+
if (run.recipe && run.recipe.inputs) {
|
49584
|
+
recipeInputNames = run.recipe.inputs.map(function (i) { return i.name; });
|
49587
49585
|
}
|
49588
49586
|
var outputs = [];
|
49589
49587
|
var recipeInputs = [];
|
49590
49588
|
var extraInputs = [];
|
49589
|
+
// If cloud
|
49591
49590
|
if (run.status) {
|
49592
|
-
|
49591
|
+
run.status.inputs.forEach(function (i) {
|
49593
49592
|
if (recipeInputNames.includes(i.name)) {
|
49594
49593
|
recipeInputs.push(i);
|
49595
49594
|
}
|
@@ -49597,12 +49596,12 @@ var RunDetails = function (_a) {
|
|
49597
49596
|
extraInputs.push(i);
|
49598
49597
|
}
|
49599
49598
|
});
|
49600
|
-
|
49599
|
+
run.status.outputs.map(function (o) { return outputs.push(o); });
|
49601
49600
|
}
|
49602
49601
|
setExtraInputs(extraInputs);
|
49603
49602
|
setRecipeInputs(recipeInputs);
|
49604
49603
|
setOutputs(outputs);
|
49605
|
-
}, [
|
49604
|
+
}, [run]);
|
49606
49605
|
return (React__default.createElement("div", null,
|
49607
49606
|
outputs &&
|
49608
49607
|
React__default.createElement(RunContent, { title: 'Outputs', inputData: outputs, projectName: projectName, projectOwner: projectOwner, studyId: run.status.job_id, runId: run.id || runId, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard }),
|
@@ -50280,7 +50279,7 @@ styleInject(css_248z);
|
|
50280
50279
|
|
50281
50280
|
var RunRow = function (_a) {
|
50282
50281
|
var _b, _c;
|
50283
|
-
var projectOwner = _a.projectOwner, projectName = _a.projectName, run = _a.run, index = _a.index, client = _a.client
|
50282
|
+
var projectOwner = _a.projectOwner, projectName = _a.projectName, run = _a.run, index = _a.index, client = _a.client; _a.authUser; var style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard;
|
50284
50283
|
var statusMap = useRuns(client).statusMap;
|
50285
50284
|
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
50286
50285
|
/*
|
@@ -50380,7 +50379,7 @@ var RunRow = function (_a) {
|
|
50380
50379
|
: hover.debugOver ? '#40a9ff'
|
50381
50380
|
: '#000') } }))),
|
50382
50381
|
open && React__default.createElement("div", { className: 'run-details' },
|
50383
|
-
React__default.createElement(RunDetails, { projectOwner: projectOwner, projectName: projectName, run: run,
|
50382
|
+
React__default.createElement(RunDetails, { projectOwner: projectOwner, projectName: projectName, run: run, client: client, getFileCard: getFileCard, getFolderCard: getFolderCard, style: style })));
|
50384
50383
|
};
|
50385
50384
|
|
50386
50385
|
var RunTable = function (_a) {
|