pollination-react-io 1.46.0 → 1.47.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/Cards/RunCard.types.d.ts +4 -1
- package/build/Cards/StudyCard.types.d.ts +4 -2
- package/build/index.esm.js +184 -113
- package/build/index.esm.js.map +1 -1
- package/build/index.js +184 -113
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,9 @@ export interface RunCardProps {
|
|
|
14
14
|
style?: CSSProperties;
|
|
15
15
|
authUser?: UserPrivate;
|
|
16
16
|
client?: APIClient;
|
|
17
|
-
|
|
17
|
+
getTab?: (tab: any) => any;
|
|
18
18
|
defaultTab?: RunTabs;
|
|
19
|
+
interval?: number;
|
|
20
|
+
getValue?: (run: Run) => any;
|
|
21
|
+
canWrite?: boolean;
|
|
19
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CloudJob, UserPrivate } from '@pollination-solutions/pollination-sdk';
|
|
1
|
+
import { CloudJob, RunList, UserPrivate } from '@pollination-solutions/pollination-sdk';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { APIClient } from '../hooks';
|
|
4
4
|
export declare enum JobTabs {
|
|
@@ -13,8 +13,10 @@ export interface StudyCardProps {
|
|
|
13
13
|
authUser?: UserPrivate;
|
|
14
14
|
client?: APIClient;
|
|
15
15
|
enableClick?: boolean;
|
|
16
|
-
|
|
16
|
+
getTab?: (tab: any) => any;
|
|
17
17
|
defaultTab?: JobTabs;
|
|
18
18
|
enableLink?: boolean;
|
|
19
19
|
canWrite?: boolean;
|
|
20
|
+
interval?: number;
|
|
21
|
+
getValue?: (runList: RunList) => any;
|
|
20
22
|
}
|
package/build/index.esm.js
CHANGED
|
@@ -47070,7 +47070,7 @@ var JobTabs;
|
|
|
47070
47070
|
JobTabs["workspace"] = "workspace";
|
|
47071
47071
|
})(JobTabs || (JobTabs = {}));
|
|
47072
47072
|
|
|
47073
|
-
var css_248z$4 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1rem;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n font-size: 0.9rem;\n}\n\n.status-label {\n font-weight: 500;\n}\n\n.item9 {\n grid-area: time;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: cpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.link {\n text-decoration: none;\n color: var(--primary3);\n}\n\n.link:hover {\n color: var(--primary3);\n}\n\n.light-text {\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun date date\" \"author recipe recipe recipe recipe recipe\" \"status status status status cpu time\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.35rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: 52px 38px 46px 46px auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.grid-container:hover {\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n cursor: pointer;\n}\n\n.disable-click {\n box-shadow: none !important;\n cursor: default !important;\n}\n\n.grid-container > div {\n text-align: left;\n padding: 1rem;\n vertical-align: middle;\n}\n\n.description-expander {\n all: unset;\n}\n\n.description-expander:focus {\n outline: 0 !important;\n}\n\n@media (max-width: 600px) {\n .grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun studyrun studyrun\" \"date date date date date date\" \"author author author recipe recipe recipe\" \"status status status status status status\" \"time time time cpu cpu cpu\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.15rem;\n transition: box-shadow 0.3s;\n grid-template-rows: 52px 52px 32px 32px 32px 32px auto;\n }\n .item1 {\n text-align: left !important;\n }\n .item2 {\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item3, .item4 {\n text-align: center !important;\n }\n .item5 {\n font-size: 0.8rem;\n }\n .item6 {\n white-space: nowrap;\n font-size: 0.8rem;\n }\n .item7 {\n font-size: 0.8rem;\n text-align: center !important;\n }\n .item8 {\n font-size: 1rem;\n text-align: center !important;\n }\n .item9 {\n text-align: left !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item10 {\n text-align: right !important;\n }\n .grid-container > div {\n text-align: left;\n vertical-align: middle;\n }\n}";
|
|
47073
|
+
var css_248z$4 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1rem;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n font-size: 0.9rem;\n}\n\n.status-label {\n font-weight: 500;\n}\n\n.item9 {\n grid-area: time;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: cpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.link {\n text-decoration: none;\n color: var(--primary3);\n}\n\n.link:hover {\n color: var(--primary3);\n}\n\n.light-text {\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun date date\" \"author recipe recipe recipe recipe recipe\" \"status status status status cpu time\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.35rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: 52px 38px 46px 46px auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.grid-container:hover {\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n cursor: pointer;\n}\n\n.disable-click {\n box-shadow: none !important;\n cursor: default !important;\n}\n\n.grid-container > div {\n text-align: left;\n padding: 1rem;\n vertical-align: middle;\n}\n\n.description-expander {\n all: unset;\n}\n\n.description-expander:focus {\n outline: 0 !important;\n}\n\n@media (max-width: 600px) {\n .grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun studyrun studyrun\" \"date date date date date date\" \"author author author recipe recipe recipe\" \"status status status status status status\" \"time time time cpu cpu cpu\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.15rem;\n transition: box-shadow 0.3s;\n grid-template-rows: 52px 52px 32px 32px 32px 32px auto;\n }\n .item1 {\n text-align: left !important;\n }\n .item2 {\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item3, .item4 {\n text-align: center !important;\n }\n .item5 {\n font-size: 0.8rem;\n }\n .item6 {\n white-space: nowrap;\n font-size: 0.8rem;\n }\n .item7 {\n font-size: 0.8rem;\n text-align: center !important;\n }\n .item8 {\n font-size: 1rem;\n text-align: center !important;\n }\n .item9 {\n text-align: left !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item10 {\n text-align: right !important;\n }\n .grid-container > div {\n text-align: left;\n vertical-align: middle;\n }\n}\n.blink-effect {\n animation: blinker 2s linear infinite;\n}\n\n@keyframes blinker {\n 50% {\n border: 0.1rem solid white;\n }\n}";
|
|
47074
47074
|
styleInject(css_248z$4);
|
|
47075
47075
|
|
|
47076
47076
|
var IconContext = /*#__PURE__*/createContext({});
|
|
@@ -48562,41 +48562,46 @@ var formatDuration$1 = function (duration) {
|
|
|
48562
48562
|
};
|
|
48563
48563
|
var StudyCard = function (_a) {
|
|
48564
48564
|
var _b;
|
|
48565
|
-
var _c, _d, _e, _f;
|
|
48566
|
-
var projectName = _a.projectName, projectOwner = _a.projectOwner, _study = _a.study, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick,
|
|
48565
|
+
var _c, _d, _e, _f, _g, _h;
|
|
48566
|
+
var projectName = _a.projectName, projectOwner = _a.projectOwner, _study = _a.study, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, _j = _a.getTab, getTab = _j === void 0 ? function (tab) { } : _j, _k = _a.defaultTab, defaultTab = _k === void 0 ? '' : _k, _l = _a.enableLink, enableLink = _l === void 0 ? false : _l, _m = _a.canWrite, canWrite = _m === void 0 ? false : _m, _o = _a.getValue, getValue = _o === void 0 ? function (runList) { } : _o, _p = _a.interval, interval = _p === void 0 ? 5000 : _p;
|
|
48567
48567
|
/**
|
|
48568
48568
|
* Fetch hooks
|
|
48569
48569
|
*/
|
|
48570
|
-
var
|
|
48570
|
+
var _q = useJobs(client), fetchJob = _q.fetchJob, getDuration = _q.getDuration, statusMap = _q.statusMap, deleteJob = _q.deleteJob, cancelJob = _q.cancelJob;
|
|
48571
48571
|
var listRuns = useRuns(client).listRuns;
|
|
48572
|
-
var
|
|
48573
|
-
var
|
|
48574
|
-
var
|
|
48572
|
+
var _r = useWindowDimensions(), width = _r.width; _r.height;
|
|
48573
|
+
var _s = useState(false), seeDescription = _s[0], setSeeDescription = _s[1];
|
|
48574
|
+
var _t = useState(false), seeAction = _t[0], setSeeAction = _t[1];
|
|
48575
|
+
var _u = useState(false), stopRefresh = _u[0], setStopRefresh = _u[1];
|
|
48576
|
+
var _v = useState(false), isReady = _v[0], setIsReady = _v[1];
|
|
48575
48577
|
/**
|
|
48576
48578
|
* From job to run
|
|
48577
48579
|
*/
|
|
48578
|
-
var
|
|
48580
|
+
var _w = useSWR(authUser && _study ? [projectOwner, projectName, _study.id] : undefined, fetchJob, {
|
|
48579
48581
|
revalidateOnFocus: false,
|
|
48580
|
-
refreshInterval:
|
|
48582
|
+
refreshInterval: stopRefresh ? undefined : interval,
|
|
48581
48583
|
fallbackData: _study,
|
|
48582
48584
|
errorRetryCount: 3,
|
|
48583
48585
|
onSuccess: function (study, key, config) {
|
|
48584
|
-
|
|
48585
|
-
var tot = study.status.runs_pending +
|
|
48586
|
-
study.status.runs_running +
|
|
48587
|
-
study.status.runs_failed +
|
|
48588
|
-
study.status.runs_completed +
|
|
48589
|
-
study.status.runs_cancelled;
|
|
48590
|
-
if (tot > 1)
|
|
48586
|
+
if (!study)
|
|
48591
48587
|
return;
|
|
48592
|
-
// One run only info
|
|
48593
48588
|
listRuns(projectOwner, projectName, [study.id])
|
|
48594
48589
|
.then(function (d) {
|
|
48595
|
-
|
|
48590
|
+
if (d.resources.length === 1) {
|
|
48591
|
+
setRun(d.resources[0]);
|
|
48592
|
+
sendRunList(d);
|
|
48593
|
+
}
|
|
48594
|
+
else {
|
|
48595
|
+
sendRunList(d);
|
|
48596
|
+
}
|
|
48596
48597
|
})
|
|
48597
|
-
.catch(function () { setRun(undefined); })
|
|
48598
|
+
.catch(function () { setRun(undefined); })
|
|
48599
|
+
.finally(function () { return setIsReady(true); });
|
|
48600
|
+
if (study.status.finished_at)
|
|
48601
|
+
setStopRefresh(true);
|
|
48598
48602
|
}
|
|
48599
|
-
}), study =
|
|
48603
|
+
}), study = _w.data; _w.error; _w.isValidating;
|
|
48604
|
+
var sendRunList = useCallback(function (runList) { return getValue(runList); }, [study]);
|
|
48600
48605
|
var total = useMemo(function () {
|
|
48601
48606
|
if (!study)
|
|
48602
48607
|
return undefined;
|
|
@@ -48619,8 +48624,8 @@ var StudyCard = function (_a) {
|
|
|
48619
48624
|
}
|
|
48620
48625
|
return study.status.status.toLocaleLowerCase();
|
|
48621
48626
|
}, [study]);
|
|
48622
|
-
var
|
|
48623
|
-
var
|
|
48627
|
+
var _x = useState(), run = _x[0], setRun = _x[1];
|
|
48628
|
+
var _y = useState(getDuration(study)), duration = _y[0], setDuration = _y[1];
|
|
48624
48629
|
useEffect(function () {
|
|
48625
48630
|
setRun(undefined);
|
|
48626
48631
|
if (!study)
|
|
@@ -48651,7 +48656,7 @@ var StudyCard = function (_a) {
|
|
|
48651
48656
|
info: false,
|
|
48652
48657
|
settings: false
|
|
48653
48658
|
};
|
|
48654
|
-
var
|
|
48659
|
+
var _z = useState(__assign(__assign({}, initialValues), (_b = {}, _b[defaultTab] = true, _b))), hover = _z[0], setHover = _z[1];
|
|
48655
48660
|
var toggleHover = useCallback(function (id, value) {
|
|
48656
48661
|
if (value === void 0) { value = false; }
|
|
48657
48662
|
setHover(function (prevHover) {
|
|
@@ -48666,7 +48671,8 @@ var StudyCard = function (_a) {
|
|
|
48666
48671
|
var _a;
|
|
48667
48672
|
setHover(__assign(__assign({}, initialValues), (_a = {}, _a[defaultTab] = true, _a)));
|
|
48668
48673
|
}, [defaultTab]);
|
|
48669
|
-
return (React__default.createElement("div", { className: enableClick ?
|
|
48674
|
+
return (React__default.createElement("div", { className: enableClick ? "grid-container ".concat(isReady && !((_c = study === null || study === void 0 ? void 0 : study.status) === null || _c === void 0 ? void 0 : _c.finished_at) && 'blink-effect')
|
|
48675
|
+
: "grid-container disable-click ".concat(isReady && !((_d = study === null || study === void 0 ? void 0 : study.status) === null || _d === void 0 ? void 0 : _d.finished_at) && 'blink-effect'), tabIndex: 0, role: 'button', style: __assign({ borderColor: (_f = (_e = statusMap[status]) === null || _e === void 0 ? void 0 : _e.color) !== null && _f !== void 0 ? _f : '#d0d7de' }, style), onClick: function () {
|
|
48670
48676
|
if (!enableClick)
|
|
48671
48677
|
return;
|
|
48672
48678
|
if (study && total > 1) {
|
|
@@ -48683,9 +48689,9 @@ var StudyCard = function (_a) {
|
|
|
48683
48689
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } }, "/"),
|
|
48684
48690
|
React__default.createElement("a", { className: 'link', href: projectName && "/".concat(projectOwner, "/projects/").concat(projectName), title: 'Go to project page', onMouseOver: function (e) { return toggleHover('project', true); }, onMouseLeave: function (e) { return toggleHover('project', false); }, style: hover.project ? { color: '#40a9ff' } : {} }, projectName !== null && projectName !== void 0 ? projectName : '--')),
|
|
48685
48691
|
React__default.createElement("div", { className: 'item2' },
|
|
48686
|
-
|
|
48687
|
-
|
|
48688
|
-
React__default.createElement(
|
|
48692
|
+
React__default.createElement("div", null,
|
|
48693
|
+
(!isReady || !study) && React__default.createElement(LoadingOutlined$1, { style: { margin: '0 10px 0 0' } }),
|
|
48694
|
+
(study && run && total === 1) && React__default.createElement(React__default.Fragment, null,
|
|
48689
48695
|
React__default.createElement("span", { title: 'Go to run page' },
|
|
48690
48696
|
React__default.createElement(InfoCircleOutlined$1, { className: 'link', onClick: function (e) {
|
|
48691
48697
|
e.stopPropagation();
|
|
@@ -48708,16 +48714,20 @@ var StudyCard = function (_a) {
|
|
|
48708
48714
|
color: "".concat((hover.workspace || hover.workspaceOver) ? '#40a9ff' : '#000') } })),
|
|
48709
48715
|
React__default.createElement("span", { title: 'Go to debug page' },
|
|
48710
48716
|
React__default.createElement(PartitionOutlined$1, { className: 'link', onClick: function (e) {
|
|
48717
|
+
if (!study.status.finished_at)
|
|
48718
|
+
return;
|
|
48711
48719
|
e.stopPropagation();
|
|
48712
48720
|
document.location = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id, "?tab=debug");
|
|
48713
48721
|
}, onMouseOver: function (e) {
|
|
48714
48722
|
toggleHover('debugOver', true);
|
|
48715
48723
|
}, onMouseLeave: function (e) {
|
|
48716
48724
|
toggleHover('debugOver', false);
|
|
48717
|
-
}, style: { marginRight:
|
|
48718
|
-
|
|
48719
|
-
|
|
48720
|
-
|
|
48725
|
+
}, style: { marginRight: "".concat(canWrite
|
|
48726
|
+
? '0.75rem' : '0'),
|
|
48727
|
+
color: "".concat((!study.status.finished_at) ? 'gray'
|
|
48728
|
+
: (hover.debug || hover.debugOver) ? '#40a9ff'
|
|
48729
|
+
: '#000') } }))),
|
|
48730
|
+
(study && total > 1) && React__default.createElement(React__default.Fragment, null,
|
|
48721
48731
|
React__default.createElement("span", { title: 'Go to study page' },
|
|
48722
48732
|
React__default.createElement(InfoCircleOutlined$1, { className: 'link', onClick: function (e) {
|
|
48723
48733
|
e.stopPropagation();
|
|
@@ -48725,7 +48735,7 @@ var StudyCard = function (_a) {
|
|
|
48725
48735
|
document.location = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "?tab=details");
|
|
48726
48736
|
}
|
|
48727
48737
|
else {
|
|
48728
|
-
|
|
48738
|
+
getTab(JobTabs.details);
|
|
48729
48739
|
toggleHover(JobTabs.workspace, false);
|
|
48730
48740
|
toggleHover(JobTabs.details, true);
|
|
48731
48741
|
}
|
|
@@ -48743,7 +48753,7 @@ var StudyCard = function (_a) {
|
|
|
48743
48753
|
document.location = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "?tab=workspace");
|
|
48744
48754
|
}
|
|
48745
48755
|
else {
|
|
48746
|
-
|
|
48756
|
+
getTab(JobTabs.workspace);
|
|
48747
48757
|
toggleHover(JobTabs.workspace, true);
|
|
48748
48758
|
toggleHover(JobTabs.details, false);
|
|
48749
48759
|
}
|
|
@@ -48751,29 +48761,35 @@ var StudyCard = function (_a) {
|
|
|
48751
48761
|
toggleHover('workspaceOver', true);
|
|
48752
48762
|
}, onMouseLeave: function (e) {
|
|
48753
48763
|
toggleHover('workspaceOver', false);
|
|
48754
|
-
}, style: {
|
|
48755
|
-
? '
|
|
48764
|
+
}, style: { marginRight: "".concat(canWrite
|
|
48765
|
+
? '0.75rem' : '0'),
|
|
48766
|
+
color: "".concat((hover.workspace || hover.workspaceOver)
|
|
48767
|
+
? '#40a9ff' : '#000') } }))),
|
|
48768
|
+
canWrite && React__default.createElement(React__default.Fragment, null,
|
|
48769
|
+
React__default.createElement("span", { title: 'See study actions' },
|
|
48770
|
+
React__default.createElement(Gear$1, { className: 'link', onMouseOver: function (e) { return toggleHover('settings', true); }, onMouseLeave: function (e) { return toggleHover('settings', false); }, onClick: function (e) {
|
|
48771
|
+
e.stopPropagation();
|
|
48772
|
+
setSeeAction(function (prev) { return !prev; });
|
|
48773
|
+
setSeeDescription(false);
|
|
48774
|
+
}, style: { margin: '5px 0 0 0',
|
|
48775
|
+
cursor: 'pointer',
|
|
48776
|
+
color: "".concat((hover.settings)
|
|
48777
|
+
? '#40a9ff' : '#000') } }))))),
|
|
48756
48778
|
React__default.createElement("div", { className: 'item3' },
|
|
48757
48779
|
React__default.createElement("div", null,
|
|
48758
|
-
study ? (
|
|
48780
|
+
study ? (_g = study.spec.name) !== null && _g !== void 0 ? _g : "Study: ".concat(study.id) : '--',
|
|
48759
48781
|
study && total > 1 && "(#".concat(total, ")"),
|
|
48760
48782
|
React__default.createElement("button", { style: { all: 'unset', margin: '0 0 0 8px', cursor: 'pointer' }, title: 'See study info', onMouseOver: function (e) { return toggleHover('info', true); }, onMouseLeave: function (e) { return toggleHover('info', false); }, onClick: function (e) {
|
|
48761
48783
|
e.stopPropagation();
|
|
48762
48784
|
setSeeDescription(function (prev) { return !prev; });
|
|
48763
48785
|
setSeeAction(false);
|
|
48764
48786
|
} },
|
|
48765
|
-
React__default.createElement(InfoCircle$1, { size: 14, style: hover.info ? { color: '#40a9ff' } : {} })),
|
|
48766
|
-
canWrite && React__default.createElement("button", { style: { all: 'unset', margin: '0 0 0 8px', cursor: 'pointer' }, title: 'See study actions', onMouseOver: function (e) { return toggleHover('settings', true); }, onMouseLeave: function (e) { return toggleHover('settings', false); }, onClick: function (e) {
|
|
48767
|
-
e.stopPropagation();
|
|
48768
|
-
setSeeAction(function (prev) { return !prev; });
|
|
48769
|
-
setSeeDescription(false);
|
|
48770
|
-
} },
|
|
48771
|
-
React__default.createElement(Gear$1, { size: 14, style: hover.settings ? { color: '#40a9ff' } : {} })))),
|
|
48787
|
+
React__default.createElement(InfoCircle$1, { size: 14, style: hover.info ? { color: '#40a9ff' } : {} })))),
|
|
48772
48788
|
React__default.createElement("div", { className: 'item4', title: study && dayjs_min(study.status.started_at).format('[on] MMM DD YYYY [at] hh:mm') }, study ? dayjs_min(study.status.started_at).format('[on] MMM DD YYYY') : '--'),
|
|
48773
48789
|
React__default.createElement("div", { className: 'item5' },
|
|
48774
48790
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } },
|
|
48775
48791
|
React__default.createElement(Avatar, { src: study ? study.author.picture_url : '', size: 24, color: hover.author ? '#40a9ff' : undefined })),
|
|
48776
|
-
React__default.createElement("a", { className: 'link', href: study ? "/".concat(study.author.name) : '', title: 'Go to author page', target: '_blank', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('author', true); }, onMouseLeave: function (e) { return toggleHover('author', false); }, style: hover.author ? { color: '#40a9ff' } : {} }, study ? ((
|
|
48792
|
+
React__default.createElement("a", { className: 'link', href: study ? "/".concat(study.author.name) : '', title: 'Go to author page', target: '_blank', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('author', true); }, onMouseLeave: function (e) { return toggleHover('author', false); }, style: hover.author ? { color: '#40a9ff' } : {} }, study ? ((_h = study.author.display_name) !== null && _h !== void 0 ? _h : study.author.name) : '--')),
|
|
48777
48793
|
React__default.createElement("div", { className: 'item6' },
|
|
48778
48794
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } },
|
|
48779
48795
|
React__default.createElement(Avatar, { src: study ? study.recipe.metadata.icon : '', size: 24, color: hover.recipe ? '#40a9ff' : undefined })),
|
|
@@ -48784,6 +48800,7 @@ var StudyCard = function (_a) {
|
|
|
48784
48800
|
React__default.createElement("div", { className: 'item8' },
|
|
48785
48801
|
React__default.createElement("span", { className: 'status-label', style: { marginRight: '0.75rem' } }, study ? status.charAt(0).toUpperCase() + status.slice(1) : '--'),
|
|
48786
48802
|
React__default.createElement("span", { className: 'light-text' },
|
|
48803
|
+
!isReady && React__default.createElement(LoadingOutlined$1, null),
|
|
48787
48804
|
(study && total == 1) && run && width > 600 &&
|
|
48788
48805
|
"".concat(run.meta.progress.completed, " / ").concat(run.meta.progress.total, " steps"),
|
|
48789
48806
|
(study && total > 1) && width > 600 &&
|
|
@@ -48837,37 +48854,55 @@ var formatDuration = function (duration) {
|
|
|
48837
48854
|
var RunCard = function (_a) {
|
|
48838
48855
|
var _b;
|
|
48839
48856
|
var _c, _d, _e, _f;
|
|
48840
|
-
var projectName = _a.projectName, projectOwner = _a.projectOwner, _run = _a.run, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, getValue = _a.getValue,
|
|
48857
|
+
var projectName = _a.projectName, projectOwner = _a.projectOwner, _run = _a.run, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, getTab = _a.getTab, defaultTab = _a.defaultTab, getValue = _a.getValue, _g = _a.interval, interval = _g === void 0 ? 5000 : _g, _h = _a.canWrite, canWrite = _h === void 0 ? false : _h;
|
|
48841
48858
|
/*
|
|
48842
48859
|
* Fetch run
|
|
48843
48860
|
*/
|
|
48844
48861
|
var fetchJob = useJobs(client).fetchJob;
|
|
48845
|
-
var
|
|
48846
|
-
var
|
|
48847
|
-
var
|
|
48862
|
+
var _j = useRuns(client), fetchRun = _j.fetchRun, statusMap = _j.statusMap, getDuration = _j.getDuration, cancelRun = _j.cancelRun;
|
|
48863
|
+
var _k = useWindowDimensions(), width = _k.width; _k.height;
|
|
48864
|
+
var _l = useState(false), seeDescription = _l[0], setSeeDescription = _l[1];
|
|
48865
|
+
var _m = useState(false), seeAction = _m[0], setSeeAction = _m[1];
|
|
48866
|
+
var _o = useState(false), stopRefresh = _o[0], setStopRefresh = _o[1];
|
|
48867
|
+
var _p = useState(false), isReady = _p[0], setIsReady = _p[1];
|
|
48848
48868
|
/*
|
|
48849
|
-
* From run
|
|
48869
|
+
* From run and stop when it is done
|
|
48850
48870
|
*/
|
|
48851
|
-
var
|
|
48871
|
+
var _q = useSWR(authUser && _run ? [projectOwner, projectName, _run.id] : undefined, fetchRun, {
|
|
48852
48872
|
revalidateOnFocus: false,
|
|
48853
|
-
refreshInterval:
|
|
48873
|
+
refreshInterval: stopRefresh ? undefined : interval,
|
|
48854
48874
|
fallbackData: _run,
|
|
48855
48875
|
errorRetryCount: 3,
|
|
48856
48876
|
onSuccess: function (run, key, config) {
|
|
48857
|
-
|
|
48858
|
-
|
|
48859
|
-
|
|
48860
|
-
|
|
48861
|
-
|
|
48862
|
-
|
|
48863
|
-
|
|
48877
|
+
sendRun(run);
|
|
48878
|
+
if (run.status.finished_at)
|
|
48879
|
+
setStopRefresh(true);
|
|
48880
|
+
setIsReady(true);
|
|
48881
|
+
},
|
|
48882
|
+
}), run = _q.data; _q.error; _q.isValidating;
|
|
48883
|
+
var sendRun = useCallback(function (run) { return getValue(run); }, [run]);
|
|
48884
|
+
/**
|
|
48885
|
+
* Fetch job just one time
|
|
48886
|
+
*/
|
|
48887
|
+
useEffect(function () {
|
|
48888
|
+
if (!_run)
|
|
48889
|
+
return;
|
|
48890
|
+
fetchJob(projectOwner, projectName, run.status.job_id)
|
|
48891
|
+
.then(function (d) {
|
|
48892
|
+
setStudy(d);
|
|
48893
|
+
})
|
|
48894
|
+
.catch(function () { setStudy(undefined); });
|
|
48895
|
+
}, [_run]);
|
|
48896
|
+
/**
|
|
48897
|
+
* Refresh status
|
|
48898
|
+
*/
|
|
48864
48899
|
var status = useMemo(function () {
|
|
48865
48900
|
if (!run)
|
|
48866
48901
|
return undefined;
|
|
48867
48902
|
return run.status.status;
|
|
48868
48903
|
}, [run]);
|
|
48869
|
-
var
|
|
48870
|
-
var
|
|
48904
|
+
var _r = useState(), study = _r[0], setStudy = _r[1];
|
|
48905
|
+
var _s = useState(getDuration(run)), duration = _s[0], setDuration = _s[1];
|
|
48871
48906
|
useEffect(function () {
|
|
48872
48907
|
if (!run)
|
|
48873
48908
|
return undefined;
|
|
@@ -48880,8 +48915,8 @@ var RunCard = function (_a) {
|
|
|
48880
48915
|
}, 1000);
|
|
48881
48916
|
return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
|
|
48882
48917
|
}, [run]);
|
|
48883
|
-
|
|
48884
|
-
* Manage hover
|
|
48918
|
+
/**
|
|
48919
|
+
* Manage hover effect
|
|
48885
48920
|
*/
|
|
48886
48921
|
var initialValues = {
|
|
48887
48922
|
study: false,
|
|
@@ -48895,9 +48930,10 @@ var RunCard = function (_a) {
|
|
|
48895
48930
|
debugOver: false,
|
|
48896
48931
|
author: false,
|
|
48897
48932
|
recipe: false,
|
|
48898
|
-
info: false
|
|
48933
|
+
info: false,
|
|
48934
|
+
settings: false,
|
|
48899
48935
|
};
|
|
48900
|
-
var
|
|
48936
|
+
var _t = useState(__assign(__assign({}, initialValues), (_b = {}, _b[defaultTab] = true, _b))), hover = _t[0], setHover = _t[1];
|
|
48901
48937
|
var toggleHover = useCallback(function (id, value) {
|
|
48902
48938
|
if (value === void 0) { value = false; }
|
|
48903
48939
|
setHover(function (prevHover) {
|
|
@@ -48912,7 +48948,8 @@ var RunCard = function (_a) {
|
|
|
48912
48948
|
var _a;
|
|
48913
48949
|
setHover(__assign(__assign({}, initialValues), (_a = {}, _a[defaultTab] = true, _a)));
|
|
48914
48950
|
}, [defaultTab]);
|
|
48915
|
-
return (React__default.createElement("div", { className: enableClick ?
|
|
48951
|
+
return (React__default.createElement("div", { className: enableClick ? "grid-container ".concat(isReady && !run.status.finished_at && 'blink-effect')
|
|
48952
|
+
: "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 () {
|
|
48916
48953
|
if (run && enableClick) {
|
|
48917
48954
|
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id);
|
|
48918
48955
|
}
|
|
@@ -48923,57 +48960,74 @@ var RunCard = function (_a) {
|
|
|
48923
48960
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } }, "/"),
|
|
48924
48961
|
React__default.createElement("a", { className: 'link', href: projectName && "/".concat(projectOwner, "/projects/").concat(projectName), title: 'Go to project page', onMouseOver: function (e) { return toggleHover('project', true); }, onMouseLeave: function (e) { return toggleHover('project', false); }, style: hover.project ? { color: '#40a9ff' } : {} }, projectName !== null && projectName !== void 0 ? projectName : '--')),
|
|
48925
48962
|
React__default.createElement("div", { className: 'item2' },
|
|
48926
|
-
|
|
48927
|
-
|
|
48928
|
-
|
|
48929
|
-
React__default.createElement(
|
|
48930
|
-
React__default.createElement(
|
|
48931
|
-
|
|
48932
|
-
|
|
48933
|
-
|
|
48934
|
-
|
|
48935
|
-
|
|
48936
|
-
|
|
48937
|
-
|
|
48938
|
-
|
|
48939
|
-
|
|
48940
|
-
|
|
48941
|
-
|
|
48942
|
-
|
|
48943
|
-
|
|
48944
|
-
React__default.createElement(
|
|
48945
|
-
|
|
48946
|
-
|
|
48947
|
-
|
|
48948
|
-
|
|
48949
|
-
|
|
48950
|
-
|
|
48951
|
-
|
|
48952
|
-
|
|
48953
|
-
|
|
48954
|
-
|
|
48955
|
-
|
|
48956
|
-
|
|
48957
|
-
|
|
48958
|
-
React__default.createElement(
|
|
48963
|
+
React__default.createElement("div", null,
|
|
48964
|
+
(!isReady || !study) && React__default.createElement(LoadingOutlined$1, { style: { margin: '0 10px 0 0' } }),
|
|
48965
|
+
(study && run) &&
|
|
48966
|
+
React__default.createElement(React__default.Fragment, null,
|
|
48967
|
+
React__default.createElement("span", { title: 'Go to run page' },
|
|
48968
|
+
React__default.createElement(InfoCircleOutlined$1, { onClick: function (e) {
|
|
48969
|
+
e.stopPropagation();
|
|
48970
|
+
getTab(RunTabs.details);
|
|
48971
|
+
toggleHover(RunTabs.workspace, false);
|
|
48972
|
+
toggleHover(RunTabs.details, true);
|
|
48973
|
+
toggleHover(RunTabs.debug, false);
|
|
48974
|
+
}, onMouseOver: function (e) {
|
|
48975
|
+
toggleHover('detailsOver', true);
|
|
48976
|
+
}, onMouseLeave: function (e) {
|
|
48977
|
+
toggleHover('detailsOver', false);
|
|
48978
|
+
}, style: { marginRight: '0.75rem',
|
|
48979
|
+
color: "".concat((hover.details || hover.detailsOver)
|
|
48980
|
+
? '#40a9ff' : '#000') } })),
|
|
48981
|
+
React__default.createElement("span", { title: 'Go to workspace page' },
|
|
48982
|
+
React__default.createElement(FolderOutlined$1, { className: 'link', onClick: function (e) {
|
|
48983
|
+
e.stopPropagation();
|
|
48984
|
+
getTab(RunTabs.workspace);
|
|
48985
|
+
toggleHover(RunTabs.workspace, true);
|
|
48986
|
+
toggleHover(RunTabs.details, false);
|
|
48987
|
+
toggleHover(RunTabs.debug, false);
|
|
48988
|
+
}, onMouseOver: function (e) {
|
|
48989
|
+
toggleHover('workspaceOver', true);
|
|
48990
|
+
}, onMouseLeave: function (e) {
|
|
48991
|
+
toggleHover('workspaceOver', false);
|
|
48992
|
+
}, style: { marginRight: '0.75rem',
|
|
48993
|
+
color: "".concat((hover.workspace || hover.workspaceOver)
|
|
48994
|
+
? '#40a9ff' : '#000') } })),
|
|
48995
|
+
React__default.createElement("span", { title: 'Go to debug page' },
|
|
48996
|
+
React__default.createElement(PartitionOutlined$1, { className: 'link', onClick: function (e) {
|
|
48997
|
+
if (!run.status.finished_at)
|
|
48998
|
+
return;
|
|
48999
|
+
e.stopPropagation();
|
|
49000
|
+
getTab(RunTabs.debug);
|
|
49001
|
+
toggleHover(RunTabs.workspace, false);
|
|
49002
|
+
toggleHover(RunTabs.details, false);
|
|
49003
|
+
toggleHover(RunTabs.debug, true);
|
|
49004
|
+
}, onMouseOver: function (e) {
|
|
49005
|
+
toggleHover('debugOver', true);
|
|
49006
|
+
}, onMouseLeave: function (e) {
|
|
49007
|
+
toggleHover('debugOver', false);
|
|
49008
|
+
}, style: { marginRight: "".concat(canWrite
|
|
49009
|
+
? '0.75rem' : '0'),
|
|
49010
|
+
color: "".concat((!run.status.finished_at) ? 'gray'
|
|
49011
|
+
: (hover.debug || hover.debugOver) ? '#40a9ff'
|
|
49012
|
+
: '#000') } }))),
|
|
49013
|
+
canWrite && React__default.createElement(React__default.Fragment, null,
|
|
49014
|
+
React__default.createElement("span", { title: 'See study actions' },
|
|
49015
|
+
React__default.createElement(Gear$1, { className: 'link', onMouseOver: function (e) { return toggleHover('settings', true); }, onMouseLeave: function (e) { return toggleHover('settings', false); }, onClick: function (e) {
|
|
48959
49016
|
e.stopPropagation();
|
|
48960
|
-
|
|
48961
|
-
|
|
48962
|
-
|
|
48963
|
-
|
|
48964
|
-
|
|
48965
|
-
|
|
48966
|
-
}, onMouseLeave: function (e) {
|
|
48967
|
-
toggleHover('debugOver', false);
|
|
48968
|
-
}, style: { color: "".concat((hover.debug || hover.debugOver)
|
|
48969
|
-
? '#40a9ff' : '#000') } })))),
|
|
49017
|
+
setSeeAction(function (prev) { return !prev; });
|
|
49018
|
+
setSeeDescription(false);
|
|
49019
|
+
}, style: { margin: '5px 0 0 0',
|
|
49020
|
+
cursor: 'pointer',
|
|
49021
|
+
color: "".concat((hover.settings)
|
|
49022
|
+
? '#40a9ff' : '#000') } }))))),
|
|
48970
49023
|
React__default.createElement("div", { className: 'item3' },
|
|
48971
49024
|
React__default.createElement("div", null,
|
|
48972
49025
|
React__default.createElement("a", { className: 'link', href: projectName && study && "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id), title: 'Go to study page', onMouseOver: function (e) { return toggleHover('study', true); }, onMouseLeave: function (e) { return toggleHover('study', false); }, style: { color: "".concat(hover.study
|
|
48973
49026
|
? '#40a9ff' : '#000') } }, study ? (_e = study.spec.name) !== null && _e !== void 0 ? _e : "Study: ".concat(study.id) : '--'),
|
|
48974
49027
|
React__default.createElement("button", { style: { all: 'unset', margin: '0 0 0 8px', cursor: 'pointer' }, onMouseOver: function (e) { return toggleHover('info', true); }, onMouseLeave: function (e) { return toggleHover('info', false); }, onClick: function (e) {
|
|
48975
49028
|
e.stopPropagation();
|
|
48976
|
-
|
|
49029
|
+
setSeeDescription(function (prev) { return !prev; });
|
|
49030
|
+
setSeeAction(false);
|
|
48977
49031
|
} },
|
|
48978
49032
|
React__default.createElement(InfoCircle$1, { size: 14, style: hover.info ? { color: '#40a9ff' } : {} })))),
|
|
48979
49033
|
React__default.createElement("div", { className: 'item4', title: study && dayjs_min(study.status.started_at).format('[on] MMM DD YYYY [at] hh:mm') }, study ? dayjs_min(study.status.started_at).format('[on] MMM DD YYYY') : '--'),
|
|
@@ -48990,16 +49044,33 @@ var RunCard = function (_a) {
|
|
|
48990
49044
|
study.recipe.metadata.tag)),
|
|
48991
49045
|
React__default.createElement("div", { className: 'item8' },
|
|
48992
49046
|
React__default.createElement("span", { className: 'status-label', style: { marginRight: '0.75rem' } }, study ? status : '--'),
|
|
48993
|
-
React__default.createElement("span", { className: 'light-text' },
|
|
48994
|
-
|
|
49047
|
+
React__default.createElement("span", { className: 'light-text' },
|
|
49048
|
+
!isReady && React__default.createElement(LoadingOutlined$1, null),
|
|
49049
|
+
study && run && width > 600 &&
|
|
49050
|
+
"".concat(run.meta.progress.completed, " / ").concat(run.meta.progress.total, " steps"))),
|
|
48995
49051
|
React__default.createElement("div", { className: 'item9', title: 'CPU usage' },
|
|
48996
49052
|
React__default.createElement(Cpu$1, { size: 18, style: { marginRight: '0.15rem' } }),
|
|
48997
49053
|
React__default.createElement("span", { className: 'light-text' }, study ? "".concat(formatDuration(dayjs_min.duration(run.meta.resources_duration.cpu, 'seconds'))) : '--')),
|
|
48998
49054
|
React__default.createElement("div", { className: 'item10', title: 'Duration of the simulation' },
|
|
48999
49055
|
React__default.createElement(Clock$1, { size: 18, style: { marginRight: '0.15rem' } }),
|
|
49000
49056
|
React__default.createElement("span", { className: 'light-text' }, study ? "".concat(formatDuration(duration)) : '--')),
|
|
49001
|
-
|
|
49002
|
-
React__default.createElement("div", { className: 'item7' }, study ? study.spec.description : '--'))
|
|
49057
|
+
seeDescription && React__default.createElement(React__default.Fragment, null,
|
|
49058
|
+
React__default.createElement("div", { className: 'item7' }, study ? study.spec.description : '--')),
|
|
49059
|
+
seeAction && width && React__default.createElement(React__default.Fragment, null,
|
|
49060
|
+
React__default.createElement("div", { className: 'item7' },
|
|
49061
|
+
React__default.createElement(Button, { style: (width > 600) ? { display: 'inline' } : { display: 'inline', float: 'left' }, disabled: !run || (run.status.status === dist.RunStatusEnum.Failed ||
|
|
49062
|
+
run.status.status === dist.RunStatusEnum.Succeeded ||
|
|
49063
|
+
run.status.status === dist.RunStatusEnum.Cancelled ||
|
|
49064
|
+
run.status.status === dist.RunStatusEnum.Unknown), onClick: function (e) {
|
|
49065
|
+
e.stopPropagation();
|
|
49066
|
+
if (!run)
|
|
49067
|
+
return;
|
|
49068
|
+
cancelRun(projectOwner, projectName, run.id)
|
|
49069
|
+
.then(function (d) { return console.log(d); })
|
|
49070
|
+
.catch(function (e) { return console.log(e); });
|
|
49071
|
+
} },
|
|
49072
|
+
React__default.createElement(XOctagon$1, { style: { display: 'inline', margin: '0 5px 0 0' } }),
|
|
49073
|
+
" Cancel")))));
|
|
49003
49074
|
};
|
|
49004
49075
|
|
|
49005
49076
|
var css_248z$3 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.card-group {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n margin: 0 0 10px 0;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n cursor: pointer;\n margin: 0 0 10px 0;\n transition: opacity 0.5s;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander:hover {\n opacity: 0.7;\n}\n\n.expander > p {\n color: var(--primary3);\n display: inline;\n margin: 0 10px 0 0;\n text-align: left;\n}\n\n.arrow {\n float: right;\n padding: 0 10px 0 0;\n}";
|