dstack 0.19.11rc1__py3-none-any.whl → 0.19.12__py3-none-any.whl
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.
Potentially problematic release.
This version of dstack might be problematic. Click here for more details.
- dstack/_internal/cli/commands/offer.py +2 -0
- dstack/_internal/cli/services/configurators/run.py +43 -42
- dstack/_internal/cli/utils/run.py +10 -26
- dstack/_internal/cli/utils/updates.py +13 -1
- dstack/_internal/core/backends/aws/compute.py +21 -9
- dstack/_internal/core/backends/base/compute.py +7 -3
- dstack/_internal/core/backends/gcp/compute.py +43 -20
- dstack/_internal/core/backends/gcp/resources.py +18 -2
- dstack/_internal/core/backends/local/compute.py +4 -2
- dstack/_internal/core/backends/template/configurator.py.jinja +1 -6
- dstack/_internal/core/backends/template/models.py.jinja +4 -0
- dstack/_internal/core/models/configurations.py +1 -1
- dstack/_internal/core/models/fleets.py +6 -1
- dstack/_internal/core/models/profiles.py +43 -3
- dstack/_internal/core/models/repos/local.py +19 -13
- dstack/_internal/core/models/runs.py +78 -45
- dstack/_internal/server/background/tasks/process_running_jobs.py +47 -12
- dstack/_internal/server/background/tasks/process_runs.py +14 -1
- dstack/_internal/server/background/tasks/process_submitted_jobs.py +3 -3
- dstack/_internal/server/routers/repos.py +9 -4
- dstack/_internal/server/services/fleets.py +2 -2
- dstack/_internal/server/services/gateways/__init__.py +1 -1
- dstack/_internal/server/services/jobs/__init__.py +4 -4
- dstack/_internal/server/services/plugins.py +64 -32
- dstack/_internal/server/services/runner/client.py +4 -1
- dstack/_internal/server/services/runs.py +2 -2
- dstack/_internal/server/services/volumes.py +1 -1
- dstack/_internal/server/statics/index.html +1 -1
- dstack/_internal/server/statics/{main-b4803049eac16aea9a49.js → main-b0e80f8e26a168c129e9.js} +72 -25
- dstack/_internal/server/statics/{main-b4803049eac16aea9a49.js.map → main-b0e80f8e26a168c129e9.js.map} +1 -1
- dstack/_internal/server/testing/common.py +2 -1
- dstack/_internal/utils/common.py +4 -0
- dstack/api/server/_fleets.py +5 -1
- dstack/api/server/_runs.py +8 -0
- dstack/plugins/builtin/__init__.py +0 -0
- dstack/plugins/builtin/rest_plugin/__init__.py +18 -0
- dstack/plugins/builtin/rest_plugin/_models.py +48 -0
- dstack/plugins/builtin/rest_plugin/_plugin.py +127 -0
- dstack/version.py +1 -1
- {dstack-0.19.11rc1.dist-info → dstack-0.19.12.dist-info}/METADATA +2 -2
- {dstack-0.19.11rc1.dist-info → dstack-0.19.12.dist-info}/RECORD +44 -41
- dstack/_internal/utils/ignore.py +0 -92
- {dstack-0.19.11rc1.dist-info → dstack-0.19.12.dist-info}/WHEEL +0 -0
- {dstack-0.19.11rc1.dist-info → dstack-0.19.12.dist-info}/entry_points.txt +0 -0
- {dstack-0.19.11rc1.dist-info → dstack-0.19.12.dist-info}/licenses/LICENSE.md +0 -0
dstack/_internal/server/statics/{main-b4803049eac16aea9a49.js → main-b0e80f8e26a168c129e9.js}
RENAMED
|
@@ -119417,11 +119417,12 @@ var src_slice_initialState={items:[]};var src_notificationsSlice=src_createSlice
|
|
|
119417
119417
|
var src_lodash = __webpack_require__(2543);
|
|
119418
119418
|
;// ./src/libs/serverErrors.ts
|
|
119419
119419
|
function src_serverErrors(error){var _data;return"object"===_typeof(error)&&null!==error&&"data"in error&&// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119420
|
-
"string"==typeof(null===(_data=error.data)||void 0===_data?void 0:_data.message)}function src_isResponseServerFormFieldError(fieldError){return"object"===src_typeof_typeof(fieldError)&&null!==fieldError&&fieldError!==void 0&&"loc"in fieldError&&"msg"in fieldError&&(0,src_lodash.isArray)(null===fieldError||void 0===fieldError?void 0:fieldError.loc)&&"string"==typeof(null===fieldError||void 0===fieldError?void 0:fieldError.msg)}function src_isResponseServerError(formErrors){return"object"===src_typeof_typeof(formErrors)&&null!==formErrors&&formErrors!==void 0&&"detail"in formErrors&&(0,src_lodash.isArray)(null===formErrors||void 0===formErrors?void 0:formErrors.detail)&&!!formErrors.detail.length&&"msg"in formErrors.detail[0]}
|
|
119420
|
+
"string"==typeof(null===(_data=error.data)||void 0===_data?void 0:_data.message)}function src_isResponseServerFormFieldError(fieldError){return"object"===src_typeof_typeof(fieldError)&&null!==fieldError&&fieldError!==void 0&&"loc"in fieldError&&"msg"in fieldError&&(0,src_lodash.isArray)(null===fieldError||void 0===fieldError?void 0:fieldError.loc)&&"string"==typeof(null===fieldError||void 0===fieldError?void 0:fieldError.msg)}function src_isResponseServerError(formErrors){return"object"===src_typeof_typeof(formErrors)&&null!==formErrors&&formErrors!==void 0&&"detail"in formErrors&&(0,src_lodash.isArray)(null===formErrors||void 0===formErrors?void 0:formErrors.detail)&&!!formErrors.detail.length&&"msg"in formErrors.detail[0]}// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119421
|
+
function src_serverErrors_getServerError(error){var errorText=null===error||void 0===error?void 0:error.error,errorData=error.data;if(src_isResponseServerError(errorData)){var errorDetail=errorData.detail;errorText=errorDetail.flatMap(function(_ref){var msg=_ref.msg;return msg}).join(", ")}return errorText}
|
|
119421
119422
|
;// ./src/libs/index.ts
|
|
119422
119423
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119423
119424
|
function src_arrayToRecordByKeyName(array,selector){return array.reduce(function(acc,item){return acc[item[selector]]=item,acc},{})}function src_wait(delayInMS){return new Promise(function(resolve){return setTimeout(resolve,delayInMS)})}function src_libs_goToUrl(url,blank){var link=document.createElement("a");link.style.opacity="0",link.style.position="absolute",link.style.top="-2000px",blank&&(link.target="_blank"),link.href=url,document.body.append(link),link.click(),link.remove()}var src_copyToClipboard=function(copyText,success,failed){navigator.clipboard.writeText(copyText).then(success,failed)};var src_MINUTE=6e4;var src_getDateAgoSting=function(time){try{return Date.now()-time<src_MINUTE?"Just now":Date.now()-time<24*(60*src_MINUTE)?formatDistanceToNowStrict(new Date(time),{addSuffix:!0}):format(new Date(time),"dd/MM/yyyy")}catch(err){return""}};var src_getUid=function(a){return a?(0|16*Math.random()).toString(16):(""+1e11+1e11).replace(/1|0/g,src_getUid)};var src_buildRoute=function(route,params){return Object.keys(params).reduce(function(acc,key){var regExp=new RegExp(":".concat(key));return acc.replace(regExp,params[key])},route)};var src_libs_formatBytes=function(bytes){var decimals=1<arguments.length&&arguments[1]!==void 0?arguments[1]:2;if(0===bytes)return"0Bytes";var k=1024,dm=0>=decimals?0:decimals,i=Math.floor(Math.log(bytes)/Math.log(k));return parseFloat((bytes/Math.pow(k,i)).toFixed(dm))+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]};var src_libs_centsToFormattedString=function(cents,currency){var floatValue=cents/100;return"".concat(0>floatValue?"-":"").concat(currency).concat(Math.abs(floatValue).toFixed(2))};var src_riseRouterException=function(){var status=0<arguments.length&&arguments[0]!==void 0?arguments[0]:404,json=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"Not Found";// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
119424
|
-
throw new Response(json,{status:status})};var src_base64ToArrayBuffer=function(base64){for(var binaryString=atob(base64),bytes=new Uint8Array(binaryString.length),i=0;i<binaryString.length;i++)bytes[i]=binaryString.charCodeAt(i);return bytes};var src_isValidUrl=function(urlString){try{return!!new URL(urlString)}catch(e){return!1}};var src_includeSubString=function(value,query){return value.toLowerCase().includes(query.trim().toLowerCase())};
|
|
119425
|
+
throw new Response(json,{status:status})};var src_base64ToArrayBuffer=function(base64){for(var binaryString=atob(base64),bytes=new Uint8Array(binaryString.length),i=0;i<binaryString.length;i++)bytes[i]=binaryString.charCodeAt(i);return bytes};var src_isValidUrl=function(urlString){try{return!!new URL(urlString)}catch(e){return!1}};var src_includeSubString=function(value,query){return value.toLowerCase().includes(query.trim().toLowerCase())};var src_capitalize=function(str){return str.charAt(0).toUpperCase()+str.slice(1)};
|
|
119425
119426
|
;// ./src/hooks/useNotifications.ts
|
|
119426
119427
|
function src_useNotifications_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function src_useNotifications_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_useNotifications_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_useNotifications_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_NOTIFICATION_LIFE_TIME=6e3,src_defaultArgs={temporary:!0,liveTime:src_NOTIFICATION_LIFE_TIME};var src_useNotifications_useNotifications=function(){var args=0<arguments.length&&void 0!==arguments[0]?arguments[0]:src_defaultArgs,dispatch=src_hooks_useAppDispatch(),notificationIdsSet=(0,src_react.useRef)(new Set),_defaultArgs$args=src_useNotifications_objectSpread(src_useNotifications_objectSpread({},src_defaultArgs),args),temporary=_defaultArgs$args.temporary,liveTime=_defaultArgs$args.liveTime,removeNotification=function(id){dispatch(src_remove(id)),notificationIdsSet.current.has(id)&¬ificationIdsSet.current.delete(id)};return (0,src_react.useEffect)(function(){return function(){notificationIdsSet.current.forEach(function(notificationId){removeNotification(notificationId)})}},[]),[function(notification){var id=src_getUid();dispatch(src_push(src_useNotifications_objectSpread(src_useNotifications_objectSpread({id:id},notification),{},{dismissible:!0,onDismiss:function(){removeNotification(id)}}))),temporary?setTimeout(function(){removeNotification(id)},liveTime):notificationIdsSet.current.add(id)}]};
|
|
119427
119428
|
;// ./src/hooks/useHelpPanel.ts
|
|
@@ -121448,7 +121449,8 @@ var src_Notifications_Notifications=function(){var notifications=src_hooks_useAp
|
|
|
121448
121449
|
;// ./src/components/ConfirmationDialog/index.tsx
|
|
121449
121450
|
var src_ConfirmationDialog=function(_ref){var titleProp=_ref.title,contentProp=_ref.content,_ref$visible=_ref.visible,onDiscard=_ref.onDiscard,onConfirm=_ref.onConfirm,cancelButtonLabelProp=_ref.cancelButtonLabel,confirmButtonLabelProp=_ref.confirmButtonLabel,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,title=null!==titleProp&&void 0!==titleProp?titleProp:t("confirm_dialog.title"),content=null!==contentProp&&void 0!==contentProp?contentProp:/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"span"},t("confirm_dialog.message")),cancelButtonLabel=null!==cancelButtonLabelProp&&void 0!==cancelButtonLabelProp?cancelButtonLabelProp:t("common.cancel"),confirmButtonLabel=null!==confirmButtonLabelProp&&void 0!==confirmButtonLabelProp?confirmButtonLabelProp:t("common.delete");return/*#__PURE__*/src_react.createElement(src_modal_Modal,{visible:void 0!==_ref$visible&&_ref$visible,onDismiss:onDiscard,header:title,footer:/*#__PURE__*/src_react.createElement(src_box_Box,{float:"right"},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{direction:"horizontal",size:"xs"},/*#__PURE__*/src_react.createElement(src_components_button,{variant:"link",onClick:onDiscard},cancelButtonLabel),/*#__PURE__*/src_react.createElement(src_components_button,{variant:"primary",onClick:onConfirm},confirmButtonLabel)))},content)};
|
|
121450
121451
|
;// ./src/components/FileUploader/FileEntry/index.tsx
|
|
121451
|
-
var src_FileEntry_FileEntry=function(_ref){var file=_ref.file,_ref$showImage=_ref.showImage,_ref$truncateLength=_ref.truncateLength,truncateLength=void 0===_ref$truncateLength?20:_ref$truncateLength,i18nStrings=_ref.i18nStrings,_useState=useState(),_useState2=_slicedToArray(_useState,2),imageData=_useState2[0],setImageData=_useState2[1],reader=new FileReader;reader.onload=function(event){setImageData(event.target.result)},reader.readAsDataURL(file)
|
|
121452
|
+
var src_FileEntry_FileEntry=function(_ref){var file=_ref.file,_ref$showImage=_ref.showImage,_ref$truncateLength=_ref.truncateLength,truncateLength=void 0===_ref$truncateLength?20:_ref$truncateLength,i18nStrings=_ref.i18nStrings,_useState=useState(),_useState2=_slicedToArray(_useState,2),imageData=_useState2[0],setImageData=_useState2[1],reader=new FileReader;reader.onload=function(event){setImageData(event.target.result)},reader.readAsDataURL(file);// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
121453
|
+
var ext=file.name.split(".").pop(),displayFileName=file.name.length-ext.length-1>truncateLength?"".concat(file.name.slice(0,truncateLength),"... .").concat(ext):file.name,lastModifiedDate=new Date(file.lastModified),fileSize=file.size;return/*#__PURE__*/React.createElement(SpaceBetween,{size:"s",direction:"horizontal"},/*#__PURE__*/React.createElement(StatusIndicator,{type:"success"}),void 0!==_ref$showImage&&_ref$showImage&&/*#__PURE__*/React.createElement("img",{alt:file.name,style:{width:"5em",height:"5em",objectFit:"cover"},src:imageData}),/*#__PURE__*/React.createElement(SpaceBetween,{size:"xxxs"},/*#__PURE__*/React.createElement(Box,null,displayFileName),!1))};
|
|
121452
121454
|
;// ./src/components/FileUploader/Token/styles.module.scss
|
|
121453
121455
|
// extracted by mini-css-extract-plugin
|
|
121454
121456
|
/* harmony default export */ const src_Token_styles_module = ({"tokenPanel":"qExbS"});
|
|
@@ -124936,7 +124938,7 @@ function src_rtk_query_react_esm_isMutationDefinition(e) {
|
|
|
124936
124938
|
return e.type === src_rtk_query_react_esm_DefinitionType.mutation;
|
|
124937
124939
|
}
|
|
124938
124940
|
// src/query/utils/capitalize.ts
|
|
124939
|
-
function
|
|
124941
|
+
function src_rtk_query_react_esm_capitalize(str) {
|
|
124940
124942
|
return str.replace(str[0], str[0].toUpperCase());
|
|
124941
124943
|
}
|
|
124942
124944
|
// src/query/tsHelpers.ts
|
|
@@ -124982,15 +124984,15 @@ var src_reactHooksModule = function (_c) {
|
|
|
124982
124984
|
useQueryState: useQueryState,
|
|
124983
124985
|
useQuerySubscription: useQuerySubscription
|
|
124984
124986
|
});
|
|
124985
|
-
api["use" +
|
|
124986
|
-
api["useLazy" +
|
|
124987
|
+
api["use" + src_rtk_query_react_esm_capitalize(endpointName) + "Query"] = useQuery;
|
|
124988
|
+
api["useLazy" + src_rtk_query_react_esm_capitalize(endpointName) + "Query"] = useLazyQuery;
|
|
124987
124989
|
}
|
|
124988
124990
|
else if (src_rtk_query_react_esm_isMutationDefinition(definition)) {
|
|
124989
124991
|
var useMutation = buildMutationHook(endpointName);
|
|
124990
124992
|
src_rtk_query_react_esm_safeAssign(anyApi.endpoints[endpointName], {
|
|
124991
124993
|
useMutation: useMutation
|
|
124992
124994
|
});
|
|
124993
|
-
api["use" +
|
|
124995
|
+
api["use" + src_rtk_query_react_esm_capitalize(endpointName) + "Mutation"] = useMutation;
|
|
124994
124996
|
}
|
|
124995
124997
|
}
|
|
124996
124998
|
};
|
|
@@ -125026,7 +125028,7 @@ var src_rtk_query_react_esm_createApi = /* @__PURE__ */ src_buildCreateApi(src_c
|
|
|
125026
125028
|
|
|
125027
125029
|
//# sourceMappingURL=rtk-query-react.esm.js.map
|
|
125028
125030
|
;// ./src/libs/fetchBaseQueryHeaders.ts
|
|
125029
|
-
function src_baseQueryHeaders(headers,_ref){var _app$authData,getState=_ref.getState,token=null===(_app$authData=getState().app.authData)||void 0===_app$authData?void 0:_app$authData.token,authorizationHeader=headers.get("Authorization");return token&&!authorizationHeader&&headers.set("Authorization","Bearer ".concat(token)),headers.set("X-API-VERSION","latest"),headers}
|
|
125031
|
+
function src_baseQueryHeaders(headers,_ref){var _app$authData,getState=_ref.getState,token=null===(_app$authData=getState().app.authData)||void 0===_app$authData?void 0:_app$authData.token,authorizationHeader=headers.get("Authorization");return token&&!authorizationHeader&&headers.set("Authorization","Bearer ".concat(token)),headers.set("X-API-VERSION","latest"),headers}/* harmony default export */ const src_fetchBaseQueryHeaders = (src_baseQueryHeaders);
|
|
125030
125032
|
;// ./src/services/server.ts
|
|
125031
125033
|
var src_serverApi=src_rtk_query_react_esm_createApi({reducerPath:"serverApi",baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),endpoints:function(builder){return{getServerInfo:builder.query({query:function(){return{url:src_API.SERVER.INFO(),method:"POST"}}})}}});var src_useGetServerInfoQuery=src_serverApi.useGetServerInfoQuery;
|
|
125032
125034
|
;// ./src/layouts/AppLayout/TutorialPanel/constants.tsx
|
|
@@ -125036,7 +125038,7 @@ var src_constants_tutorialPanelI18nStrings={labelsTaskStatus:{pending:"Pending",
|
|
|
125036
125038
|
;// ./src/consts.ts
|
|
125037
125039
|
var src_consts_DATE_TIME_FORMAT="MM/dd/yyyy HH:mm";var src_DISCORD_URL="https://discord.gg/u8SmfwPpMd";var src_QUICK_START_URL="https://dstack.ai/docs/quickstart/";var src_TALLY_FORM_ID="3xYlYG";var src_DOCS_URL="https://dstack.ai/docs/";var src_DEFAULT_TABLE_PAGE_SIZE=20;
|
|
125038
125040
|
;// ./src/libs/run.ts
|
|
125039
|
-
function src_run_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function src_run_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_run_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_run_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_getStatusIconType=function(status){switch(status){case"failed":return"error";case"aborted":case"terminated":case"done":return"stopped";case"running":return"success";case"terminating":case"pulling":case"provisioning":return"in-progress";case"submitted":case"pending":return"pending";default:console.error(new Error("Undefined run status"))}};var src_getExtendedModelFromRun=function(run){var _run$service,_run$service$model,_run$service2,_run$run_spec$run_nam,_run$
|
|
125041
|
+
function src_run_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function src_run_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_run_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_run_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_getStatusIconType=function(status,terminationReason){if("interrupted_by_no_capacity"===terminationReason)return"stopped";switch(status){case"failed":return"error";case"aborted":case"terminated":case"done":return"stopped";case"running":return"success";case"terminating":case"pulling":case"provisioning":return"in-progress";case"submitted":case"pending":return"pending";default:console.error(new Error("Undefined run status"))}};var src_getStatusIconColor=function(status,terminationReason){if("failed_to_start_due_to_no_capacity"===terminationReason||"interrupted_by_no_capacity"===terminationReason)return"yellow";return"pulling"===status?"green":"aborted"===status?"yellow":void 0};var src_getRunStatusMessage=function(run){var _run$latest_job_submi;return null!==(_run$latest_job_submi=run.latest_job_submission)&&void 0!==_run$latest_job_submi&&_run$latest_job_submi.status_message?src_capitalize(run.latest_job_submission.status_message):src_capitalize(run.status)};var src_getRunError=function(run){var _ref,_run$error,_run$latest_job_submi2,error=null!==(_ref=null!==(_run$error=run.error)&&void 0!==_run$error?_run$error:null===(_run$latest_job_submi2=run.latest_job_submission)||void 0===_run$latest_job_submi2?void 0:_run$latest_job_submi2.error)&&void 0!==_ref?_ref:null;return error?src_capitalize(error):null};var src_getExtendedModelFromRun=function(run){var _run$service,_run$service$model,_run$service2,_run$run_spec$run_nam,_run$latest_job_submi3,_run$latest_job_submi4,_run$latest_job_submi5,_run$latest_job_submi6,_run$latest_job_submi7,_run$latest_job_submi8,_run$latest_job_submi9,_run$latest_job_submi10;return null!==run&&void 0!==run&&null!==(_run$service=run.service)&&void 0!==_run$service&&_run$service.model?src_run_objectSpread(src_run_objectSpread({},null!==(_run$service$model=null===(_run$service2=run.service)||void 0===_run$service2?void 0:_run$service2.model)&&void 0!==_run$service$model?_run$service$model:{}),{},{id:run.id,project_name:run.project_name,run_name:null!==(_run$run_spec$run_nam=null===run||void 0===run?void 0:run.run_spec.run_name)&&void 0!==_run$run_spec$run_nam?_run$run_spec$run_nam:"No run name",user:run.user,resources:null!==(_run$latest_job_submi3=null===(_run$latest_job_submi4=run.latest_job_submission)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.job_provisioning_data)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.instance_type)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.resources)||void 0===_run$latest_job_submi4?void 0:_run$latest_job_submi4.description)&&void 0!==_run$latest_job_submi3?_run$latest_job_submi3:null,price:null!==(_run$latest_job_submi5=null===(_run$latest_job_submi6=run.latest_job_submission)||void 0===_run$latest_job_submi6||null===(_run$latest_job_submi6=_run$latest_job_submi6.job_provisioning_data)||void 0===_run$latest_job_submi6?void 0:_run$latest_job_submi6.price)&&void 0!==_run$latest_job_submi5?_run$latest_job_submi5:null,submitted_at:run.submitted_at,repository:src_getRepoNameFromRun(run),backend:null!==(_run$latest_job_submi7=null===(_run$latest_job_submi8=run.latest_job_submission)||void 0===_run$latest_job_submi8||null===(_run$latest_job_submi8=_run$latest_job_submi8.job_provisioning_data)||void 0===_run$latest_job_submi8?void 0:_run$latest_job_submi8.backend)&&void 0!==_run$latest_job_submi7?_run$latest_job_submi7:null,region:null!==(_run$latest_job_submi9=null===(_run$latest_job_submi10=run.latest_job_submission)||void 0===_run$latest_job_submi10||null===(_run$latest_job_submi10=_run$latest_job_submi10.job_provisioning_data)||void 0===_run$latest_job_submi10?void 0:_run$latest_job_submi10.region)&&void 0!==_run$latest_job_submi9?_run$latest_job_submi9:null}):null};var src_getRepoNameFromRun=function(run){return (0,src_lodash.get)(run.run_spec.repo_data,"repo_name",(0,src_lodash.get)(run.run_spec.repo_data,"repo_dir","-"))};
|
|
125040
125042
|
;// ./src/pages/Runs/constants.ts
|
|
125041
125043
|
var src_runStatusForDeleting=["failed","aborted","done","terminated"];var src_inActiveRunStatuses=["failed","aborted","done","terminated"];var src_runStatusForStopping=["submitted","provisioning","pulling","pending","running"];var src_runStatusForAborting=["submitted","provisioning","pulling","pending","running"];var src_unfinishedRuns=["running","terminating","pending"];var src_finishedJobs=["terminated","aborted","failed","done"];
|
|
125042
125044
|
;// ./src/services/run.ts
|
|
@@ -125046,7 +125048,7 @@ var src_run_excluded=["project_name"],src_run_excluded2=["project_name"],src_run
|
|
|
125046
125048
|
var src_AWSCredentialTypeEnum=/*#__PURE__*/function(AWSCredentialTypeEnum){return AWSCredentialTypeEnum.DEFAULT="default",AWSCredentialTypeEnum.ACCESS_KEY="access_key",AWSCredentialTypeEnum}({});var src_AzureCredentialTypeEnum=/*#__PURE__*/function(AzureCredentialTypeEnum){return AzureCredentialTypeEnum.DEFAULT="default",AzureCredentialTypeEnum.CLIENT="client",AzureCredentialTypeEnum}({});var src_GCPCredentialTypeEnum=/*#__PURE__*/function(GCPCredentialTypeEnum){return GCPCredentialTypeEnum.DEFAULT="default",GCPCredentialTypeEnum.SERVICE_ACCOUNT="service_account",GCPCredentialTypeEnum}({});var src_types_GlobalUserRole=/*#__PURE__*/function(GlobalUserRole){return GlobalUserRole.ADMIN="admin",GlobalUserRole.USER="user",GlobalUserRole}({});var src_ProjectUserRole=/*#__PURE__*/function(ProjectUserRole){return ProjectUserRole.ADMIN="admin",ProjectUserRole.USER="user",ProjectUserRole.MANAGER="manager",ProjectUserRole}({});var src_UserPermission=/*#__PURE__*/function(UserPermission){return UserPermission.CAN_CREATE_PROJECTS="CAN_CREATE_PROJECTS",UserPermission}({});var src_userPermissionMap={can_create_projects:src_UserPermission.CAN_CREATE_PROJECTS};
|
|
125047
125049
|
;// ./src/services/user.ts
|
|
125048
125050
|
var src_user_excluded=["username"],src_user_excluded2=["username"];function src_user_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function src_user_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_user_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_user_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_userApi=src_rtk_query_react_esm_createApi({reducerPath:"userApi",refetchOnMountOrArgChange:!0,baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),tagTypes:["User","Payments","Billing"],endpoints:function(builder){return{getUserData:builder.query({query:function(){return{url:src_API.USERS.CURRENT_USER(),method:"POST"}},transformResponse:function(userData){return src_user_objectSpread(src_user_objectSpread({},userData),{},{permissions:Object.keys(src_userPermissionMap).reduce(function(acc,key){var _userData$permissions;return null!==userData&&void 0!==userData&&null!==(_userData$permissions=userData.permissions)&&void 0!==_userData$permissions&&_userData$permissions[key]&&acc.push(src_UserPermission[src_userPermissionMap[key]]),acc},[])})}}),getUserList:builder.query({query:function(){return{url:src_API.USERS.LIST(),method:"POST"}},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref){var username=_ref.username;return{type:"User",id:username}})),["User"]):["User"]}}),getUser:builder.query({query:function(_ref2){var name=_ref2.name;return{url:src_API.USERS.DETAILS(),method:"POST",body:{username:name}}},providesTags:function(result){return result?[{type:"User",id:result.username}]:[]}}),checkAuthToken:builder.mutation({query:function(_ref3){var token=_ref3.token;return{url:src_API.USERS.CURRENT_USER(),method:"POST",headers:{Authorization:"Bearer ".concat(token)}}}}),createUser:builder.mutation({query:function(user){return{url:src_API.USERS.CREATE(),method:"POST",body:user}},invalidatesTags:function(result){return[{type:"User",id:null===result||void 0===result?void 0:result.username},"User"]}}),updateUser:builder.mutation({query:function(user){return{url:src_API.USERS.UPDATE(),method:"POST",body:user}},invalidatesTags:function(result){return[{type:"User",id:null===result||void 0===result?void 0:result.username}]}}),refreshToken:builder.mutation({query:function(_ref4){var username=_ref4.username;return{url:src_API.USERS.REFRESH_TOKEN(),method:"POST",body:{username:username}}},// invalidatesTags: (result, error, { username }) => [{ type: 'User' as const, id: username }],
|
|
125049
|
-
onQueryStarted:function(_ref5,_ref6){return src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(){var username,dispatch,queryFulfilled,_yield$queryFulfilled,data;return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return username=_ref5.username,dispatch=_ref6.dispatch,queryFulfilled=_ref6.queryFulfilled,_context.prev=2,_context.next=5,queryFulfilled;case 5:_yield$queryFulfilled=_context.sent,data=_yield$queryFulfilled.data,dispatch(src_userApi.util.updateQueryData("getUser",{name:username},function(draft){Object.assign(draft,data)})),_context.next=13;break;case 10:_context.prev=10,_context.t0=_context["catch"](2),console.log(_context.t0);case 13:case"end":return _context.stop()}},_callee,null,[[2,10]])}))()}}),deleteUsers:builder.mutation({query:function(userNames){return{url:src_API.USERS.DELETE(),method:"POST",body:{users:userNames}}},invalidatesTags:["User"]}),getUserPayments:builder.query({query:function(_ref7){var username=_ref7.username;return{url:src_API.USER_PAYMENTS.LIST(username),method:"POST"}},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref8){var id=_ref8.id;return{type:"Payments",id:id}})),["Payments"]):["Payments"]}}),addUserPayment:builder.mutation({query:function(_ref9){var username=_ref9.username,body=src_objectWithoutProperties_objectWithoutProperties(_ref9,src_user_excluded);return{url:src_API.USER_PAYMENTS.ADD(username),method:"POST",body:body}},invalidatesTags:["Payments"]}),getUserBillingInfo:builder.query({query:function(_ref10){var username=_ref10.username;return{url:src_API.USER_BILLING.INFO(username),method:"POST"}},transformResponse:function(response){return src_user_objectSpread({},response)},providesTags:["Billing"]}),userBillingCheckoutSession:builder.mutation({query:function(_ref11){var username=_ref11.username,body=src_objectWithoutProperties_objectWithoutProperties(_ref11,src_user_excluded2);return{url:src_API.USER_BILLING.CHECKOUT_SESSION(username),method:"POST",body:body}},invalidatesTags:["Billing"]}),userBillingPortalSession:builder.mutation({query:function(_ref12){var username=_ref12.username;return{url:src_API.USER_BILLING.PORTAL_SESSION(username),method:"POST"}},invalidatesTags:["Billing"]})}}});var src_useGetUserDataQuery=src_userApi.useGetUserDataQuery,src_useGetUserListQuery=src_userApi.useGetUserListQuery,src_useGetUserQuery=src_userApi.useGetUserQuery,src_useCheckAuthTokenMutation=src_userApi.useCheckAuthTokenMutation,src_useCreateUserMutation=src_userApi.useCreateUserMutation,src_useDeleteUsersMutation=src_userApi.useDeleteUsersMutation,src_useUpdateUserMutation=src_userApi.useUpdateUserMutation,src_useRefreshTokenMutation=src_userApi.useRefreshTokenMutation,src_user_useGetUserPaymentsQuery=src_userApi.useGetUserPaymentsQuery,src_useAddUserPaymentMutation=src_userApi.useAddUserPaymentMutation,src_user_useGetUserBillingInfoQuery=src_userApi.useGetUserBillingInfoQuery,src_user_useUserBillingCheckoutSessionMutation=src_userApi.useUserBillingCheckoutSessionMutation,
|
|
125051
|
+
onQueryStarted:function(_ref5,_ref6){return src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(){var username,dispatch,queryFulfilled,_yield$queryFulfilled,data;return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return username=_ref5.username,dispatch=_ref6.dispatch,queryFulfilled=_ref6.queryFulfilled,_context.prev=2,_context.next=5,queryFulfilled;case 5:_yield$queryFulfilled=_context.sent,data=_yield$queryFulfilled.data,dispatch(src_userApi.util.updateQueryData("getUser",{name:username},function(draft){Object.assign(draft,data)})),_context.next=13;break;case 10:_context.prev=10,_context.t0=_context["catch"](2),console.log(_context.t0);case 13:case"end":return _context.stop()}},_callee,null,[[2,10]])}))()}}),deleteUsers:builder.mutation({query:function(userNames){return{url:src_API.USERS.DELETE(),method:"POST",body:{users:userNames}}},invalidatesTags:["User"]}),getUserPayments:builder.query({query:function(_ref7){var username=_ref7.username;return{url:src_API.USER_PAYMENTS.LIST(username),method:"POST"}},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref8){var id=_ref8.id;return{type:"Payments",id:id}})),["Payments"]):["Payments"]}}),addUserPayment:builder.mutation({query:function(_ref9){var username=_ref9.username,body=src_objectWithoutProperties_objectWithoutProperties(_ref9,src_user_excluded);return{url:src_API.USER_PAYMENTS.ADD(username),method:"POST",body:body}},invalidatesTags:["Payments"]}),getUserBillingInfo:builder.query({query:function(_ref10){var username=_ref10.username;return{url:src_API.USER_BILLING.INFO(username),method:"POST"}},transformResponse:function(response){return src_user_objectSpread({},response)},providesTags:["Billing"]}),userBillingCheckoutSession:builder.mutation({query:function(_ref11){var username=_ref11.username,body=src_objectWithoutProperties_objectWithoutProperties(_ref11,src_user_excluded2);return{url:src_API.USER_BILLING.CHECKOUT_SESSION(username),method:"POST",body:body}},invalidatesTags:["Billing"]}),userBillingPortalSession:builder.mutation({query:function(_ref12){var username=_ref12.username;return{url:src_API.USER_BILLING.PORTAL_SESSION(username),method:"POST"}},invalidatesTags:["Billing"]})}}});var src_useGetUserDataQuery=src_userApi.useGetUserDataQuery,src_useGetUserListQuery=src_userApi.useGetUserListQuery,src_useGetUserQuery=src_userApi.useGetUserQuery,src_useCheckAuthTokenMutation=src_userApi.useCheckAuthTokenMutation,src_useCreateUserMutation=src_userApi.useCreateUserMutation,src_useDeleteUsersMutation=src_userApi.useDeleteUsersMutation,src_useUpdateUserMutation=src_userApi.useUpdateUserMutation,src_useRefreshTokenMutation=src_userApi.useRefreshTokenMutation,src_user_useGetUserPaymentsQuery=src_userApi.useGetUserPaymentsQuery,src_useAddUserPaymentMutation=src_userApi.useAddUserPaymentMutation,src_user_useGetUserBillingInfoQuery=src_userApi.useGetUserBillingInfoQuery,src_user_useUserBillingCheckoutSessionMutation=src_userApi.useUserBillingCheckoutSessionMutation,src_useUserBillingPortalSessionMutation=src_userApi.useUserBillingPortalSessionMutation;
|
|
125050
125052
|
;// ./src/layouts/AppLayout/hooks.ts
|
|
125051
125053
|
var src_useSideNavigation=function(){var _useAppSelector,_serverInfoData$serve,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,userName=null!==(_useAppSelector=src_hooks_useAppSelector(src_slice_selectUserName))&&void 0!==_useAppSelector?_useAppSelector:"",_useLocation=src_dist_useLocation(),pathname=_useLocation.pathname,_usePermissionGuard=src_usePermissionGuard({allowedGlobalRoles:[src_types_GlobalUserRole.ADMIN]}),_usePermissionGuard2=src_slicedToArray_slicedToArray(_usePermissionGuard,1),isGlobalAdmin=_usePermissionGuard2[0],_useGetServerInfoQuer=src_useGetServerInfoQuery(),serverInfoData=_useGetServerInfoQuer.data,isPoolDetails=!!src_useMatch(src_routes_ROUTES.FLEETS.DETAILS.TEMPLATE),billingUrl=src_routes_ROUTES.USER.BILLING.LIST.FORMAT(userName),userProjectsUrl=src_routes_ROUTES.USER.PROJECTS.FORMAT(userName),generalLinks=[{type:"link",text:t("navigation.runs"),href:src_routes_ROUTES.RUNS.LIST},{type:"link",text:t("navigation.models"),href:src_routes_ROUTES.MODELS.LIST},{type:"link",text:t("navigation.fleets"),href:src_routes_ROUTES.FLEETS.LIST},{type:"link",text:t("navigation.instances"),href:src_routes_ROUTES.INSTANCES.LIST},{type:"link",text:t("navigation.volumes"),href:src_routes_ROUTES.VOLUMES.LIST},{type:"link",text:t("navigation.project_other"),href:src_routes_ROUTES.PROJECT.LIST},isGlobalAdmin&&{type:"link",text:t("navigation.users"),href:src_routes_ROUTES.USER.LIST}].filter(Boolean),userSettingsLinks=[{type:"link",text:t("navigation.settings"),href:src_routes_ROUTES.USER.DETAILS.FORMAT(userName)}, false&&0,{type:"link",text:t("users.projects"),href:userProjectsUrl}].filter(Boolean),navLinks=[{type:"section-group",title:t("navigation.general"),items:generalLinks},{type:"divider"},{type:"section-group",title:t("navigation.account"),items:userSettingsLinks},{type:"divider"},{type:"section-group",title:t("navigation.resources"),items:[{type:"link",text:t("common.docs"),external:!0,href:src_DOCS_URL// onClick: () => goToUrl(DOCS_URL, true),
|
|
125052
125054
|
},{type:"link",text:t("common.discord"),external:!0,href:src_DISCORD_URL,onClick:function(){return src_libs_goToUrl(src_DISCORD_URL,!0)}}]},{type:"divider"},{type:"link",href:"#version",text:"dstack version: ".concat(null!==(_serverInfoData$serve=null===serverInfoData||void 0===serverInfoData?void 0:serverInfoData.server_version)&&void 0!==_serverInfoData$serve?_serverInfoData$serve:"No version")}].filter(Boolean),activeHref=(0,src_react.useMemo)(function(){if(isPoolDetails)return src_routes_ROUTES.FLEETS.LIST;var generalActiveLink=generalLinks.find(function(linkItem){return 0===pathname.indexOf(linkItem.href)});if(generalActiveLink)return pathname;var settingsActiveLink=userSettingsLinks.find(function(linkItem){return linkItem.href===pathname});return settingsActiveLink?pathname:"/"+pathname.split("/")[1]},[pathname,userName]);return{navLinks:navLinks,activeHref:activeHref,billingUrl:billingUrl}};
|
|
@@ -125058,7 +125060,8 @@ function src_hooks_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySym
|
|
|
125058
125060
|
// completed: tallyCompleted,
|
|
125059
125061
|
// startCallback: startCreditsTutorial,
|
|
125060
125062
|
// },
|
|
125061
|
-
src_hooks_objectSpread(src_hooks_objectSpread({},src_CONFIGURE_CLI_TUTORIAL),{},{id:2,completed:configureCLICompleted,startCallback:startConfigCliTutorial,finishCallback:finishConfigCliTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_BILLING_TUTORIAL),{},{id:3,completed:billingCompleted,startCallback:startBillingTutorial,finishCallback:finishBillingTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_QUICKSTART_TUTORIAL),{},{id:4,startWithoutActivation:!0,completed:quickStartCompleted,startCallback:startQuickStartTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_JOIN_DISCORD_TUTORIAL),{},{id:5,startWithoutActivation:!0,completed:discordCompleted,startCallback:startDiscordTutorial})]},[billingUrl,quickStartCompleted,discordCompleted,tallyCompleted,billingCompleted,configureCLICompleted,finishBillingTutorial,finishConfigCliTutorial]);//
|
|
125063
|
+
src_hooks_objectSpread(src_hooks_objectSpread({},src_CONFIGURE_CLI_TUTORIAL),{},{id:2,completed:configureCLICompleted,startCallback:startConfigCliTutorial,finishCallback:finishConfigCliTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_BILLING_TUTORIAL),{},{id:3,completed:billingCompleted,startCallback:startBillingTutorial,finishCallback:finishBillingTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_QUICKSTART_TUTORIAL),{},{id:4,startWithoutActivation:!0,completed:quickStartCompleted,startCallback:startQuickStartTutorial}),src_hooks_objectSpread(src_hooks_objectSpread({},src_JOIN_DISCORD_TUTORIAL),{},{id:5,startWithoutActivation:!0,completed:discordCompleted,startCallback:startDiscordTutorial})]},[billingUrl,quickStartCompleted,discordCompleted,tallyCompleted,billingCompleted,configureCLICompleted,finishBillingTutorial,finishConfigCliTutorial]);// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
125064
|
+
// const startCreditsTutorial = useCallback(() => {
|
|
125062
125065
|
// if (typeof Tally !== 'undefined') {
|
|
125063
125066
|
// Tally.openPopup(TALLY_FORM_ID);
|
|
125064
125067
|
// dispatch(updateTutorialPanelState({ tallyCompleted: true }));
|
|
@@ -133990,7 +133993,7 @@ var src_useBackendsTable=function(projectName,backends){var _useTranslation=src_
|
|
|
133990
133993
|
;// ./src/pages/Project/Backends/hooks/index.ts
|
|
133991
133994
|
|
|
133992
133995
|
;// ./src/pages/Project/Backends/Table/constants.tsx
|
|
133993
|
-
var src_BACKENDS_HELP_SKY={header:/*#__PURE__*/src_react.createElement("h2",null,"
|
|
133996
|
+
var src_BACKENDS_HELP_SKY={header:/*#__PURE__*/src_react.createElement("h2",null,"Backends"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"To use ",/*#__PURE__*/src_react.createElement("code",null,"dstack")," with cloud providers, you have to configure backends."),/*#__PURE__*/src_react.createElement("h4",null,"Marketplace"),/*#__PURE__*/src_react.createElement("p",null,"By default, ",/*#__PURE__*/src_react.createElement("code",null,"dstack Sky")," includes a preset of backends that let you access compute from the"," ",/*#__PURE__*/src_react.createElement("code",null,"dstack")," marketplace and pay through your ",/*#__PURE__*/src_react.createElement("code",null,"dstack Sky")," user billing."),/*#__PURE__*/src_react.createElement("h4",null,"Your own cloud accounts"),/*#__PURE__*/src_react.createElement("p",null,"You can also configure custom backends to use your own cloud providers, either instead of or in addition to the default ones."),/*#__PURE__*/src_react.createElement("p",null,"See the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/backends",target:"_blank"},"documentation")," ","for the list of supported backends."))};var src_BACKENDS_HELP_ENTERPRISE={header:/*#__PURE__*/src_react.createElement("h2",null,"Backends"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"To use ",/*#__PURE__*/src_react.createElement("code",null,"dstack")," with cloud providers, you have to configure backends."),/*#__PURE__*/src_react.createElement("p",null,"See the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/backends",target:"_blank"},"documentation")," ","for the list of supported backends."))};
|
|
133994
133997
|
;// ./src/pages/Project/Backends/Table/styles.module.scss
|
|
133995
133998
|
// extracted by mini-css-extract-plugin
|
|
133996
133999
|
/* harmony default export */ const src_Table_styles_module = ({"cell":"biUJI","contextMenu":"A3asV","ellipsisCell":"kUgHm"});
|
|
@@ -134001,7 +134004,7 @@ var src_hooks_useColumnsDefinitions_useColumnsDefinitions=function(_ref){var loa
|
|
|
134001
134004
|
;// ./src/pages/Project/Backends/Table/index.tsx
|
|
134002
134005
|
function src_Table_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function src_Table_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_Table_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_Table_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_INFO= true?src_BACKENDS_HELP_ENTERPRISE:0;var src_BackendsTable=function(_ref){var backends=_ref.backends,editBackend=_ref.editBackend,deleteBackends=_ref.deleteBackends,onClickAddBackend=_ref.onClickAddBackend,isDisabledDelete=_ref.isDisabledDelete,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useHelpPanel=src_useHelpPanel_useHelpPanel(),_useHelpPanel2=src_slicedToArray_slicedToArray(_useHelpPanel,1),openHelpPanel=_useHelpPanel2[0],renderEmptyMessage=function(){return/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("backend.empty_message_title"),message:t("backend.empty_message_text")},onClickAddBackend&&/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:onClickAddBackend},t("common.add")))},_useCollection=src_use_collection_useCollection(null!==backends&&void 0!==backends?backends:[],{filtering:{empty:renderEmptyMessage(),noMatch:renderEmptyMessage()},selection:{}}),items=_useCollection.items,collectionProps=_useCollection.collectionProps,selectedItems=collectionProps.selectedItems,isDisabledDeleteSelected=!(null!==selectedItems&&void 0!==selectedItems&&selectedItems.length)||isDisabledDelete,_useColumnsDefinition=src_hooks_useColumnsDefinitions_useColumnsDefinitions(src_Table_objectSpread({},editBackend?{onEditClick:function(backend){return editBackend(backend)}}:{})),columns=_useColumnsDefinition.columns;return/*#__PURE__*/src_react.createElement(src_table,src_extends_extends({},collectionProps,{columnDefinitions:columns,items:items,loadingText:t("common.loading"),selectionType:deleteBackends||editBackend?"multi":void 0,stickyHeader:!0,header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{counter:function(){return null!==backends&&void 0!==backends&&backends.length?"(".concat(backends.length,")"):""}(),info:/*#__PURE__*/src_react.createElement(src_InfoLink_InfoLink,{onFollow:function(){return openHelpPanel(src_INFO)}}),actions:/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xs",direction:"horizontal"},deleteBackends&&/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{disabled:isDisabledDeleteSelected,formAction:"none",onClick:function(){null!==selectedItems&&void 0!==selectedItems&&selectedItems.length&&deleteBackends&&deleteBackends(selectedItems)},confirmTitle:t("backend.edit.delete_backends_confirm_title"),confirmContent:t("backend.edit.delete_backends_confirm_message")},t("common.delete")),onClickAddBackend&&/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:onClickAddBackend/*disabled={isDisabledAddBackendButton}*/},t("common.add")))},t("backend.page_title_other"))}))};
|
|
134003
134006
|
;// ./src/pages/Project/Gateways/Table/constants.tsx
|
|
134004
|
-
var src_GATEWAYS_INFO={header:/*#__PURE__*/src_react.createElement("h2",null,"Gateways"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"
|
|
134007
|
+
var src_GATEWAYS_INFO={header:/*#__PURE__*/src_react.createElement("h2",null,"Gateways"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"Gateways manage the ingress traffic for running services."),/*#__PURE__*/src_react.createElement("p",null,"To learn more about gateways, see the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/gateways",target:"_blank"},"documentation"),"."))};
|
|
134005
134008
|
;// ./src/pages/Project/Gateways/Table/styles.module.scss
|
|
134006
134009
|
// extracted by mini-css-extract-plugin
|
|
134007
134010
|
/* harmony default export */ const src_Gateways_Table_styles_module = ({"cell":"naCdG","contextMenu":"_TtVL","ellipsisCell":"FLA_c"});
|
|
@@ -134032,7 +134035,7 @@ var src_useGatewaysTable=function(projectName){var navigate=src_dist_useNavigate
|
|
|
134032
134035
|
;// ./src/pages/Project/Gateways/hooks/index.ts
|
|
134033
134036
|
|
|
134034
134037
|
;// ./src/pages/Project/Details/Settings/constants.tsx
|
|
134035
|
-
var src_CLI_INFO={header:/*#__PURE__*/src_react.createElement("h2",null,"CLI"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"
|
|
134038
|
+
var src_CLI_INFO={header:/*#__PURE__*/src_react.createElement("h2",null,"CLI"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"To use this project with your CLI, add it using the",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/reference/cli/dstack/project/",target:"_blank"},/*#__PURE__*/src_react.createElement("code",null,"dstack project add"))," ","command."),/*#__PURE__*/src_react.createElement("p",null,"To learn how to install the CLI, refer to the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/cli/installation",target:"_blank"},"installation")," ","guide."))};
|
|
134036
134039
|
;// ./src/pages/Project/Details/Settings/styles.module.scss
|
|
134037
134040
|
// extracted by mini-css-extract-plugin
|
|
134038
134041
|
/* harmony default export */ const src_Settings_styles_module = ({"dangerSectionGrid":"U24Qs","dangerSectionField":"AKyqV","codeWrapper":"LmVNG","code":"Vntdh","copy":"Wtjre"});
|
|
@@ -134045,7 +134048,7 @@ var src_ProjectAdd=function(){var _useTranslation=src_useTranslation_useTranslat
|
|
|
134045
134048
|
;// ./src/pages/Project/index.tsx
|
|
134046
134049
|
var src_Project=function(){return null};
|
|
134047
134050
|
;// ./src/pages/Project/Backends/YAMLForm/constants.tsx
|
|
134048
|
-
var src_CONFIG_YAML_HELP_SKY={header:/*#__PURE__*/src_react.createElement("h2",null,"Backend config"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"The backend config is defined in the YAML format. It specifies the backend's ",/*#__PURE__*/src_react.createElement("code",null,"type")," and settings,"," ","such as ",/*#__PURE__*/src_react.createElement("code",null,"creds"),", ",/*#__PURE__*/src_react.createElement("code",null,"regions"),", and so on."),/*#__PURE__*/src_react.createElement("h4",null,"Marketplace"),/*#__PURE__*/src_react.createElement("p",null,"If you set ",/*#__PURE__*/src_react.createElement("code",null,"creds"),"'s ",/*#__PURE__*/src_react.createElement("code",null,"type")," to ",/*#__PURE__*/src_react.createElement("code",null,"dstack"),", you'll get compute from"," ",/*#__PURE__*/src_react.createElement("code",null,"dstack"),"'s marketplace and will pay for it via your ",/*#__PURE__*/src_react.createElement("code",null,"dstack Sky")," user billing. Example:"),/*#__PURE__*/src_react.createElement("p",null,/*#__PURE__*/src_react.createElement("pre",null,"type: aws","\n","creds:","\n"," ","type: dstack","\n")),/*#__PURE__*/src_react.createElement("p",null,"You can see all supported backend types at the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/
|
|
134051
|
+
var src_CONFIG_YAML_HELP_SKY={header:/*#__PURE__*/src_react.createElement("h2",null,"Backend config"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"The backend config is defined in the YAML format. It specifies the backend's ",/*#__PURE__*/src_react.createElement("code",null,"type")," and settings,"," ","such as ",/*#__PURE__*/src_react.createElement("code",null,"creds"),", ",/*#__PURE__*/src_react.createElement("code",null,"regions"),", and so on."),/*#__PURE__*/src_react.createElement("h4",null,"Marketplace"),/*#__PURE__*/src_react.createElement("p",null,"If you set ",/*#__PURE__*/src_react.createElement("code",null,"creds"),"'s ",/*#__PURE__*/src_react.createElement("code",null,"type")," to ",/*#__PURE__*/src_react.createElement("code",null,"dstack"),", you'll get compute from"," ",/*#__PURE__*/src_react.createElement("code",null,"dstack"),"'s marketplace and will pay for it via your ",/*#__PURE__*/src_react.createElement("code",null,"dstack Sky")," user billing. Example:"),/*#__PURE__*/src_react.createElement("p",null,/*#__PURE__*/src_react.createElement("pre",null,"type: aws","\n","creds:","\n"," ","type: dstack","\n")),/*#__PURE__*/src_react.createElement("p",null,"You can see all supported backend types at the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/backends",target:"_blank"},"documentation"),"."),/*#__PURE__*/src_react.createElement("h4",null,"Your own cloud account"),/*#__PURE__*/src_react.createElement("p",null,"If you want to use your own cloud account, configure ",/*#__PURE__*/src_react.createElement("code",null,"creds")," and other settings according to the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/backends",target:"_blank"},"documentation"),". Example:"),/*#__PURE__*/src_react.createElement("p",null,/*#__PURE__*/src_react.createElement("pre",null,"type: aws","\n","creds:","\n"," ","type: access_key","\n"," ","access_key: AIZKISCVKUK","\n"," ","secret_key: QSbmpqJIUBn1")))};var src_CONFIG_YAML_HELP_ENTERPRISE={header:/*#__PURE__*/src_react.createElement("h2",null,"Backend config"),body:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("p",null,"The backend config is defined in the YAML format. It specifies the backend's ",/*#__PURE__*/src_react.createElement("code",null,"type")," and settings, such as ",/*#__PURE__*/src_react.createElement("code",null,"creds"),", ",/*#__PURE__*/src_react.createElement("code",null,"regions"),", and so on."),/*#__PURE__*/src_react.createElement("p",null,"Example:"),/*#__PURE__*/src_react.createElement("p",null,/*#__PURE__*/src_react.createElement("pre",null,"type: aws","\n","creds:","\n"," ","type: access_key","\n"," ","access_key: AIZKISCVKUK","\n"," ","secret_key: QSbmpqJIUBn1")),/*#__PURE__*/src_react.createElement("p",null,"Each backend type may support different properties. See the"," ",/*#__PURE__*/src_react.createElement("a",{href:"https://dstack.ai/docs/concepts/backends",target:"_blank"},"documentaiton")," ","for more examples."))};
|
|
134049
134052
|
;// ./src/pages/Project/Backends/YAMLForm/index.tsx
|
|
134050
134053
|
var src_YAMLForm_INFO= true?src_CONFIG_YAML_HELP_ENTERPRISE:0;var src_YAMLForm=function(_ref){var initialValues=_ref.initialValues,onCancel=_ref.onCancel,loading=_ref.loading,onSubmitProp=_ref.onSubmit,onApplyProp=_ref.onApply,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useHelpPanel=src_useHelpPanel_useHelpPanel(),_useHelpPanel2=src_slicedToArray_slicedToArray(_useHelpPanel,1),openHelpPanel=_useHelpPanel2[0],_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),isApplying=_useState2[0],setIsApplying=_useState2[1],_useForm=src_index_esm_useForm({defaultValues:initialValues}),handleSubmit=_useForm.handleSubmit,control=_useForm.control,setError=_useForm.setError,clearErrors=_useForm.clearErrors;return/*#__PURE__*/src_react.createElement("form",{onSubmit:handleSubmit(function(data){clearErrors();var submitCallback=isApplying&&onApplyProp?onApplyProp:onSubmitProp;submitCallback(data).finally(function(){return setIsApplying(!1)}).catch(function(errorResponse){var errorRequestData=null===errorResponse||void 0===errorResponse?void 0:errorResponse.data;if(src_isResponseServerError(errorRequestData))errorRequestData.detail.forEach(function(error){src_isResponseServerFormFieldError(error)?setError(error.loc.join("."),{type:"custom",message:error.msg}):pushNotification({type:"error",content:t("common.server_error",{error:error.msg})})});else{var _errorResponse$error;pushNotification({type:"error",content:t("common.server_error",{error:null!==(_errorResponse$error=null===errorResponse||void 0===errorResponse?void 0:errorResponse.error)&&void 0!==_errorResponse$error?_errorResponse$error:errorResponse})})}})})},/*#__PURE__*/src_react.createElement(src_form_Form,{actions:/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{direction:"horizontal",size:"xs"},/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",disabled:loading,variant:"link",onClick:onCancel},t("common.cancel")),onApplyProp&&/*#__PURE__*/src_react.createElement(src_Button_Button,{loading:loading,disabled:loading,onClick:function(){return setIsApplying(!0)}},t("common.apply")),/*#__PURE__*/src_react.createElement(src_Button_Button,{loading:loading,disabled:loading,variant:"primary"},t("common.save")))},/*#__PURE__*/src_react.createElement(src_FormCodeEditor,{info:/*#__PURE__*/src_react.createElement(src_InfoLink_InfoLink,{onFollow:function(){return openHelpPanel(src_YAMLForm_INFO)}}),control:control,label:t("projects.edit.backend_config"),description:t("projects.edit.backend_config_description"),name:"config_yaml",language:"yaml",loading:loading,editorContentHeight:600})))};
|
|
134051
134054
|
;// ./src/pages/Project/Backends/Add/index.tsx
|
|
@@ -134107,11 +134110,11 @@ var src_consts_DEFAULT_PREFERENCES={pageSize:30,contentDisplay:[{id:"run_name",v
|
|
|
134107
134110
|
;// ./src/pages/Runs/List/Preferences/useRunListPreferences.ts
|
|
134108
134111
|
var src_useRunListPreferences=function(){var _useLocalStorageState=src_useLocalStorageState("run-list-preferences",src_consts_DEFAULT_PREFERENCES),_useLocalStorageState2=src_slicedToArray_slicedToArray(_useLocalStorageState,2),preferences=_useLocalStorageState2[0],setPreferences=_useLocalStorageState2[1];return[preferences,setPreferences]};
|
|
134109
134112
|
;// ./src/pages/Runs/Details/Jobs/List/helpers.ts
|
|
134110
|
-
var src_getJobListItemResources=function(job){var _job$job_submissions;return null===(_job$job_submissions=job.job_submissions)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions[job.job_submissions.length-1])||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.job_provisioning_data)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.instance_type)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.resources)||void 0===_job$job_submissions?void 0:_job$job_submissions.description};var src_getJobListItemSpot=function(job){var _job$job_submissions$,_job$job_submissions2;return null!==(_job$job_submissions$=null===(_job$job_submissions2=job.job_submissions)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2[job.job_submissions.length-1])||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.job_provisioning_data)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.instance_type)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.resources)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.spot)||void 0===_job$job_submissions2?void 0:_job$job_submissions2.toString())&&void 0!==_job$job_submissions$?_job$job_submissions$:"-"};var src_getJobListItemPrice=function(job){var _job$job_submissions3,_job$job_submissions4;return null!==(_job$job_submissions3=job.job_submissions)&&void 0!==_job$job_submissions3&&null!==(_job$job_submissions3=_job$job_submissions3[job.job_submissions.length-1])&&void 0!==_job$job_submissions3&&null!==(_job$job_submissions3=_job$job_submissions3.job_provisioning_data)&&void 0!==_job$job_submissions3&&_job$job_submissions3.price?"$".concat(null===(_job$job_submissions4=job.job_submissions)||void 0===_job$job_submissions4||null===(_job$job_submissions4=_job$job_submissions4[job.job_submissions.length-1])||void 0===_job$job_submissions4||null===(_job$job_submissions4=_job$job_submissions4.job_provisioning_data)||void 0===_job$job_submissions4?void 0:_job$job_submissions4.price):null};var src_getJobListItemInstance=function(job){var _job$job_submissions5;return null===(_job$job_submissions5=job.job_submissions)||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5[job.job_submissions.length-1])||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5.job_provisioning_data)||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5.instance_type)||void 0===_job$job_submissions5?void 0:_job$job_submissions5.name};var src_getJobListItemRegion=function(job){var _job$job_submissions$2,_job$job_submissions6;return null!==(_job$job_submissions$2=null===(_job$job_submissions6=job.job_submissions)||void 0===_job$job_submissions6||null===(_job$job_submissions6=_job$job_submissions6[job.job_submissions.length-1])||void 0===_job$job_submissions6||null===(_job$job_submissions6=_job$job_submissions6.job_provisioning_data)||void 0===_job$job_submissions6?void 0:_job$job_submissions6.region)&&void 0!==_job$job_submissions$2?_job$job_submissions$2:"-"};var src_getJobListItemBackend=function(job){var _job$job_submissions$3,_job$job_submissions7;return null!==(_job$job_submissions$3=null===(_job$job_submissions7=job.job_submissions)||void 0===_job$job_submissions7||null===(_job$job_submissions7=_job$job_submissions7[job.job_submissions.length-1])||void 0===_job$job_submissions7||null===(_job$job_submissions7=_job$job_submissions7.job_provisioning_data)||void 0===_job$job_submissions7?void 0:_job$job_submissions7.backend)&&void 0!==_job$job_submissions$3?_job$job_submissions$3:"-"};var src_getJobSubmittedAt=function(job){var _job$job_submissions8,_job$job_submissions9;return null!==(_job$job_submissions8=job.job_submissions)&&void 0!==_job$job_submissions8&&_job$job_submissions8[job.job_submissions.length-1].submitted_at?src_format_format(new Date(null===(_job$job_submissions9=job.job_submissions)||void 0===_job$job_submissions9?void 0:_job$job_submissions9[job.job_submissions.length-1].submitted_at),src_consts_DATE_TIME_FORMAT):""};var src_getJobStatus=function(job){var _job$job_submissions10;return null===(_job$job_submissions10=job.job_submissions)||void 0===_job$job_submissions10?void 0:_job$job_submissions10[job.job_submissions.length-1].status};var src_getJobTerminationReason=function(job){var _job$job_submissions$4,_job$job_submissions11;return null!==(_job$job_submissions$4=null===(_job$job_submissions11=job.job_submissions)||void 0===_job$job_submissions11?void 0:_job$job_submissions11[job.job_submissions.length-1].termination_reason)&&void 0!==_job$job_submissions$4?_job$job_submissions$4:"-"};
|
|
134113
|
+
var src_getJobListItemResources=function(job){var _job$job_submissions;return null===(_job$job_submissions=job.job_submissions)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions[job.job_submissions.length-1])||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.job_provisioning_data)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.instance_type)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.resources)||void 0===_job$job_submissions?void 0:_job$job_submissions.description};var src_getJobListItemSpot=function(job){var _job$job_submissions$,_job$job_submissions2;return null!==(_job$job_submissions$=null===(_job$job_submissions2=job.job_submissions)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2[job.job_submissions.length-1])||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.job_provisioning_data)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.instance_type)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.resources)||void 0===_job$job_submissions2||null===(_job$job_submissions2=_job$job_submissions2.spot)||void 0===_job$job_submissions2?void 0:_job$job_submissions2.toString())&&void 0!==_job$job_submissions$?_job$job_submissions$:"-"};var src_getJobListItemPrice=function(job){var _job$job_submissions3,_job$job_submissions4;return null!==(_job$job_submissions3=job.job_submissions)&&void 0!==_job$job_submissions3&&null!==(_job$job_submissions3=_job$job_submissions3[job.job_submissions.length-1])&&void 0!==_job$job_submissions3&&null!==(_job$job_submissions3=_job$job_submissions3.job_provisioning_data)&&void 0!==_job$job_submissions3&&_job$job_submissions3.price?"$".concat(null===(_job$job_submissions4=job.job_submissions)||void 0===_job$job_submissions4||null===(_job$job_submissions4=_job$job_submissions4[job.job_submissions.length-1])||void 0===_job$job_submissions4||null===(_job$job_submissions4=_job$job_submissions4.job_provisioning_data)||void 0===_job$job_submissions4?void 0:_job$job_submissions4.price):null};var src_getJobListItemInstance=function(job){var _job$job_submissions5;return null===(_job$job_submissions5=job.job_submissions)||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5[job.job_submissions.length-1])||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5.job_provisioning_data)||void 0===_job$job_submissions5||null===(_job$job_submissions5=_job$job_submissions5.instance_type)||void 0===_job$job_submissions5?void 0:_job$job_submissions5.name};var src_getJobListItemRegion=function(job){var _job$job_submissions$2,_job$job_submissions6;return null!==(_job$job_submissions$2=null===(_job$job_submissions6=job.job_submissions)||void 0===_job$job_submissions6||null===(_job$job_submissions6=_job$job_submissions6[job.job_submissions.length-1])||void 0===_job$job_submissions6||null===(_job$job_submissions6=_job$job_submissions6.job_provisioning_data)||void 0===_job$job_submissions6?void 0:_job$job_submissions6.region)&&void 0!==_job$job_submissions$2?_job$job_submissions$2:"-"};var src_getJobListItemBackend=function(job){var _job$job_submissions$3,_job$job_submissions7;return null!==(_job$job_submissions$3=null===(_job$job_submissions7=job.job_submissions)||void 0===_job$job_submissions7||null===(_job$job_submissions7=_job$job_submissions7[job.job_submissions.length-1])||void 0===_job$job_submissions7||null===(_job$job_submissions7=_job$job_submissions7.job_provisioning_data)||void 0===_job$job_submissions7?void 0:_job$job_submissions7.backend)&&void 0!==_job$job_submissions$3?_job$job_submissions$3:"-"};var src_getJobSubmittedAt=function(job){var _job$job_submissions8,_job$job_submissions9;return null!==(_job$job_submissions8=job.job_submissions)&&void 0!==_job$job_submissions8&&_job$job_submissions8[job.job_submissions.length-1].submitted_at?src_format_format(new Date(null===(_job$job_submissions9=job.job_submissions)||void 0===_job$job_submissions9?void 0:_job$job_submissions9[job.job_submissions.length-1].submitted_at),src_consts_DATE_TIME_FORMAT):""};var src_getJobStatus=function(job){var _job$job_submissions10;return null===(_job$job_submissions10=job.job_submissions)||void 0===_job$job_submissions10?void 0:_job$job_submissions10[job.job_submissions.length-1].status};var src_getJobTerminationReason=function(job){var _job$job_submissions$4,_job$job_submissions11;return null!==(_job$job_submissions$4=null===(_job$job_submissions11=job.job_submissions)||void 0===_job$job_submissions11?void 0:_job$job_submissions11[job.job_submissions.length-1].termination_reason)&&void 0!==_job$job_submissions$4?_job$job_submissions$4:"-"};var src_getJobStatusMessage=function(job){var _job$job_submissions12,latest_submission=null===(_job$job_submissions12=job.job_submissions)||void 0===_job$job_submissions12?void 0:_job$job_submissions12[job.job_submissions.length-1];return null!==latest_submission&&void 0!==latest_submission&&latest_submission.status_message?src_capitalize(latest_submission.status_message):src_capitalize(latest_submission.status)};var src_getJobError=function(job){var _job$job_submissions$5,_job$job_submissions13;return null!==(_job$job_submissions$5=null===(_job$job_submissions13=job.job_submissions)||void 0===_job$job_submissions13||null===(_job$job_submissions13=_job$job_submissions13[job.job_submissions.length-1])||void 0===_job$job_submissions13?void 0:_job$job_submissions13.error)&&void 0!==_job$job_submissions$5?_job$job_submissions$5:null};
|
|
134111
134114
|
;// ./src/pages/Runs/List/helpers.ts
|
|
134112
134115
|
var src_getGroupedRunsByProjectAndRepoID=function(runs){return (0,src_lodash.groupBy)(runs,function(_ref){var project_name=_ref.project_name;return project_name})};var src_getRunListItemResources=function(run){var _run$latest_job_submi;return 1<run.jobs.length?"-":null===(_run$latest_job_submi=run.latest_job_submission)||void 0===_run$latest_job_submi||null===(_run$latest_job_submi=_run$latest_job_submi.job_provisioning_data)||void 0===_run$latest_job_submi||null===(_run$latest_job_submi=_run$latest_job_submi.instance_type)||void 0===_run$latest_job_submi||null===(_run$latest_job_submi=_run$latest_job_submi.resources)||void 0===_run$latest_job_submi?void 0:_run$latest_job_submi.description};var src_getRunListItemSpotLabelKey=function(run){var _run$latest_job_submi2;return 1<run.jobs.length?"-":null!==(_run$latest_job_submi2=run.latest_job_submission)&&void 0!==_run$latest_job_submi2&&null!==(_run$latest_job_submi2=_run$latest_job_submi2.job_provisioning_data)&&void 0!==_run$latest_job_submi2&&null!==(_run$latest_job_submi2=_run$latest_job_submi2.instance_type)&&void 0!==_run$latest_job_submi2&&null!==(_run$latest_job_submi2=_run$latest_job_submi2.resources)&&void 0!==_run$latest_job_submi2&&_run$latest_job_submi2.spot?"common.yes":"common.no"};var src_getRunListItemSpot=function(run){var _run$latest_job_submi3,_run$latest_job_submi4;return 1<run.jobs.length?"":null!==(_run$latest_job_submi3=null===(_run$latest_job_submi4=run.latest_job_submission)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.job_provisioning_data)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.instance_type)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.resources)||void 0===_run$latest_job_submi4||null===(_run$latest_job_submi4=_run$latest_job_submi4.spot)||void 0===_run$latest_job_submi4?void 0:_run$latest_job_submi4.toString())&&void 0!==_run$latest_job_submi3?_run$latest_job_submi3:"-"};var src_getRunListItemPrice=function(run){var _run$latest_job_submi5,_run$latest_job_submi6,unFinishedJobs=run.jobs.filter(function(job){return!src_finishedJobs.includes(src_getJobStatus(job))});return 1<run.jobs.length?"$".concat(unFinishedJobs.reduce(function(acc,job){var _job$job_submissions,price=null===(_job$job_submissions=job.job_submissions)||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions[job.job_submissions.length-1])||void 0===_job$job_submissions||null===(_job$job_submissions=_job$job_submissions.job_provisioning_data)||void 0===_job$job_submissions?void 0:_job$job_submissions.price;return price&&(acc+=price),acc},0)):null!==(_run$latest_job_submi5=run.latest_job_submission)&&void 0!==_run$latest_job_submi5&&null!==(_run$latest_job_submi5=_run$latest_job_submi5.job_provisioning_data)&&void 0!==_run$latest_job_submi5&&_run$latest_job_submi5.price?"$".concat(null===(_run$latest_job_submi6=run.latest_job_submission)||void 0===_run$latest_job_submi6||null===(_run$latest_job_submi6=_run$latest_job_submi6.job_provisioning_data)||void 0===_run$latest_job_submi6?void 0:_run$latest_job_submi6.price):null};var src_getRunListItemInstance=function(run){var _run$latest_job_submi7;return 1<run.jobs.length?"":null===(_run$latest_job_submi7=run.latest_job_submission)||void 0===_run$latest_job_submi7||null===(_run$latest_job_submi7=_run$latest_job_submi7.job_provisioning_data)||void 0===_run$latest_job_submi7||null===(_run$latest_job_submi7=_run$latest_job_submi7.instance_type)||void 0===_run$latest_job_submi7?void 0:_run$latest_job_submi7.name};var src_getRunListItemInstanceId=function(run){var _run$latest_job_submi8,_run$latest_job_submi9;return 1<run.jobs.length?"":null!==(_run$latest_job_submi8=null===(_run$latest_job_submi9=run.latest_job_submission)||void 0===_run$latest_job_submi9||null===(_run$latest_job_submi9=_run$latest_job_submi9.job_provisioning_data)||void 0===_run$latest_job_submi9?void 0:_run$latest_job_submi9.instance_id)&&void 0!==_run$latest_job_submi8?_run$latest_job_submi8:"-"};var src_getRunListItemRegion=function(run){var _run$latest_job_submi10,_run$latest_job_submi11;return 1<run.jobs.length?"":null!==(_run$latest_job_submi10=null===(_run$latest_job_submi11=run.latest_job_submission)||void 0===_run$latest_job_submi11||null===(_run$latest_job_submi11=_run$latest_job_submi11.job_provisioning_data)||void 0===_run$latest_job_submi11?void 0:_run$latest_job_submi11.region)&&void 0!==_run$latest_job_submi10?_run$latest_job_submi10:"-"};var src_getRunListItemBackend=function(run){var _run$latest_job_submi12,_run$latest_job_submi13;return 1<run.jobs.length?"":null!==(_run$latest_job_submi12=null===(_run$latest_job_submi13=run.latest_job_submission)||void 0===_run$latest_job_submi13||null===(_run$latest_job_submi13=_run$latest_job_submi13.job_provisioning_data)||void 0===_run$latest_job_submi13?void 0:_run$latest_job_submi13.backend)&&void 0!==_run$latest_job_submi12?_run$latest_job_submi12:"-"};var src_getRunListItemServiceUrl=function(run){var _run$service,url=null===(_run$service=run.service)||void 0===_run$service?void 0:_run$service.url;return url?url.startsWith("/")?"".concat(src_getBaseUrl()).concat(url):url:null};
|
|
134113
134116
|
;// ./src/pages/Runs/List/hooks/useColumnsDefinitions.tsx
|
|
134114
|
-
var src_List_hooks_useColumnsDefinitions_useColumnsDefinitions=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,columns=[{id:"run_name",header:t("projects.run.run_name"),cell:function(item){return null===item.id?item.run_spec.run_name:/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(item.project_name,item.id)},item.run_spec.run_name)}},{id:"project",header:"".concat(t("projects.run.project")),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.FORMAT(item.project_name)},item.project_name)}},{id:"repo",header:"".concat(t("projects.run.repo")),cell:function(item){return src_getRepoNameFromRun(item)}},{id:"hub_user_name",header:"".concat(t("projects.run.hub_user_name")),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.USER.DETAILS.FORMAT(item.user)},item.user)}},{id:"submitted_at",header:t("projects.run.submitted_at"),cell:function(item){return src_format_format(new Date(item.submitted_at),src_consts_DATE_TIME_FORMAT)}},{id:"finished_at",header:t("projects.run.finished_at"),cell:function(item){return item.terminated_at?src_format_format(new Date(item.terminated_at),src_consts_DATE_TIME_FORMAT):null}},{id:"status",header:t("projects.run.status"),cell:function(item){return/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(
|
|
134117
|
+
var src_List_hooks_useColumnsDefinitions_useColumnsDefinitions=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,columns=[{id:"run_name",header:t("projects.run.run_name"),cell:function(item){return null===item.id?item.run_spec.run_name:/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(item.project_name,item.id)},item.run_spec.run_name)}},{id:"project",header:"".concat(t("projects.run.project")),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.FORMAT(item.project_name)},item.project_name)}},{id:"repo",header:"".concat(t("projects.run.repo")),cell:function(item){return src_getRepoNameFromRun(item)}},{id:"hub_user_name",header:"".concat(t("projects.run.hub_user_name")),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.USER.DETAILS.FORMAT(item.user)},item.user)}},{id:"submitted_at",header:t("projects.run.submitted_at"),cell:function(item){return src_format_format(new Date(item.submitted_at),src_consts_DATE_TIME_FORMAT)}},{id:"finished_at",header:t("projects.run.finished_at"),cell:function(item){return item.terminated_at?src_format_format(new Date(item.terminated_at),src_consts_DATE_TIME_FORMAT):null}},{id:"status",header:t("projects.run.status"),cell:function(item){var _item$latest_job_subm,_item$latest_job_subm2,_item$latest_job_subm3,status=null!==(_item$latest_job_subm=null===(_item$latest_job_subm2=item.latest_job_submission)||void 0===_item$latest_job_subm2?void 0:_item$latest_job_subm2.status)&&void 0!==_item$latest_job_subm?_item$latest_job_subm:item.status,terminationReason=null===(_item$latest_job_subm3=item.latest_job_submission)||void 0===_item$latest_job_subm3?void 0:_item$latest_job_subm3.termination_reason;return/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(status,terminationReason),colorOverride:src_getStatusIconColor(status,terminationReason)},src_getRunStatusMessage(item))}},{id:"error",header:t("projects.run.error"),cell:function(item){return src_getRunError(item)}},{id:"cost",header:"".concat(t("projects.run.cost")),cell:function(item){return"$".concat(item.cost)}},{id:"resources",header:"".concat(t("projects.run.resources")),cell:src_getRunListItemResources},{id:"spot",header:"".concat(t("projects.run.spot")),cell:function(item){return t(src_getRunListItemSpotLabelKey(item))}},{id:"price",header:"".concat(t("projects.run.price")),cell:src_getRunListItemPrice},{id:"instance",header:"".concat(t("projects.run.instance")),cell:src_getRunListItemInstance},{id:"region",header:"".concat(t("projects.run.region")),cell:src_getRunListItemRegion},{id:"backend",header:"".concat(t("projects.run.backend")),cell:src_getRunListItemBackend}];return{columns:columns}};
|
|
134115
134118
|
;// ./src/pages/Runs/List/hooks/useStopRuns.ts
|
|
134116
134119
|
var src_useStopRuns=function(isAborting){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useStopRunsMutation=src_useStopRunsMutation(),_useStopRunsMutation2=src_slicedToArray_slicedToArray(_useStopRunsMutation,2),stopRun=_useStopRunsMutation2[0],isStopping=_useStopRunsMutation2[1].isLoading,_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],stopRuns=(0,src_react.useCallback)(function(runs){var groupedRuns=src_getGroupedRunsByProjectAndRepoID(runs),request=Promise.all(Object.keys(groupedRuns).map(function(key){var runsGroup=groupedRuns[key];return stopRun({project_name:runsGroup[0].project_name,runs_names:runsGroup.map(function(item){return item.run_spec.run_name}),abort:!!isAborting}).unwrap()}));return request.catch(function(error){pushNotification({type:"error",content:t("common.server_error",{error:src_serverErrors_getServerError(error)})})}),request},[isAborting]);return{stopRuns:stopRuns,isStopping:isStopping}};var src_useAbortRuns=function(){var _useStopRuns=src_useStopRuns(!0),abortRuns=_useStopRuns.stopRuns,isAborting=_useStopRuns.isStopping;return{abortRuns:abortRuns,isAborting:isAborting}};
|
|
134117
134120
|
;// ./src/pages/Runs/List/hooks/useDeleteRuns.ts
|
|
@@ -134133,14 +134136,41 @@ var src_Preferences_Preferences=function(){var _useTranslation=src_useTranslatio
|
|
|
134133
134136
|
// extracted by mini-css-extract-plugin
|
|
134134
134137
|
/* harmony default export */ const src_Runs_List_styles_module = ({"selectFilters":"sYCvq","select":"cM1VZ","activeOnly":"PbvNs","clear":"Ct6R1","emptyMessage":"JPkrf","emptyMessageHelp":"Urnse","cliCommand":"o_Gf_"});
|
|
134135
134138
|
;// ./src/pages/Runs/List/index.tsx
|
|
134136
|
-
var src_RunList=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,2),
|
|
134139
|
+
var src_RunList=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,2),setSearchParams=_useSearchParams2[1],_useRunListPreference=src_useRunListPreferences(),_useRunListPreference2=src_slicedToArray_slicedToArray(_useRunListPreference,1),preferences=_useRunListPreference2[0];src_useBreadcrumbs_useBreadcrumbs([{text:t("projects.runs"),href:src_routes_ROUTES.RUNS.LIST}]);var _useFilters=src_hooks_useFilters_useFilters({projectSearchKey:"project",localStorePrefix:"administration-run-list-page"}),projectOptions=_useFilters.projectOptions,selectedProject=_useFilters.selectedProject,setSelectedProject=_useFilters.setSelectedProject,onlyActive=_useFilters.onlyActive,setOnlyActive=_useFilters.setOnlyActive,clearSelected=_useFilters.clearSelected,_useInfiniteScroll=src_useInfiniteScroll({useLazyQuery:src_useLazyGetRunsQuery,args:{project_name:null===selectedProject||void 0===selectedProject?void 0:selectedProject.value,only_active:onlyActive,limit:src_DEFAULT_TABLE_PAGE_SIZE},getPaginationParams:function(lastRun){return{prev_submitted_at:lastRun.submitted_at}}}),data=_useInfiniteScroll.data,isLoading=_useInfiniteScroll.isLoading,refreshList=_useInfiniteScroll.refreshList,isLoadingMore=_useInfiniteScroll.isLoadingMore,isDisabledClearFilter=!selectedProject&&!onlyActive,_useStopRuns=src_useStopRuns(),stopRuns=_useStopRuns.stopRuns,isStopping=_useStopRuns.isStopping,_useAbortRuns=src_useAbortRuns(),abortRuns=_useAbortRuns.abortRuns,isAborting=_useAbortRuns.isAborting,_useDeleteRuns=src_useDeleteRuns(),isDeleting=_useDeleteRuns.isDeleting,_useColumnsDefinition=src_List_hooks_useColumnsDefinitions_useColumnsDefinitions(),columns=_useColumnsDefinition.columns,clearFilter=function(){clearSelected(),setOnlyActive(!1),setSearchParams({})},_useEmptyMessages=src_useEmptyMessages_useEmptyMessages({isDisabledClearFilter:isDisabledClearFilter,clearFilter:clearFilter}),renderEmptyMessage=_useEmptyMessages.renderEmptyMessage,renderNoMatchMessage=_useEmptyMessages.renderNoMatchMessage,_useCollection=src_use_collection_useCollection(null!==data&&void 0!==data?data:[],{filtering:{empty:renderEmptyMessage(),noMatch:renderNoMatchMessage()},selection:{}}),items=_useCollection.items,actions=_useCollection.actions,collectionProps=_useCollection.collectionProps,selectedItems=collectionProps.selectedItems,_useDisabledStatesFor=src_useDisabledStatesForButtons({selectedRuns:selectedItems,isStopping:isStopping,isAborting:isAborting,isDeleting:isDeleting}),isDisabledAbortButton=_useDisabledStatesFor.isDisabledAbortButton,isDisabledStopButton=_useDisabledStatesFor.isDisabledStopButton;// const deleteClickHandle = () => {
|
|
134140
|
+
// if (!selectedItems?.length) return;
|
|
134141
|
+
//
|
|
134142
|
+
// deleteRuns([...selectedItems]).catch(console.log);
|
|
134143
|
+
// };
|
|
134144
|
+
return/*#__PURE__*/src_react.createElement(src_table,src_extends_extends({},collectionProps,{variant:"full-page",columnDefinitions:columns,items:items,loading:isLoading,loadingText:t("common.loading"),selectionType:"multi",stickyHeader:!0,columnDisplay:preferences.contentDisplay,preferences:/*#__PURE__*/src_react.createElement(src_Preferences_Preferences,null),header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"awsui-h1-sticky",actions:/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xs",direction:"horizontal"},/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",onClick:function(){null!==selectedItems&&void 0!==selectedItems&&selectedItems.length&&abortRuns(src_toConsumableArray_toConsumableArray(selectedItems)).then(function(){return actions.setSelectedItems([])})},disabled:isDisabledAbortButton},t("common.abort")),/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",onClick:function(){null!==selectedItems&&void 0!==selectedItems&&selectedItems.length&&stopRuns(src_toConsumableArray_toConsumableArray(selectedItems)).then(function(){return actions.setSelectedItems([])})},disabled:isDisabledStopButton},t("common.stop")),/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"refresh",disabled:isLoading,ariaLabel:t("common.refresh"),onClick:refreshList}))},t("projects.runs")),filter:/*#__PURE__*/src_react.createElement("div",{className:src_Runs_List_styles_module.selectFilters},/*#__PURE__*/src_react.createElement("div",{className:src_Runs_List_styles_module.select},/*#__PURE__*/src_react.createElement(src_form_field_FormField,{label:t("projects.run.project")},/*#__PURE__*/src_react.createElement(src_components_select,{disabled:!(null!==projectOptions&&void 0!==projectOptions&&projectOptions.length),options:projectOptions,selectedOption:selectedProject,onChange:function(event){setSelectedProject(event.detail.selectedOption)},placeholder:t("projects.run.project_placeholder"),expandToViewport:!0,filteringType:"auto"}))),/*#__PURE__*/src_react.createElement("div",{className:src_Runs_List_styles_module.activeOnly},/*#__PURE__*/src_react.createElement(src_toggle,{onChange:function(_ref){var detail=_ref.detail;return setOnlyActive(detail.checked)},checked:onlyActive},t("projects.run.active_only"))),/*#__PURE__*/src_react.createElement("div",{className:src_Runs_List_styles_module.clear},/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",onClick:clearFilter,disabled:isDisabledClearFilter},t("common.clearFilter")))),footer:/*#__PURE__*/src_react.createElement(src_Loader_Loader,{show:isLoadingMore,padding:{vertical:"m"}})}))};
|
|
134137
134145
|
;// ./src/pages/Runs/Details/styles.module.scss
|
|
134138
134146
|
// extracted by mini-css-extract-plugin
|
|
134139
134147
|
/* harmony default export */ const src_Runs_Details_styles_module = ({"page":"sbwRz"});
|
|
134140
134148
|
;// ./src/pages/Runs/Details/index.tsx
|
|
134141
|
-
var src_Details_CodeTab=/*#__PURE__*/function(CodeTab){return CodeTab.Details="details",CodeTab.Metrics="metrics",CodeTab}(src_Details_CodeTab||{});var src_RunDetailsPage=function(){var _params$projectName,_params$runId,_runData$run_spec$run,_runData$run_spec,_runData$run_spec$run2,_runData$run_spec2,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,
|
|
134149
|
+
var src_Details_CodeTab=/*#__PURE__*/function(CodeTab){return CodeTab.Details="details",CodeTab.Metrics="metrics",CodeTab}(src_Details_CodeTab||{});var src_RunDetailsPage=function(){var _params$projectName,_params$runId,_runData$run_spec$run,_runData$run_spec,_runData$run_spec$run2,_runData$run_spec2,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunId=null!==(_params$runId=params.runId)&&void 0!==_params$runId?_params$runId:"",_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,id:paramRunId}),runData=_useGetRunQuery.data,runError=_useGetRunQuery.error;// const navigate = useNavigate();
|
|
134150
|
+
(0,src_react.useEffect)(function(){404===(null===runError||void 0===runError?void 0:runError.status)&&src_riseRouterException()},[runError]);var _useStopRunsMutation=src_useStopRunsMutation(),_useStopRunsMutation2=src_slicedToArray_slicedToArray(_useStopRunsMutation,2),stopRun=_useStopRunsMutation2[0],isStopping=_useStopRunsMutation2[1].isLoading,_useDeleteRunsMutatio=src_useDeleteRunsMutation(),_useDeleteRunsMutatio2=src_slicedToArray_slicedToArray(_useDeleteRunsMutatio,2),isDeleting=_useDeleteRunsMutatio2[1].isLoading;src_useBreadcrumbs_useBreadcrumbs([{text:t("navigation.project_other"),href:src_routes_ROUTES.PROJECT.LIST},{text:paramProjectName,href:src_routes_ROUTES.PROJECT.DETAILS.FORMAT(paramProjectName)},{text:t("projects.runs"),href:src_routes_ROUTES.RUNS.LIST},{text:null!==(_runData$run_spec$run=null===runData||void 0===runData||null===(_runData$run_spec=runData.run_spec)||void 0===_runData$run_spec?void 0:_runData$run_spec.run_name)&&void 0!==_runData$run_spec$run?_runData$run_spec$run:"",href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(paramProjectName,paramRunId)}]);var isDisabledAbortButton=!runData||!src_isAvailableAbortingForRun(runData.status)||isStopping||isDeleting,isDisabledStopButton=!runData||!src_isAvailableStoppingForRun(runData.status)||isStopping||isDeleting;// const deleteClickHandle = () => {
|
|
134151
|
+
// if (!runData) {
|
|
134152
|
+
// return;
|
|
134153
|
+
// }
|
|
134154
|
+
//
|
|
134155
|
+
// deleteRun({
|
|
134156
|
+
// project_name: paramProjectName,
|
|
134157
|
+
// runs_names: [runData.run_spec.run_name],
|
|
134158
|
+
// })
|
|
134159
|
+
// .unwrap()
|
|
134160
|
+
// .then(() => {
|
|
134161
|
+
// navigate(ROUTES.RUNS.LIST);
|
|
134162
|
+
// })
|
|
134163
|
+
// .catch((error) => {
|
|
134164
|
+
// pushNotification({
|
|
134165
|
+
// type: 'error',
|
|
134166
|
+
// content: t('common.server_error', { error: getServerError(error) }),
|
|
134167
|
+
// });
|
|
134168
|
+
// });
|
|
134169
|
+
// };
|
|
134170
|
+
// const isDisabledDeleteButton = !runData || !isAvailableDeletingForRun(runData.status) || isStopping || isDeleting;
|
|
134171
|
+
return/*#__PURE__*/src_react.createElement("div",{className:src_Runs_Details_styles_module.page},/*#__PURE__*/src_react.createElement(src_ContentLayout,{header:/*#__PURE__*/src_react.createElement(src_DetailsHeader,{title:null!==(_runData$run_spec$run2=null===runData||void 0===runData||null===(_runData$run_spec2=runData.run_spec)||void 0===_runData$run_spec2?void 0:_runData$run_spec2.run_name)&&void 0!==_runData$run_spec$run2?_runData$run_spec$run2:"",actionButtons:/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_components_button,{onClick:function(){runData&&stopRun({project_name:paramProjectName,runs_names:[runData.run_spec.run_name],abort:!0}).unwrap().catch(function(error){pushNotification({type:"error",content:t("common.server_error",{error:src_serverErrors_getServerError(error)})})})},disabled:isDisabledAbortButton},t("common.abort")),/*#__PURE__*/src_react.createElement(src_components_button,{onClick:function(){runData&&stopRun({project_name:paramProjectName,runs_names:[runData.run_spec.run_name],abort:!1}).unwrap().catch(function(error){pushNotification({type:"error",content:t("common.server_error",{error:src_serverErrors_getServerError(error)})})})},disabled:isDisabledStopButton},t("common.stop")))})},/*#__PURE__*/src_react.createElement(src_react.Fragment,null,1===(null===runData||void 0===runData?void 0:runData.jobs.length)&&/*#__PURE__*/src_react.createElement(src_Tabs_Tabs,{withNavigation:!0,tabs:[{label:"Details",id:src_Details_CodeTab.Details,href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(paramProjectName,paramRunId)},{label:"Metrics",id:src_Details_CodeTab.Metrics,href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.METRICS.FORMAT(paramProjectName,paramRunId)}]}),/*#__PURE__*/src_react.createElement(src_Outlet,null))))};
|
|
134142
134172
|
;// ./src/pages/Runs/Details/Jobs/List/hooks.tsx
|
|
134143
|
-
var src_List_hooks_useColumnsDefinitions=function(_ref){var projectName=_ref.projectName,runId=_ref.runId,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,columns=[{id:"job_name",header:t("projects.run.job_name"),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.FORMAT(projectName,runId,item.job_spec.job_name)},item.job_spec.job_name)}},{id:"submitted_at",header:t("projects.run.submitted_at"),cell:src_getJobSubmittedAt},{id:"status",header:t("projects.run.status"),cell:function(item){var status=src_getJobStatus(item);return
|
|
134173
|
+
var src_List_hooks_useColumnsDefinitions=function(_ref){var projectName=_ref.projectName,runId=_ref.runId,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,columns=[{id:"job_name",header:t("projects.run.job_name"),cell:function(item){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.FORMAT(projectName,runId,item.job_spec.job_name)},item.job_spec.job_name)}},{id:"submitted_at",header:t("projects.run.submitted_at"),cell:src_getJobSubmittedAt},{id:"status",header:t("projects.run.status"),cell:function(item){var status=src_getJobStatus(item);return/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(status,src_getJobTerminationReason(item))},src_getJobStatusMessage(item))}},{id:"error",header:t("projects.run.error"),cell:function(item){return src_getJobError(item)}},{id:"resources",header:"".concat(t("projects.run.resources")),cell:src_getJobListItemResources},{id:"spot",header:"".concat(t("projects.run.spot")),cell:src_getJobListItemSpot},{id:"price",header:"".concat(t("projects.run.price")),cell:src_getJobListItemPrice},{id:"instance",header:"".concat(t("projects.run.instance")),cell:src_getJobListItemInstance},{id:"region",header:"".concat(t("projects.run.region")),cell:src_getJobListItemRegion},{id:"backend",header:"".concat(t("projects.run.backend")),cell:src_getJobListItemBackend}];return{columns:columns}};
|
|
134144
134174
|
;// ./src/pages/Runs/Details/Jobs/List/index.tsx
|
|
134145
134175
|
var src_JobList=function(_ref){var jobs=_ref.jobs,projectName=_ref.projectName,runId=_ref.runId,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useColumnsDefinition=src_List_hooks_useColumnsDefinitions({projectName:projectName,runId:runId}),columns=_useColumnsDefinition.columns,_useCollection=src_use_collection_useCollection(jobs,{pagination:{pageSize:20}}),items=_useCollection.items,collectionProps=_useCollection.collectionProps,paginationProps=_useCollection.paginationProps;return/*#__PURE__*/src_react.createElement(src_table,src_extends_extends({},collectionProps,{columnDefinitions:columns,items:items,header:/*#__PURE__*/src_react.createElement(src_components_header_Header,null,t("projects.run.jobs")),pagination:/*#__PURE__*/src_react.createElement(src_pagination_Pagination,paginationProps)}))};
|
|
134146
134176
|
// EXTERNAL MODULE: ./node_modules/@xterm/addon-fit/lib/addon-fit.js
|
|
@@ -134158,7 +134188,7 @@ var src_getJobSubmissionId=function(run){var _lastJob$job_submissi;if(run){var l
|
|
|
134158
134188
|
// extracted by mini-css-extract-plugin
|
|
134159
134189
|
/* harmony default export */ const src_RunDetails_styles_module = ({"logs":"tVvb0"});
|
|
134160
134190
|
;// ./src/pages/Runs/Details/RunDetails/index.tsx
|
|
134161
|
-
var src_RunDetails=function(){var _params$projectName,_params$runId,_runData$run_spec$run,_runData$run_spec,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunId=null!==(_params$runId=params.runId)&&void 0!==_params$runId?_params$runId:"",_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,id:paramRunId}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading,serviceUrl=runData?src_getRunListItemServiceUrl(runData):null;return
|
|
134191
|
+
var src_RunDetails=function(){var _params$projectName,_params$runId,_runData$latest_job_s,_runData$latest_job_s2,_runData$latest_job_s3,_runData$run_spec$run,_runData$run_spec,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunId=null!==(_params$runId=params.runId)&&void 0!==_params$runId?_params$runId:"",_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,id:paramRunId}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading,serviceUrl=runData?src_getRunListItemServiceUrl(runData):null;if(isLoadingRun)return/*#__PURE__*/src_react.createElement(src_container_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null));if(!runData)return null;var status=null!==(_runData$latest_job_s=null===(_runData$latest_job_s2=runData.latest_job_submission)||void 0===_runData$latest_job_s2?void 0:_runData$latest_job_s2.status)&&void 0!==_runData$latest_job_s?_runData$latest_job_s:runData.status,terminationReason=null===(_runData$latest_job_s3=runData.latest_job_submission)||void 0===_runData$latest_job_s3?void 0:_runData$latest_job_s3.termination_reason;return/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_container_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("common.general"))},/*#__PURE__*/src_react.createElement(src_column_layout_ColumnLayout,{columns:4,variant:"text-grid"},/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.project")),/*#__PURE__*/src_react.createElement("div",null,runData.project_name)),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.repo")),/*#__PURE__*/src_react.createElement("div",null,(0,src_lodash.get)(runData.run_spec.repo_data,"repo_name",(0,src_lodash.get)(runData.run_spec.repo_data,"repo_dir","-")))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.hub_user_name")),/*#__PURE__*/src_react.createElement("div",null,runData.user)),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.configuration")),/*#__PURE__*/src_react.createElement("div",null,runData.run_spec.configuration_path)),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.submitted_at")),/*#__PURE__*/src_react.createElement("div",null,src_format_format(new Date(runData.submitted_at),src_consts_DATE_TIME_FORMAT))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.status")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(status,terminationReason),colorOverride:src_getStatusIconColor(status,terminationReason)},src_getRunStatusMessage(runData)))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.error")),/*#__PURE__*/src_react.createElement("div",null,src_getRunError(runData))),src_getRunListItemBackend(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.backend")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemBackend(runData))),src_getRunListItemRegion(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.region")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemRegion(runData))),src_getRunListItemInstanceId(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.instance_id")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemInstanceId(runData))),src_getRunListItemResources(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.resources")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemResources(runData))),src_getRunListItemSpot(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.spot")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemSpot(runData))),src_getRunListItemPrice(runData)&&/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.price")),/*#__PURE__*/src_react.createElement("div",null,src_getRunListItemPrice(runData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.cost")),/*#__PURE__*/src_react.createElement("div",null,"$",runData.cost))),serviceUrl&&/*#__PURE__*/src_react.createElement(src_column_layout_ColumnLayout,{columns:1,variant:"text-grid"},/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.service_url")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement("a",{href:serviceUrl},serviceUrl))))),1===runData.jobs.length&&/*#__PURE__*/src_react.createElement(src_Logs,{projectName:paramProjectName,runName:null!==(_runData$run_spec$run=null===runData||void 0===runData||null===(_runData$run_spec=runData.run_spec)||void 0===_runData$run_spec?void 0:_runData$run_spec.run_name)&&void 0!==_runData$run_spec$run?_runData$run_spec$run:"",jobSubmissionId:src_getJobSubmissionId(runData),className:src_RunDetails_styles_module.logs}),1<runData.jobs.length&&/*#__PURE__*/src_react.createElement(src_JobList,{projectName:paramProjectName,runId:paramRunId,jobs:runData.jobs}))};
|
|
134162
134192
|
;// ./src/pages/Runs/Details/Jobs/Metrics/consts.ts
|
|
134163
134193
|
var src_consts_second=1e3;var src_minute=60*src_consts_second;var src_hour=60*src_minute;var src_kByte=1024;var src_MByte=1024*src_kByte;var src_GByte=1024*src_MByte;var src_CPU_NUMS="cpus_detected_num";var src_ALL_CPU_USAGE="cpu_usage_percent";var src_MEMORY_WORKING_SET="memory_working_set_bytes";var src_MEMORY_TOTAL="memory_total_bytes";var src_EACH_GPU_USAGE_PREFIX="gpu_util_percent_gpu";var src_EACH_GPU_MEMORY_USAGE_PREFIX="gpu_memory_usage_bytes_gpu";var src_EACH_GPU_MEMORY_TOTAL="gpu_memory_total_bytes";
|
|
134164
134194
|
;// ./src/pages/Runs/Details/Jobs/Metrics/helpers.ts
|
|
@@ -134208,7 +134238,22 @@ var src_AmountField_AmountField=function(props){return/*#__PURE__*/src_react.cre
|
|
|
134208
134238
|
;// ./src/pages/User/Details/Billing/PayForm/index.tsx
|
|
134209
134239
|
var src_PayForm_MINIMAL_AMOUNT=5;var src_PayForm_PayForm=function(_ref){var defaultValues=_ref.defaultValues,isLoading=_ref.isLoading,onCancel=_ref.onCancel,onSubmitProp=_ref.onSubmit,_useTranslation=useTranslation(),t=_useTranslation.t,_useForm=useForm({defaultValues:defaultValues}),handleSubmit=_useForm.handleSubmit,control=_useForm.control;return/*#__PURE__*/React.createElement("form",{onSubmit:handleSubmit(function(values){onSubmitProp(values)})},/*#__PURE__*/React.createElement(FormUI,{actions:/*#__PURE__*/React.createElement(SpaceBetween,{direction:"horizontal",size:"xs"},/*#__PURE__*/React.createElement(Button,{formAction:"none",disabled:isLoading,variant:"link",onClick:onCancel},t("common.cancel")),/*#__PURE__*/React.createElement(Hotspot,{hotspotId:HotspotIds.PAYMENT_CONTINUE_BUTTON},/*#__PURE__*/React.createElement(Button,{loading:isLoading,disabled:isLoading,variant:"primary"},t("common.continue"))))},/*#__PURE__*/React.createElement(SpaceBetween,{size:"l"},/*#__PURE__*/React.createElement(AmountField,{label:t("billing.payment_amount"),description:t("billing.amount_description",{value:src_PayForm_MINIMAL_AMOUNT.toFixed(2)}),control:control,name:"amount",inputMode:"numeric",step:.01,disabled:isLoading,rules:{required:t("validation.required"),min:{value:src_PayForm_MINIMAL_AMOUNT,message:t("billing.min_amount_error_message",{value:src_PayForm_MINIMAL_AMOUNT})}}}))))};
|
|
134210
134240
|
;// ./src/pages/User/Details/Billing/index.tsx
|
|
134211
|
-
var src_Billing=function(){var _useAppSelector,_params$userName,_data$balance,_data$billing_history,_toFixed,_useTranslation=useTranslation(),t=_useTranslation.t,_useNotifications=useNotifications(),_useNotifications2=_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useSearchParams=useSearchParams(),_useSearchParams2=_slicedToArray(_useSearchParams,2),searchParams=_useSearchParams2[0],setSearchParams=_useSearchParams2[1],_useState=useState(!1),_useState2=_slicedToArray(_useState,2),showPaymentModal=_useState2[0],setShowPaymentModal=_useState2[1],userName=null!==(_useAppSelector=useAppSelector(selectUserName))&&void 0!==_useAppSelector?_useAppSelector:"",params=useParams(),paramUserName=null!==(_params$userName=params.userName)&&void 0!==_params$userName?_params$userName:"",_useGetUserBillingInf=useGetUserBillingInfoQuery({username:paramUserName}),data=_useGetUserBillingInf.data,isLoading=_useGetUserBillingInf.isLoading,_useUserBillingChecko=useUserBillingCheckoutSessionMutation(),_useUserBillingChecko2=_slicedToArray(_useUserBillingChecko,2),billingCheckout=_useUserBillingChecko2[0],isLoadingBillingCheckout=_useUserBillingChecko2[1].isLoading
|
|
134241
|
+
var src_Billing=function(){var _useAppSelector,_params$userName,_data$balance,_data$billing_history,_toFixed,_useTranslation=useTranslation(),t=_useTranslation.t,_useNotifications=useNotifications(),_useNotifications2=_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useSearchParams=useSearchParams(),_useSearchParams2=_slicedToArray(_useSearchParams,2),searchParams=_useSearchParams2[0],setSearchParams=_useSearchParams2[1],_useState=useState(!1),_useState2=_slicedToArray(_useState,2),showPaymentModal=_useState2[0],setShowPaymentModal=_useState2[1],userName=null!==(_useAppSelector=useAppSelector(selectUserName))&&void 0!==_useAppSelector?_useAppSelector:"",params=useParams(),paramUserName=null!==(_params$userName=params.userName)&&void 0!==_params$userName?_params$userName:"",_useGetUserBillingInf=useGetUserBillingInfoQuery({username:paramUserName}),data=_useGetUserBillingInf.data,isLoading=_useGetUserBillingInf.isLoading,_useUserBillingChecko=useUserBillingCheckoutSessionMutation(),_useUserBillingChecko2=_slicedToArray(_useUserBillingChecko,2),billingCheckout=_useUserBillingChecko2[0],isLoadingBillingCheckout=_useUserBillingChecko2[1].isLoading;// const [billingPortalSession, { isLoading: isLoadingBillingPortalSession }] = useUserBillingPortalSessionMutation();
|
|
134242
|
+
useBreadcrumbs([{text:t("navigation.account"),href:ROUTES.USER.LIST},{text:paramUserName,href:ROUTES.USER.DETAILS.FORMAT(paramUserName)}]),useEffect(function(){"success"===searchParams.get("payment_status")&&(pushNotification({type:"success",content:t("billing.payment_success_message")}),setSearchParams({}))},[]);var closeModal=function(){setShowPaymentModal(!1)};// const editPaymentMethod = () => {
|
|
134243
|
+
// billingPortalSession({
|
|
134244
|
+
// username: paramUserName,
|
|
134245
|
+
// })
|
|
134246
|
+
// .unwrap()
|
|
134247
|
+
// .then((data) => goToUrl(data.url))
|
|
134248
|
+
// .catch((error) => {
|
|
134249
|
+
// pushNotification({
|
|
134250
|
+
// type: 'error',
|
|
134251
|
+
// content: t('common.server_error', { error: getServerError(error) }),
|
|
134252
|
+
// });
|
|
134253
|
+
// })
|
|
134254
|
+
// .finally(closeModal);
|
|
134255
|
+
// };
|
|
134256
|
+
return/*#__PURE__*/React.createElement(SpaceBetween,{size:"l"},/*#__PURE__*/React.createElement(Container,{header:/*#__PURE__*/React.createElement(Header,{variant:"h2"},t("billing.balance"))},isLoading&&/*#__PURE__*/React.createElement(Loader,null),data&&/*#__PURE__*/React.createElement(SpaceBetween,{size:"m"},/*#__PURE__*/React.createElement(Box,{variant:"awsui-value-large"},centsToFormattedString(null!==(_data$balance=null===data||void 0===data?void 0:data.balance)&&void 0!==_data$balance?_data$balance:0,"$")),/*#__PURE__*/React.createElement(SpaceBetween,{direction:"horizontal",size:"m"},userName===paramUserName&&/*#__PURE__*/React.createElement(Hotspot,{renderHotspot:!showPaymentModal,hotspotId:HotspotIds.ADD_TOP_UP_BALANCE},/*#__PURE__*/React.createElement(Button,{formAction:"none",onClick:function(){setShowPaymentModal(!0)}},t("billing.top_up_balance")))))),/*#__PURE__*/React.createElement(Payments,{payments:null!==(_data$billing_history=null===data||void 0===data?void 0:data.billing_history)&&void 0!==_data$billing_history?_data$billing_history:[],isLoading:isLoading,tableHeaderContent:/*#__PURE__*/React.createElement(Header,{variant:"h2"},t("billing.billing_history"))}),/*#__PURE__*/React.createElement(PermissionGuard,{allowedGlobalRoles:[GlobalUserRole.ADMIN]},/*#__PURE__*/React.createElement(CreditsHistory,{username:paramUserName})),showPaymentModal&&/*#__PURE__*/React.createElement(Modal,{onDismiss:closeModal,visible:!0,closeAriaLabel:"Close modal",header:t("billing.top_up_balance")},data&&/*#__PURE__*/React.createElement(PayForm,{isLoading:isLoadingBillingCheckout,onCancel:closeModal,onSubmit:function(_ref){var amount=_ref.amount;billingCheckout({username:paramUserName,// Because the server needs amount value as cents
|
|
134212
134257
|
amount:100*amount}).unwrap().then(function(data){return goToUrl(data.url)}).catch(function(error){pushNotification({type:"error",content:t("common.server_error",{error:getServerError(error)})})}).finally(closeModal)},defaultValues:{// Todo решить с типама формы
|
|
134213
134258
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
134214
134259
|
// @ts-ignore
|
|
@@ -134218,7 +134263,9 @@ var src_UserProjectList=function(){var _params$userName,_useTranslation=src_useT
|
|
|
134218
134263
|
// @ts-ignore
|
|
134219
134264
|
},[data]),_useCollection=src_use_collection_useCollection(filteredData,{filtering:{empty:function(){return/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("projects.empty_message_title"),message:t("projects.empty_message_text")})}()},pagination:{pageSize:20},selection:{}}),items=_useCollection.items,collectionProps=_useCollection.collectionProps,paginationProps=_useCollection.paginationProps,columns=[{id:"project_name",header:"".concat(t("projects.edit.project_name")),cell:function(project){return/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.FORMAT(project.project_name)},project.project_name)}}];return/*#__PURE__*/src_react.createElement(src_table,src_extends_extends({},collectionProps,{columnDefinitions:columns,items:items,loading:isLoading||isFetching,loadingText:t("common.loading"),pagination:/*#__PURE__*/src_react.createElement(src_pagination_Pagination,src_extends_extends({},paginationProps,{disabled:isLoading}))}))};
|
|
134220
134265
|
;// ./src/pages/User/Details/index.tsx
|
|
134221
|
-
|
|
134266
|
+
// import { GlobalUserRole } from '../../../types';
|
|
134267
|
+
var src_UserDetails=function(){var _params$userName,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),showDeleteConfirm=_useState2[0],setShowConfirmDelete=_useState2[1],params=src_dist_useParams(),paramUserName=null!==(_params$userName=params.userName)&&void 0!==_params$userName?_params$userName:"",navigate=src_dist_useNavigate(),_useGetUserQuery=src_useGetUserQuery({name:paramUserName}),userError=_useGetUserQuery.error,_useDeleteUsersMutati=src_useDeleteUsersMutation(),_useDeleteUsersMutati2=src_slicedToArray_slicedToArray(_useDeleteUsersMutati,1),deleteUsers/*, { isLoading: isDeleting }*/=_useDeleteUsersMutati2[0],_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0];// const [isAvailableDeleteUser] = usePermissionGuard({ allowedGlobalRoles: [GlobalUserRole.ADMIN] });
|
|
134268
|
+
(0,src_react.useEffect)(function(){404===(null===userError||void 0===userError?void 0:userError.status)&&src_riseRouterException()},[userError]);var tabs=[{label:t("users.settings"),id:src_UserDetailsTabTypeEnum.SETTINGS,href:src_routes_ROUTES.USER.DETAILS.FORMAT(paramUserName)}, false&&0,{label:t("users.projects"),id:src_UserDetailsTabTypeEnum.PROJECTS,href:src_routes_ROUTES.USER.PROJECTS.FORMAT(paramUserName)}].filter(Boolean);return/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_ContentLayout,{header:/*#__PURE__*/src_react.createElement(src_DetailsHeader,{title:paramUserName// deleteAction={isAvailableDeleteUser ? toggleDeleteConfirm : undefined}
|
|
134222
134269
|
// deleteDisabled={isDeleting}
|
|
134223
134270
|
})},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},/*#__PURE__*/src_react.createElement("div",null),/*#__PURE__*/src_react.createElement("div",null),/*#__PURE__*/src_react.createElement(src_Tabs_Tabs,{withNavigation:!0,tabs:tabs}),/*#__PURE__*/src_react.createElement(src_Outlet,null))),/*#__PURE__*/src_react.createElement(src_ConfirmationDialog,{visible:showDeleteConfirm,onDiscard:function(){setShowConfirmDelete(function(val){return!val})},onConfirm:function(){deleteUsers([paramUserName]).unwrap().then(function(){return navigate(src_routes_ROUTES.USER.LIST)}).catch(function(error){pushNotification({type:"error",content:t("common.server_error",{error:src_serverErrors_getServerError(error)})})}),setShowConfirmDelete(!1)}}))};
|
|
134224
134271
|
;// ./src/pages/User/Form/index.tsx
|
|
@@ -134242,7 +134289,7 @@ var src_User=function(){return null};
|
|
|
134242
134289
|
// extracted by mini-css-extract-plugin
|
|
134243
134290
|
/* harmony default export */ const src_JobDetails_styles_module = ({"details":"OBVS0","logs":"mMHsi"});
|
|
134244
134291
|
;// ./src/pages/Runs/Details/Jobs/Details/JobDetails/index.tsx
|
|
134245
|
-
var src_JobDetails_getJobSubmissionId=function(job){var _job$job_submissions;return job?null===(_job$job_submissions=job.job_submissions[job.job_submissions.length-1])||void 0===_job$job_submissions?void 0:_job$job_submissions.id:void 0};var src_JobDetails=function(){var _params$projectName,_params$runId,_params$jobName,_runData$run_spec$run,_runData$run_spec,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunId=null!==(_params$runId=params.runId)&&void 0!==_params$runId?_params$runId:"",paramJobName=null!==(_params$jobName=params.jobName)&&void 0!==_params$jobName?_params$jobName:"",_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,id:paramRunId}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading,jobData=(0,src_react.useMemo)(function(){var _runData$jobs$find;return runData?null!==(_runData$jobs$find=runData.jobs.find(function(job){return job.job_spec.job_name===paramJobName}))&&void 0!==_runData$jobs$find?_runData$jobs$find:null:null},[runData]);return isLoadingRun?/*#__PURE__*/src_react.createElement(src_container_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)):jobData?/*#__PURE__*/src_react.createElement("div",{className:src_JobDetails_styles_module.details},/*#__PURE__*/src_react.createElement(src_container_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("common.general"))},/*#__PURE__*/src_react.createElement(src_column_layout_ColumnLayout,{columns:4,variant:"text-grid"},/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.submitted_at")),/*#__PURE__*/src_react.createElement("div",null,src_getJobSubmittedAt(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.status")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(src_getJobStatus(jobData))},
|
|
134292
|
+
var src_JobDetails_getJobSubmissionId=function(job){var _job$job_submissions;return job?null===(_job$job_submissions=job.job_submissions[job.job_submissions.length-1])||void 0===_job$job_submissions?void 0:_job$job_submissions.id:void 0};var src_JobDetails=function(){var _params$projectName,_params$runId,_params$jobName,_runData$run_spec$run,_runData$run_spec,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunId=null!==(_params$runId=params.runId)&&void 0!==_params$runId?_params$runId:"",paramJobName=null!==(_params$jobName=params.jobName)&&void 0!==_params$jobName?_params$jobName:"",_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,id:paramRunId}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading,jobData=(0,src_react.useMemo)(function(){var _runData$jobs$find;return runData?null!==(_runData$jobs$find=runData.jobs.find(function(job){return job.job_spec.job_name===paramJobName}))&&void 0!==_runData$jobs$find?_runData$jobs$find:null:null},[runData]);return isLoadingRun?/*#__PURE__*/src_react.createElement(src_container_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)):jobData?/*#__PURE__*/src_react.createElement("div",{className:src_JobDetails_styles_module.details},/*#__PURE__*/src_react.createElement(src_container_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("common.general"))},/*#__PURE__*/src_react.createElement(src_column_layout_ColumnLayout,{columns:4,variant:"text-grid"},/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.submitted_at")),/*#__PURE__*/src_react.createElement("div",null,src_getJobSubmittedAt(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.status")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:src_getStatusIconType(src_getJobStatus(jobData),src_getJobTerminationReason(jobData))},src_getJobStatusMessage(jobData)))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.error")),/*#__PURE__*/src_react.createElement("div",null,src_getJobError(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.backend")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemBackend(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.region")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemRegion(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.instance")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemInstance(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.resources")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemResources(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.spot")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemSpot(jobData))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("projects.run.price")),/*#__PURE__*/src_react.createElement("div",null,src_getJobListItemPrice(jobData))))),/*#__PURE__*/src_react.createElement(src_Logs,{projectName:paramProjectName,runName:null!==(_runData$run_spec$run=null===runData||void 0===runData||null===(_runData$run_spec=runData.run_spec)||void 0===_runData$run_spec?void 0:_runData$run_spec.run_name)&&void 0!==_runData$run_spec$run?_runData$run_spec$run:"",jobSubmissionId:src_JobDetails_getJobSubmissionId(jobData),className:src_JobDetails_styles_module.logs})):null};
|
|
134246
134293
|
;// ./src/services/volume.ts
|
|
134247
134294
|
var src_volumeApi=src_rtk_query_react_esm_createApi({reducerPath:"volumeApi",baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),tagTypes:["Volumes"],endpoints:function(builder){return{getAllVolumes:builder.query({query:function(body){return{url:src_API.VOLUME.LIST(),method:"POST",body:body}},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref){var id=_ref.id;return{type:"Volumes",id:id}})),["Volumes"]):["Volumes"]}}),deleteVolumes:builder.mutation({query:function(_ref2){var project_name=_ref2.project_name,names=_ref2.names;return{url:src_API.PROJECTS.VOLUMES_DELETE(project_name),method:"POST",body:{names:names}}},invalidatesTags:function(){return["Volumes"]}})}}});var src_useLazyGetAllVolumesQuery=src_volumeApi.useLazyGetAllVolumesQuery,src_useDeleteVolumesMutation=src_volumeApi.useDeleteVolumesMutation;
|
|
134248
134295
|
;// ./src/libs/volumes.ts
|
|
@@ -136477,4 +136524,4 @@ var src_container=document.getElementById("root"),src_src_theme={tokens:{fontFam
|
|
|
136477
136524
|
|
|
136478
136525
|
/******/ })()
|
|
136479
136526
|
;
|
|
136480
|
-
//# sourceMappingURL=main-
|
|
136527
|
+
//# sourceMappingURL=main-b0e80f8e26a168c129e9.js.map
|