dstack 0.19.16__py3-none-any.whl → 0.19.18__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/secrets.py +92 -0
- dstack/_internal/cli/main.py +2 -0
- dstack/_internal/cli/services/completion.py +5 -0
- dstack/_internal/cli/services/configurators/fleet.py +13 -1
- dstack/_internal/cli/services/configurators/run.py +59 -17
- dstack/_internal/cli/utils/secrets.py +25 -0
- dstack/_internal/core/backends/__init__.py +10 -4
- dstack/_internal/core/backends/aws/compute.py +237 -18
- dstack/_internal/core/backends/base/compute.py +20 -2
- dstack/_internal/core/backends/cudo/compute.py +23 -9
- dstack/_internal/core/backends/gcp/compute.py +13 -7
- dstack/_internal/core/backends/lambdalabs/compute.py +2 -1
- dstack/_internal/core/compatibility/fleets.py +12 -11
- dstack/_internal/core/compatibility/gateways.py +9 -8
- dstack/_internal/core/compatibility/logs.py +4 -3
- dstack/_internal/core/compatibility/runs.py +41 -17
- dstack/_internal/core/compatibility/volumes.py +9 -8
- dstack/_internal/core/errors.py +4 -0
- dstack/_internal/core/models/common.py +7 -0
- dstack/_internal/core/models/configurations.py +11 -0
- dstack/_internal/core/models/files.py +67 -0
- dstack/_internal/core/models/runs.py +14 -0
- dstack/_internal/core/models/secrets.py +9 -2
- dstack/_internal/core/services/diff.py +36 -3
- dstack/_internal/server/app.py +22 -0
- dstack/_internal/server/background/__init__.py +61 -37
- dstack/_internal/server/background/tasks/process_fleets.py +19 -3
- dstack/_internal/server/background/tasks/process_gateways.py +1 -1
- dstack/_internal/server/background/tasks/process_instances.py +13 -2
- dstack/_internal/server/background/tasks/process_placement_groups.py +4 -2
- dstack/_internal/server/background/tasks/process_running_jobs.py +123 -15
- dstack/_internal/server/background/tasks/process_runs.py +23 -7
- dstack/_internal/server/background/tasks/process_submitted_jobs.py +36 -7
- dstack/_internal/server/background/tasks/process_terminating_jobs.py +5 -3
- dstack/_internal/server/background/tasks/process_volumes.py +2 -2
- dstack/_internal/server/migrations/versions/5f1707c525d2_add_filearchivemodel.py +39 -0
- dstack/_internal/server/migrations/versions/644b8a114187_add_secretmodel.py +49 -0
- dstack/_internal/server/models.py +33 -0
- dstack/_internal/server/routers/files.py +67 -0
- dstack/_internal/server/routers/secrets.py +57 -15
- dstack/_internal/server/schemas/files.py +5 -0
- dstack/_internal/server/schemas/runner.py +2 -0
- dstack/_internal/server/schemas/secrets.py +7 -11
- dstack/_internal/server/services/backends/__init__.py +1 -1
- dstack/_internal/server/services/files.py +91 -0
- dstack/_internal/server/services/fleets.py +5 -4
- dstack/_internal/server/services/gateways/__init__.py +4 -2
- dstack/_internal/server/services/jobs/__init__.py +19 -8
- dstack/_internal/server/services/jobs/configurators/base.py +25 -3
- dstack/_internal/server/services/jobs/configurators/dev.py +3 -3
- dstack/_internal/server/services/locking.py +101 -12
- dstack/_internal/server/services/proxy/repo.py +3 -0
- dstack/_internal/server/services/runner/client.py +8 -0
- dstack/_internal/server/services/runs.py +76 -47
- dstack/_internal/server/services/secrets.py +204 -0
- dstack/_internal/server/services/storage/base.py +21 -0
- dstack/_internal/server/services/storage/gcs.py +28 -6
- dstack/_internal/server/services/storage/s3.py +27 -9
- dstack/_internal/server/services/volumes.py +2 -2
- dstack/_internal/server/settings.py +19 -5
- dstack/_internal/server/statics/index.html +1 -1
- dstack/_internal/server/statics/{main-a4eafa74304e587d037c.js → main-d1ac2e8c38ed5f08a114.js} +86 -34
- dstack/_internal/server/statics/{main-a4eafa74304e587d037c.js.map → main-d1ac2e8c38ed5f08a114.js.map} +1 -1
- dstack/_internal/server/statics/{main-f53d6d0d42f8d61df1de.css → main-d58fc0460cb0eae7cb5c.css} +1 -1
- dstack/_internal/server/statics/static/media/google.b194b06fafd0a52aeb566922160ea514.svg +1 -0
- dstack/_internal/server/testing/common.py +50 -8
- dstack/_internal/settings.py +4 -0
- dstack/_internal/utils/files.py +69 -0
- dstack/_internal/utils/nested_list.py +47 -0
- dstack/_internal/utils/path.py +12 -4
- dstack/api/_public/runs.py +67 -7
- dstack/api/server/__init__.py +6 -0
- dstack/api/server/_files.py +18 -0
- dstack/api/server/_secrets.py +15 -15
- dstack/version.py +1 -1
- {dstack-0.19.16.dist-info → dstack-0.19.18.dist-info}/METADATA +13 -13
- {dstack-0.19.16.dist-info → dstack-0.19.18.dist-info}/RECORD +80 -67
- {dstack-0.19.16.dist-info → dstack-0.19.18.dist-info}/WHEEL +0 -0
- {dstack-0.19.16.dist-info → dstack-0.19.18.dist-info}/entry_points.txt +0 -0
- {dstack-0.19.16.dist-info → dstack-0.19.18.dist-info}/licenses/LICENSE.md +0 -0
dstack/_internal/server/statics/{main-a4eafa74304e587d037c.js → main-d1ac2e8c38ed5f08a114.js}
RENAMED
|
@@ -117157,7 +117157,7 @@ src_applyDisplayName(src_Checkbox, 'Checkbox');
|
|
|
117157
117157
|
/* harmony default export */ const src_components_checkbox = (src_Checkbox);
|
|
117158
117158
|
//# sourceMappingURL=index.js.map
|
|
117159
117159
|
;// ./src/components/form/Checkbox/index.tsx
|
|
117160
|
-
var src_Checkbox_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","checkboxLabel","onChange"],src_Checkbox_excluded2=["onChange","value"];var src_FormCheckbox=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,checkboxLabel=_ref.checkboxLabel,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Checkbox_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,value=_ref2$field.value,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Checkbox_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,/*#__PURE__*/src_react.createElement(src_components_checkbox,src_extends_extends({},fieldRest,props,{checked:value,onChange:function(event){_onChange(event.detail.checked),onChangeProp
|
|
117160
|
+
var src_Checkbox_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","checkboxLabel","onChange"],src_Checkbox_excluded2=["onChange","value"];var src_FormCheckbox=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,checkboxLabel=_ref.checkboxLabel,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Checkbox_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,value=_ref2$field.value,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Checkbox_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,/*#__PURE__*/src_react.createElement(src_components_checkbox,src_extends_extends({},fieldRest,props,{checked:value,onChange:function(event){_onChange(event.detail.checked),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}}),checkboxLabel))}})};
|
|
117161
117161
|
;// ./node_modules/@cloudscape-design/components/hotspot/styles.scoped.css
|
|
117162
117162
|
// extracted by mini-css-extract-plugin
|
|
117163
117163
|
|
|
@@ -117206,11 +117206,11 @@ function src_hotspot_Hotspot(_a) {
|
|
|
117206
117206
|
src_applyDisplayName(src_hotspot_Hotspot, 'Hotspot');
|
|
117207
117207
|
//# sourceMappingURL=index.js.map
|
|
117208
117208
|
;// ./src/components/form/Input/index.tsx
|
|
117209
|
-
var src_Input_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","hotspotId","onChange"],src_Input_excluded2=["onChange"];function src_Input_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_Input_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_Input_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_Input_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_FormInput=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,hotspotId=_ref.hotspotId,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Input_excluded),renderInput=function(renderProps){return/*#__PURE__*/src_react.createElement(src_input,renderProps)};return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Input_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,hotspotId?/*#__PURE__*/src_react.createElement(src_hotspot_Hotspot,{hotspotId:hotspotId},renderInput(src_Input_objectSpread(src_Input_objectSpread(src_Input_objectSpread({},fieldRest),props),{},{invalid:!!error,onChange:function(event){_onChange(event.detail.value),onChangeProp
|
|
117209
|
+
var src_Input_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","hotspotId","onChange"],src_Input_excluded2=["onChange"];function src_Input_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_Input_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_Input_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_Input_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_FormInput=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,hotspotId=_ref.hotspotId,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Input_excluded),renderInput=function(renderProps){return/*#__PURE__*/src_react.createElement(src_input,renderProps)};return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Input_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,hotspotId?/*#__PURE__*/src_react.createElement(src_hotspot_Hotspot,{hotspotId:hotspotId},renderInput(src_Input_objectSpread(src_Input_objectSpread(src_Input_objectSpread({},fieldRest),props),{},{invalid:!!error,onChange:function(event){_onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}}))):renderInput(src_Input_objectSpread(src_Input_objectSpread(src_Input_objectSpread({},fieldRest),props),{},{invalid:!!error,onChange:function(event){_onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}})))}})};
|
|
117210
117210
|
;// ./src/components/form/Multiselect/index.tsx
|
|
117211
|
-
var src_Multiselect_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"])),src_Multiselect_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormMultiselect=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_Multiselect_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _props$options$filter,_props$options,_ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_Multiselect_excluded2),error=_ref2.fieldState.error,selectedOptions=null!==(_props$options$filter=null===(_props$options=props.options)||void 0===_props$options?void 0:_props$options.filter(function(i){var _fieldRest$value;return null===(_fieldRest$value=fieldRest.value)||void 0===_fieldRest$value?void 0:_fieldRest$value.includes(i.value)}))&&void 0!==_props$options$filter?_props$options$filter:null;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement(MultiselectCSD,_extends({selectedOptions:selectedOptions,onChange:function(event){var value=event.detail.selectedOptions.map(function(item){return item.value});onChange(value),onChangeProp
|
|
117211
|
+
var src_Multiselect_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"])),src_Multiselect_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormMultiselect=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_Multiselect_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _props$options$filter,_props$options,_ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_Multiselect_excluded2),error=_ref2.fieldState.error,selectedOptions=null!==(_props$options$filter=null===(_props$options=props.options)||void 0===_props$options?void 0:_props$options.filter(function(i){var _fieldRest$value;return null===(_fieldRest$value=fieldRest.value)||void 0===_fieldRest$value?void 0:_fieldRest$value.includes(i.value)}))&&void 0!==_props$options$filter?_props$options$filter:null;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement(MultiselectCSD,_extends({selectedOptions:selectedOptions,onChange:function(event){var value=event.detail.selectedOptions.map(function(item){return item.value});onChange(value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}},fieldRest,props,{invalid:!!error})))}})};
|
|
117212
117212
|
;// ./src/components/form/Select/index.tsx
|
|
117213
|
-
var src_Select_excluded=["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"],src_Select_excluded2=["onChange"];var src_FormSelect=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Select_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _props$options$find,_props$options,_ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Select_excluded2),error=_ref2.fieldState.error,selectedOption=null!==(_props$options$find=null===(_props$options=props.options)||void 0===_props$options?void 0:_props$options.find(function(i){return i.value===fieldRest.value}))&&void 0!==_props$options$find?_props$options$find:null;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/src_react.createElement(src_components_select,src_extends_extends({selectedOption:selectedOption,onChange:function(event){onChange(event.detail.selectedOption.value),onChangeProp
|
|
117213
|
+
var src_Select_excluded=["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"],src_Select_excluded2=["onChange"];var src_FormSelect=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Select_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _props$options$find,_props$options,_ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Select_excluded2),error=_ref2.fieldState.error,selectedOption=null!==(_props$options$find=null===(_props$options=props.options)||void 0===_props$options?void 0:_props$options.find(function(i){return i.value===fieldRest.value}))&&void 0!==_props$options$find?_props$options$find:null;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/src_react.createElement(src_components_select,src_extends_extends({selectedOption:selectedOption,onChange:function(event){onChange(event.detail.selectedOption.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}},fieldRest,props,{invalid:!!error})))}})};
|
|
117214
117214
|
;// ./node_modules/@cloudscape-design/components/textarea/styles.scoped.css
|
|
117215
117215
|
// extracted by mini-css-extract-plugin
|
|
117216
117216
|
|
|
@@ -117289,7 +117289,7 @@ src_applyDisplayName(src_Textarea, 'Textarea');
|
|
|
117289
117289
|
/* harmony default export */ const src_components_textarea = (src_Textarea);
|
|
117290
117290
|
//# sourceMappingURL=index.js.map
|
|
117291
117291
|
;// ./src/components/form/Textarea/index.tsx
|
|
117292
|
-
var src_Textarea_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","onChange"],src_Textarea_excluded2=["onChange"];var src_FormTextarea=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Textarea_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Textarea_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,/*#__PURE__*/src_react.createElement(src_components_textarea,src_extends_extends({},fieldRest,props,{invalid:!!error,onChange:function(event){_onChange(event.detail.value),onChangeProp
|
|
117292
|
+
var src_Textarea_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","leftContent","onChange"],src_Textarea_excluded2=["onChange"];var src_FormTextarea=function(_ref){var name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,leftContent=_ref.leftContent,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Textarea_excluded);return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_Textarea_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},leftContent,/*#__PURE__*/src_react.createElement(src_components_textarea,src_extends_extends({},fieldRest,props,{invalid:!!error,onChange:function(event){_onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}})))}})};
|
|
117293
117293
|
// EXTERNAL MODULE: ./node_modules/ace-builds/src-noconflict/ace.js
|
|
117294
117294
|
var src_ace = __webpack_require__(952);
|
|
117295
117295
|
var src_ace_default = /*#__PURE__*/__webpack_require__.n(src_ace);
|
|
@@ -121005,8 +121005,9 @@ function src_serverErrors(error){var _data;return"object"===_typeof(error)&&null
|
|
|
121005
121005
|
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}
|
|
121006
121006
|
;// ./src/libs/index.ts
|
|
121007
121007
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
121008
|
-
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")
|
|
121009
|
-
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)
|
|
121008
|
+
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");// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
121009
|
+
}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";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);// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
121010
|
+
}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)};
|
|
121010
121011
|
;// ./src/hooks/useNotifications.ts
|
|
121011
121012
|
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)}]};
|
|
121012
121013
|
;// ./src/hooks/useHelpPanel.ts
|
|
@@ -121853,16 +121854,16 @@ var src_mode_yaml = __webpack_require__(766);
|
|
|
121853
121854
|
// EXTERNAL MODULE: ./node_modules/ace-builds/src-noconflict/ext-language_tools.js
|
|
121854
121855
|
var src_ext_language_tools = __webpack_require__(47);
|
|
121855
121856
|
;// ./src/components/form/CodeEditor/index.tsx
|
|
121856
|
-
var src_CodeEditor_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","onChange"],src_CodeEditor_excluded2=["onChange"];src_ace_default().config.set("useWorker",!1);var src_FormCodeEditor=function(_ref){var _useAppSelector,name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_CodeEditor_excluded),systemMode=null!==(_useAppSelector=src_hooks_useAppSelector(src_selectSystemMode))&&void 0!==_useAppSelector?_useAppSelector:"",_useState=(0,src_react.useState)(function(){return{theme:systemMode===src_Mode.Dark?"cloud_editor_dark":"cloud_editor"}}),_useState2=src_slicedToArray_slicedToArray(_useState,2),codeEditorPreferences=_useState2[0],setCodeEditorPreferences=_useState2[1];(0,src_react.useEffect)(function(){systemMode===src_Mode.Dark?setCodeEditorPreferences({theme:"cloud_editor_dark"}):setCodeEditorPreferences({theme:"cloud_editor"})},[systemMode]);var onCodeEditorPreferencesChange=function(e){setCodeEditorPreferences(e.detail)};return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_CodeEditor_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/src_react.createElement(src_code_editor,src_extends_extends({},fieldRest,props,{i18nStrings:src_CODE_EDITOR_I18N_STRINGS,ace:(src_ace_default()),onChange:function(event){_onChange(event.detail.value),onChangeProp
|
|
121857
|
+
var src_CodeEditor_excluded=["name","control","rules","label","info","constraintText","description","secondaryControl","stretch","onChange"],src_CodeEditor_excluded2=["onChange"];src_ace_default().config.set("useWorker",!1);var src_FormCodeEditor=function(_ref){var _useAppSelector,name=_ref.name,control=_ref.control,rules=_ref.rules,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_CodeEditor_excluded),systemMode=null!==(_useAppSelector=src_hooks_useAppSelector(src_selectSystemMode))&&void 0!==_useAppSelector?_useAppSelector:"",_useState=(0,src_react.useState)(function(){return{theme:systemMode===src_Mode.Dark?"cloud_editor_dark":"cloud_editor"}}),_useState2=src_slicedToArray_slicedToArray(_useState,2),codeEditorPreferences=_useState2[0],setCodeEditorPreferences=_useState2[1];(0,src_react.useEffect)(function(){systemMode===src_Mode.Dark?setCodeEditorPreferences({theme:"cloud_editor_dark"}):setCodeEditorPreferences({theme:"cloud_editor"})},[systemMode]);var onCodeEditorPreferencesChange=function(e){setCodeEditorPreferences(e.detail)};return/*#__PURE__*/src_react.createElement(src_index_esm_Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,_onChange=_ref2$field.onChange,fieldRest=src_objectWithoutProperties_objectWithoutProperties(_ref2$field,src_CodeEditor_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/src_react.createElement(src_form_field_FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/src_react.createElement(src_code_editor,src_extends_extends({},fieldRest,props,{i18nStrings:src_CODE_EDITOR_I18N_STRINGS,ace:(src_ace_default()),onChange:function(event){_onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)},themes:{light:[],dark:[]},preferences:codeEditorPreferences,onPreferencesChange:onCodeEditorPreferencesChange})))}})};
|
|
121857
121858
|
;// ./src/components/form/RadioButtons/index.tsx
|
|
121858
|
-
var src_RadioButtons_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"])),src_RadioButtons_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormRadioButtons=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_RadioButtons_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_RadioButtons_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement(RadioGroup,_extends({onChange:function(event){onChange(event.detail.value),onChangeProp
|
|
121859
|
+
var src_RadioButtons_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","info","constraintText","description","secondaryControl","stretch","onChange"])),src_RadioButtons_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormRadioButtons=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_RadioButtons_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref2){var _ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_RadioButtons_excluded2),error=_ref2.fieldState.error;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement(RadioGroup,_extends({onChange:function(event){onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}},fieldRest,props)))}})};
|
|
121859
121860
|
;// ./src/components/form/S3BucketSelector/styles.module.scss
|
|
121860
121861
|
// extracted by mini-css-extract-plugin
|
|
121861
121862
|
/* harmony default export */ const src_S3BucketSelector_styles_module = ({"bucketSelector":"os81H"});
|
|
121862
121863
|
;// ./src/components/form/S3BucketSelector/index.tsx
|
|
121863
|
-
var src_S3BucketSelector_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","buckets","info","constraintText","description","secondaryControl","stretch","onChange","disabled","prefix","i18nStrings"])),src_S3BucketSelector_excluded2=(/* unused pure expression or super */ null && (["onChange","value"]));var src_FormS3BucketSelector=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,bucketsProp=_ref.buckets,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,disabled=_ref.disabled,_ref$prefix=_ref.prefix,prefix=void 0===_ref$prefix?"s3://":_ref$prefix,i18nStrings=_ref.i18nStrings,props=_objectWithoutProperties(_ref,src_S3BucketSelector_excluded),fetch=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.abrupt("return",Promise.resolve([]));case 1:case"end":return _context.stop()}},_callee)}));return function(){return _ref2.apply(this,arguments)}}(),lastValue=useRef(null),buckets=useMemo(function(){return bucketsProp.map(function(i){return{Name:i.name,CreationDate:i.created,Region:i.region}})},[bucketsProp]),customProps={bucketsVisibleColumns:["Name"],fetchBuckets:function(){return Promise.resolve(buckets)},fetchObjects:fetch,fetchVersions:fetch,i18nStrings:getResourceSelectorI18n(prefix,i18nStrings)};return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref3){var _ref3$field=_ref3.field,onChange=_ref3$field.onChange,value=_ref3$field.value,fieldRest=_objectWithoutProperties(_ref3$field,src_S3BucketSelector_excluded2),error=_ref3.fieldState.error;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement("div",{className:cn(styles.bucketSelector,{disabled:disabled})},/*#__PURE__*/React.createElement(S3ResourceSelector,_extends({resource:{uri:value},onChange:function(event){var bucket=event.detail.resource.uri.replace(/^s3:\/\//,"");lastValue.current===bucket||(lastValue.current=bucket,onChange(bucket),onChangeProp
|
|
121864
|
+
var src_S3BucketSelector_excluded=(/* unused pure expression or super */ null && (["name","rules","control","label","buckets","info","constraintText","description","secondaryControl","stretch","onChange","disabled","prefix","i18nStrings"])),src_S3BucketSelector_excluded2=(/* unused pure expression or super */ null && (["onChange","value"]));var src_FormS3BucketSelector=function(_ref){var name=_ref.name,rules=_ref.rules,control=_ref.control,label=_ref.label,bucketsProp=_ref.buckets,info=_ref.info,constraintText=_ref.constraintText,description=_ref.description,secondaryControl=_ref.secondaryControl,stretch=_ref.stretch,onChangeProp=_ref.onChange,disabled=_ref.disabled,_ref$prefix=_ref.prefix,prefix=void 0===_ref$prefix?"s3://":_ref$prefix,i18nStrings=_ref.i18nStrings,props=_objectWithoutProperties(_ref,src_S3BucketSelector_excluded),fetch=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.abrupt("return",Promise.resolve([]));case 1:case"end":return _context.stop()}},_callee)}));return function(){return _ref2.apply(this,arguments)}}(),lastValue=useRef(null),buckets=useMemo(function(){return bucketsProp.map(function(i){return{Name:i.name,CreationDate:i.created,Region:i.region}})},[bucketsProp]),customProps={bucketsVisibleColumns:["Name"],fetchBuckets:function(){return Promise.resolve(buckets)},fetchObjects:fetch,fetchVersions:fetch,i18nStrings:getResourceSelectorI18n(prefix,i18nStrings)};return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,rules:rules,render:function(_ref3){var _ref3$field=_ref3.field,onChange=_ref3$field.onChange,value=_ref3$field.value,fieldRest=_objectWithoutProperties(_ref3$field,src_S3BucketSelector_excluded2),error=_ref3.fieldState.error;return/*#__PURE__*/React.createElement(FormField,{description:description,label:label,info:info,stretch:stretch,constraintText:constraintText,secondaryControl:secondaryControl,errorText:null===error||void 0===error?void 0:error.message},/*#__PURE__*/React.createElement("div",{className:cn(styles.bucketSelector,{disabled:disabled})},/*#__PURE__*/React.createElement(S3ResourceSelector,_extends({resource:{uri:value},onChange:function(event){var bucket=event.detail.resource.uri.replace(/^s3:\/\//,"");lastValue.current===bucket||(lastValue.current=bucket,onChange(bucket),null===onChangeProp||void 0===onChangeProp||onChangeProp(event))}},fieldRest,props,customProps,{invalid:!!error}))))}})};
|
|
121864
121865
|
;// ./src/components/form/Tiles/index.tsx
|
|
121865
|
-
var src_Tiles_excluded=(/* unused pure expression or super */ null && (["name","control","onChange"])),src_Tiles_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormTiles=function(_ref){var name=_ref.name,control=_ref.control,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_Tiles_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,render:function(_ref2){var _ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_Tiles_excluded2);return/*#__PURE__*/React.createElement(Tiles,_extends({onChange:function(event){onChange(event.detail.value),onChangeProp
|
|
121866
|
+
var src_Tiles_excluded=(/* unused pure expression or super */ null && (["name","control","onChange"])),src_Tiles_excluded2=(/* unused pure expression or super */ null && (["onChange"]));var src_FormTiles=function(_ref){var name=_ref.name,control=_ref.control,onChangeProp=_ref.onChange,props=_objectWithoutProperties(_ref,src_Tiles_excluded);return/*#__PURE__*/React.createElement(Controller,{name:name,control:control,render:function(_ref2){var _ref2$field=_ref2.field,onChange=_ref2$field.onChange,fieldRest=_objectWithoutProperties(_ref2$field,src_Tiles_excluded2);return/*#__PURE__*/React.createElement(Tiles,_extends({onChange:function(event){onChange(event.detail.value),null===onChangeProp||void 0===onChangeProp||onChangeProp(event)}},fieldRest,props))}})};
|
|
121866
121867
|
;// ./node_modules/react-transition-group/esm/utils/ChildMapping.js
|
|
121867
121868
|
|
|
121868
121869
|
/**
|
|
@@ -123033,8 +123034,7 @@ var src_Notifications_Notifications=function(){var notifications=src_hooks_useAp
|
|
|
123033
123034
|
;// ./src/components/ConfirmationDialog/index.tsx
|
|
123034
123035
|
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)};
|
|
123035
123036
|
;// ./src/components/FileUploader/FileEntry/index.tsx
|
|
123036
|
-
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)
|
|
123037
|
-
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))};
|
|
123037
|
+
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);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))};
|
|
123038
123038
|
;// ./src/components/FileUploader/Token/styles.module.scss
|
|
123039
123039
|
// extracted by mini-css-extract-plugin
|
|
123040
123040
|
/* harmony default export */ const src_Token_styles_module = ({"tokenPanel":"qExbS"});
|
|
@@ -123698,8 +123698,7 @@ src_applyDisplayName(src_Tabs, 'Tabs');
|
|
|
123698
123698
|
// extracted by mini-css-extract-plugin
|
|
123699
123699
|
/* harmony default export */ const src_Tabs_styles_module = ({"tabs":"JUM2H","hasContent":"Xlnx0"});
|
|
123700
123700
|
;// ./src/components/Tabs/index.tsx
|
|
123701
|
-
var src_Tabs_excluded=["className","withNavigation","onChange","activeTabId"];var src_Tabs_Tabs=function(_ref){var className=_ref.className,withNavigation=_ref.withNavigation,onChange=_ref.onChange,activeTabIdProp=_ref.activeTabId,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Tabs_excluded),navigate=src_dist_useNavigate(),_useLocation=src_dist_useLocation(),pathname=_useLocation.pathname,hasContent=(0,src_react.useMemo)(function(){return props.tabs.some(function(tab){return!!tab.content})},[props.tabs]),activeTabId=(0,src_react.useMemo)(function(){if(activeTabIdProp)return activeTabIdProp;if(withNavigation){var tab=props.tabs.find(function(t){return pathname===t.href});return null===tab||void 0===tab?void 0:tab.id}},[pathname,activeTabIdProp]);return/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_Tabs_styles_module.tabs,src_defineProperty_defineProperty({},src_Tabs_styles_module.hasContent,hasContent),className)},/*#__PURE__*/src_react.createElement(src_Tabs,src_extends_extends({},props,{activeTabId:activeTabId,onChange:function(event){if(withNavigation){var detail=event.detail
|
|
123702
|
-
navigate(detail.activeTabHref)}onChange&&onChange(event)}})))};
|
|
123701
|
+
var src_Tabs_excluded=["className","withNavigation","onChange","activeTabId"];var src_Tabs_Tabs=function(_ref){var className=_ref.className,withNavigation=_ref.withNavigation,onChange=_ref.onChange,activeTabIdProp=_ref.activeTabId,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_Tabs_excluded),navigate=src_dist_useNavigate(),_useLocation=src_dist_useLocation(),pathname=_useLocation.pathname,hasContent=(0,src_react.useMemo)(function(){return props.tabs.some(function(tab){return!!tab.content})},[props.tabs]),activeTabId=(0,src_react.useMemo)(function(){if(activeTabIdProp)return activeTabIdProp;if(withNavigation){var tab=props.tabs.find(function(t){return pathname===t.href});return null===tab||void 0===tab?void 0:tab.id}},[pathname,activeTabIdProp]);return/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_Tabs_styles_module.tabs,src_defineProperty_defineProperty({},src_Tabs_styles_module.hasContent,hasContent),className)},/*#__PURE__*/src_react.createElement(src_Tabs,src_extends_extends({},props,{activeTabId:activeTabId,onChange:function(event){if(withNavigation){var detail=event.detail;navigate(detail.activeTabHref)}onChange&&onChange(event)}})))};
|
|
123703
123702
|
;// ./src/components/Code/styles.module.scss
|
|
123704
123703
|
// extracted by mini-css-extract-plugin
|
|
123705
123704
|
/* harmony default export */ const src_Code_styles_module = ({"code":"Yy_gg"});
|
|
@@ -123713,9 +123712,9 @@ var src_Hotspot_excluded=["renderHotspot","children"];var src_Hotspot_Hotspot=fu
|
|
|
123713
123712
|
;// ./src/consts.ts
|
|
123714
123713
|
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;
|
|
123715
123714
|
;// ./src/routes.ts
|
|
123716
|
-
var src_routes_ROUTES={BASE:"/",LOGOUT:"/logout",AUTH:{GITHUB_CALLBACK:"/auth/github/callback",OKTA_CALLBACK:"/auth/okta/callback",ENTRA_CALLBACK:"/auth/entra/callback",TOKEN:"/auth/token"},PROJECT:{LIST:"/projects",ADD:"/projects/add",DETAILS:{TEMPLATE:"/projects/:projectName",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.TEMPLATE,{projectName:projectName})},SETTINGS:{TEMPLATE:"/projects/:projectName",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.SETTINGS.TEMPLATE,{projectName:projectName})}},RUNS:{DETAILS:{TEMPLATE:"/projects/:projectName/runs/:runId",FORMAT:function(projectName,runId){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.TEMPLATE,{projectName:projectName,runId:runId})},METRICS:{TEMPLATE:"/projects/:projectName/runs/:runId/metrics",FORMAT:function(projectName,runId){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.METRICS.TEMPLATE,{projectName:projectName,runId:runId})}},JOBS:{DETAILS:{TEMPLATE:"/projects/:projectName/runs/:runId/jobs/:jobName",FORMAT:function(projectName,runId,jobName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.TEMPLATE,{projectName:projectName,runId:runId,jobName:jobName})},METRICS:{TEMPLATE:"/projects/:projectName/runs/:runId/jobs/:jobName/metrics",FORMAT:function(projectName,runId,jobName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.METRICS.TEMPLATE,{projectName:projectName,runId:runId,jobName:jobName})}}}}}}},BACKEND:{ADD:{TEMPLATE:"/projects/:projectName/backends/add",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.BACKEND.ADD.TEMPLATE,{projectName:projectName})}},EDIT:{TEMPLATE:"/projects/:projectName/backends/:backend",FORMAT:function(projectName,backendName){return src_buildRoute(src_routes_ROUTES.PROJECT.BACKEND.EDIT.TEMPLATE,{projectName:projectName,backend:backendName})}}},GATEWAY:{ADD:{TEMPLATE:"/projects/:projectName/gateways/add",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.GATEWAY.ADD.TEMPLATE,{projectName:projectName})}},EDIT:{TEMPLATE:"/projects/:projectName/gateways/:instance",FORMAT:function(projectName,instanceName){return src_buildRoute(src_routes_ROUTES.PROJECT.GATEWAY.EDIT.TEMPLATE,{projectName:projectName,instance:instanceName})}}}},RUNS:{LIST:"/runs"},MODELS:{LIST:"/models",DETAILS:{TEMPLATE:"/projects/:projectName/models/:runName",FORMAT:function(projectName,runName){return src_buildRoute(src_routes_ROUTES.MODELS.DETAILS.TEMPLATE,{projectName:projectName,runName:runName})}}},FLEETS:{LIST:"/fleets",DETAILS:{TEMPLATE:"/projects/:projectName/fleets/:fleetId",FORMAT:function(projectName,fleetId){return src_buildRoute(src_routes_ROUTES.FLEETS.DETAILS.TEMPLATE,{projectName:projectName,fleetId:fleetId})}}},INSTANCES:{LIST:"/instances"},VOLUMES:{LIST:"/volumes"},USER:{LIST:"/users",ADD:"/users/add",DETAILS:{TEMPLATE:"/users/:userName",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.DETAILS.TEMPLATE,{userName:userName})}},EDIT:{TEMPLATE:"/users/:userName/edit",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.EDIT.TEMPLATE,{userName:userName})}},PROJECTS:{TEMPLATE:"/users/:userName/projects",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.PROJECTS.TEMPLATE,{userName:userName})}},BILLING:{LIST:{TEMPLATE:"/users/:userName/billing",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.BILLING.LIST.TEMPLATE,{userName:userName})}},ADD_PAYMENT:{TEMPLATE:"/users/:userName/billing/payments/add",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.BILLING.ADD_PAYMENT.TEMPLATE,{userName:userName})}}}},BILLING:{BALANCE:"/billing"}};
|
|
123715
|
+
var src_routes_ROUTES={BASE:"/",LOGOUT:"/logout",AUTH:{GITHUB_CALLBACK:"/auth/github/callback",OKTA_CALLBACK:"/auth/okta/callback",ENTRA_CALLBACK:"/auth/entra/callback",GOOGLE_CALLBACK:"/auth/google/callback",TOKEN:"/auth/token"},PROJECT:{LIST:"/projects",ADD:"/projects/add",DETAILS:{TEMPLATE:"/projects/:projectName",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.TEMPLATE,{projectName:projectName})},SETTINGS:{TEMPLATE:"/projects/:projectName",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.SETTINGS.TEMPLATE,{projectName:projectName})}},RUNS:{DETAILS:{TEMPLATE:"/projects/:projectName/runs/:runId",FORMAT:function(projectName,runId){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.TEMPLATE,{projectName:projectName,runId:runId})},METRICS:{TEMPLATE:"/projects/:projectName/runs/:runId/metrics",FORMAT:function(projectName,runId){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.METRICS.TEMPLATE,{projectName:projectName,runId:runId})}},JOBS:{DETAILS:{TEMPLATE:"/projects/:projectName/runs/:runId/jobs/:jobName",FORMAT:function(projectName,runId,jobName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.TEMPLATE,{projectName:projectName,runId:runId,jobName:jobName})},METRICS:{TEMPLATE:"/projects/:projectName/runs/:runId/jobs/:jobName/metrics",FORMAT:function(projectName,runId,jobName){return src_buildRoute(src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.METRICS.TEMPLATE,{projectName:projectName,runId:runId,jobName:jobName})}}}}}}},BACKEND:{ADD:{TEMPLATE:"/projects/:projectName/backends/add",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.BACKEND.ADD.TEMPLATE,{projectName:projectName})}},EDIT:{TEMPLATE:"/projects/:projectName/backends/:backend",FORMAT:function(projectName,backendName){return src_buildRoute(src_routes_ROUTES.PROJECT.BACKEND.EDIT.TEMPLATE,{projectName:projectName,backend:backendName})}}},GATEWAY:{ADD:{TEMPLATE:"/projects/:projectName/gateways/add",FORMAT:function(projectName){return src_buildRoute(src_routes_ROUTES.PROJECT.GATEWAY.ADD.TEMPLATE,{projectName:projectName})}},EDIT:{TEMPLATE:"/projects/:projectName/gateways/:instance",FORMAT:function(projectName,instanceName){return src_buildRoute(src_routes_ROUTES.PROJECT.GATEWAY.EDIT.TEMPLATE,{projectName:projectName,instance:instanceName})}}}},RUNS:{LIST:"/runs"},MODELS:{LIST:"/models",DETAILS:{TEMPLATE:"/projects/:projectName/models/:runName",FORMAT:function(projectName,runName){return src_buildRoute(src_routes_ROUTES.MODELS.DETAILS.TEMPLATE,{projectName:projectName,runName:runName})}}},FLEETS:{LIST:"/fleets",DETAILS:{TEMPLATE:"/projects/:projectName/fleets/:fleetId",FORMAT:function(projectName,fleetId){return src_buildRoute(src_routes_ROUTES.FLEETS.DETAILS.TEMPLATE,{projectName:projectName,fleetId:fleetId})}}},INSTANCES:{LIST:"/instances"},VOLUMES:{LIST:"/volumes"},USER:{LIST:"/users",ADD:"/users/add",DETAILS:{TEMPLATE:"/users/:userName",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.DETAILS.TEMPLATE,{userName:userName})}},EDIT:{TEMPLATE:"/users/:userName/edit",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.EDIT.TEMPLATE,{userName:userName})}},PROJECTS:{TEMPLATE:"/users/:userName/projects",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.PROJECTS.TEMPLATE,{userName:userName})}},BILLING:{LIST:{TEMPLATE:"/users/:userName/billing",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.BILLING.LIST.TEMPLATE,{userName:userName})}},ADD_PAYMENT:{TEMPLATE:"/users/:userName/billing/payments/add",FORMAT:function(userName){return src_buildRoute(src_routes_ROUTES.USER.BILLING.ADD_PAYMENT.TEMPLATE,{userName:userName})}}}},BILLING:{BALANCE:"/billing"}};
|
|
123717
123716
|
;// ./src/api.ts
|
|
123718
|
-
var src_BASE_URL="/api";var src_API={BASE:function(){return"".concat(src_BASE_URL)},AUTH:{BASE:function(){return"".concat(src_API.BASE(),"/auth")},GITHUB:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/github")},AUTHORIZE:function(){return"".concat(src_API.AUTH.GITHUB.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.GITHUB.BASE(),"/callback")}},OKTA:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/okta")},INFO:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/info")},AUTHORIZE:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/callback")}},ENTRA:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/entra")},INFO:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/info")},AUTHORIZE:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/callback")}}},USERS:{BASE:function(){return"".concat(src_API.BASE(),"/users")},LIST:function(){return"".concat(src_API.USERS.BASE(),"/list")},CREATE:function(){return"".concat(src_API.USERS.BASE(),"/create")},UPDATE:function(){return"".concat(src_API.USERS.BASE(),"/update")},DETAILS:function(){return"".concat(src_API.USERS.BASE(),"/get_user")},CURRENT_USER:function(){return"".concat(src_API.USERS.BASE(),"/get_my_user")},REFRESH_TOKEN:function(){return"".concat(src_API.USERS.BASE(),"/refresh_token")},DELETE:function(){return"".concat(src_API.USERS.BASE(),"/delete")}},USER_PAYMENTS:{BASE:function(username){return"".concat(src_API.BASE(),"/user/").concat(username,"/payments")},LIST:function(username){return"".concat(src_API.USER_PAYMENTS.BASE(username),"/list")},ADD:function(username){return"".concat(src_API.USER_PAYMENTS.BASE(username),"/add")}},USER_BILLING:{BASE:function(username){return"".concat(src_API.BASE(),"/user/").concat(username,"/billing")},INFO:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/info")},CHECKOUT_SESSION:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/checkout_session")},PORTAL_SESSION:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/portal_session")}},PROJECTS:{BASE:function(){return"".concat(src_API.BASE(),"/projects")},LIST:function(){return"".concat(src_API.PROJECTS.BASE(),"/list")},CREATE:function(){return"".concat(src_API.PROJECTS.BASE(),"/create")},DELETE:function(){return"".concat(src_API.PROJECTS.BASE(),"/delete")},DETAILS:function(name){return"".concat(src_API.PROJECTS.BASE(),"/").concat(name)},DETAILS_INFO:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/get")},SET_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/set_members")},ADD_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/add_members")},REMOVE_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/remove_members")},UPDATE:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/update")},// Repos
|
|
123717
|
+
var src_BASE_URL="/api";var src_API={BASE:function(){return"".concat(src_BASE_URL)},AUTH:{BASE:function(){return"".concat(src_API.BASE(),"/auth")},GITHUB:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/github")},AUTHORIZE:function(){return"".concat(src_API.AUTH.GITHUB.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.GITHUB.BASE(),"/callback")}},OKTA:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/okta")},INFO:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/info")},AUTHORIZE:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.OKTA.BASE(),"/callback")}},ENTRA:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/entra")},INFO:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/info")},AUTHORIZE:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.ENTRA.BASE(),"/callback")}},GOOGLE:{BASE:function(){return"".concat(src_API.AUTH.BASE(),"/google")},INFO:function(){return"".concat(src_API.AUTH.GOOGLE.BASE(),"/info")},AUTHORIZE:function(){return"".concat(src_API.AUTH.GOOGLE.BASE(),"/authorize")},CALLBACK:function(){return"".concat(src_API.AUTH.GOOGLE.BASE(),"/callback")}}},USERS:{BASE:function(){return"".concat(src_API.BASE(),"/users")},LIST:function(){return"".concat(src_API.USERS.BASE(),"/list")},CREATE:function(){return"".concat(src_API.USERS.BASE(),"/create")},UPDATE:function(){return"".concat(src_API.USERS.BASE(),"/update")},DETAILS:function(){return"".concat(src_API.USERS.BASE(),"/get_user")},CURRENT_USER:function(){return"".concat(src_API.USERS.BASE(),"/get_my_user")},REFRESH_TOKEN:function(){return"".concat(src_API.USERS.BASE(),"/refresh_token")},DELETE:function(){return"".concat(src_API.USERS.BASE(),"/delete")}},USER_PAYMENTS:{BASE:function(username){return"".concat(src_API.BASE(),"/user/").concat(username,"/payments")},LIST:function(username){return"".concat(src_API.USER_PAYMENTS.BASE(username),"/list")},ADD:function(username){return"".concat(src_API.USER_PAYMENTS.BASE(username),"/add")}},USER_BILLING:{BASE:function(username){return"".concat(src_API.BASE(),"/user/").concat(username,"/billing")},INFO:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/info")},CHECKOUT_SESSION:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/checkout_session")},PORTAL_SESSION:function(username){return"".concat(src_API.USER_BILLING.BASE(username),"/portal_session")}},PROJECTS:{BASE:function(){return"".concat(src_API.BASE(),"/projects")},LIST:function(){return"".concat(src_API.PROJECTS.BASE(),"/list")},CREATE:function(){return"".concat(src_API.PROJECTS.BASE(),"/create")},DELETE:function(){return"".concat(src_API.PROJECTS.BASE(),"/delete")},DETAILS:function(name){return"".concat(src_API.PROJECTS.BASE(),"/").concat(name)},DETAILS_INFO:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/get")},SET_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/set_members")},ADD_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/add_members")},REMOVE_MEMBERS:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/remove_members")},UPDATE:function(name){return"".concat(src_API.PROJECTS.DETAILS(name),"/update")},// Repos
|
|
123719
123718
|
REPOS:function(projectName){return"".concat(src_API.BASE(),"/project/").concat(projectName,"/repos")},REPOS_LIST:function(projectName){return"".concat(src_API.PROJECTS.REPOS(projectName),"/list")},// Runs
|
|
123720
123719
|
RUNS:function(projectName){return"".concat(src_API.BASE(),"/project/").concat(projectName,"/runs")},RUNS_LIST:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/list")},RUN_DETAILS:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/get")},RUN_GET_PLAN:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/get_plan")},RUNS_DELETE:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/delete")},RUNS_STOP:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/stop")},RUNS_SUBMIT:function(projectName){return"".concat(src_API.PROJECTS.RUNS(projectName),"/submit")},// Logs
|
|
123721
123720
|
LOGS:function(projectName){return"".concat(src_API.BASE(),"/project/").concat(projectName,"/logs/poll")},// Logs
|
|
@@ -126645,8 +126644,7 @@ null===hideStartUp&&(tempHideStartUp=_billingCompleted&&_configureCLICompleted),
|
|
|
126645
126644
|
// completed: tallyCompleted,
|
|
126646
126645
|
// startCallback: startCreditsTutorial,
|
|
126647
126646
|
// },
|
|
126648
|
-
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]);//
|
|
126649
|
-
// const startCreditsTutorial = useCallback(() => {
|
|
126647
|
+
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]);// const startCreditsTutorial = useCallback(() => {
|
|
126650
126648
|
// if (typeof Tally !== 'undefined') {
|
|
126651
126649
|
// Tally.openPopup(TALLY_FORM_ID);
|
|
126652
126650
|
// dispatch(updateTutorialPanelState({ tallyCompleted: true }));
|
|
@@ -127108,7 +127106,7 @@ onItemFollow:onFollowHandler}].filter(Boolean)}))),/*#__PURE__*/src_react.create
|
|
|
127108
127106
|
;// ./src/layouts/UnauthorizedLayout/index.tsx
|
|
127109
127107
|
var src_UnauthorizedLayout_UnauthorizedLayout=function(_ref){var children=_ref.children;return/*#__PURE__*/src_react.createElement("div",{className:src_UnauthorizedLayout_styles_module.layout},children)};
|
|
127110
127108
|
;// ./src/services/auth.ts
|
|
127111
|
-
var src_authApi=src_rtk_query_react_esm_createApi({reducerPath:"authApi",baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),tagTypes:["Auth"],endpoints:function(builder){return{githubAuthorize:builder.mutation({query:function(){return{url:src_API.AUTH.GITHUB.AUTHORIZE(),method:"POST"}}}),githubCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.GITHUB.CALLBACK(),method:"POST",body:body}}}),getOktaInfo:builder.query({query:function(){return{url:src_API.AUTH.OKTA.INFO(),method:"POST"}}}),oktaAuthorize:builder.mutation({query:function(){return{url:src_API.AUTH.OKTA.AUTHORIZE(),method:"POST"}}}),oktaCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.OKTA.CALLBACK(),method:"POST",body:body}}}),getEntraInfo:builder.query({query:function(){return{url:src_API.AUTH.ENTRA.INFO(),method:"POST"}}}),entraAuthorize:builder.mutation({query:function(body){return{url:src_API.AUTH.ENTRA.AUTHORIZE(),method:"POST",body:body}}}),entraCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.ENTRA.CALLBACK(),method:"POST",body:body}}})}}});var src_auth_useGithubAuthorizeMutation=src_authApi.useGithubAuthorizeMutation,src_useGithubCallbackMutation=src_authApi.useGithubCallbackMutation,src_useGetOktaInfoQuery=src_authApi.useGetOktaInfoQuery,src_useOktaAuthorizeMutation=src_authApi.useOktaAuthorizeMutation,src_useOktaCallbackMutation=src_authApi.useOktaCallbackMutation,src_useGetEntraInfoQuery=src_authApi.useGetEntraInfoQuery,src_useEntraAuthorizeMutation=src_authApi.useEntraAuthorizeMutation,src_useEntraCallbackMutation=src_authApi.useEntraCallbackMutation;
|
|
127109
|
+
var src_authApi=src_rtk_query_react_esm_createApi({reducerPath:"authApi",baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),tagTypes:["Auth"],endpoints:function(builder){return{githubAuthorize:builder.mutation({query:function(){return{url:src_API.AUTH.GITHUB.AUTHORIZE(),method:"POST"}}}),githubCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.GITHUB.CALLBACK(),method:"POST",body:body}}}),getOktaInfo:builder.query({query:function(){return{url:src_API.AUTH.OKTA.INFO(),method:"POST"}}}),oktaAuthorize:builder.mutation({query:function(){return{url:src_API.AUTH.OKTA.AUTHORIZE(),method:"POST"}}}),oktaCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.OKTA.CALLBACK(),method:"POST",body:body}}}),getEntraInfo:builder.query({query:function(){return{url:src_API.AUTH.ENTRA.INFO(),method:"POST"}}}),entraAuthorize:builder.mutation({query:function(body){return{url:src_API.AUTH.ENTRA.AUTHORIZE(),method:"POST",body:body}}}),entraCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.ENTRA.CALLBACK(),method:"POST",body:body}}}),getGoogleInfo:builder.query({query:function(){return{url:src_API.AUTH.GOOGLE.INFO(),method:"POST"}}}),googleAuthorize:builder.mutation({query:function(){return{url:src_API.AUTH.GOOGLE.AUTHORIZE(),method:"POST"}}}),googleCallback:builder.mutation({query:function(body){return{url:src_API.AUTH.GOOGLE.CALLBACK(),method:"POST",body:body}}})}}});var src_auth_useGithubAuthorizeMutation=src_authApi.useGithubAuthorizeMutation,src_useGithubCallbackMutation=src_authApi.useGithubCallbackMutation,src_useGetOktaInfoQuery=src_authApi.useGetOktaInfoQuery,src_useOktaAuthorizeMutation=src_authApi.useOktaAuthorizeMutation,src_useOktaCallbackMutation=src_authApi.useOktaCallbackMutation,src_useGetEntraInfoQuery=src_authApi.useGetEntraInfoQuery,src_useEntraAuthorizeMutation=src_authApi.useEntraAuthorizeMutation,src_useEntraCallbackMutation=src_authApi.useEntraCallbackMutation,src_useGetGoogleInfoQuery=src_authApi.useGetGoogleInfoQuery,src_useGoogleAuthorizeMutation=src_authApi.useGoogleAuthorizeMutation,src_useGoogleCallbackMutation=src_authApi.useGoogleCallbackMutation;
|
|
127112
127110
|
;// ./src/assets/icons/entraID.svg
|
|
127113
127111
|
var src_entraID_path, src_entraID_path2, src_polygon, src_entraID_path3, src_entraID_path4, src_polygon2;
|
|
127114
127112
|
var src_entraID_excluded = ["title", "titleId"];
|
|
@@ -127160,6 +127158,52 @@ var src_entraID_ForwardRef = /*#__PURE__*/(0,src_react.forwardRef)(src_SvgEntraI
|
|
|
127160
127158
|
/* harmony default export */ const src_LoginByEntraID_styles_module = ({"entraSignIn":"FYoyE","loginButtonInner":"cEx0X","loginButtonLabel":"CTcqv"});
|
|
127161
127159
|
;// ./src/App/Login/EntraID/LoginByEntraID/index.tsx
|
|
127162
127160
|
var src_LoginByEntraID=function(_ref){var className=_ref.className,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useEntraAuthorizeMut=src_useEntraAuthorizeMutation(),_useEntraAuthorizeMut2=src_slicedToArray_slicedToArray(_useEntraAuthorizeMut,2),entraAuthorize=_useEntraAuthorizeMut2[0],isLoading=_useEntraAuthorizeMut2[1].isLoading;return/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_LoginByEntraID_styles_module.entraSignIn,className)},/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:function(){entraAuthorize({base_url:src_getBaseUrl()}).unwrap().then(function(data){src_libs_goToUrl(data.authorization_url)}).catch(console.log)},disabled:isLoading,loading:isLoading,variant:"primary"},/*#__PURE__*/src_react.createElement("span",{className:src_LoginByEntraID_styles_module.loginButtonInner},/*#__PURE__*/src_react.createElement(src_entraID_ForwardRef,null),/*#__PURE__*/src_react.createElement("span",{className:src_LoginByEntraID_styles_module.loginButtonLabel},t("common.login_entra")))))};
|
|
127161
|
+
;// ./src/assets/icons/google.svg
|
|
127162
|
+
var src_google_path, src_google_path2, src_google_path3, src_google_path4, src_google_path5;
|
|
127163
|
+
var src_google_excluded = ["title", "titleId"];
|
|
127164
|
+
function src_google_extends() { return src_google_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, src_google_extends.apply(null, arguments); }
|
|
127165
|
+
function src_google_objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = src_google_objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
127166
|
+
function src_google_objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
127167
|
+
|
|
127168
|
+
|
|
127169
|
+
var src_SvgGoogle = function SvgGoogle(_ref, ref) {
|
|
127170
|
+
var title = _ref.title,
|
|
127171
|
+
titleId = _ref.titleId,
|
|
127172
|
+
props = src_google_objectWithoutProperties(_ref, src_google_excluded);
|
|
127173
|
+
return /*#__PURE__*/src_react.createElement("svg", src_google_extends({
|
|
127174
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
127175
|
+
height: 14,
|
|
127176
|
+
viewBox: "0 0 24 24",
|
|
127177
|
+
width: 14,
|
|
127178
|
+
ref: ref,
|
|
127179
|
+
"aria-labelledby": titleId
|
|
127180
|
+
}, props), title ? /*#__PURE__*/src_react.createElement("title", {
|
|
127181
|
+
id: titleId
|
|
127182
|
+
}, title) : null, src_google_path || (src_google_path = /*#__PURE__*/src_react.createElement("path", {
|
|
127183
|
+
d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",
|
|
127184
|
+
fill: "#4285F4"
|
|
127185
|
+
})), src_google_path2 || (src_google_path2 = /*#__PURE__*/src_react.createElement("path", {
|
|
127186
|
+
d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",
|
|
127187
|
+
fill: "#34A853"
|
|
127188
|
+
})), src_google_path3 || (src_google_path3 = /*#__PURE__*/src_react.createElement("path", {
|
|
127189
|
+
d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",
|
|
127190
|
+
fill: "#FBBC05"
|
|
127191
|
+
})), src_google_path4 || (src_google_path4 = /*#__PURE__*/src_react.createElement("path", {
|
|
127192
|
+
d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",
|
|
127193
|
+
fill: "#EA4335"
|
|
127194
|
+
})), src_google_path5 || (src_google_path5 = /*#__PURE__*/src_react.createElement("path", {
|
|
127195
|
+
d: "M1 1h22v22H1z",
|
|
127196
|
+
fill: "none"
|
|
127197
|
+
})));
|
|
127198
|
+
};
|
|
127199
|
+
var src_google_ForwardRef = /*#__PURE__*/(0,src_react.forwardRef)(src_SvgGoogle);
|
|
127200
|
+
|
|
127201
|
+
/* harmony default export */ const src_google = (__webpack_require__.p + "static/media/google.b194b06fafd0a52aeb566922160ea514.svg");
|
|
127202
|
+
;// ./src/App/Login/LoginByGoogle/styles.module.scss
|
|
127203
|
+
// extracted by mini-css-extract-plugin
|
|
127204
|
+
/* harmony default export */ const src_LoginByGoogle_styles_module = ({"signIn":"O3dLS","loginButtonInner":"wutJr","loginButtonLabel":"EFHt5"});
|
|
127205
|
+
;// ./src/App/Login/LoginByGoogle/index.tsx
|
|
127206
|
+
var src_LoginByGoogle=function(_ref){var className=_ref.className,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useGoogleAuthorizeMu=src_useGoogleAuthorizeMutation(),_useGoogleAuthorizeMu2=src_slicedToArray_slicedToArray(_useGoogleAuthorizeMu,2),googleAuthorize=_useGoogleAuthorizeMu2[0],isLoading=_useGoogleAuthorizeMu2[1].isLoading;return/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_LoginByGoogle_styles_module.signIn,className)},/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:function(){googleAuthorize().unwrap().then(function(data){src_libs_goToUrl(data.authorization_url)}).catch(console.log)},disabled:isLoading,loading:isLoading,variant:"normal"},/*#__PURE__*/src_react.createElement("span",{className:src_LoginByGoogle_styles_module.loginButtonInner},/*#__PURE__*/src_react.createElement(src_google_ForwardRef,null),/*#__PURE__*/src_react.createElement("span",{className:src_LoginByGoogle_styles_module.loginButtonLabel},t("common.login_google")))))};
|
|
127163
127207
|
;// ./src/assets/icons/okta.svg
|
|
127164
127208
|
var src_okta_path;
|
|
127165
127209
|
var src_okta_excluded = ["title", "titleId"];
|
|
@@ -127204,7 +127248,7 @@ var src_LoginByTokenForm=function(_ref){var className=_ref.className,_useTransla
|
|
|
127204
127248
|
// extracted by mini-css-extract-plugin
|
|
127205
127249
|
/* harmony default export */ const src_EnterpriseLogin_styles_module = ({"form":"Gb9hi","okta":"w_GI3","entra":"uaI3N"});
|
|
127206
127250
|
;// ./src/App/Login/EnterpriseLogin/index.tsx
|
|
127207
|
-
var src_EnterpriseLogin=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useGetOktaInfoQuery=src_useGetOktaInfoQuery(),oktaData=_useGetOktaInfoQuery.data,isLoadingOkta=_useGetOktaInfoQuery.isLoading,_useGetEntraInfoQuery=src_useGetEntraInfoQuery(),entraData=_useGetEntraInfoQuery.data,isLoadingEntra=_useGetEntraInfoQuery.isLoading,oktaEnabled=null===oktaData||void 0===oktaData?void 0:oktaData.enabled,entraEnabled=null===entraData||void 0===entraData?void 0:entraData.enabled,isLoading=isLoadingOkta||isLoadingEntra,isShowTokenForm=!oktaEnabled&&!entraEnabled;return/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_EnterpriseLogin_styles_module.form)},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xl",alignItems:"center"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h1",textAlign:"center"},t("auth.sign_in_to_dstack_enterprise")),!isLoading&&isShowTokenForm&&/*#__PURE__*/src_react.createElement(src_LoginByTokenForm,null),!isLoadingOkta&&oktaEnabled&&/*#__PURE__*/src_react.createElement(src_LoginByOkta,{className:src_EnterpriseLogin_styles_module.okta}),!isLoadingEntra&&entraEnabled&&/*#__PURE__*/src_react.createElement(src_LoginByEntraID,{className:src_EnterpriseLogin_styles_module.entra}),!isLoading&&!isShowTokenForm&&/*#__PURE__*/src_react.createElement(src_box_Box,{color:"text-body-secondary"},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.AUTH.TOKEN},t("auth.login_by_token"))))))};
|
|
127251
|
+
var src_EnterpriseLogin=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useGetOktaInfoQuery=src_useGetOktaInfoQuery(),oktaData=_useGetOktaInfoQuery.data,isLoadingOkta=_useGetOktaInfoQuery.isLoading,_useGetEntraInfoQuery=src_useGetEntraInfoQuery(),entraData=_useGetEntraInfoQuery.data,isLoadingEntra=_useGetEntraInfoQuery.isLoading,_useGetGoogleInfoQuer=src_useGetGoogleInfoQuery(),googleData=_useGetGoogleInfoQuer.data,isLoadingGoogle=_useGetGoogleInfoQuer.isLoading,oktaEnabled=null===oktaData||void 0===oktaData?void 0:oktaData.enabled,entraEnabled=null===entraData||void 0===entraData?void 0:entraData.enabled,googleEnabled=null===googleData||void 0===googleData?void 0:googleData.enabled,isLoading=isLoadingOkta||isLoadingEntra,isShowTokenForm=!oktaEnabled&&!entraEnabled;return/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_EnterpriseLogin_styles_module.form)},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xl",alignItems:"center"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h1",textAlign:"center"},t("auth.sign_in_to_dstack_enterprise")),!isLoading&&isShowTokenForm&&/*#__PURE__*/src_react.createElement(src_LoginByTokenForm,null),!isLoadingOkta&&oktaEnabled&&/*#__PURE__*/src_react.createElement(src_LoginByOkta,{className:src_EnterpriseLogin_styles_module.okta}),!isLoadingEntra&&entraEnabled&&/*#__PURE__*/src_react.createElement(src_LoginByEntraID,{className:src_EnterpriseLogin_styles_module.entra}),!isLoadingGoogle&&googleEnabled&&/*#__PURE__*/src_react.createElement(src_LoginByGoogle,{className:src_EnterpriseLogin_styles_module.google}),!isLoading&&!isShowTokenForm&&/*#__PURE__*/src_react.createElement(src_box_Box,{color:"text-body-secondary"},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.AUTH.TOKEN},t("auth.login_by_token"))))))};
|
|
127208
127252
|
;// ./src/assets/icons/github.svg
|
|
127209
127253
|
var src_github_path;
|
|
127210
127254
|
var src_github_excluded = (/* unused pure expression or super */ null && (["title", "titleId"]));
|
|
@@ -127246,7 +127290,7 @@ var src_LoginByGithub=function(){var _useTranslation=useTranslation(),t=_useTran
|
|
|
127246
127290
|
;// ./src/App/AuthErrorMessage/index.tsx
|
|
127247
127291
|
var src_AuthErrorMessage=function(_ref){var title=_ref.title,text=_ref.text,children=_ref.children;return/*#__PURE__*/src_react.createElement(src_box_Box,{margin:{vertical:"xxxl"},textAlign:"center",color:"inherit"},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xxs"},/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement("b",null,title),text&&/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p",color:"inherit"},text))),/*#__PURE__*/src_react.createElement("div",{className:src_AuthErrorMessage_styles_module.content},children))};
|
|
127248
127292
|
;// ./src/App/index.tsx
|
|
127249
|
-
var src_localStorageIsAvailable="localStorage"in window,src_IGNORED_AUTH_PATHS=[src_routes_ROUTES.AUTH.GITHUB_CALLBACK,src_routes_ROUTES.AUTH.OKTA_CALLBACK,src_routes_ROUTES.AUTH.ENTRA_CALLBACK,src_routes_ROUTES.AUTH.TOKEN],src_LoginFormComponent= true?src_EnterpriseLogin:0,src_App_0=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,token=src_hooks_useAppSelector(src_selectAuthToken),isAuthenticated=!!token,dispatch=src_hooks_useAppDispatch(),_useLocation=src_dist_useLocation(),pathname=_useLocation.pathname,_useGetUserDataQuery=src_useGetUserDataQuery({token:token},{skip:!isAuthenticated||!src_localStorageIsAvailable}),isLoading=_useGetUserDataQuery.isLoading,userData=_useGetUserDataQuery.data,getUserError=_useGetUserDataQuery.error;(0,src_react.useEffect)(function(){(null!==userData&&void 0!==userData&&userData.username||getUserError)&&null!==userData&&void 0!==userData&&userData.username&&dispatch(src_setUserData(userData))},[userData,getUserError,isLoading]);return src_IGNORED_AUTH_PATHS.includes(pathname)?/*#__PURE__*/src_react.createElement(src_Outlet,null):src_localStorageIsAvailable?getUserError?function(){return/*#__PURE__*/src_react.createElement(src_LoginFormComponent,null)}():isAuthenticated?/*#__PURE__*/src_react.createElement(src_layouts_AppLayout,null,/*#__PURE__*/src_react.createElement(src_Outlet,null)):function(){return/*#__PURE__*/src_react.createElement(src_LoginFormComponent,null)}():function(){return/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("common.local_storage_unavailable"),text:t("common.local_storage_unavailable_message")})}()};/* harmony default export */ const src_src_App = (src_App_0);
|
|
127293
|
+
var src_localStorageIsAvailable="localStorage"in window,src_IGNORED_AUTH_PATHS=[src_routes_ROUTES.AUTH.GITHUB_CALLBACK,src_routes_ROUTES.AUTH.OKTA_CALLBACK,src_routes_ROUTES.AUTH.ENTRA_CALLBACK,src_routes_ROUTES.AUTH.GOOGLE_CALLBACK,src_routes_ROUTES.AUTH.TOKEN],src_LoginFormComponent= true?src_EnterpriseLogin:0,src_App_0=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,token=src_hooks_useAppSelector(src_selectAuthToken),isAuthenticated=!!token,dispatch=src_hooks_useAppDispatch(),_useLocation=src_dist_useLocation(),pathname=_useLocation.pathname,_useGetUserDataQuery=src_useGetUserDataQuery({token:token},{skip:!isAuthenticated||!src_localStorageIsAvailable}),isLoading=_useGetUserDataQuery.isLoading,userData=_useGetUserDataQuery.data,getUserError=_useGetUserDataQuery.error;(0,src_react.useEffect)(function(){(null!==userData&&void 0!==userData&&userData.username||getUserError)&&null!==userData&&void 0!==userData&&userData.username&&dispatch(src_setUserData(userData))},[userData,getUserError,isLoading]);return src_IGNORED_AUTH_PATHS.includes(pathname)?/*#__PURE__*/src_react.createElement(src_Outlet,null):src_localStorageIsAvailable?getUserError?function(){return/*#__PURE__*/src_react.createElement(src_LoginFormComponent,null)}():isAuthenticated?/*#__PURE__*/src_react.createElement(src_layouts_AppLayout,null,/*#__PURE__*/src_react.createElement(src_Outlet,null)):function(){return/*#__PURE__*/src_react.createElement(src_LoginFormComponent,null)}():function(){return/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("common.local_storage_unavailable"),text:t("common.local_storage_unavailable_message")})}()};/* harmony default export */ const src_src_App = (src_App_0);
|
|
127250
127294
|
;// ./src/App/Loading/styles.module.scss
|
|
127251
127295
|
// extracted by mini-css-extract-plugin
|
|
127252
127296
|
/* harmony default export */ const src_Loading_styles_module = ({"spinner":"OZnXs"});
|
|
@@ -127256,6 +127300,8 @@ var src_Loading=function(){return/*#__PURE__*/src_react.createElement(src_app_la
|
|
|
127256
127300
|
var src_LoginByEntraIDCallback=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,1),searchParams=_useSearchParams2[0],navigate=src_dist_useNavigate(),code=searchParams.get("code"),state=searchParams.get("state"),_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),isInvalidCode=_useState2[0],setIsInvalidCode=_useState2[1],dispatch=src_hooks_useAppDispatch(),_useEntraCallbackMuta=src_useEntraCallbackMutation(),_useEntraCallbackMuta2=src_slicedToArray_slicedToArray(_useEntraCallbackMuta,1),entraCallback=_useEntraCallbackMuta2[0],checkCode=function(){code&&state&&entraCallback({code:code,state:state,base_url:src_getBaseUrl()}).unwrap().then(function(_ref){var token=_ref.creds.token;dispatch(src_setAuthData({token:token})),navigate("/")}).catch(function(){setIsInvalidCode(!0)})};return (0,src_react.useEffect)(function(){code&&state?checkCode():setIsInvalidCode(!0)},[]),isInvalidCode?/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("auth.authorization_failed")},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.BASE},t("auth.try_again")))):/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_Loading,null),";")};
|
|
127257
127301
|
;// ./src/App/Login/LoginByGithubCallback/index.tsx
|
|
127258
127302
|
var src_LoginByGithubCallback=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,1),searchParams=_useSearchParams2[0],navigate=src_dist_useNavigate(),code=searchParams.get("code"),_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),isInvalidCode=_useState2[0],setIsInvalidCode=_useState2[1],dispatch=src_hooks_useAppDispatch(),_useGithubCallbackMut=src_useGithubCallbackMutation(),_useGithubCallbackMut2=src_slicedToArray_slicedToArray(_useGithubCallbackMut,1),githubCallback=_useGithubCallbackMut2[0],checkCode=function(){code&&githubCallback({code:code}).unwrap().then(function(_ref){var token=_ref.creds.token;dispatch(src_setAuthData({token:token})),navigate("/")}).catch(function(){setIsInvalidCode(!0)})};return (0,src_react.useEffect)(function(){code?checkCode():setIsInvalidCode(!0)},[]),isInvalidCode?/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("auth.authorization_failed")},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.BASE},t("auth.try_again")))):/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_Loading,null),";")};
|
|
127303
|
+
;// ./src/App/Login/LoginByGoogleCallback/index.tsx
|
|
127304
|
+
var src_LoginByGoogleCallback=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,1),searchParams=_useSearchParams2[0],navigate=src_dist_useNavigate(),code=searchParams.get("code"),state=searchParams.get("state"),_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),isInvalidCode=_useState2[0],setIsInvalidCode=_useState2[1],dispatch=src_hooks_useAppDispatch(),_useGoogleCallbackMut=src_useGoogleCallbackMutation(),_useGoogleCallbackMut2=src_slicedToArray_slicedToArray(_useGoogleCallbackMut,1),googleCallback=_useGoogleCallbackMut2[0],checkCode=function(){code&&state&&googleCallback({code:code,state:state}).unwrap().then(function(_ref){var token=_ref.creds.token;dispatch(src_setAuthData({token:token})),navigate("/")}).catch(function(){setIsInvalidCode(!0)})};return (0,src_react.useEffect)(function(){code&&state?checkCode():setIsInvalidCode(!0)},[]),isInvalidCode?/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("auth.authorization_failed")},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.BASE},t("auth.try_again")))):/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_Loading,null),";")};
|
|
127259
127305
|
;// ./src/App/Login/LoginByOktaCallback/index.tsx
|
|
127260
127306
|
var src_LoginByOktaCallback=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useSearchParams=src_dist_useSearchParams(),_useSearchParams2=src_slicedToArray_slicedToArray(_useSearchParams,1),searchParams=_useSearchParams2[0],navigate=src_dist_useNavigate(),code=searchParams.get("code"),state=searchParams.get("state"),_useState=(0,src_react.useState)(!1),_useState2=src_slicedToArray_slicedToArray(_useState,2),isInvalidCode=_useState2[0],setIsInvalidCode=_useState2[1],dispatch=src_hooks_useAppDispatch(),_useOktaCallbackMutat=src_useOktaCallbackMutation(),_useOktaCallbackMutat2=src_slicedToArray_slicedToArray(_useOktaCallbackMutat,1),oktaCallback=_useOktaCallbackMutat2[0],checkCode=function(){code&&state&&oktaCallback({code:code,state:state}).unwrap().then(function(_ref){var token=_ref.creds.token;dispatch(src_setAuthData({token:token})),navigate("/")}).catch(function(){setIsInvalidCode(!0)})};return (0,src_react.useEffect)(function(){code&&state?checkCode():setIsInvalidCode(!0)},[]),isInvalidCode?/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:t("auth.authorization_failed")},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.BASE},t("auth.try_again")))):/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement(src_Loading,null),";")};
|
|
127261
127307
|
;// ./src/App/Login/TokenLogin/styles.module.scss
|
|
@@ -127265,7 +127311,9 @@ var src_LoginByOktaCallback=function(){var _useTranslation=src_useTranslation_us
|
|
|
127265
127311
|
var src_TokenLogin=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t;return/*#__PURE__*/src_react.createElement(src_UnauthorizedLayout_UnauthorizedLayout,null,/*#__PURE__*/src_react.createElement("div",{className:src_classnames_default()(src_TokenLogin_styles_module.form)},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xl",alignItems:"center"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h1",textAlign:"center"},t("auth.sign_in_to_dstack_enterprise")),/*#__PURE__*/src_react.createElement(src_LoginByTokenForm,null),/*#__PURE__*/src_react.createElement(src_box_Box,{color:"text-body-secondary"},/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.BASE},t("auth.another_login_methods"))))))};
|
|
127266
127312
|
;// ./src/services/project.ts
|
|
127267
127313
|
var src_project_excluded=["project_name"];function src_project_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_project_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_project_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_project_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}// Helper function to transform backend response to frontend format
|
|
127268
|
-
|
|
127314
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127315
|
+
var src_transformProjectResponse=function(project){return src_project_objectSpread(src_project_objectSpread({},project),{},{isPublic:project.is_public})};var src_projectApi=src_rtk_query_react_esm_createApi({reducerPath:"projectApi",refetchOnMountOrArgChange:!0,baseQuery:src_fetchBaseQuery({prepareHeaders:src_fetchBaseQueryHeaders}),tagTypes:["Projects","ProjectRepos","ProjectLogs","Backends"],endpoints:function(builder){return{getProjects:builder.query({query:function(){return{url:src_API.PROJECTS.LIST(),method:"POST"}},// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127316
|
+
transformResponse:function(response){return response.map(src_transformProjectResponse)},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref){var project_name=_ref.project_name;return{type:"Projects",id:project_name}})),["Projects"]):["Projects"]}}),getProject:builder.query({query:function(_ref2){var name=_ref2.name;return{url:src_API.PROJECTS.DETAILS_INFO(name),method:"POST"}},transformResponse:src_transformProjectResponse,providesTags:function(result){return result?[{type:"Projects",id:result.project_name}]:[]}}),createProject:builder.mutation({query:function(project){return{url:src_API.PROJECTS.CREATE(),method:"POST",body:project}},transformResponse:src_transformProjectResponse,invalidatesTags:function(){return["Projects"]}}),updateProjectMembers:builder.mutation({query:function(_ref3){var project_name=_ref3.project_name,members=_ref3.members;return{url:src_API.PROJECTS.SET_MEMBERS(project_name),method:"POST",body:{members:members}}},transformResponse:src_transformProjectResponse,invalidatesTags:function(result,error,params){return[{type:"Projects",id:null===params||void 0===params?void 0:params.project_name}]}}),addProjectMember:builder.mutation({query:function(_ref4){var project_name=_ref4.project_name,username=_ref4.username,_ref4$project_role=_ref4.project_role,project_role=void 0===_ref4$project_role?"user":_ref4$project_role;return{url:src_API.PROJECTS.ADD_MEMBERS(project_name),method:"POST",body:{members:[{username:username,project_role:project_role}]}}},transformResponse:src_transformProjectResponse,invalidatesTags:function(result,error,params){return[{type:"Projects",id:null===params||void 0===params?void 0:params.project_name}]}}),removeProjectMember:builder.mutation({query:function(_ref5){var project_name=_ref5.project_name,username=_ref5.username;return{url:src_API.PROJECTS.REMOVE_MEMBERS(project_name),method:"POST",body:{usernames:[username]}}},transformResponse:src_transformProjectResponse,invalidatesTags:function(result,error,params){return[{type:"Projects",id:null===params||void 0===params?void 0:params.project_name}]}}),deleteProjects:builder.mutation({query:function(projectNames){return{url:src_API.PROJECTS.DELETE(),method:"POST",body:{projects_names:projectNames}}},invalidatesTags:function(){return["Projects"]}}),getProjectLogs:builder.query({query:function(_ref6){var project_name=_ref6.project_name,body=src_objectWithoutProperties_objectWithoutProperties(_ref6,src_project_excluded);return{url:src_API.PROJECTS.LOGS(project_name),method:"POST",body:body}},keepUnusedDataFor:0,providesTags:function(){return["ProjectLogs"]},transformResponse:function(response){var logs=response.logs.map(function(logItem){return src_project_objectSpread(src_project_objectSpread({},logItem),{},{message:src_base64ToArrayBuffer(logItem.message)})});return src_project_objectSpread(src_project_objectSpread({},response),{},{logs:logs})}}),getProjectRepos:builder.query({query:function(_ref7){var project_name=_ref7.project_name;return{url:src_API.PROJECTS.REPOS_LIST(project_name),method:"POST"}},providesTags:function(){return["ProjectRepos"]}}),updateProject:builder.mutation({query:function(_ref8){var project_name=_ref8.project_name,is_public=_ref8.is_public;return{url:src_API.PROJECTS.UPDATE(project_name),method:"POST",body:{is_public:is_public}}},transformResponse:src_transformProjectResponse,invalidatesTags:function(result,error,params){return[{type:"Projects",id:null===params||void 0===params?void 0:params.project_name}]}})}}});var src_useGetProjectsQuery=src_projectApi.useGetProjectsQuery,src_useGetProjectQuery=src_projectApi.useGetProjectQuery,src_useCreateProjectMutation=src_projectApi.useCreateProjectMutation,src_useUpdateProjectMembersMutation=src_projectApi.useUpdateProjectMembersMutation,src_useAddProjectMemberMutation=src_projectApi.useAddProjectMemberMutation,src_useRemoveProjectMemberMutation=src_projectApi.useRemoveProjectMemberMutation,src_useDeleteProjectsMutation=src_projectApi.useDeleteProjectsMutation,src_useGetProjectLogsQuery=src_projectApi.useGetProjectLogsQuery,src_useLazyGetProjectLogsQuery=src_projectApi.useLazyGetProjectLogsQuery,src_useGetProjectReposQuery=src_projectApi.useGetProjectReposQuery,src_useUpdateProjectMutation=src_projectApi.useUpdateProjectMutation;
|
|
127269
127317
|
;// ./src/App/Logout/index.tsx
|
|
127270
127318
|
var src_Logout=function(){var dispatch=src_hooks_useAppDispatch();return (0,src_react.useEffect)(function(){dispatch(src_removeAuthData()),dispatch(src_userApi.util.resetApiState()),dispatch(src_projectApi.util.resetApiState())},[]),/*#__PURE__*/src_react.createElement(src_Navigate,{replace:!0,to:src_routes_ROUTES.BASE})};
|
|
127271
127319
|
;// ./src/services/fleet.ts
|
|
@@ -135534,7 +135582,9 @@ var src_getPythonModelCode=function(_ref){var _model$base_url,_model$name,model=
|
|
|
135534
135582
|
// extracted by mini-css-extract-plugin
|
|
135535
135583
|
/* harmony default export */ const src_Details_styles_module = ({"modelDetailsLayout":"saLOO","general":"G6gkh","modelForm":"Yybyq","side":"fTQI9","buttons":"RQFU_","chat":"OSeY8","message":"o9AkU","messageForm":"SaEus","viewCodeControls":"PQJls","copyButton":"fLak8"});
|
|
135536
135584
|
;// ./src/pages/Models/Details/index.tsx
|
|
135537
|
-
function src_asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new src_AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function src_AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:n}})}return src_AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next},src_AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))}},new src_AsyncFromSyncIterator(r)}var src_MESSAGE_ROLE_MAP={tool:"Tool",system:"System",user:"User",assistant:"Assistant"},src_CodeTab=/*#__PURE__*/function(CodeTab){return CodeTab.Python="python",CodeTab.Curl="curl",CodeTab}(src_CodeTab||{});var src_ModelDetails=function(){var _params$projectName,_params$runName,_modelData$run_name,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,token=src_hooks_useAppSelector(src_selectAuthToken),_useState=(0,src_react.useState)([]),_useState2=src_slicedToArray_slicedToArray(_useState,2),messages=_useState2[0],setMessages=_useState2[1],_useState3=(0,src_react.useState)(!1),_useState4=src_slicedToArray_slicedToArray(_useState3,2),viewCodeVisible=_useState4[0],setViewCodeVisible=_useState4[1],_useState5=(0,src_react.useState)(src_CodeTab.Python),_useState6=src_slicedToArray_slicedToArray(_useState5,2),codeTab=_useState6[0],setCodeTab=_useState6[1],_useState7=(0,src_react.useState)(!1),_useState8=src_slicedToArray_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1],params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunName=null!==(_params$runName=params.runName)&&void 0!==_params$runName?_params$runName:"",openai=(0,src_react.useRef)(),textAreaRef=(0,src_react.useRef)(null),chatList=(0,src_react.useRef)(),_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],messageForShowing=(0,src_react.useMemo)(function(){return messages.filter(function(m){return"system"!==m.role})},[messages]);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("navigation.models"),href:src_routes_ROUTES.MODELS.LIST},{text:paramRunName,href:src_routes_ROUTES.MODELS.DETAILS.FORMAT(paramProjectName,paramRunName)}]);var scrollChatToBottom=function(){if(chatList.current){var _chatList$current=chatList.current,clientHeight=_chatList$current.clientHeight,scrollHeight=_chatList$current.scrollHeight;chatList.current.scrollTo(0,scrollHeight-clientHeight)}},_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,run_name:paramRunName}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading;(0,src_react.useEffect)(function(){runData&&src_runIsStopped(runData.status)&&src_riseRouterException()},[runData]);var modelData=(0,src_react.useMemo)(function(){return runData?src_getExtendedModelFromRun(runData):void 0},[runData]);(0,src_react.useEffect)(function(){modelData&&(openai.current=new src_node_modules_openai({baseURL:src_getModelGateway(modelData.base_url),apiKey:token,dangerouslyAllowBrowser:!0}))},[modelData,token]),(0,src_react.useEffect)(function(){scrollChatToBottom()},[messageForShowing]);var _useForm=src_index_esm_useForm(),handleSubmit=_useForm.handleSubmit,control=_useForm.control,setValue=_useForm.setValue,watch=_useForm.watch,messageText=watch("message"),sendRequest=/*#__PURE__*/function(){var _ref=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(messages){var _modelData$name;return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:if(openai.current){_context.next=2;break}return _context.abrupt("return",Promise.reject("Model not found"));case 2:return _context.abrupt("return",openai.current.chat.completions.create({model:null!==(_modelData$name=null===modelData||void 0===modelData?void 0:modelData.name)&&void 0!==_modelData$name?_modelData$name:"",messages:messages,stream:!0,max_tokens:512}));case 3:case"end":return _context.stop()}},_callee)}));return function(){return _ref.apply(this,arguments)}}(),onSubmit=/*#__PURE__*/function(){var _ref2=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee2(data){var _data$instructions,newMessages,newMessage,messagesWithoutSystemMessage,stream,_iteratorAbruptCompletion,_didIteratorError,_iteratorError,_loop,_iterator,_step;return src_regenerator_default().wrap(function(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:if(data.message){_context3.next=2;break}return _context3.abrupt("return");case 2:return newMessage={role:"user",content:data.message},messagesWithoutSystemMessage=messages.filter(function(m){return"system"!==m.role}),newMessages=null!==(_data$instructions=data.instructions)&&void 0!==_data$instructions&&_data$instructions.length?[{role:"system",content:data.instructions}].concat(src_toConsumableArray_toConsumableArray(messagesWithoutSystemMessage),[newMessage]):[].concat(src_toConsumableArray_toConsumableArray(messagesWithoutSystemMessage),[newMessage]),setMessages(newMessages),setLoading(!0),_context3.prev=7,_context3.next=10,sendRequest(newMessages);case 10:stream=_context3.sent,setMessages(function(oldMessages){return[].concat(src_toConsumableArray_toConsumableArray(oldMessages),[{role:"assistant",content:""}])}),setValue("message",""),setTimeout(onChangeMessage,0),_iteratorAbruptCompletion=!1,_didIteratorError=!1,_context3.prev=16,_loop=/*#__PURE__*/src_regenerator_default().mark(function _loop(){var chunk;return src_regenerator_default().wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:chunk=_step.value,setMessages(function(oldMessages){var _chunk$choices$0$delt,_chunk$choices$,_lastMessage$content,_chunk$choices$0$delt2,_chunk$choices$2,newMessages=src_toConsumableArray_toConsumableArray(oldMessages),lastMessage=newMessages.pop();return lastMessage?[].concat(src_toConsumableArray_toConsumableArray(newMessages),[{role:null!==(_chunk$choices$0$delt=null===(_chunk$choices$=chunk.choices[0])||void 0===_chunk$choices$||null===(_chunk$choices$=_chunk$choices$.delta)||void 0===_chunk$choices$?void 0:_chunk$choices$.role)&&void 0!==_chunk$choices$0$delt?_chunk$choices$0$delt:null===lastMessage||void 0===lastMessage?void 0:lastMessage.role,content:(null!==(_lastMessage$content=null===lastMessage||void 0===lastMessage?void 0:lastMessage.content)&&void 0!==_lastMessage$content?_lastMessage$content:"")+(null!==(_chunk$choices$0$delt2=null===(_chunk$choices$2=chunk.choices[0])||void 0===_chunk$choices$2||null===(_chunk$choices$2=_chunk$choices$2.delta)||void 0===_chunk$choices$2?void 0:_chunk$choices$2.content)&&void 0!==_chunk$choices$0$delt2?_chunk$choices$0$delt2:"")}]):oldMessages});case 2:case"end":return _context2.stop()}},_loop)}),_iterator=src_asyncIterator(stream);case 19:return _context3.next=21,_iterator.next();case 21:if(!(_iteratorAbruptCompletion=!(_step=_context3.sent).done)){_context3.next=26;break}return _context3.delegateYield(_loop(),"t0",23);case 23:_iteratorAbruptCompletion=!1,_context3.next=19;break;case 26:_context3.next=32;break;case 28:_context3.prev=28,_context3.t1=_context3["catch"](16),_didIteratorError=!0,_iteratorError=_context3.t1;case 32:if(_context3.prev=32,_context3.prev=33,!(_iteratorAbruptCompletion&&null!=_iterator.return)){_context3.next=37;break}return _context3.next=37,_iterator.return();case 37:if(_context3.prev=37,!_didIteratorError){_context3.next=40;break}throw _iteratorError;case 40:return _context3.finish(37);case 41:return _context3.finish(32);case 42:_context3.next=48;break;case 44:_context3.prev=44,_context3.t2=_context3["catch"](7),pushNotification({type:"error",content:t("common.server_error",{error:_context3.t2})}),clearChat();case 48:setLoading(!1),setTimeout(function(){var _textAreaRef$current;null===(_textAreaRef$current=textAreaRef.current)||void 0===_textAreaRef$current||null===(_textAreaRef$current=_textAreaRef$current.querySelector("textarea"))||void 0===_textAreaRef$current||_textAreaRef$current.focus()},10);case 50:case"end":return _context3.stop()}},_callee2,null,[[7,44],[16,28,32,42],[33,,37,41]])}));return function(){return _ref2.apply(this,arguments)}}(),clearChat=function(){setValue("message",""),setValue("instructions",""),setMessages([]),setTimeout(onChangeMessage,10)},renderMessageBody=function(content){var languages=[],matches=content.match(/^(```[A-Za-z]*)/m);matches&&src_toConsumableArray_toConsumableArray(matches).forEach(function(l){return l&&languages.push(l.replace(/^```/,""))});var replacedStrings=src_react_string_replace_default()(content,/^([A-Za-z \t]*)```([A-Za-z]*)?\n([\s\S]*?)```([A-Za-z \t]*)*$/gm,function(match){return match?/*#__PURE__*/src_react.createElement(src_Code,null,match):""});return/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p"},replacedStrings.filter(function(line,index){return!(languages.includes(line)&&"string"!=typeof replacedStrings[index+1]&&void 0!==src_typeof_typeof(replacedStrings[index+1]))}))},onChangeMessage=function(){if(textAreaRef.current){var textAreaElement=textAreaRef.current.querySelector("textarea");textAreaElement&&(textAreaElement.style.height="auto",textAreaElement.style.height=textAreaElement.scrollHeight+"px")}},pythonCode=src_getPythonModelCode({model:modelData,token:token}),curlCode=src_getCurlModelCode({model:modelData,token:token});return console.log({modelData:modelData}),/*#__PURE__*/src_react.createElement(src_ContentLayout,{header:/*#__PURE__*/src_react.createElement(src_DetailsHeader,{title:/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(paramProjectName,paramRunName)},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h1"},paramRunName)),actionButtons:/*#__PURE__*/src_react.createElement(src_Button_Button,{disabled:loading,onClick:function(){return setViewCodeVisible(!0)}},t("models.code"))})},isLoadingRun&&/*#__PURE__*/src_react.createElement(src_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)),modelData&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.modelDetailsLayout},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.general},/*#__PURE__*/src_react.createElement(src_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("models.details.run_name")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(modelData.project_name,null!==(_modelData$run_name=modelData.run_name)&&void 0!==_modelData$run_name?_modelData$run_name:"No run name")},modelData.run_name))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("models.model_name")),/*#__PURE__*/src_react.createElement("div",null,modelData.name)),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("models.type")),/*#__PURE__*/src_react.createElement("div",null,modelData.type))))),/*#__PURE__*/src_react.createElement("form",{className:src_Details_styles_module.modelForm,onSubmit:handleSubmit(onSubmit)},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.buttons},/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"remove",disabled:loading||!messages.length,onClick:clearChat})),/*#__PURE__*/src_react.createElement("aside",{className:src_Details_styles_module.side},/*#__PURE__*/src_react.createElement(src_FormTextarea,{rows:4,disabled:loading,label:t("models.details.instructions"),constraintText:t("models.details.instructions_description"),control:control,name:"instructions"})),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.chat,ref:chatList},!messageForShowing.length&&/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("models.details.chat_empty_title"),message:t("models.details.chat_empty_message")}),messageForShowing.map(function(message,index){return/*#__PURE__*/src_react.createElement("div",{key:index,className:src_Details_styles_module.message},/*#__PURE__*/src_react.createElement(src_ChatBubble,{ariaLabel:"",type:"user"===message.role?"outgoing":"incoming",avatar:/*#__PURE__*/src_react.createElement(src_Avatar,{ariaLabel:src_MESSAGE_ROLE_MAP[message.role],color:"user"===message.role?"default":"gen-ai",iconName:"user"===message.role?"user-profile":"gen-ai"})},renderMessageBody(message.content||"...")))})),/*#__PURE__*/src_react.createElement("div",{ref:textAreaRef,className:src_Details_styles_module.messageForm},/*#__PURE__*/src_react.createElement(src_FormTextarea,{stretch:!0,placeholder:t("models.details.message_placeholder"),control:control,disabled:loading,name:"message",onKeyDown:function(event){var _event$detail,_event$detail2,_event$detail3,_event$detail4,isCtrlOrShiftKey=(null===event||void 0===event||null===(_event$detail=event.detail)||void 0===_event$detail?void 0:_event$detail.ctrlKey)||(null===event||void 0===event||null===(_event$detail2=event.detail)||void 0===_event$detail2?void 0:_event$detail2.shiftKey);13!==(null===event||void 0===event||null===(_event$detail3=event.detail)||void 0===_event$detail3?void 0:_event$detail3.keyCode)||isCtrlOrShiftKey?13===(null===event||void 0===event||null===(_event$detail4=event.detail)||void 0===_event$detail4?void 0:_event$detail4.keyCode)&&isCtrlOrShiftKey&&(event.preventDefault(),setValue("message",messageText+"\n"),setTimeout(onChangeMessage,0)):handleSubmit(onSubmit)()},onChange:onChangeMessage}),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.buttons},/*#__PURE__*/src_react.createElement(src_Button_Button,{variant:"primary",disabled:loading},t("common.send")))))),/*#__PURE__*/src_react.createElement(src_modal_Modal,{visible:viewCodeVisible,header:t("models.details.view_code"),size:"large",footer:/*#__PURE__*/src_react.createElement(src_box_Box,{float:"right"},/*#__PURE__*/src_react.createElement(src_Button_Button,{variant:"normal",onClick:function(){return setViewCodeVisible(!1)}},t("common.close"))),onDismiss:function(){return setViewCodeVisible(!1)}},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"m",direction:"vertical"},/*#__PURE__*/src_react.createElement(src_box_Box,null,t("models.details.view_code_description")),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.viewCodeControls},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.copyButton},/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"copy",onClick:function(){return codeTab===src_CodeTab.Python?src_copyToClipboard(pythonCode):codeTab===src_CodeTab.Curl?src_copyToClipboard(curlCode):void 0}})),/*#__PURE__*/src_react.createElement(src_Tabs_Tabs,{onChange:function(_ref3){var detail=_ref3.detail;return setCodeTab(detail.activeTabId)},activeTabId:codeTab,tabs:[{label:"python",id:src_CodeTab.Python,content:/*#__PURE__*/src_react.createElement(src_Code,null,pythonCode)},{label:"curl",id:src_CodeTab.Curl,content:/*#__PURE__*/src_react.createElement(src_Code,null,curlCode)}]}))))))};
|
|
135585
|
+
function src_asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new src_AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function src_AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:n}})}return src_AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next},src_AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))}},new src_AsyncFromSyncIterator(r)}var src_MESSAGE_ROLE_MAP={tool:"Tool",system:"System",user:"User",assistant:"Assistant"},src_CodeTab=/*#__PURE__*/function(CodeTab){return CodeTab.Python="python",CodeTab.Curl="curl",CodeTab}(src_CodeTab||{});var src_ModelDetails=function(){var _params$projectName,_params$runName,_modelData$run_name,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,token=src_hooks_useAppSelector(src_selectAuthToken),_useState=(0,src_react.useState)([]),_useState2=src_slicedToArray_slicedToArray(_useState,2),messages=_useState2[0],setMessages=_useState2[1],_useState3=(0,src_react.useState)(!1),_useState4=src_slicedToArray_slicedToArray(_useState3,2),viewCodeVisible=_useState4[0],setViewCodeVisible=_useState4[1],_useState5=(0,src_react.useState)(src_CodeTab.Python),_useState6=src_slicedToArray_slicedToArray(_useState5,2),codeTab=_useState6[0],setCodeTab=_useState6[1],_useState7=(0,src_react.useState)(!1),_useState8=src_slicedToArray_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1],params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",paramRunName=null!==(_params$runName=params.runName)&&void 0!==_params$runName?_params$runName:"",openai=(0,src_react.useRef)(),textAreaRef=(0,src_react.useRef)(null),chatList=(0,src_react.useRef)(),_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],messageForShowing=(0,src_react.useMemo)(function(){return messages.filter(function(m){return"system"!==m.role})},[messages]);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("navigation.models"),href:src_routes_ROUTES.MODELS.LIST},{text:paramRunName,href:src_routes_ROUTES.MODELS.DETAILS.FORMAT(paramProjectName,paramRunName)}]);var scrollChatToBottom=function(){if(chatList.current){var _chatList$current=chatList.current,clientHeight=_chatList$current.clientHeight,scrollHeight=_chatList$current.scrollHeight;chatList.current.scrollTo(0,scrollHeight-clientHeight)}},_useGetRunQuery=src_useGetRunQuery({project_name:paramProjectName,run_name:paramRunName}),runData=_useGetRunQuery.data,isLoadingRun=_useGetRunQuery.isLoading;(0,src_react.useEffect)(function(){runData&&src_runIsStopped(runData.status)&&src_riseRouterException()},[runData]);var modelData=(0,src_react.useMemo)(function(){return runData?src_getExtendedModelFromRun(runData):void 0},[runData]);(0,src_react.useEffect)(function(){modelData&&(openai.current=new src_node_modules_openai({baseURL:src_getModelGateway(modelData.base_url),apiKey:token,dangerouslyAllowBrowser:!0}))},[modelData,token]),(0,src_react.useEffect)(function(){scrollChatToBottom()},[messageForShowing]);var _useForm=src_index_esm_useForm(),handleSubmit=_useForm.handleSubmit,control=_useForm.control,setValue=_useForm.setValue,watch=_useForm.watch,messageText=watch("message"),sendRequest=/*#__PURE__*/function(){var _ref=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(messages){var _modelData$name;return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:if(openai.current){_context.next=2;break}return _context.abrupt("return",Promise.reject("Model not found"));case 2:return _context.abrupt("return",openai.current.chat.completions.create({model:null!==(_modelData$name=null===modelData||void 0===modelData?void 0:modelData.name)&&void 0!==_modelData$name?_modelData$name:"",messages:messages,stream:!0,max_tokens:512}));case 3:case"end":return _context.stop()}},_callee)}));return function(){return _ref.apply(this,arguments)}}(),onSubmit=/*#__PURE__*/function(){var _ref2=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee2(data){var _data$instructions,newMessages,newMessage,messagesWithoutSystemMessage,stream,_iteratorAbruptCompletion,_didIteratorError,_iteratorError,_loop,_iterator,_step;return src_regenerator_default().wrap(function(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:if(data.message){_context3.next=2;break}return _context3.abrupt("return");case 2:return newMessage={role:"user",content:data.message},messagesWithoutSystemMessage=messages.filter(function(m){return"system"!==m.role}),newMessages=null!==(_data$instructions=data.instructions)&&void 0!==_data$instructions&&_data$instructions.length?[{role:"system",content:data.instructions}].concat(src_toConsumableArray_toConsumableArray(messagesWithoutSystemMessage),[newMessage]):[].concat(src_toConsumableArray_toConsumableArray(messagesWithoutSystemMessage),[newMessage]),setMessages(newMessages),setLoading(!0),_context3.prev=7,_context3.next=10,sendRequest(newMessages);case 10:stream=_context3.sent,setMessages(function(oldMessages){return[].concat(src_toConsumableArray_toConsumableArray(oldMessages),[{role:"assistant",content:""}])}),setValue("message",""),setTimeout(onChangeMessage,0),_iteratorAbruptCompletion=!1,_didIteratorError=!1,_context3.prev=16,_loop=/*#__PURE__*/src_regenerator_default().mark(function _loop(){var chunk;return src_regenerator_default().wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:chunk=_step.value,setMessages(function(oldMessages){var _chunk$choices$0$delt,_chunk$choices$,_lastMessage$content,_chunk$choices$0$delt2,_chunk$choices$2,newMessages=src_toConsumableArray_toConsumableArray(oldMessages),lastMessage=newMessages.pop();return lastMessage?[].concat(src_toConsumableArray_toConsumableArray(newMessages),[{role:null!==(_chunk$choices$0$delt=null===(_chunk$choices$=chunk.choices[0])||void 0===_chunk$choices$||null===(_chunk$choices$=_chunk$choices$.delta)||void 0===_chunk$choices$?void 0:_chunk$choices$.role)&&void 0!==_chunk$choices$0$delt?_chunk$choices$0$delt:null===lastMessage||void 0===lastMessage?void 0:lastMessage.role,content:(null!==(_lastMessage$content=null===lastMessage||void 0===lastMessage?void 0:lastMessage.content)&&void 0!==_lastMessage$content?_lastMessage$content:"")+(null!==(_chunk$choices$0$delt2=null===(_chunk$choices$2=chunk.choices[0])||void 0===_chunk$choices$2||null===(_chunk$choices$2=_chunk$choices$2.delta)||void 0===_chunk$choices$2?void 0:_chunk$choices$2.content)&&void 0!==_chunk$choices$0$delt2?_chunk$choices$0$delt2:"")}]):oldMessages});case 2:case"end":return _context2.stop()}},_loop)}),_iterator=src_asyncIterator(stream);case 19:return _context3.next=21,_iterator.next();case 21:if(!(_iteratorAbruptCompletion=!(_step=_context3.sent).done)){_context3.next=26;break}return _context3.delegateYield(_loop(),"t0",23);case 23:_iteratorAbruptCompletion=!1,_context3.next=19;break;case 26:_context3.next=32;break;case 28:_context3.prev=28,_context3.t1=_context3["catch"](16),_didIteratorError=!0,_iteratorError=_context3.t1;case 32:if(_context3.prev=32,_context3.prev=33,!(_iteratorAbruptCompletion&&null!=_iterator.return)){_context3.next=37;break}return _context3.next=37,_iterator.return();case 37:if(_context3.prev=37,!_didIteratorError){_context3.next=40;break}throw _iteratorError;case 40:return _context3.finish(37);case 41:return _context3.finish(32);case 42:_context3.next=48;break;case 44:_context3.prev=44,_context3.t2=_context3["catch"](7),pushNotification({type:"error",content:t("common.server_error",{error:_context3.t2})}),clearChat();case 48:setLoading(!1),setTimeout(function(){var _textAreaRef$current;null===(_textAreaRef$current=textAreaRef.current)||void 0===_textAreaRef$current||null===(_textAreaRef$current=_textAreaRef$current.querySelector("textarea"))||void 0===_textAreaRef$current||_textAreaRef$current.focus()},10);case 50:case"end":return _context3.stop()}},_callee2,null,[[7,44],[16,28,32,42],[33,,37,41]])}));return function(){return _ref2.apply(this,arguments)}}(),clearChat=function(){setValue("message",""),setValue("instructions",""),setMessages([]),setTimeout(onChangeMessage,10)},renderMessageBody=function(content){var languages=[],matches=content.match(/^(```[A-Za-z]*)/m);matches&&src_toConsumableArray_toConsumableArray(matches).forEach(function(l){return l&&languages.push(l.replace(/^```/,""))});var replacedStrings=src_react_string_replace_default()(content,/^([A-Za-z \t]*)```([A-Za-z]*)?\n([\s\S]*?)```([A-Za-z \t]*)*$/gm,function(match){return match?/*#__PURE__*/src_react.createElement(src_Code,null,match):""});return/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p"},replacedStrings.filter(function(line,index){return!(languages.includes(line)&&"string"!=typeof replacedStrings[index+1]&&"undefined"!=typeof replacedStrings[index+1])}))},onChangeMessage=function(){if(textAreaRef.current){var textAreaElement=textAreaRef.current.querySelector("textarea");textAreaElement&&(textAreaElement.style.height="auto",textAreaElement.style.height=textAreaElement.scrollHeight+"px")}},pythonCode=src_getPythonModelCode({model:modelData,token:token}),curlCode=src_getCurlModelCode({model:modelData,token:token});// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
135586
|
+
// @ts-expect-error
|
|
135587
|
+
return console.log({modelData:modelData}),/*#__PURE__*/src_react.createElement(src_ContentLayout,{header:/*#__PURE__*/src_react.createElement(src_DetailsHeader,{title:/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(paramProjectName,paramRunName)},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h1"},paramRunName)),actionButtons:/*#__PURE__*/src_react.createElement(src_Button_Button,{disabled:loading,onClick:function(){return setViewCodeVisible(!0)}},t("models.code"))})},isLoadingRun&&/*#__PURE__*/src_react.createElement(src_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)),modelData&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.modelDetailsLayout},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.general},/*#__PURE__*/src_react.createElement(src_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("models.details.run_name")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_NavigateLink_NavigateLink,{href:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.FORMAT(modelData.project_name,null!==(_modelData$run_name=modelData.run_name)&&void 0!==_modelData$run_name?_modelData$run_name:"No run name")},modelData.run_name))),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("models.model_name")),/*#__PURE__*/src_react.createElement("div",null,modelData.name)),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"awsui-key-label"},t("models.type")),/*#__PURE__*/src_react.createElement("div",null,modelData.type))))),/*#__PURE__*/src_react.createElement("form",{className:src_Details_styles_module.modelForm,onSubmit:handleSubmit(onSubmit)},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.buttons},/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"remove",disabled:loading||!messages.length,onClick:clearChat})),/*#__PURE__*/src_react.createElement("aside",{className:src_Details_styles_module.side},/*#__PURE__*/src_react.createElement(src_FormTextarea,{rows:4,disabled:loading,label:t("models.details.instructions"),constraintText:t("models.details.instructions_description"),control:control,name:"instructions"})),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.chat,ref:chatList},!messageForShowing.length&&/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("models.details.chat_empty_title"),message:t("models.details.chat_empty_message")}),messageForShowing.map(function(message,index){return/*#__PURE__*/src_react.createElement("div",{key:index,className:src_Details_styles_module.message},/*#__PURE__*/src_react.createElement(src_ChatBubble,{ariaLabel:"",type:"user"===message.role?"outgoing":"incoming",avatar:/*#__PURE__*/src_react.createElement(src_Avatar,{ariaLabel:src_MESSAGE_ROLE_MAP[message.role],color:"user"===message.role?"default":"gen-ai",iconName:"user"===message.role?"user-profile":"gen-ai"})},renderMessageBody(message.content||"...")))})),/*#__PURE__*/src_react.createElement("div",{ref:textAreaRef,className:src_Details_styles_module.messageForm},/*#__PURE__*/src_react.createElement(src_FormTextarea,{stretch:!0,placeholder:t("models.details.message_placeholder"),control:control,disabled:loading,name:"message",onKeyDown:function(event){var _event$detail,_event$detail2,_event$detail3,_event$detail4,isCtrlOrShiftKey=(null===event||void 0===event||null===(_event$detail=event.detail)||void 0===_event$detail?void 0:_event$detail.ctrlKey)||(null===event||void 0===event||null===(_event$detail2=event.detail)||void 0===_event$detail2?void 0:_event$detail2.shiftKey);13!==(null===event||void 0===event||null===(_event$detail3=event.detail)||void 0===_event$detail3?void 0:_event$detail3.keyCode)||isCtrlOrShiftKey?13===(null===event||void 0===event||null===(_event$detail4=event.detail)||void 0===_event$detail4?void 0:_event$detail4.keyCode)&&isCtrlOrShiftKey&&(event.preventDefault(),setValue("message",messageText+"\n"),setTimeout(onChangeMessage,0)):handleSubmit(onSubmit)()},onChange:onChangeMessage}),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.buttons},/*#__PURE__*/src_react.createElement(src_Button_Button,{variant:"primary",disabled:loading},t("common.send")))))),/*#__PURE__*/src_react.createElement(src_modal_Modal,{visible:viewCodeVisible,header:t("models.details.view_code"),size:"large",footer:/*#__PURE__*/src_react.createElement(src_box_Box,{float:"right"},/*#__PURE__*/src_react.createElement(src_Button_Button,{variant:"normal",onClick:function(){return setViewCodeVisible(!1)}},t("common.close"))),onDismiss:function(){return setViewCodeVisible(!1)}},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"m",direction:"vertical"},/*#__PURE__*/src_react.createElement(src_box_Box,null,t("models.details.view_code_description")),/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.viewCodeControls},/*#__PURE__*/src_react.createElement("div",{className:src_Details_styles_module.copyButton},/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"copy",onClick:function(){return codeTab===src_CodeTab.Python?src_copyToClipboard(pythonCode):codeTab===src_CodeTab.Curl?src_copyToClipboard(curlCode):void 0}})),/*#__PURE__*/src_react.createElement(src_Tabs_Tabs,{onChange:function(_ref3){var detail=_ref3.detail;return setCodeTab(detail.activeTabId)},activeTabId:codeTab,tabs:[{label:"python",id:src_CodeTab.Python,content:/*#__PURE__*/src_react.createElement(src_Code,null,pythonCode)},{label:"curl",id:src_CodeTab.Curl,content:/*#__PURE__*/src_react.createElement(src_Code,null,curlCode)}]}))))))};
|
|
135538
135588
|
;// ./src/pages/Project/utils.ts
|
|
135539
135589
|
var src_getProjectRoleByUserName=function(project,userName){var _project$members$find,_project$members$find2;return null!==(_project$members$find=null===(_project$members$find2=project.members.find(function(m){return m.user.username===userName}))||void 0===_project$members$find2?void 0:_project$members$find2.project_role)&&void 0!==_project$members$find?_project$members$find:null};
|
|
135540
135590
|
;// ./src/pages/Project/hooks/useCheckAvailableProjectPermission.ts
|
|
@@ -135561,12 +135611,12 @@ return{columns:columns}};
|
|
|
135561
135611
|
var src_SEARCHABLE_COLUMNS=["project_name","owner.username"];var src_ProjectList=function(){var _t,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useGetProjectsQuery=src_useGetProjectsQuery(),isLoading=_useGetProjectsQuery.isLoading,isFetching=_useGetProjectsQuery.isFetching,data=_useGetProjectsQuery.data,refetch=_useGetProjectsQuery.refetch,_useCheckAvailablePro=src_useCheckAvailableProjectPermission(),isAvailableDeletingPermission=_useCheckAvailablePro.isAvailableDeletingPermission,isAvailableProjectManaging=_useCheckAvailablePro.isAvailableProjectManaging,_useDeleteProject=src_useDeleteProject(),deleteProject=_useDeleteProject.deleteProject,deleteProjects=_useDeleteProject.deleteProjects,isDeleting=_useDeleteProject.isDeleting,navigate=src_dist_useNavigate(),sortedData=(0,src_react.useMemo)(function(){return data?src_toConsumableArray_toConsumableArray(data).sort(function(a,b){return new Date(b.created_at)-new Date(a.created_at)}):[];// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
135562
135612
|
// @ts-ignore
|
|
135563
135613
|
},[data]);src_useBreadcrumbs_useBreadcrumbs([{text:t("navigation.project_other"),href:src_routes_ROUTES.PROJECT.LIST}]);var addProjectHandler=function(){navigate(src_routes_ROUTES.PROJECT.ADD)},_useCollection=src_use_collection_useCollection(sortedData,{filtering:{empty:function(){return/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("projects.empty_message_title"),message:t("projects.empty_message_text")},isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:addProjectHandler},t("common.add")))}(),noMatch:function(onClearFilter){return/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("projects.nomatch_message_title"),message:t("projects.nomatch_message_text")},/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:onClearFilter},t("projects.nomatch_message_button_label")))}(function(){return actions.setFiltering("")}),filteringFunction:function(projectItem,filteringText){var filteringTextLowerCase=filteringText.toLowerCase();return src_SEARCHABLE_COLUMNS.map(function(key){return (0,src_lodash.get)(projectItem,key)}).some(function(value){return"string"==typeof value&&-1<value.trim().toLowerCase().indexOf(filteringTextLowerCase)})}},pagination:{pageSize:20},selection:{}}),items=_useCollection.items,actions=_useCollection.actions,filteredItemsCount=_useCollection.filteredItemsCount,collectionProps=_useCollection.collectionProps,filterProps=_useCollection.filterProps,paginationProps=_useCollection.paginationProps,selectedItems=collectionProps.selectedItems,isDisabledDeleteSelected=(0,src_react.useMemo)(function(){return!(null!==selectedItems&&void 0!==selectedItems&&selectedItems.length&&!isDeleting)||!selectedItems.every(isAvailableDeletingPermission)},[selectedItems]),_useColumnsDefinition=src_useColumnsDefinitions_useColumnsDefinitions({loading:isLoading,onDeleteClick:isAvailableProjectManaging?deleteProject:void 0}),columns=_useColumnsDefinition.columns;return/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_table,src_extends_extends({},collectionProps,{variant:"full-page",columnDefinitions:columns,items:items,loading:isLoading||isFetching,loadingText:t("common.loading"),selectionType:isAvailableProjectManaging?"multi":void 0,stickyHeader:!0,header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"awsui-h1-sticky",counter:function(){return null!==data&&void 0!==data&&data.length?"(".concat(data.length,")"):""}(),actions:isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xs",direction:"horizontal"},/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{disabled:isDisabledDeleteSelected,formAction:"none",onClick:function(){null!==selectedItems&&void 0!==selectedItems&&selectedItems.length&&deleteProjects(src_toConsumableArray_toConsumableArray(selectedItems)).catch(console.log)},confirmTitle:t("projects.edit.delete_projects_confirm_title"),confirmContent:t("projects.edit.delete_projects_confirm_message")},t("common.delete")),/*#__PURE__*/src_react.createElement(src_Button_Button,{onClick:addProjectHandler},t("common.add")),/*#__PURE__*/src_react.createElement(src_Button_Button,{iconName:"refresh",disabled:isLoading||isFetching,ariaLabel:t("common.refresh"),onClick:refetch}))},t("projects.page_title")),filter:/*#__PURE__*/src_react.createElement(src_text_filter,src_extends_extends({},filterProps,{filteringPlaceholder:t("projects.search_placeholder")||"",countText:null!==(_t=t("common.match_count_with_value",{count:filteredItemsCount}))&&void 0!==_t?_t:"",disabled:isLoading})),pagination:/*#__PURE__*/src_react.createElement(src_pagination_Pagination,src_extends_extends({},paginationProps,{disabled:isLoading}))})))};
|
|
135564
|
-
;// ./src/pages/Project/hooks/useProjectMemberActions.ts
|
|
135565
|
-
var src_useProjectMemberActions=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,navigate=src_dist_useNavigate(),_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useAddProjectMemberM=src_useAddProjectMemberMutation(),_useAddProjectMemberM2=src_slicedToArray_slicedToArray(_useAddProjectMemberM,2),addMember=_useAddProjectMemberM2[0],isAdding=_useAddProjectMemberM2[1].isLoading,_useRemoveProjectMemb=src_useRemoveProjectMemberMutation(),_useRemoveProjectMemb2=src_slicedToArray_slicedToArray(_useRemoveProjectMemb,2),removeMember=_useRemoveProjectMemb2[0],isRemoving=_useRemoveProjectMemb2[1].isLoading,handleJoinProject=/*#__PURE__*/function(){var _ref=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(projectName,username){return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:if(username&&projectName){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,addMember({project_name:projectName,username:username,project_role:"user"}).unwrap();case 5:pushNotification({type:"success",content:t("projects.join_success")}),_context.next=12;break;case 8:_context.prev=8,_context.t0=_context["catch"](2),console.error("Failed to join project:",_context.t0),pushNotification({type:"error",content:t("projects.join_error")});case 12:case"end":return _context.stop()}},_callee,null,[[2,8]])}));return function(){return _ref.apply(this,arguments)}}(),handleLeaveProject=/*#__PURE__*/function(){var _ref2=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee2(projectName,username,onLeaveSuccess){var _error$data,errorMessage,_error$data$detail$;return src_regenerator_default().wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:if(username&&projectName){_context2.next=2;break}return _context2.abrupt("return");case 2:return _context2.prev=2,_context2.next=5,removeMember({project_name:projectName,username:username}).unwrap();case 5:pushNotification({type:"success",content:t("projects.leave_success")}),null===onLeaveSuccess||void 0===onLeaveSuccess||onLeaveSuccess(),_context2.next=15;break;case 9:_context2.prev=9,_context2.t0=_context2["catch"](2),console.error("Failed to leave project:",_context2.t0),errorMessage=t("projects.leave_error"),null!==_context2.t0&&void 0!==_context2.t0&&null!==(_error$data=_context2.t0.data)&&void 0!==_error$data&&_error$data.detail&&(Array.isArray(_context2.t0.data.detail)?errorMessage=(null===(_error$data$detail$=_context2.t0.data.detail[0])||void 0===_error$data$detail$?void 0:_error$data$detail$.msg)||errorMessage:"string"==typeof _context2.t0.data.detail?errorMessage=_context2.t0.data.detail:_context2.t0.data.detail.msg&&(errorMessage=_context2.t0.data.detail.msg)),pushNotification({type:"error",content:errorMessage});case 15:case"end":return _context2.stop()}},_callee2,null,[[2,9]])}));return function(){return _ref2.apply(this,arguments)}}();return{handleJoinProject:handleJoinProject,handleLeaveProject:handleLeaveProject,isMemberActionLoading:isAdding||isRemoving}};
|
|
135566
135614
|
;// ./src/pages/Project/Details/index.tsx
|
|
135567
|
-
var src_ProjectDetails=function(){var _params$projectName,
|
|
135615
|
+
var src_ProjectDetails=function(){var _params$projectName,params=src_dist_useParams(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"";return/*#__PURE__*/src_react.createElement(src_ContentLayout,{header:/*#__PURE__*/src_react.createElement(src_DetailsHeader,{title:paramProjectName})},/*#__PURE__*/src_react.createElement(src_Outlet,null))};
|
|
135568
135616
|
;// ./src/pages/Project/hooks/useConfigProjectCliComand.ts
|
|
135569
135617
|
var src_useConfigProjectCliCommand=function(_ref){var projectName=_ref.projectName,currentUserToken=src_hooks_useAppSelector(src_selectAuthToken),cliCommand="dstack project add --name ".concat(projectName," --url ").concat(location.origin," --token ").concat(currentUserToken);return[cliCommand,function(){src_copyToClipboard(cliCommand)}]};
|
|
135618
|
+
;// ./src/pages/Project/hooks/useProjectMemberActions.ts
|
|
135619
|
+
var src_useProjectMemberActions=function(){var _useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useAddProjectMemberM=src_useAddProjectMemberMutation(),_useAddProjectMemberM2=src_slicedToArray_slicedToArray(_useAddProjectMemberM,2),addMember=_useAddProjectMemberM2[0],isAdding=_useAddProjectMemberM2[1].isLoading,_useRemoveProjectMemb=src_useRemoveProjectMemberMutation(),_useRemoveProjectMemb2=src_slicedToArray_slicedToArray(_useRemoveProjectMemb,2),removeMember=_useRemoveProjectMemb2[0],isRemoving=_useRemoveProjectMemb2[1].isLoading,handleJoinProject=/*#__PURE__*/function(){var _ref=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee(projectName,username){return src_regenerator_default().wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:if(username&&projectName){_context.next=2;break}return _context.abrupt("return");case 2:return _context.prev=2,_context.next=5,addMember({project_name:projectName,username:username,project_role:"user"}).unwrap();case 5:pushNotification({type:"success",content:t("projects.join_success")}),_context.next=12;break;case 8:_context.prev=8,_context.t0=_context["catch"](2),console.error("Failed to join project:",_context.t0),pushNotification({type:"error",content:t("projects.join_error")});case 12:case"end":return _context.stop()}},_callee,null,[[2,8]])}));return function(){return _ref.apply(this,arguments)}}(),handleLeaveProject=/*#__PURE__*/function(){var _ref2=src_asyncToGenerator_asyncToGenerator(/*#__PURE__*/src_regenerator_default().mark(function _callee2(projectName,username,onLeaveSuccess){var _error$data,errorMessage,_error$data$detail$;return src_regenerator_default().wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:if(username&&projectName){_context2.next=2;break}return _context2.abrupt("return");case 2:return _context2.prev=2,_context2.next=5,removeMember({project_name:projectName,username:username}).unwrap();case 5:pushNotification({type:"success",content:t("projects.leave_success")}),null===onLeaveSuccess||void 0===onLeaveSuccess||onLeaveSuccess(),_context2.next=15;break;case 9:_context2.prev=9,_context2.t0=_context2["catch"](2),console.error("Failed to leave project:",_context2.t0),errorMessage=t("projects.leave_error"),null!==_context2.t0&&void 0!==_context2.t0&&null!==(_error$data=_context2.t0.data)&&void 0!==_error$data&&_error$data.detail&&(Array.isArray(_context2.t0.data.detail)?errorMessage=(null===(_error$data$detail$=_context2.t0.data.detail[0])||void 0===_error$data$detail$?void 0:_error$data$detail$.msg)||errorMessage:"string"==typeof _context2.t0.data.detail?errorMessage=_context2.t0.data.detail:_context2.t0.data.detail.msg&&(errorMessage=_context2.t0.data.detail.msg)),pushNotification({type:"error",content:errorMessage});case 15:case"end":return _context2.stop()}},_callee2,null,[[2,9]])}));return function(){return _ref2.apply(this,arguments)}}();return{handleJoinProject:handleJoinProject,handleLeaveProject:handleLeaveProject,isMemberActionLoading:isAdding||isRemoving}};
|
|
135570
135620
|
;// ./src/pages/Project/Members/UsersAutosuggest/index.tsx
|
|
135571
135621
|
var src_UsersAutosuggest_excluded=["optionsFilter","onSelect"];var src_UserAutosuggest=function(_ref){var optionsFilter=_ref.optionsFilter,onSelectProp=_ref.onSelect,props=src_objectWithoutProperties_objectWithoutProperties(_ref,src_UsersAutosuggest_excluded),_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useState=(0,src_react.useState)(""),_useState2=src_slicedToArray_slicedToArray(_useState,2),value=_useState2[0],setValue=_useState2[1],_useGetUserListQuery=src_useGetUserListQuery(),usersData=_useGetUserListQuery.data,isUsersLoading=_useGetUserListQuery.isLoading,options=(0,src_react.useMemo)(function(){return usersData?usersData.map(function(user){return{value:user.username}}):[]},[usersData]),filteredOptions=optionsFilter?optionsFilter(options):options;return/*#__PURE__*/src_react.createElement(src_autosuggest,src_extends_extends({value:value,enteredTextLabel:function(text){return"".concat(t("users_autosuggest.entered_text")," ").concat(text)},onChange:function(_ref2){var detail=_ref2.detail;return setValue(detail.value)},options:filteredOptions,statusType:isUsersLoading?"loading":void 0,loadingText:t("users_autosuggest.loading"),placeholder:t("users_autosuggest.placeholder"),empty:t("users_autosuggest.no_match"),onSelect:function(args){onSelectProp&&args.detail.value&&onSelectProp(args),setValue("")}},props))};
|
|
135572
135622
|
;// ./src/pages/Project/Members/styles.module.scss
|
|
@@ -135574,11 +135624,10 @@ var src_UsersAutosuggest_excluded=["optionsFilter","onSelect"];var src_UserAutos
|
|
|
135574
135624
|
/* harmony default export */ const src_Members_styles_module = ({"role":"ECf2j","roleFieldWrapper":"cvhmo","deleteMemberButtonWrapper":"aeJmV"});
|
|
135575
135625
|
;// ./src/pages/Project/Members/index.tsx
|
|
135576
135626
|
function src_Members_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_Members_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_Members_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_Members_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}//TODO move type to special file
|
|
135577
|
-
var src_ProjectMembers=function(_ref){var members=_ref.members,loading=_ref.loading,onChange=_ref.onChange,readonly=_ref.readonly,isAdmin=_ref.isAdmin,project=_ref.project,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,
|
|
135578
|
-
src_react.createElement("form",{onSubmit:handleSubmit(function(){})},/*#__PURE__*/src_react.createElement(src_table,{selectionType:"multi",selectedItems:selectedItems,onSelectionChange:function(event){return setSelectedItems(event.detail.selectedItems)},columnDefinitions:COLUMN_DEFINITIONS,items:items,header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2",counter:"(".concat(null===items||void 0===items?void 0:items.length,")"),actions:function(){var actions=[];// Add management actions only if not readonly
|
|
135627
|
+
var src_ProjectMembers=function(_ref){var members=_ref.members,loading=_ref.loading,onChange=_ref.onChange,readonly=_ref.readonly,isAdmin=_ref.isAdmin,project=_ref.project,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useState=(0,src_react.useState)([]),_useState2=src_slicedToArray_slicedToArray(_useState,2),selectedItems=_useState2[0],setSelectedItems=_useState2[1],_useGetUserListQuery=src_useGetUserListQuery(),usersData=_useGetUserListQuery.data,userData=src_hooks_useAppSelector(src_selectUserData),_useProjectMemberActi=src_useProjectMemberActions(),handleJoinProject=_useProjectMemberActi.handleJoinProject,handleLeaveProject=_useProjectMemberActi.handleLeaveProject,isMemberActionLoading=_useProjectMemberActi.isMemberActionLoading,_useForm=src_index_esm_useForm({defaultValues:{members:null!==members&&void 0!==members?members:[]}}),handleSubmit=_useForm.handleSubmit,control=_useForm.control,getValues=_useForm.getValues,setValue=_useForm.setValue,_useFieldArray=src_useFieldArray({control:control,name:"members"}),fields=_useFieldArray.fields,append=_useFieldArray.append,remove=_useFieldArray.remove,currentUserRole=(0,src_react.useMemo)(function(){if(!(null!==userData&&void 0!==userData&&userData.username))return null;var member=null===members||void 0===members?void 0:members.find(function(m){return m.user.username===userData.username});return(null===member||void 0===member?void 0:member.project_role)||null},[members,null===userData||void 0===userData?void 0:userData.username]);(0,src_react.useEffect)(function(){members&&setValue("members",members)},[members]);var onChangeHandler=function(){onChange(getValues("members"))},fieldsWithIndex=fields.map(function(field,index){return src_Members_objectSpread(src_Members_objectSpread({},field),{},{index:index})}),_useCollection=src_use_collection_useCollection(fieldsWithIndex,{filtering:{empty:/*#__PURE__*/src_react.createElement(src_ListEmptyMessage_ListEmptyMessage,{title:t("projects.edit.members_empty_message_title"),message:t("projects.edit.members_empty_message_text")})},pagination:{pageSize:10},selection:{}}),items=_useCollection.items,paginationProps=_useCollection.paginationProps,roleSelectOptions=[{label:t("roles.admin"),value:"admin",disabled:!isAdmin},{label:t("roles.manager"),value:"manager"},{label:t("roles.user"),value:"user"}],addMemberHandler=function(username){var selectedUser=null===usersData||void 0===usersData?void 0:usersData.find(function(u){return u.username===username});selectedUser?(append({user:selectedUser,project_role:"user"}),onChangeHandler()):onChange([].concat(src_toConsumableArray_toConsumableArray(getValues("members")),[{user:{username:username},project_role:"user"}]))},deleteSelectedMembers=function(){remove(selectedItems.map(function(_ref2){var index=_ref2.index;return index})),setSelectedItems([]),onChangeHandler()},COLUMN_DEFINITIONS=[{id:"name",header:t("projects.edit.members.name"),cell:function(item){return/*#__PURE__*/src_react.createElement(src_components_link,{target:"_blank",href:src_routes_ROUTES.USER.DETAILS.FORMAT(item.user.username)},item.user.username)}},{id:"global_role",header:t("projects.edit.members.role"),cell:function(field){var isAvailableForAdmin=!readonly&&(isAdmin||"admin"!==field.project_role);return/*#__PURE__*/src_react.createElement("div",{className:src_Members_styles_module.role},/*#__PURE__*/src_react.createElement("div",{className:src_Members_styles_module.roleFieldWrapper},/*#__PURE__*/src_react.createElement(src_FormSelect,{key:field.user.username,control:control,name:"members.".concat(field.index,".project_role"),options:roleSelectOptions,disabled:loading||!isAvailableForAdmin,expandToViewport:!0,onChange:onChangeHandler})),/*#__PURE__*/src_react.createElement("div",{className:src_Members_styles_module.deleteMemberButtonWrapper},isAvailableForAdmin&&/*#__PURE__*/src_react.createElement(src_Button_Button,{disabled:loading,formAction:"none",onClick:function(){remove(field.index),onChangeHandler()},variant:"icon",iconName:"remove"})))}}];return/*#__PURE__*/src_react.createElement("form",{onSubmit:handleSubmit(function(){})},/*#__PURE__*/src_react.createElement(src_table,{selectionType:"multi",selectedItems:selectedItems,onSelectionChange:function(event){return setSelectedItems(event.detail.selectedItems)},columnDefinitions:COLUMN_DEFINITIONS,items:items,header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2",counter:"(".concat(null===items||void 0===items?void 0:items.length,")"),actions:function(){var actions=[];// Add management actions only if not readonly
|
|
135579
135628
|
// Add join/leave button if user is authenticated (available even in readonly mode)
|
|
135580
135629
|
if(readonly||actions.push(/*#__PURE__*/src_react.createElement(src_Button_Button,{key:"delete",formAction:"none",onClick:deleteSelectedMembers,disabled:!selectedItems.length},t("common.delete"))),null!==userData&&void 0!==userData&&userData.username&&project)if(!(null!==currentUserRole))actions.unshift(/*#__PURE__*/src_react.createElement(src_Button_Button,{key:"join",onClick:function(){return handleJoinProject(project.project_name,userData.username)},disabled:isMemberActionLoading,variant:"normal"},isMemberActionLoading?t("common.loading"):t("projects.join")));else{// Check if user is the last admin - if so, don't show leave button
|
|
135581
|
-
var adminCount=project.members.filter(function(member){return"admin"===member.project_role}).length;"admin"===currentUserRole&&1>=adminCount||actions.unshift(/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{key:"leave",onClick:function(){return handleLeaveProject(project.project_name,userData.username)},disabled:isMemberActionLoading,variant:"danger-normal",confirmTitle:t("projects.leave_confirm_title"),confirmContent:t("projects.leave_confirm_message"),confirmButtonLabel:t("projects.leave")},isMemberActionLoading?t("common.loading"):t("projects.leave")))}return 0<actions.length?/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xs",direction:"horizontal"},actions):void 0}()},t("projects.edit.members.section_title")),filter:readonly?void 0:/*#__PURE__*/src_react.createElement(src_UserAutosuggest,{disabled:loading,onSelect:function(_ref3){var detail=_ref3.detail;return addMemberHandler(detail.value)},optionsFilter:function(options){return options.filter(function(o){return!fields.find(function(f){return f.user.username===o.value})})}}),pagination:/*#__PURE__*/src_react.createElement(src_pagination_Pagination,paginationProps)}))
|
|
135630
|
+
var adminCount=project.members.filter(function(member){return"admin"===member.project_role}).length;"admin"===currentUserRole&&1>=adminCount||actions.unshift(/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{key:"leave",onClick:function(){return handleLeaveProject(project.project_name,userData.username)},disabled:isMemberActionLoading,variant:"danger-normal",confirmTitle:t("projects.leave_confirm_title"),confirmContent:t("projects.leave_confirm_message"),confirmButtonLabel:t("projects.leave")},isMemberActionLoading?t("common.loading"):t("projects.leave")))}return 0<actions.length?/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"xs",direction:"horizontal"},actions):void 0}()},t("projects.edit.members.section_title")),filter:readonly?void 0:/*#__PURE__*/src_react.createElement(src_UserAutosuggest,{disabled:loading,onSelect:function(_ref3){var detail=_ref3.detail;return addMemberHandler(detail.value)},optionsFilter:function(options){return options.filter(function(o){return!fields.find(function(f){return f.user.username===o.value})})}}),pagination:/*#__PURE__*/src_react.createElement(src_pagination_Pagination,paginationProps)}))};
|
|
135582
135631
|
;// ./src/services/backend.ts
|
|
135583
135632
|
var src_extendedProjectApi=src_projectApi.injectEndpoints({endpoints:function(builder){return{getBackendTypes:builder.query({query:function(){return{url:src_API.BACKENDS.LIST_TYPES(),method:"POST"}}}),createBackend:builder.mutation({query:function(_ref){var projectName=_ref.projectName,config=_ref.config;return{url:src_API.PROJECT_BACKENDS.CREATE(projectName),method:"POST",body:config}},invalidatesTags:function(result,error,arg){return[{type:"Projects",id:arg.projectName}]}}),updateBackend:builder.mutation({query:function(_ref2){var projectName=_ref2.projectName,config=_ref2.config;return{url:src_API.PROJECT_BACKENDS.UPDATE(projectName),method:"POST",body:config}},invalidatesTags:function(result,error,arg){return[{type:"Projects",id:arg.projectName},{type:"Backends",id:null===result||void 0===result?void 0:result.type}]}}),backendValues:builder.mutation({query:function(data){return{url:src_API.BACKENDS.CONFIG_VALUES(),method:"POST",body:data}}}),getBackendConfig:builder.query({query:function(_ref3){var projectName=_ref3.projectName,backendName=_ref3.backendName;return{url:src_API.PROJECT_BACKENDS.BACKEND_CONFIG_INFO(projectName,backendName),method:"POST"}},providesTags:function(result,error,arg){return result?[{type:"Backends",id:arg.backendName}]:[]}}),createBackendViaYaml:builder.mutation({query:function(_ref4){var projectName=_ref4.projectName,backend=_ref4.backend;return{url:src_API.PROJECT_BACKENDS.CREATE_YAML(projectName),method:"POST",body:backend}}}),updateBackendViaYaml:builder.mutation({query:function(_ref5){var projectName=_ref5.projectName,backend=_ref5.backend;return{url:src_API.PROJECT_BACKENDS.UPDATE_YAML(projectName),method:"POST",body:backend}}}),getBackendYaml:builder.query({query:function(_ref6){var projectName=_ref6.projectName,backendName=_ref6.backendName;return{url:src_API.PROJECT_BACKENDS.GET_YAML(projectName,backendName),method:"POST"}}}),getProjectBackends:builder.query({query:function(_ref7){var projectName=_ref7.projectName;return{url:src_API.PROJECT_BACKENDS.LIST(projectName),method:"POST"}},providesTags:function(result){return result?[].concat(src_toConsumableArray_toConsumableArray(result.map(function(_ref8){var name=_ref8.name;return{type:"Backends",id:name}})),["Backends"]):["Backends"]}}),deleteProjectBackend:builder.mutation({query:function(_ref9){var projectName=_ref9.projectName,backends_names=_ref9.backends_names;return{url:src_API.PROJECT_BACKENDS.DELETE(projectName),method:"POST",body:{backends_names:backends_names}}},invalidatesTags:function(result,error,arg){return[{type:"Projects",id:arg.projectName},{type:"Backends"}]}})}}});var src_useGetBackendTypesQuery=src_extendedProjectApi.useGetBackendTypesQuery,src_useDeleteProjectBackendMutation=src_extendedProjectApi.useDeleteProjectBackendMutation,src_useCreateBackendMutation=src_extendedProjectApi.useCreateBackendMutation,src_useBackendValuesMutation=src_extendedProjectApi.useBackendValuesMutation,src_useGetBackendConfigQuery=src_extendedProjectApi.useGetBackendConfigQuery,src_useUpdateBackendMutation=src_extendedProjectApi.useUpdateBackendMutation,src_useCreateBackendViaYamlMutation=src_extendedProjectApi.useCreateBackendViaYamlMutation,src_useUpdateBackendViaYamlMutation=src_extendedProjectApi.useUpdateBackendViaYamlMutation,src_useGetBackendYamlQuery=src_extendedProjectApi.useGetBackendYamlQuery;
|
|
135584
135633
|
;// ./src/pages/Project/Backends/hooks/useBackendsTable.ts
|
|
@@ -135633,7 +135682,10 @@ var src_CLI_INFO={header:/*#__PURE__*/src_react.createElement("h2",null,"CLI"),b
|
|
|
135633
135682
|
// extracted by mini-css-extract-plugin
|
|
135634
135683
|
/* harmony default export */ const src_Settings_styles_module = ({"dangerSectionGrid":"U24Qs","dangerSectionField":"AKyqV","codeWrapper":"LmVNG","code":"Vntdh","copy":"Wtjre"});
|
|
135635
135684
|
;// ./src/pages/Project/Details/Settings/index.tsx
|
|
135636
|
-
var src_ProjectSettings=function(){var _params$projectName,_currentUser$username,_data$backends,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),navigate=src_dist_useNavigate(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",_useHelpPanel=src_useHelpPanel_useHelpPanel(),_useHelpPanel2=src_slicedToArray_slicedToArray(_useHelpPanel,1),openHelpPanel=_useHelpPanel2[0],_useConfigProjectCliC=src_useConfigProjectCliCommand({projectName:paramProjectName}),_useConfigProjectCliC2=src_slicedToArray_slicedToArray(_useConfigProjectCliC,2),configCliCommand=_useConfigProjectCliC2[0],copyCliCommand=_useConfigProjectCliC2[1],_useCheckAvailablePro=src_useCheckAvailableProjectPermission(),isAvailableDeletingPermission=_useCheckAvailablePro.isAvailableDeletingPermission,isProjectManager=_useCheckAvailablePro.isProjectManager,isProjectAdmin=_useCheckAvailablePro.isProjectAdmin,isAvailableProjectManaging=_useCheckAvailablePro.isAvailableProjectManaging,_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useUpdateProjectMemb=src_useUpdateProjectMembersMutation(),_useUpdateProjectMemb2=src_slicedToArray_slicedToArray(_useUpdateProjectMemb,1),updateProjectMembers=_useUpdateProjectMemb2[0],_useUpdateProjectMuta=src_useUpdateProjectMutation(),_useUpdateProjectMuta2=src_slicedToArray_slicedToArray(_useUpdateProjectMuta,1),updateProject=_useUpdateProjectMuta2[0],_useDeleteProject=src_useDeleteProject(),deleteProject=_useDeleteProject.deleteProject,isDeleting=_useDeleteProject.isDeleting,_useGetUserDataQuery=src_useGetUserDataQuery({}),currentUser=_useGetUserDataQuery.data,_useGetProjectQuery=src_useGetProjectQuery({name:paramProjectName}),data=_useGetProjectQuery.data,isLoading=_useGetProjectQuery.isLoading,error=_useGetProjectQuery.error;(0,src_react.useEffect)(function(){error&&"status"in error&&404===error.status&&src_riseRouterException()},[error]);var currentUserRole=data?src_getProjectRoleByUserName(data,null!==(_currentUser$username=null===currentUser||void 0===currentUser?void 0:currentUser.username)&&void 0!==_currentUser$username?_currentUser$username:""):null,currentOwner={label:null===data||void 0===data?void 0:data.owner.username,value:null===data||void 0===data?void 0:data.owner.username},visibilityOptions=[{label:t("projects.edit.visibility.private")||"",value:"private"},{label:t("projects.edit.visibility.public")||"",value:"public"}],currentVisibility=null!==data&&void 0!==data&&data.isPublic?"public":"private",_useState=(0,src_react.useState)(null!==data&&void 0!==data&&data.isPublic?visibilityOptions[1]:visibilityOptions[0]),_useState2=src_slicedToArray_slicedToArray(_useState,2),selectedVisibility=_useState2[0],setSelectedVisibility=_useState2[1];(0,src_react.useEffect)(function(){setSelectedVisibility(null!==data&&void 0!==data&&data.isPublic?visibilityOptions[1]:visibilityOptions[0])},[data]);var _useBackendsTable=src_useBackendsTable(paramProjectName,null!==(_data$backends=null===data||void 0===data?void 0:data.backends)&&void 0!==_data$backends?_data$backends:[]),backendsData=_useBackendsTable.data,isDeletingBackend=_useBackendsTable.isDeleting,addBackend=_useBackendsTable.addBackend,deleteBackend=_useBackendsTable.deleteBackend,editBackend=_useBackendsTable.editBackend,_useGatewaysTable=src_useGatewaysTable(paramProjectName),gatewaysData=_useGatewaysTable.data,isLoadingGateways=_useGatewaysTable.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)}]);var debouncedMembersHandler=(0,src_react.useCallback)((0,src_lodash.debounce)(function(members){updateProjectMembers({project_name:paramProjectName,members:members.map(function(m){return{project_role:m.project_role,username:m.user.username}})}).unwrap().then(function(){pushNotification({type:"success",content:t("projects.edit.update_members_success")})}).catch(function(error){var _error$data;pushNotification({type:"error",content:t("common.server_error",{error:null===error||void 0===error||null===(_error$data=error.data)||void 0===_error$data||null===(_error$data=_error$data.detail)||void 0===_error$data?void 0:_error$data.msg})})})},1e3),[]),changeVisibilityHandler=function(is_public){updateProject({project_name:paramProjectName,is_public:is_public}).unwrap().then(function(){pushNotification({type:"success",content:t("projects.edit.update_visibility_success")})}).catch(function(error){var _error$data2;pushNotification({type:"error",content:t("common.server_error",{error:null===error||void 0===error||null===(_error$data2=error.data)||void 0===_error$data2||null===(_error$data2=_error$data2.detail)||void 0===_error$data2?void 0:_error$data2.msg})})})},isDisabledButtons=(0,src_react.useMemo)(function(){return isDeleting||!data||!isAvailableDeletingPermission(data)},[data,isDeleting,isAvailableDeletingPermission]);return isLoading||!data||isLoadingGateways?/*#__PURE__*/src_react.createElement(src_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)):/*#__PURE__*/src_react.createElement(src_react.Fragment,null,data&&backendsData&&gatewaysData&&/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},null!==currentUserRole&&/*#__PURE__*/src_react.createElement(src_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2",info:/*#__PURE__*/src_react.createElement(src_InfoLink_InfoLink,{onFollow:function(){return openHelpPanel(src_CLI_INFO)}})},t("projects.edit.cli"))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"s"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p",color:"text-body-secondary"},"Run the following commands to set up the CLI for this project"),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.codeWrapper},/*#__PURE__*/src_react.createElement(src_Hotspot_Hotspot,{hotspotId:src_constants_HotspotIds.CONFIGURE_CLI_COMMAND},/*#__PURE__*/src_react.createElement(src_Code,{className:src_Settings_styles_module.code},configCliCommand),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.copy},/*#__PURE__*/src_react.createElement(src_popover,{dismissButton:!1,position:"top",size:"small",triggerType:"custom",content:/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:"success"},t("common.copied"))},/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",iconName:"copy",variant:"normal",onClick:copyCliCommand}))))))),/*#__PURE__*/src_react.createElement(src_BackendsTable,src_extends_extends({backends:backendsData},isProjectManager(data)?{onClickAddBackend:addBackend,editBackend:editBackend,deleteBackends:deleteBackend,isDisabledDelete:isDeletingBackend}:{})),/*#__PURE__*/src_react.createElement(src_GatewaysTable,{gateways:gatewaysData}),/*#__PURE__*/src_react.createElement(src_ProjectMembers,{onChange:debouncedMembersHandler,members:data.members,readonly:!isProjectManager(data),isAdmin:isProjectAdmin(data),project:data}),/*#__PURE__*/src_react.createElement(src_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("common.danger_zone"))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionGrid},isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.delete_this_project")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{variant:"danger-normal",disabled:isDisabledButtons,formAction:"none",onClick:function(){data&&deleteProject(data).then(function(){return navigate(src_routes_ROUTES.PROJECT.LIST)}).catch(function(error){console.error("Delete project failed:",error)})},confirmTitle:t("projects.edit.delete_project_confirm_title"),confirmContent:t("projects.edit.delete_project_confirm_message")},t("common.delete")))),isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.project_visibility")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{variant:"danger-normal",disabled:!isProjectManager(data),formAction:"none",onClick:function(){return changeVisibilityHandler("public"===selectedVisibility.value)},confirmTitle:t("projects.edit.update_visibility_confirm_title"),confirmButtonLabel:t("projects.edit.change_visibility"),confirmContent:/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"s"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p",color:"text-body-secondary"},t("projects.edit.update_visibility_confirm_message")),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionField},/*#__PURE__*/src_react.createElement(src_components_select,{options:visibilityOptions,selectedOption:selectedVisibility,onChange:function(event){return setSelectedVisibility(event.detail.selectedOption)},expandToViewport:!0,filteringType:"auto"})))},t("projects.edit.change_visibility")))),/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.owner")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionField},/*#__PURE__*/src_react.createElement(src_components_select,{disabled:!0,options:[currentOwner],selectedOption:currentOwner,expandToViewport:!0,filteringType:"auto"}))))))))};
|
|
135685
|
+
var src_ProjectSettings=function(){var _params$projectName,_currentUser$username,_data$backends,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,params=src_dist_useParams(),navigate=src_dist_useNavigate(),paramProjectName=null!==(_params$projectName=params.projectName)&&void 0!==_params$projectName?_params$projectName:"",_useHelpPanel=src_useHelpPanel_useHelpPanel(),_useHelpPanel2=src_slicedToArray_slicedToArray(_useHelpPanel,1),openHelpPanel=_useHelpPanel2[0],_useConfigProjectCliC=src_useConfigProjectCliCommand({projectName:paramProjectName}),_useConfigProjectCliC2=src_slicedToArray_slicedToArray(_useConfigProjectCliC,2),configCliCommand=_useConfigProjectCliC2[0],copyCliCommand=_useConfigProjectCliC2[1],_useCheckAvailablePro=src_useCheckAvailableProjectPermission(),isAvailableDeletingPermission=_useCheckAvailablePro.isAvailableDeletingPermission,isProjectManager=_useCheckAvailablePro.isProjectManager,isProjectAdmin=_useCheckAvailablePro.isProjectAdmin,isAvailableProjectManaging=_useCheckAvailablePro.isAvailableProjectManaging,_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],_useUpdateProjectMemb=src_useUpdateProjectMembersMutation(),_useUpdateProjectMemb2=src_slicedToArray_slicedToArray(_useUpdateProjectMemb,1),updateProjectMembers=_useUpdateProjectMemb2[0],_useUpdateProjectMuta=src_useUpdateProjectMutation(),_useUpdateProjectMuta2=src_slicedToArray_slicedToArray(_useUpdateProjectMuta,1),updateProject=_useUpdateProjectMuta2[0],_useDeleteProject=src_useDeleteProject(),deleteProject=_useDeleteProject.deleteProject,isDeleting=_useDeleteProject.isDeleting,_useGetUserDataQuery=src_useGetUserDataQuery({}),currentUser=_useGetUserDataQuery.data,_useGetProjectQuery=src_useGetProjectQuery({name:paramProjectName}),data=_useGetProjectQuery.data,isLoading=_useGetProjectQuery.isLoading,error=_useGetProjectQuery.error;(0,src_react.useEffect)(function(){error&&"status"in error&&404===error.status&&src_riseRouterException()},[error]);var currentUserRole=data?src_getProjectRoleByUserName(data,null!==(_currentUser$username=null===currentUser||void 0===currentUser?void 0:currentUser.username)&&void 0!==_currentUser$username?_currentUser$username:""):null,currentOwner={label:null===data||void 0===data?void 0:data.owner.username,value:null===data||void 0===data?void 0:data.owner.username},visibilityOptions=[{label:t("projects.edit.visibility.private")||"",value:"private"},{label:t("projects.edit.visibility.public")||"",value:"public"}],_useState=(0,src_react.useState)(null!==data&&void 0!==data&&data.isPublic?visibilityOptions[1]:visibilityOptions[0]),_useState2=src_slicedToArray_slicedToArray(_useState,2),selectedVisibility=_useState2[0],setSelectedVisibility=_useState2[1];(0,src_react.useEffect)(function(){setSelectedVisibility(null!==data&&void 0!==data&&data.isPublic?visibilityOptions[1]:visibilityOptions[0])},[data]);var _useBackendsTable=src_useBackendsTable(paramProjectName,null!==(_data$backends=null===data||void 0===data?void 0:data.backends)&&void 0!==_data$backends?_data$backends:[]),backendsData=_useBackendsTable.data,isDeletingBackend=_useBackendsTable.isDeleting,addBackend=_useBackendsTable.addBackend,deleteBackend=_useBackendsTable.deleteBackend,editBackend=_useBackendsTable.editBackend,_useGatewaysTable=src_useGatewaysTable(paramProjectName),gatewaysData=_useGatewaysTable.data,isLoadingGateways=_useGatewaysTable.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)}]);var debouncedMembersHandler=(0,src_react.useCallback)((0,src_lodash.debounce)(function(members){updateProjectMembers({project_name:paramProjectName,members:members.map(function(m){return{project_role:m.project_role,username:m.user.username}})}).unwrap().then(function(){pushNotification({type:"success",content:t("projects.edit.update_members_success")})})// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135686
|
+
.catch(function(error){var _error$data;pushNotification({type:"error",content:t("common.server_error",{error:null===error||void 0===error||null===(_error$data=error.data)||void 0===_error$data||null===(_error$data=_error$data.detail)||void 0===_error$data?void 0:_error$data.msg})})})},1e3),[]),changeVisibilityHandler=function(is_public){updateProject({project_name:paramProjectName,is_public:is_public}).unwrap().then(function(){pushNotification({type:"success",content:t("projects.edit.update_visibility_success")})})// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135687
|
+
.catch(function(error){var _error$data2;pushNotification({type:"error",content:t("common.server_error",{error:null===error||void 0===error||null===(_error$data2=error.data)||void 0===_error$data2||null===(_error$data2=_error$data2.detail)||void 0===_error$data2?void 0:_error$data2.msg})})})},isDisabledButtons=(0,src_react.useMemo)(function(){return isDeleting||!data||!isAvailableDeletingPermission(data)},[data,isDeleting,isAvailableDeletingPermission]);return isLoading||!data||isLoadingGateways?/*#__PURE__*/src_react.createElement(src_Container,null,/*#__PURE__*/src_react.createElement(src_Loader_Loader,null)):/*#__PURE__*/src_react.createElement(src_react.Fragment,null,data&&backendsData&&gatewaysData&&/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},null!==currentUserRole&&/*#__PURE__*/src_react.createElement(src_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2",info:/*#__PURE__*/src_react.createElement(src_InfoLink_InfoLink,{onFollow:function(){return openHelpPanel(src_CLI_INFO)}})},t("projects.edit.cli"))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"s"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p",color:"text-body-secondary"},"Run the following commands to set up the CLI for this project"),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.codeWrapper},/*#__PURE__*/src_react.createElement(src_Hotspot_Hotspot,{hotspotId:src_constants_HotspotIds.CONFIGURE_CLI_COMMAND},/*#__PURE__*/src_react.createElement(src_Code,{className:src_Settings_styles_module.code},configCliCommand),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.copy},/*#__PURE__*/src_react.createElement(src_popover,{dismissButton:!1,position:"top",size:"small",triggerType:"custom",content:/*#__PURE__*/src_react.createElement(src_status_indicator_StatusIndicator,{type:"success"},t("common.copied"))},/*#__PURE__*/src_react.createElement(src_Button_Button,{formAction:"none",iconName:"copy",variant:"normal",onClick:copyCliCommand}))))))),/*#__PURE__*/src_react.createElement(src_BackendsTable,src_extends_extends({backends:backendsData},isProjectManager(data)?{onClickAddBackend:addBackend,editBackend:editBackend,deleteBackends:deleteBackend,isDisabledDelete:isDeletingBackend}:{})),/*#__PURE__*/src_react.createElement(src_GatewaysTable,{gateways:gatewaysData}),/*#__PURE__*/src_react.createElement(src_ProjectMembers,{onChange:debouncedMembersHandler,members:data.members,readonly:!isProjectManager(data),isAdmin:isProjectAdmin(data),project:data}),/*#__PURE__*/src_react.createElement(src_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("common.danger_zone"))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionGrid},isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.delete_this_project")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{variant:"danger-normal",disabled:isDisabledButtons,formAction:"none",onClick:function(){data&&deleteProject(data).then(function(){return navigate(src_routes_ROUTES.PROJECT.LIST)})// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135688
|
+
.catch(function(error){console.error("Delete project failed:",error)})},confirmTitle:t("projects.edit.delete_project_confirm_title"),confirmContent:t("projects.edit.delete_project_confirm_message")},t("common.delete")))),isAvailableProjectManaging&&/*#__PURE__*/src_react.createElement(src_react.Fragment,null,/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.project_visibility")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement(src_ButtonWithConfirmation,{variant:"danger-normal",disabled:!isProjectManager(data),formAction:"none",onClick:function(){return changeVisibilityHandler("public"===selectedVisibility.value)},confirmTitle:t("projects.edit.update_visibility_confirm_title"),confirmButtonLabel:t("projects.edit.change_visibility"),confirmContent:/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"s"},/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"p",color:"text-body-secondary"},t("projects.edit.update_visibility_confirm_message")),/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionField},/*#__PURE__*/src_react.createElement(src_components_select,{options:visibilityOptions,selectedOption:selectedVisibility,onChange:function(event){return setSelectedVisibility(event.detail.selectedOption)},expandToViewport:!0,filteringType:"auto"})))},t("projects.edit.change_visibility")))),/*#__PURE__*/src_react.createElement(src_box_Box,{variant:"h5",color:"text-body-secondary"},t("projects.edit.owner")),/*#__PURE__*/src_react.createElement("div",null,/*#__PURE__*/src_react.createElement("div",{className:src_Settings_styles_module.dangerSectionField},/*#__PURE__*/src_react.createElement(src_components_select,{disabled:!0,options:[currentOwner],selectedOption:currentOwner,expandToViewport:!0,filteringType:"auto"}))))))))};
|
|
135637
135689
|
;// ./src/pages/Project/Form/index.tsx
|
|
135638
135690
|
function src_Form_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_Form_objectSpread(e){for(var t,r=1;r<arguments.length;r++)t=null==arguments[r]?{}:arguments[r],r%2?src_Form_ownKeys(Object(t),!0).forEach(function(r){src_defineProperty_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):src_Form_ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))});return e}var src_ProjectForm=function(_ref){var initialValues=_ref.initialValues,onCancel=_ref.onCancel,loading=_ref.loading,onSubmitProp=_ref.onSubmit,_useTranslation=src_useTranslation_useTranslation(),t=_useTranslation.t,_useNotifications=src_useNotifications_useNotifications(),_useNotifications2=src_slicedToArray_slicedToArray(_useNotifications,1),pushNotification=_useNotifications2[0],formMethods=src_index_esm_useForm({defaultValues:src_Form_objectSpread({isPublic:!1},initialValues)}),handleSubmit=formMethods.handleSubmit,control=formMethods.control,setError=formMethods.setError,clearErrors=formMethods.clearErrors;return/*#__PURE__*/src_react.createElement("form",{onSubmit:handleSubmit(function(data){clearErrors();// Transform frontend camelCase to backend snake_case
|
|
135639
135691
|
var backendData={project_name:data.project_name,is_public:data.isPublic};onSubmitProp(backendData).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")),/*#__PURE__*/src_react.createElement(src_Button_Button,{loading:loading,disabled:loading,variant:"primary"},t("common.save")))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},/*#__PURE__*/src_react.createElement(src_Container,{header:/*#__PURE__*/src_react.createElement(src_components_header_Header,{variant:"h2"},t("projects.edit.general"))},/*#__PURE__*/src_react.createElement(src_space_between_SpaceBetween,{size:"l"},/*#__PURE__*/src_react.createElement(src_FormInput,{label:t("projects.edit.project_name"),description:t("projects.edit.project_name_description"),control:control,name:"project_name",disabled:loading,rules:{required:t("validation.required"),pattern:{value:/^[a-zA-Z0-9-_]+$/,message:t("projects.edit.validation.user_name_format")}}}),/*#__PURE__*/src_react.createElement(src_FormCheckbox,{label:t("projects.edit.is_public"),description:t("projects.edit.is_public_description"),control:control,name:"isPublic",disabled:loading}))))))};
|
|
@@ -135899,7 +135951,7 @@ function src_Volumes_List_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnProp
|
|
|
135899
135951
|
|
|
135900
135952
|
;// ./src/router.tsx
|
|
135901
135953
|
var src_router_router=src_createBrowserRouter([{path:"/",element:/*#__PURE__*/src_react.createElement(src_src_App,null),errorElement:/*#__PURE__*/src_react.createElement(src_AuthErrorMessage,{title:"Not Found",text:"Page not found"}),children:[// auth
|
|
135902
|
-
{path:src_routes_ROUTES.AUTH.GITHUB_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByGithubCallback,null)},{path:src_routes_ROUTES.AUTH.OKTA_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByOktaCallback,null)},{path:src_routes_ROUTES.AUTH.ENTRA_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByEntraIDCallback,null)},{path:src_routes_ROUTES.AUTH.TOKEN,element:/*#__PURE__*/src_react.createElement(src_TokenLogin,null)},// hubs
|
|
135954
|
+
{path:src_routes_ROUTES.AUTH.GITHUB_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByGithubCallback,null)},{path:src_routes_ROUTES.AUTH.OKTA_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByOktaCallback,null)},{path:src_routes_ROUTES.AUTH.ENTRA_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByEntraIDCallback,null)},{path:src_routes_ROUTES.AUTH.GOOGLE_CALLBACK,element:/*#__PURE__*/src_react.createElement(src_LoginByGoogleCallback,null)},{path:src_routes_ROUTES.AUTH.TOKEN,element:/*#__PURE__*/src_react.createElement(src_TokenLogin,null)},// hubs
|
|
135903
135955
|
{path:src_routes_ROUTES.BASE,element:/*#__PURE__*/src_react.createElement(src_Navigate,{replace:!0,to:src_routes_ROUTES.RUNS.LIST})},{path:src_routes_ROUTES.PROJECT.LIST,element:/*#__PURE__*/src_react.createElement(src_ProjectList,null)},{path:src_routes_ROUTES.PROJECT.DETAILS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_ProjectDetails,null),children:[{index:!0,element:/*#__PURE__*/src_react.createElement(src_ProjectSettings,null)},{path:src_routes_ROUTES.PROJECT.BACKEND.ADD.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_BackendAdd,null)},{path:src_routes_ROUTES.PROJECT.BACKEND.EDIT.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_BackendEdit,null)},{path:src_routes_ROUTES.PROJECT.GATEWAY.ADD.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_AddGateway,null)},{path:src_routes_ROUTES.PROJECT.GATEWAY.EDIT.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_EditGateway,null)}]},{path:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_RunDetailsPage,null),children:[{index:!0,element:/*#__PURE__*/src_react.createElement(src_RunDetails,null)},{path:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.METRICS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_JobMetrics,null)}]},{path:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_JobDetailsPage,null),children:[{index:!0,element:/*#__PURE__*/src_react.createElement(src_JobDetails,null)},{path:src_routes_ROUTES.PROJECT.DETAILS.RUNS.DETAILS.JOBS.DETAILS.METRICS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_JobMetrics,null)}]},{path:src_routes_ROUTES.PROJECT.ADD,element:/*#__PURE__*/src_react.createElement(src_ProjectAdd,null)},// Runs
|
|
135904
135956
|
{path:src_routes_ROUTES.RUNS.LIST,element:/*#__PURE__*/src_react.createElement(src_RunList,null)},// Models
|
|
135905
135957
|
{path:src_routes_ROUTES.MODELS.LIST,element:/*#__PURE__*/src_react.createElement(src_List_List,null)},{path:src_routes_ROUTES.MODELS.DETAILS.TEMPLATE,element:/*#__PURE__*/src_react.createElement(src_ModelDetails,null)},// Fleets
|
|
@@ -138109,7 +138161,7 @@ const src_i18next_loadLanguages = src_instance.loadLanguages;
|
|
|
138109
138161
|
|
|
138110
138162
|
|
|
138111
138163
|
;// ./src/locale/en.json
|
|
138112
|
-
const src_en_namespaceObject = /*#__PURE__*/JSON.parse('{"dstack":"Dstack","common":{"loading":"Loading","add":"Add","yes":"Yes","no":"No","create":"Create {{text}}","edit":"Edit","delete":"Delete","remove":"Remove","apply":"Apply","settings":"Settings","match_count_with_value_one":"{{count}} match","match_count_with_value_other":"{{count}} matches","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","sign_out":"Sign out","cancel":"Cancel","save":"Save","send":"Send","profile":"Profile","copied":"Copied","copy":"Copy","info":"Info","stop":"Stop","abort":"Abort","close":"Close","clearFilter":"Clear filter","server_error":"Server error: {{error}}","login":"Sign in","login_github":"Sign in with GitHub","login_okta":"Sign in with Okta","login_entra":"Sign in with EntraID","general":"General","test":"Test","local_storage_unavailable":"Local Storage is unavailable","local_storage_unavailable_message":"Your browser doesn\'t support local storage","object":"Object","objects_other":"Objects","continue":"Continue","select_visible_columns":"Select visible columns","tutorial":"Tutorials","tutorial_other":"Tour","docs":"Docs","discord":"Discord","danger_zone":"Danger Zone","control_plane":"Control plane","refresh":"Refresh","quickstart":"Quickstart"},"auth":{"invalid_token":"Invalid token","you_are_not_logged_in":"You are not logged in","contact_to_administrator":"For getting the authorization token, contact to the administrator","sign_in_to_dstack":"Welcome to dstack Sky","sign_in_to_dstack_enterprise":"Welcome to dstack","authorization_failed":"Authorization is failed","try_again":"Please try again","login_by_token":"Sign in via a token","another_login_methods":"Other sign in options"},"navigation":{"settings":"Settings","runs":"Runs","models":"Models","fleets":"Fleets","project":"Project","project_other":"Projects","general":"General","users":"Users","user_settings":"User settings","account":"User","billing":"Billing","resources":"Resources","volumes":"Volumes","instances":"Instances"},"backend":{"page_title_one":"Backend","page_title_other":"Backends","add_backend":"Add backend","edit_backend":"Edit backend","empty_message_title":"No backends","empty_message_text":"No backends to display.","type":{"aws":"AWS","aws_description":"Run workflows and store data in Amazon Web Services ","gcp":"GCP","gcp_description":"Run workflows and store data in Google Cloud Platform","azure":"Azure","azure_description":"Run workflows and store data in Microsoft Azure","lambda":"Lambda","lambda_description":"Run workflows and store data in Lambda","local":"Local","local_description":"Run workflows and store data locally via Docker"},"table":{"region":"Region","bucket":"Storage"},"edit":{"success_notification":"Project updating is successful","delete_backend_confirm_title":"Delete backend","delete_backend_confirm_message":"Are you sure you want to delete this backend?","delete_backends_confirm_title":"Delete backends","delete_backends_confirm_message":"Are you sure you want to delete these backends?"},"create":{"success_notification":"Backend is created"}},"gateway":{"page_title_one":"Gateway","page_title_other":"Gateways","add_gateway":"Add gateway","edit_gateway":"Edit gateway","empty_message_title":"No gateways","empty_message_text":"No gateways to display.","edit":{"backend":"Backend","backend_description":"Select a backend","region":"Region","region_description":"Select a region","default":"Default","default_checkbox":"Turn on default","external_ip":"External IP","wildcard_domain":"Wildcard domain","wildcard_domain_description":"Specify the wildcard domain mapped to the external IP.","wildcard_domain_placeholder":"*.mydomain.com","delete_gateway_confirm_title":"Delete gateway","delete_gateway_confirm_message":"Are you sure you want to delete this gateway?","delete_gateways_confirm_title":"Delete gateways","delete_gateways_confirm_message":"Are you sure you want to delete these gateways?","validation":{"wildcard_domain_format":"Should use next format: {{pattern}}"}},"create":{"success_notification":"Gateway is created","creating_notification":"The gateway is creating. It may take some time"},"update":{"success_notification":"Gateway is updated"},"test_domain":{"success_notification":"Domain is valid"}},"projects":{"page_title":"Projects","search_placeholder":"Find projects","empty_message_title":"No projects","empty_message_text":"No projects to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","repositories":"Repositories","runs":"Runs","tags":"Tags","settings":"Settings","join":"Join","leave_confirm_title":"Leave project","leave_confirm_message":"Are you sure you want to leave this project?","leave":"Leave","join_success":"Successfully joined the project","leave_success":"Successfully left the project","join_error":"Failed to join project","leave_error":"Failed to leave project","card":{"backend":"Backend","settings":"Settings"},"edit":{"general":"General","project_name":"Project name","owner":"Owner","project_name_description":"Only latin characters, dashes, underscores, and digits","is_public":"Make project public","is_public_description":"Public projects can be accessed by any user without being a member","backend":"Backend","backend_config":"Backend config","backend_config_description":"Specify the backend config in the YAML format. Click Info for examples.","backend_type":"Type","backend_type_description":"Select a backend type","members_empty_message_title":"No members","members_empty_message_text":"Select project\'s members","update_members_success":"Members are updated","update_visibility_success":"Project visibility updated successfully","update_visibility_confirm_title":"Change project visibility","update_visibility_confirm_message":"Are you sure you want to change the project visibility? This will affect who can access this project.","change_visibility":"Change visibility","project_visibility":"Project visibility","project_visibility_description":"Control who can access this project","make_project_public":"Make project public","delete_project_confirm_title":"Delete project","delete_project_confirm_message":"Are you sure you want to delete this project?","delete_projects_confirm_title":"Delete projects","delete_projects_confirm_message":"Are you sure you want to delete these projects?","delete_this_project":"Delete this project","cli":"CLI","aws":{"authorization":"Authorization","authorization_default":"Default credentials","authorization_access_key":"Access key","access_key":"Access key","access_key_id":"Access key ID","access_key_id_description":"Specify the AWS access key ID","secret_key":"Secret key","secret_key_id":"Secret access key","secret_key_id_description":"Specify the AWS secret access key","regions":"Regions","regions_description":"Select regions to run workflows and store artifacts","regions_placeholder":"Select regions","s3_bucket_name":"Bucket","s3_bucket_name_description":"Select an S3 bucket to store artifacts","ec2_subnet_id":"Subnet","ec2_subnet_id_description":"Select a subnet to run workflows in","ec2_subnet_id_placeholder":"Not selected","vpc_name":"VPC","vpc_name_description":"Enter a vpc"},"azure":{"authorization":"Authorization","authorization_default":"Default credentials","authorization_client":"Client secret","tenant_id":"Tenant ID","tenant_id_description":"Specify an Azure tenant ID","tenant_id_placeholder":"Not selected","client_id":"Client ID","client_id_description":"Specify an Azure client (application) ID","client_secret":"Client secret","client_secret_description":"Specify an Azure client (application) secret","subscription_id":"Subscription ID","subscription_id_description":"Select an Azure subscription ID","subscription_id_placeholder":"Not selected","locations":"Locations","locations_description":"Select locations to run workflows","locations_placeholder":"Select locations","storage_account":"Storage account","storage_account_description":"Select an Azure storage account to store artifacts","storage_account_placeholder":"Not selected"},"gcp":{"authorization":"Authorization","authorization_default":"Default credentials","service_account":"Service account key","credentials_description":"Credentials description","credentials_placeholder":"Credentials placeholder","regions":"Regions","regions_description":"Select regions to run workflows and store artifacts","regions_placeholder":"Select regions","project_id":"Project Id","project_id_description":"Select a project id","project_id_placeholder":"Select a project Id"},"lambda":{"api_key":"API key","api_key_description":"Specify the Lambda API key","regions":"Regions","regions_description":"Select regions to run workflows","regions_placeholder":"Select regions","storage_backend":{"type":"Storage","type_description":"Select backend storage","type_placeholder":"Select type","credentials":{"access_key_id":"Access key ID","access_key_id_description":"Specify the AWS access key ID","secret_key_id":"Secret access key","secret_key_id_description":"Specify the AWS secret access key"},"s3_bucket_name":"Bucket","s3_bucket_name_description":"Select an S3 bucket to store artifacts"}},"local":{"path":"Files path"},"members":{"section_title":"Members","name":"User name","role":"Project role"},"error_notification":"Update project error","validation":{"user_name_format":"Only letters, numbers, - or _"},"visibility":{"private":"Private","public":"Public"}},"create":{"page_title":"Create project","error_notification":"Create project error","success_notification":"Project is created"},"repo":{"search_placeholder":"Find repositories","empty_message_title":"No repositories","empty_message_text":"No repositories to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","card":{"owner":"Owner","last_run":"Last run","tags_count":"Tags count","directory":"Directory"},"secrets":{"table_title":"Secrets","add_modal_title":"Add secret","update_modal_title":"Update secret","name":"Secret name","name_description":"Secret name","value":"Secret value","value_description":"Secret value","search_placeholder":"Find secrets","empty_message_title":"No secrets","empty_message_text":"No secrets to display."}},"run":{"list_page_title":"Runs","search_placeholder":"Find runs","empty_message_title":"No runs","empty_message_text":"No runs to display.","quickstart_message_text":"Check out the quickstart guide to get started with dstack","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match. Try to change project or clear filter","filter_property_placeholder":"Filter runs by properties","project":"Project","project_placeholder":"Filtering by project","repo":"Repository","repo_placeholder":"Filtering by repository","user":"User","user_placeholder":"Filtering by user","active_only":"Active runs","log":"Logs","log_empty_message_title":"No logs","log_empty_message_text":"No logs to display.","run_name":"Name","workflow_name":"Workflow","configuration":"Configuration","instance":"Instance","priority":"Priority","provider_name":"Provider","status":"Status","submitted_at":"Submitted","finished_at":"Finished","metrics":{"title":"Metrics","show_metrics":"Show metrics","cpu_utilization":"CPU utilization %","memory_used":"System memory used","per_each_cpu_utilization":"GPU utilization %","per_each_memory_used":"GPU memory used"},"jobs":"Jobs","job_name":"Job Name","cost":"Cost","backend":"Backend","region":"Region","instance_id":"Instance ID","resources":"Resources","spot":"Spot","termination_reason":"Termination reason","price":"Price","error":"Error","artifacts":"Artifacts","artifacts_count":"Artifacts","hub_user_name":"User","service_url":"Service URL","statuses":{"pending":"Pending","submitted":"Submitted","provisioning":"Provisioning","pulling":"Pulling","downloading":"Downloading","running":"Running","uploading":"Uploading","stopping":"Stopping","stopped":"Stopped","terminating":"Terminating","terminated":"Terminated","aborting":"Aborting","aborted":"Aborted","failed":"Failed","done":"Done","building":"Building"}},"tag":{"list_page_title":"Artifacts","search_placeholder":"Find tags","empty_message_title":"No tags","empty_message_text":"No tags to display.","tag_name":"Tag","run_name":"Run","artifacts":"Files"},"artifact":{"list_page_title":"Artifacts","search_placeholder":"Find objects","empty_message_title":"No objects","empty_message_text":"No objects to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","name":"Name","type":"Type","size":"Size"}},"models":{"model_name":"Name","url":"URL","gateway":"Gateway","type":"Type","run":"Run","resources":"Resources","price":"Price","submitted_at":"Submitted","user":"User","repository":"Repository","backend":"Backend","code":"Code","empty_message_title":"No models","empty_message_text":"No models to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","details":{"instructions":"System","instructions_description":"Specify system","message_placeholder":"Enter your question","chat_empty_title":"No messages yet","chat_empty_message":"Please start a chat","run_name":"Run name","view_code":"View code","view_code_description":"You can use the following code to start integrating your current prompt and settings into your application."}},"fleets":{"fleet":"Fleet","fleet_placeholder":"Filtering by fleet","fleet_name":"Fleet name","total_instances":"Number of instances","empty_message_title":"No fleets","empty_message_text":"No fleets to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","active_only":"Active fleets","filter_property_placeholder":"Filter fleets by properties","statuses":{"active":"Active","submitted":"Submitted","failed":"Failed","terminating":"Terminating","terminated":"Terminated"},"instances":{"active_only":"Active instances","filter_property_placeholder":"Filter instances by properties","title":"Instances","empty_message_title":"No instances","empty_message_text":"No instances to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","instance_name":"Instance","instance_num":"Instance num","created":"Created","status":"Status","project":"Project","hostname":"Host name","instance_type":"Type","statuses":{"pending":"Pending","provisioning":"Provisioning","idle":"Idle","busy":"Busy","terminating":"Terminating","terminated":"Terminated"},"resources":"Resources","backend":"Backend","region":"Region","spot":"Spot","started":"Started","price":"Price"}},"volume":{"volumes":"Volumes","empty_message_title":"No volumes","empty_message_text":"No volumes to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","delete_volumes_confirm_title":"Delete volumes","delete_volumes_confirm_message":"Are you sure you want to delete these volumes?","active_only":"Active volumes","filter_property_placeholder":"Filter volumes by properties","name":"Name","project":"Project name","region":"Region","backend":"Backend","status":"Status","created":"Created","finished":"Finished","price":"Price (per month)","cost":"Cost","statuses":{"failed":"Failed","submitted":"Submitted","provisioning":"Provisioning","active":"Active","deleted":"Deleted"}},"users":{"page_title":"Users","search_placeholder":"Find members","empty_message_title":"No members","empty_message_text":"No members to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","user_name":"User name","user_name_description":"Only latin characters, dashes, underscores, and digits","global_role_description":"Whether the user is an administrator or not","email_description":"Enter user email","token":"Token","token_description":"Specify use your personal access token","global_role":"Global role","active":"Active","active_description":"Specify user activation","activated":"Activated","deactivated":"Deactivated","email":"Email","created_at":"Created at","account":"User","account_settings":"User settings","settings":"Settings","projects":"Projects","create":{"page_title":"Create user","error_notification":"Create user error","success_notification":"User is created"},"edit":{"error_notification":"Update user error","success_notification":"User updating is successful","refresh_token_success_notification":"Token rotating is successful","refresh_token_error_notification":"Token rotating error","refresh_token_confirm_title":"Rotate token","refresh_token_confirm_message":"Are you sure you want to rotate token?","refresh_token_button_label":"Rotate","validation":{"user_name_format":"Only letters, numbers, - or _","email_format":"Incorrect email"}},"manual_payments":{"title":"Credits history","add_payment":"Add payment","empty_message_title":"No payments","empty_message_text":"No payments to display.","create":{"success_notification":"Payment creating is successful"},"edit":{"value":"Amount","value_description":"Enter amount here","description":"Description","description_description":"Describe payment here","created_at":"Created at"}},"token_copied":"Token copied"},"billing":{"title":"Billing","balance":"Balance","billing_history":"Billing history","payment_method":"Payment method","no_payment_method":"No payment method attached","top_up_balance":"Top up balance","edit_payment_method":"Edit payment method","payment_amount":"Payment amount","amount_description":"Minimum: ${{value}}","make_payment":"Make a payment","min_amount_error_message":"The amount is allowed to be more than {{value}}","payment_success_message":"Payment succeeded. There can be a short delay before the balance is updated."},"validation":{"required":"This is required field"},"users_autosuggest":{"placeholder":"Enter username or email to add member","entered_text":"Add member","loading":"Loading users","no_match":"No matches found"},"roles":{"admin":"Admin","manager":"Manager","user":"User"},"confirm_dialog":{"title":"Confirm delete","message":"Are you sure you want to delete?"}}');
|
|
138164
|
+
const src_en_namespaceObject = /*#__PURE__*/JSON.parse('{"dstack":"Dstack","common":{"loading":"Loading","add":"Add","yes":"Yes","no":"No","create":"Create {{text}}","edit":"Edit","delete":"Delete","remove":"Remove","apply":"Apply","settings":"Settings","match_count_with_value_one":"{{count}} match","match_count_with_value_other":"{{count}} matches","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","sign_out":"Sign out","cancel":"Cancel","save":"Save","send":"Send","profile":"Profile","copied":"Copied","copy":"Copy","info":"Info","stop":"Stop","abort":"Abort","close":"Close","clearFilter":"Clear filter","server_error":"Server error: {{error}}","login":"Sign in","login_github":"Sign in with GitHub","login_okta":"Sign in with Okta","login_entra":"Sign in with EntraID","login_google":"Sign in with Google","general":"General","test":"Test","local_storage_unavailable":"Local Storage is unavailable","local_storage_unavailable_message":"Your browser doesn\'t support local storage","object":"Object","objects_other":"Objects","continue":"Continue","select_visible_columns":"Select visible columns","tutorial":"Tutorials","tutorial_other":"Tour","docs":"Docs","discord":"Discord","danger_zone":"Danger Zone","control_plane":"Control plane","refresh":"Refresh","quickstart":"Quickstart"},"auth":{"invalid_token":"Invalid token","you_are_not_logged_in":"You are not logged in","contact_to_administrator":"For getting the authorization token, contact to the administrator","sign_in_to_dstack":"Welcome to dstack Sky","sign_in_to_dstack_enterprise":"Welcome to dstack","authorization_failed":"Authorization is failed","try_again":"Please try again","login_by_token":"Sign in via a token","another_login_methods":"Other sign in options"},"navigation":{"settings":"Settings","runs":"Runs","models":"Models","fleets":"Fleets","project":"Project","project_other":"Projects","general":"General","users":"Users","user_settings":"User settings","account":"User","billing":"Billing","resources":"Resources","volumes":"Volumes","instances":"Instances"},"backend":{"page_title_one":"Backend","page_title_other":"Backends","add_backend":"Add backend","edit_backend":"Edit backend","empty_message_title":"No backends","empty_message_text":"No backends to display.","type":{"aws":"AWS","aws_description":"Run workflows and store data in Amazon Web Services ","gcp":"GCP","gcp_description":"Run workflows and store data in Google Cloud Platform","azure":"Azure","azure_description":"Run workflows and store data in Microsoft Azure","lambda":"Lambda","lambda_description":"Run workflows and store data in Lambda","local":"Local","local_description":"Run workflows and store data locally via Docker"},"table":{"region":"Region","bucket":"Storage"},"edit":{"success_notification":"Project updating is successful","delete_backend_confirm_title":"Delete backend","delete_backend_confirm_message":"Are you sure you want to delete this backend?","delete_backends_confirm_title":"Delete backends","delete_backends_confirm_message":"Are you sure you want to delete these backends?"},"create":{"success_notification":"Backend is created"}},"gateway":{"page_title_one":"Gateway","page_title_other":"Gateways","add_gateway":"Add gateway","edit_gateway":"Edit gateway","empty_message_title":"No gateways","empty_message_text":"No gateways to display.","edit":{"backend":"Backend","backend_description":"Select a backend","region":"Region","region_description":"Select a region","default":"Default","default_checkbox":"Turn on default","external_ip":"External IP","wildcard_domain":"Wildcard domain","wildcard_domain_description":"Specify the wildcard domain mapped to the external IP.","wildcard_domain_placeholder":"*.mydomain.com","delete_gateway_confirm_title":"Delete gateway","delete_gateway_confirm_message":"Are you sure you want to delete this gateway?","delete_gateways_confirm_title":"Delete gateways","delete_gateways_confirm_message":"Are you sure you want to delete these gateways?","validation":{"wildcard_domain_format":"Should use next format: {{pattern}}"}},"create":{"success_notification":"Gateway is created","creating_notification":"The gateway is creating. It may take some time"},"update":{"success_notification":"Gateway is updated"},"test_domain":{"success_notification":"Domain is valid"}},"projects":{"page_title":"Projects","search_placeholder":"Find projects","empty_message_title":"No projects","empty_message_text":"No projects to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","repositories":"Repositories","runs":"Runs","tags":"Tags","settings":"Settings","join":"Join","leave_confirm_title":"Leave project","leave_confirm_message":"Are you sure you want to leave this project?","leave":"Leave","join_success":"Successfully joined the project","leave_success":"Successfully left the project","join_error":"Failed to join project","leave_error":"Failed to leave project","card":{"backend":"Backend","settings":"Settings"},"edit":{"general":"General","project_name":"Project name","owner":"Owner","project_name_description":"Only latin characters, dashes, underscores, and digits","is_public":"Make project public","is_public_description":"Public projects can be accessed by any user without being a member","backend":"Backend","backend_config":"Backend config","backend_config_description":"Specify the backend config in the YAML format. Click Info for examples.","backend_type":"Type","backend_type_description":"Select a backend type","members_empty_message_title":"No members","members_empty_message_text":"Select project\'s members","update_members_success":"Members are updated","update_visibility_success":"Project visibility updated successfully","update_visibility_confirm_title":"Change project visibility","update_visibility_confirm_message":"Are you sure you want to change the project visibility? This will affect who can access this project.","change_visibility":"Change visibility","project_visibility":"Project visibility","project_visibility_description":"Control who can access this project","make_project_public":"Make project public","delete_project_confirm_title":"Delete project","delete_project_confirm_message":"Are you sure you want to delete this project?","delete_projects_confirm_title":"Delete projects","delete_projects_confirm_message":"Are you sure you want to delete these projects?","delete_this_project":"Delete this project","cli":"CLI","aws":{"authorization":"Authorization","authorization_default":"Default credentials","authorization_access_key":"Access key","access_key":"Access key","access_key_id":"Access key ID","access_key_id_description":"Specify the AWS access key ID","secret_key":"Secret key","secret_key_id":"Secret access key","secret_key_id_description":"Specify the AWS secret access key","regions":"Regions","regions_description":"Select regions to run workflows and store artifacts","regions_placeholder":"Select regions","s3_bucket_name":"Bucket","s3_bucket_name_description":"Select an S3 bucket to store artifacts","ec2_subnet_id":"Subnet","ec2_subnet_id_description":"Select a subnet to run workflows in","ec2_subnet_id_placeholder":"Not selected","vpc_name":"VPC","vpc_name_description":"Enter a vpc"},"azure":{"authorization":"Authorization","authorization_default":"Default credentials","authorization_client":"Client secret","tenant_id":"Tenant ID","tenant_id_description":"Specify an Azure tenant ID","tenant_id_placeholder":"Not selected","client_id":"Client ID","client_id_description":"Specify an Azure client (application) ID","client_secret":"Client secret","client_secret_description":"Specify an Azure client (application) secret","subscription_id":"Subscription ID","subscription_id_description":"Select an Azure subscription ID","subscription_id_placeholder":"Not selected","locations":"Locations","locations_description":"Select locations to run workflows","locations_placeholder":"Select locations","storage_account":"Storage account","storage_account_description":"Select an Azure storage account to store artifacts","storage_account_placeholder":"Not selected"},"gcp":{"authorization":"Authorization","authorization_default":"Default credentials","service_account":"Service account key","credentials_description":"Credentials description","credentials_placeholder":"Credentials placeholder","regions":"Regions","regions_description":"Select regions to run workflows and store artifacts","regions_placeholder":"Select regions","project_id":"Project Id","project_id_description":"Select a project id","project_id_placeholder":"Select a project Id"},"lambda":{"api_key":"API key","api_key_description":"Specify the Lambda API key","regions":"Regions","regions_description":"Select regions to run workflows","regions_placeholder":"Select regions","storage_backend":{"type":"Storage","type_description":"Select backend storage","type_placeholder":"Select type","credentials":{"access_key_id":"Access key ID","access_key_id_description":"Specify the AWS access key ID","secret_key_id":"Secret access key","secret_key_id_description":"Specify the AWS secret access key"},"s3_bucket_name":"Bucket","s3_bucket_name_description":"Select an S3 bucket to store artifacts"}},"local":{"path":"Files path"},"members":{"section_title":"Members","name":"User name","role":"Project role"},"error_notification":"Update project error","validation":{"user_name_format":"Only letters, numbers, - or _"},"visibility":{"private":"Private","public":"Public"}},"create":{"page_title":"Create project","error_notification":"Create project error","success_notification":"Project is created"},"repo":{"search_placeholder":"Find repositories","empty_message_title":"No repositories","empty_message_text":"No repositories to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","card":{"owner":"Owner","last_run":"Last run","tags_count":"Tags count","directory":"Directory"},"secrets":{"table_title":"Secrets","add_modal_title":"Add secret","update_modal_title":"Update secret","name":"Secret name","name_description":"Secret name","value":"Secret value","value_description":"Secret value","search_placeholder":"Find secrets","empty_message_title":"No secrets","empty_message_text":"No secrets to display."}},"run":{"list_page_title":"Runs","search_placeholder":"Find runs","empty_message_title":"No runs","empty_message_text":"No runs to display.","quickstart_message_text":"Check out the quickstart guide to get started with dstack","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match. Try to change project or clear filter","filter_property_placeholder":"Filter runs by properties","project":"Project","project_placeholder":"Filtering by project","repo":"Repository","repo_placeholder":"Filtering by repository","user":"User","user_placeholder":"Filtering by user","active_only":"Active runs","log":"Logs","log_empty_message_title":"No logs","log_empty_message_text":"No logs to display.","run_name":"Name","workflow_name":"Workflow","configuration":"Configuration","instance":"Instance","priority":"Priority","provider_name":"Provider","status":"Status","submitted_at":"Submitted","finished_at":"Finished","metrics":{"title":"Metrics","show_metrics":"Show metrics","cpu_utilization":"CPU utilization %","memory_used":"System memory used","per_each_cpu_utilization":"GPU utilization %","per_each_memory_used":"GPU memory used"},"jobs":"Jobs","job_name":"Job Name","cost":"Cost","backend":"Backend","region":"Region","instance_id":"Instance ID","resources":"Resources","spot":"Spot","termination_reason":"Termination reason","price":"Price","error":"Error","artifacts":"Artifacts","artifacts_count":"Artifacts","hub_user_name":"User","service_url":"Service URL","statuses":{"pending":"Pending","submitted":"Submitted","provisioning":"Provisioning","pulling":"Pulling","downloading":"Downloading","running":"Running","uploading":"Uploading","stopping":"Stopping","stopped":"Stopped","terminating":"Terminating","terminated":"Terminated","aborting":"Aborting","aborted":"Aborted","failed":"Failed","done":"Done","building":"Building"}},"tag":{"list_page_title":"Artifacts","search_placeholder":"Find tags","empty_message_title":"No tags","empty_message_text":"No tags to display.","tag_name":"Tag","run_name":"Run","artifacts":"Files"},"artifact":{"list_page_title":"Artifacts","search_placeholder":"Find objects","empty_message_title":"No objects","empty_message_text":"No objects to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","name":"Name","type":"Type","size":"Size"}},"models":{"model_name":"Name","url":"URL","gateway":"Gateway","type":"Type","run":"Run","resources":"Resources","price":"Price","submitted_at":"Submitted","user":"User","repository":"Repository","backend":"Backend","code":"Code","empty_message_title":"No models","empty_message_text":"No models to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","details":{"instructions":"System","instructions_description":"Specify system","message_placeholder":"Enter your question","chat_empty_title":"No messages yet","chat_empty_message":"Please start a chat","run_name":"Run name","view_code":"View code","view_code_description":"You can use the following code to start integrating your current prompt and settings into your application."}},"fleets":{"fleet":"Fleet","fleet_placeholder":"Filtering by fleet","fleet_name":"Fleet name","total_instances":"Number of instances","empty_message_title":"No fleets","empty_message_text":"No fleets to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","nomatch_message_button_label":"Clear filter","active_only":"Active fleets","filter_property_placeholder":"Filter fleets by properties","statuses":{"active":"Active","submitted":"Submitted","failed":"Failed","terminating":"Terminating","terminated":"Terminated"},"instances":{"active_only":"Active instances","filter_property_placeholder":"Filter instances by properties","title":"Instances","empty_message_title":"No instances","empty_message_text":"No instances to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","instance_name":"Instance","instance_num":"Instance num","created":"Created","status":"Status","project":"Project","hostname":"Host name","instance_type":"Type","statuses":{"pending":"Pending","provisioning":"Provisioning","idle":"Idle","busy":"Busy","terminating":"Terminating","terminated":"Terminated"},"resources":"Resources","backend":"Backend","region":"Region","spot":"Spot","started":"Started","price":"Price"}},"volume":{"volumes":"Volumes","empty_message_title":"No volumes","empty_message_text":"No volumes to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","delete_volumes_confirm_title":"Delete volumes","delete_volumes_confirm_message":"Are you sure you want to delete these volumes?","active_only":"Active volumes","filter_property_placeholder":"Filter volumes by properties","name":"Name","project":"Project name","region":"Region","backend":"Backend","status":"Status","created":"Created","finished":"Finished","price":"Price (per month)","cost":"Cost","statuses":{"failed":"Failed","submitted":"Submitted","provisioning":"Provisioning","active":"Active","deleted":"Deleted"}},"users":{"page_title":"Users","search_placeholder":"Find members","empty_message_title":"No members","empty_message_text":"No members to display.","nomatch_message_title":"No matches","nomatch_message_text":"We can\'t find a match.","user_name":"User name","user_name_description":"Only latin characters, dashes, underscores, and digits","global_role_description":"Whether the user is an administrator or not","email_description":"Enter user email","token":"Token","token_description":"Specify use your personal access token","global_role":"Global role","active":"Active","active_description":"Specify user activation","activated":"Activated","deactivated":"Deactivated","email":"Email","created_at":"Created at","account":"User","account_settings":"User settings","settings":"Settings","projects":"Projects","create":{"page_title":"Create user","error_notification":"Create user error","success_notification":"User is created"},"edit":{"error_notification":"Update user error","success_notification":"User updating is successful","refresh_token_success_notification":"Token rotating is successful","refresh_token_error_notification":"Token rotating error","refresh_token_confirm_title":"Rotate token","refresh_token_confirm_message":"Are you sure you want to rotate token?","refresh_token_button_label":"Rotate","validation":{"user_name_format":"Only letters, numbers, - or _","email_format":"Incorrect email"}},"manual_payments":{"title":"Credits history","add_payment":"Add payment","empty_message_title":"No payments","empty_message_text":"No payments to display.","create":{"success_notification":"Payment creating is successful"},"edit":{"value":"Amount","value_description":"Enter amount here","description":"Description","description_description":"Describe payment here","created_at":"Created at"}},"token_copied":"Token copied"},"billing":{"title":"Billing","balance":"Balance","billing_history":"Billing history","payment_method":"Payment method","no_payment_method":"No payment method attached","top_up_balance":"Top up balance","edit_payment_method":"Edit payment method","payment_amount":"Payment amount","amount_description":"Minimum: ${{value}}","make_payment":"Make a payment","min_amount_error_message":"The amount is allowed to be more than {{value}}","payment_success_message":"Payment succeeded. There can be a short delay before the balance is updated."},"validation":{"required":"This is required field"},"users_autosuggest":{"placeholder":"Enter username or email to add member","entered_text":"Add member","loading":"Loading users","no_match":"No matches found"},"roles":{"admin":"Admin","manager":"Manager","user":"User"},"confirm_dialog":{"title":"Confirm delete","message":"Are you sure you want to delete?"}}');
|
|
138113
138165
|
;// ./src/locale/index.ts
|
|
138114
138166
|
src_instance.use(src_initReactI18next).init({returnNull:!1,resources:{en:{translation:src_en_namespaceObject}},fallbackLng:"en",interpolation:{escapeValue:!1}});
|
|
138115
138167
|
;// ./src/index.tsx
|
|
@@ -138118,4 +138170,4 @@ var src_container=document.getElementById("root"),src_src_theme={tokens:{fontFam
|
|
|
138118
138170
|
|
|
138119
138171
|
/******/ })()
|
|
138120
138172
|
;
|
|
138121
|
-
//# sourceMappingURL=main-
|
|
138173
|
+
//# sourceMappingURL=main-d1ac2e8c38ed5f08a114.js.map
|