pollination-react-io 1.23.0 → 1.24.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.
@@ -21,6 +21,6 @@ export interface LocalConfig {
21
21
  export declare const useCreateStudy: (accountName: string, projectName: string, client: APIClient) => {
22
22
  host: string;
23
23
  createStudy: ({ name, recipe, description }: JobArgs, data: object, onSuccess?: (accountName: string, projectName: string, studyId: string) => void) => Promise<void>;
24
- createLocalStudy: ({ name, description, recipe }: JobArgs, data: object, { localCPUCount, localRunFolder, isLocalJob, cloudProjectName, cloudProjectOwner }: LocalConfig, onSuccess?: (accountName: string, projectName: string, studyId: string) => void, key?: string) => Promise<import("./types").PanelMessageIn>;
24
+ createLocalStudy: ({ name, description, recipe }: JobArgs, data: object, { localCPUCount, localRunFolder, isLocalJob, cloudProjectName, cloudProjectOwner }: LocalConfig, onSuccess?: (accountName: string, projectName: string, studyId: string) => void, key?: string) => Promise<any>;
25
25
  };
26
26
  export {};
@@ -38096,7 +38096,10 @@ var useCreateStudy = function (accountName, projectName, client) {
38096
38096
  description: description,
38097
38097
  source: recipe.source,
38098
38098
  arguments: [jobArguments]
38099
- }); })];
38099
+ }); }).catch(function (err) {
38100
+ var data = err.response.data;
38101
+ console.error(data.detail);
38102
+ })];
38100
38103
  case 1:
38101
38104
  job = _c.sent();
38102
38105
  jobInfo = {
@@ -38109,14 +38112,13 @@ var useCreateStudy = function (accountName, projectName, client) {
38109
38112
  SubFolderPath: ''
38110
38113
  };
38111
38114
  console.log(jobInfo);
38112
- response = sendMessageDotNet({
38113
- action: 'AddStudy',
38114
- data: jobInfo,
38115
- uniqueId: key
38115
+ response = window.parent.chrome.webview.hostObjects.study.RunSimulation(JSON.stringify(jobInfo))
38116
+ .then(function (value) {
38117
+ console.log(value);
38118
+ onSuccess && onSuccess(cloudProjectOwner, cloudProjectName, value);
38119
+ }, function (reason) {
38120
+ console.error(reason);
38116
38121
  });
38117
- if (response) {
38118
- onSuccess && onSuccess(cloudProjectOwner, cloudProjectName, localRunFolder);
38119
- }
38120
38122
  return [2 /*return*/, response];
38121
38123
  }
38122
38124
  });
@@ -46588,6 +46590,9 @@ styleInject(css_248z);
46588
46590
 
46589
46591
  dayjs_min.extend(duration);
46590
46592
  dayjs_min.extend(utc);
46593
+ var formatDuration = function (duration) {
46594
+ return "".concat(duration.days() > 0 ? "".concat(duration.days(), " day").concat(duration.days() !== 1 ? 's' : '', " and ") : '', " ").concat(duration.format('HH:mm:ss'));
46595
+ };
46591
46596
  var StudyCard = function (_a) {
46592
46597
  var _b, _c;
46593
46598
  var projectName = _a.projectName, projectOwner = _a.projectOwner, _study = _a.study, _d = _a.canWrite, canWrite = _d === void 0 ? false : _d, _e = _a.runList, runList = _e === void 0 ? true : _e, style = _a.style, authUser = _a.authUser, client = _a.client;
@@ -46656,7 +46661,7 @@ var StudyCard = function (_a) {
46656
46661
  color: getSummaryColor(status),
46657
46662
  borderColor: getSummaryColor(status),
46658
46663
  backgroundColor: 'white',
46659
- } }, "Duration ".concat(duration.days() > 0 ? "".concat(duration.days(), " day").concat(duration.days() !== 1 ? 's' : '', " and ") : '', " ").concat(duration.format('HH:mm:ss'))))),
46664
+ } }, "Duration ".concat(formatDuration(duration))))),
46660
46665
  React__default.createElement("div", { style: {
46661
46666
  width: '100%',
46662
46667
  display: 'flex',
@@ -46794,7 +46799,7 @@ var StudyCard = function (_a) {
46794
46799
  color: 'var(--slate10)',
46795
46800
  borderColor: 'var(--slate10)',
46796
46801
  backgroundColor: 'var(--slate2)',
46797
- } }, study ? "".concat(dayjs_min.duration(study.resources_duration.cpu, 'seconds').format('HH:mm:ss'), " CPU time") : '--'))))),
46802
+ } }, study ? "".concat(formatDuration(dayjs_min.duration(study.resources_duration.cpu, 'seconds')), " CPU time") : '--'))))),
46798
46803
  runList && study &&
46799
46804
  React__default.createElement("div", { style: {
46800
46805
  width: '100%',