zenml-nightly 0.83.0.dev20250623__py3-none-any.whl → 0.83.1.dev20250624__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.
- zenml/VERSION +1 -1
- zenml/zen_server/dashboard/assets/{404-DmJUgorp.js → 404-B5eko6XL.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-8OCk19Fi.js → @reactflow-B_iCtR7X.js} +1 -1
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-CZW4QyWn.js → AlertDialogDropdownItem-DsOmO1FH.js} +1 -1
- zenml/zen_server/dashboard/assets/{ButtonGroup-DFWWFGUE.js → ButtonGroup-4sPZDv70.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-D2HkkAGr.js → CodeSnippet-Ctplhzdc.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-CnS09ljw.js → CollapsibleCard-CBKenz9f.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-CDgdd0Ks.js → ComponentBadge-Cnecw3qz.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentIcon-CbbOc7lb.js → ComponentIcon-CMiVW-O6.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-VIOMDLmx.js → DeleteAlertDialog-DEI0YDzP.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-ClFCqxEp.js → DialogItem-CRCDpYU6.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-CQzjbDcN.js → Error-BG6f_WRd.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CWreILP0.js → ExecutionStatus-BuhNAE9w.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CiKxG5_X.js → Helpbox-DtUG2Bf_.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-CGxFvqzi.js → Infobox-CSBRrM6r.js} +1 -1
- zenml/zen_server/dashboard/assets/{LeftSideMenu-DCsKdIjC.js → LeftSideMenu-DPsCCK3z.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-3M4llYtH.js → NestedCollapsible-CMuDIJlp.js} +1 -1
- zenml/zen_server/dashboard/assets/{NumberBox-C0mQktmV.js → NumberBox-DtCv7jh3.js} +1 -1
- zenml/zen_server/dashboard/assets/Pagination-CWnEpSpN.js +1 -0
- zenml/zen_server/dashboard/assets/{Partials-DSjkttlz.js → Partials-CfHD6OH5.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-Dm5cWKpS.js → ProCta-CNyp04C8.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-DPwMR6nF.js → ProviderIcon-DHejyg7C.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-DEDNRgAb.js → ProviderRadio-tGtie8Gc.js} +1 -1
- zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-BtUi6cYl.js +1 -0
- zenml/zen_server/dashboard/assets/{SecretTooltip-CZTRnaCV.js → SecretTooltip-B5u1UsQ9.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-BjNGDC5e.js → SetPassword-BmbgL_ed.js} +1 -1
- zenml/zen_server/dashboard/assets/{SheetHeader-CASpN2Lz.js → SheetHeader-DkH7aG9K.js} +1 -1
- zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +1 -0
- zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +1 -0
- zenml/zen_server/dashboard/assets/{StackName-ojLC6xdl.js → StackName-CFSZL8ec.js} +1 -1
- zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +1 -0
- zenml/zen_server/dashboard/assets/{Tick-BPrWnNlN.js → Tick-Qquvr4P3.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-CNfKDo2Q.js → UpdatePasswordSchemas-D_DCETSO.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-Cb-mpV8M.js → UsageReason-DhiUV1bu.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-Dg8Pmn5A.js → Wizard-BHvY75u_.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-BcNDIvlQ.js → WizardFooter-FQm8y-jP.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DCdax7I5.js → all-pipeline-runs-query-DpKw9WL9.js} +1 -1
- zenml/zen_server/dashboard/assets/{bulk-delete-C_kpIB9A.js → bulk-delete-CzYA--cC.js} +1 -1
- zenml/zen_server/dashboard/assets/{configuration-form-B2hmKGnF.js → configuration-form-DSoMMiPE.js} +1 -1
- zenml/zen_server/dashboard/assets/{constants-1EZZxtay.js → constants-DTfsIqHy.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-TKmMtrkQ.js → create-stack-BpZrmKDu.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-CCR9md_s.js → delete-run-BkyDsKQc.js} +1 -1
- zenml/zen_server/dashboard/assets/elk-worker.min-BdOC9sib.js +6263 -0
- zenml/zen_server/dashboard/assets/expand-full-BPiXpch2.js +1 -0
- zenml/zen_server/dashboard/assets/{form-DFJkaFDX.js → form-BgtamtJm.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-CrznJVzA.js → form-schemas-dyDkAxXP.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BjUu1mP4.js → index-BBt0LDtR.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BfNISy0X.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BFqbGSck.js → index-BgEfQ3_G.js} +4 -4
- zenml/zen_server/dashboard/assets/{index-U992soPJ.js → index-eoDB_1XX.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-Do9YI4QX.js → layout-o1x87a3q.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-D3tFP6Wm.js → login-mutation-C1hvP_cX.js} +1 -1
- zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +31 -0
- zenml/zen_server/dashboard/assets/page-4zc4xPv2.js +2 -0
- zenml/zen_server/dashboard/assets/page-B0104V6C.js +1 -0
- zenml/zen_server/dashboard/assets/page-BNJsjvof.js +1 -0
- zenml/zen_server/dashboard/assets/{page-sJjNT9xA.js → page-BPQ66vR-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CAJ8B0vb.js → page-BQgSZ2nH.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CtiuMP_r.js → page-BxeZrG_t.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Cal6XQ4U.js → page-C2A-2Cj_.js} +1 -1
- zenml/zen_server/dashboard/assets/page-C2i-C7jv.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DJIGaUQ9.js → page-C3JfJxuR.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ChGcZI_6.js → page-CESEqC2L.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DCcuPZ8P.js → page-CF8cTZ7l.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CKjsimVu.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DNjKHjnH.js → page-COLzBwff.js} +1 -1
- zenml/zen_server/dashboard/assets/page-COifg5fa.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CnbIYE80.js → page-CQeJuA8T.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DKK6ulgy.js → page-CcjWEjre.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-9RjCitFH.js → page-CefGLeWy.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DUKbOhaD.js → page-CfxpV3j4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D9Hfx6GV.js → page-ClcUzawe.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +1 -0
- zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CUaMMoPG.js → page-D-tJ_Y0a.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CdZCmszX.js → page-DHrvih9u.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DUK0Nd_1.js → page-DMhaHZDw.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CAUYrfui.js → page-DOCOmmKn.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-akLcPcKw.js → page-DcQmxKLp.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DwVPpCFg.js → page-DiHZK-1w.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CN7lkvXr.js → page-QrvWQwZb.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BrT0_zSJ.js → page-RF3Fup0q.js} +1 -1
- zenml/zen_server/dashboard/assets/page-WuvCrN47.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Be3R2uYn.js → page-_WnHBI1F.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C210HcBA.js → page-ghjVNgVE.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BCrKmYIZ.js → page-iDsDiDXw.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ClvmVesa.js → page-rVhXI5ZO.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DEohTSz6.js → page-uxjMX8Iq.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-Dec_w7aB.js → persist-BsdEtCkd.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-DWMWVP-y.js → persist-CFPbMcJX.js} +1 -1
- zenml/zen_server/dashboard/assets/{resource-tyes-list-o2LXiMay.js → resource-tyes-list-79FqS3LY.js} +1 -1
- zenml/zen_server/dashboard/assets/{resource-type-tooltip-DwHrJstL.js → resource-type-tooltip-BL9ZTRKi.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-connectors-DSEMwJ5A.js → service-connectors-Q8h7-_rG.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-jxtvgks0.js → service-k-9Vsb30.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BXzg0EZz.js → sharedSchema-C_HkejsG.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-Cm0fsgo-.js → stack-detail-query-CNmVZ0Bo.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-current-user-mutation-D5MjcQ6F.js → update-current-user-mutation-Ca-Lmwuj.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-CmnxdxiK.js → update-server-settings-mutation-Bwe3gUt4.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_stores/migrations/versions/0.83.1_release.py +23 -0
- {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/METADATA +5 -9
- {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/RECORD +110 -106
- zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +0 -1
- zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +0 -1
- zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +0 -1
- zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +0 -1
- zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +0 -1
- zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +0 -29
- zenml/zen_server/dashboard/assets/page-BgknnddT.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +0 -1
- zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +0 -1
- zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +0 -1
- zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +0 -1
- zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +0 -1
- zenml/zen_server/dashboard/assets/page-D9iuB88h.js +0 -1
- zenml/zen_server/dashboard/assets/page-DYOucPtA.js +0 -1
- zenml/zen_server/dashboard/assets/page-DpqRelAy.js +0 -1
- zenml/zen_server/dashboard/assets/page-XURWnYZP.js +0 -1
- zenml/zen_server/dashboard/assets/page-abw-2oeW.js +0 -1
- zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +0 -2
- {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250624.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as v,j as o}from"./@radix-Cdvw4jJ8.js";import{o as B,f as V,i as Z,F as G,j as J,as as Y,au as K,av as Q,aw as X,B as D,ab as ee,a$ as te,r as re,T as ne,q as oe,s as se,h as R,b0 as ae,t as ie,a as ce,d as le,g as ue,b1 as pe,aB as de,b as N}from"./index-BgEfQ3_G.js";import{c as me}from"./@tanstack-5gTMR7G2.js";import{S as fe}from"./clock-B_mTG8PH.js";import{C as I}from"./CodeSnippet-Ctplhzdc.js";import{I as he}from"./Infobox-CSBRrM6r.js";import{T as ye}from"./Tick-Qquvr4P3.js";import{E as ve}from"./react-error-boundary.esm-7_MuhCay.js";import{L as Te}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";import"./check-B9QMTa3f.js";async function xe({params:t}){const n=B(t).toString(),s=Z(J.apiToken+(n?`?${n}`:"")),r=await V(s,{credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok){const e=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Error while creating API Token");throw new G({status:r.status,statusText:r.statusText,message:e})}return r.json()}function ge(t){return me({mutationFn:async n=>xe(n),...t})}class x extends Error{}x.prototype.name="InvalidTokenError";function be(t){return decodeURIComponent(atob(t).replace(/(.)/g,(n,s)=>{let r=s.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Se(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return be(n)}catch{return atob(n)}}function je(t,n){if(typeof t!="string")throw new x("Invalid token specified: must be a string");n||(n={});const s=n.header===!0?0:1,r=t.split(".")[s];if(typeof r!="string")throw new x(`Invalid token specified: missing part #${s+1}`);let e;try{e=Se(r)}catch(a){throw new x(`Invalid token specified: invalid base64 for part #${s+1} (${a.message})`)}try{return JSON.parse(e)}catch(a){throw new x(`Invalid token specified: invalid json for part #${s+1} (${a.message})`)}}var b={exports:{}},S,_;function we(){if(_)return S;_=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return S=t,S}var j,E;function Pe(){if(E)return j;E=1;var t=we();function n(){}function s(){}return s.resetWarningCache=n,j=function(){function r(i,c,u,m,h,p){if(p!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function e(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:n};return a.PropTypes=a,a},j}var A;function ke(){return A||(A=1,b.exports=Pe()()),b.exports}var l=ke();function M(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function De(t,n){for(var s=0;s<n.length;s++){var r=n[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function z(t,n,s){return n&&De(t.prototype,n),t}function $(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&w(t,n)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},g(t)}function w(t,n){return w=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r},w(t,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Oe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ne(t,n){return n&&(typeof n=="object"||typeof n=="function")?n:Oe(t)}function U(t){var n=Ce();return function(){var r=g(t),e;if(n){var a=g(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return Ne(this,e)}}function Ie(t){return _e(t)||Ee(t)||Ae(t)||Re()}function _e(t){if(Array.isArray(t))return P(t)}function Ee(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Ae(t,n){if(t){if(typeof t=="string")return P(t,n);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return P(t,n)}}function P(t,n){(n==null||n>t.length)&&(n=t.length);for(var s=0,r=new Array(n);s<n;s++)r[s]=t[s];return r}function Re(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,s=String(t);if(n===0)return s;var r=s.match(/(.*?)([0-9]+)(.*)/),e=r?r[1]:"",a=r?r[3]:"",i=r?r[2]:s,c=i.length>=n?i:(Ie(Array(n)).map(function(){return"0"}).join("")+i).slice(n*-1);return"".concat(e).concat(c).concat(a)}var F={daysInHours:!1,zeroPadTime:2};function Me(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=n.now,r=s===void 0?Date.now:s,e=n.precision,a=e===void 0?0:e,i=n.controlled,c=n.offsetTime,u=c===void 0?0:c,m=n.overtime,h;typeof t=="string"?h=new Date(t).getTime():t instanceof Date?h=t.getTime():h=t,i||(h+=u);var p=i?h:h-r(),f=Math.min(20,Math.max(0,a)),d=Math.round(parseFloat(((m?p:Math.max(0,p))/1e3).toFixed(f))*1e3),y=Math.abs(d)/1e3;return{total:d,days:Math.floor(y/(3600*24)),hours:Math.floor(y/3600%24),minutes:Math.floor(y/60%60),seconds:Math.floor(y%60),milliseconds:Number((y%1*1e3).toFixed()),completed:d<=0}}function ze(t,n){var s=t.days,r=t.hours,e=t.minutes,a=t.seconds,i=Object.assign(Object.assign({},F),n),c=i.daysInHours,u=i.zeroPadTime,m=i.zeroPadDays,h=m===void 0?u:m,p=Math.min(2,u),f=c?T(r+s*24,u):T(r,p);return{days:c?"":T(s,h),hours:f,minutes:T(e,p),seconds:T(a,p)}}var H=function(t){$(s,t);var n=U(s);function s(){var r;return M(this,s),r=n.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var e=r.state.count-1;e===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(e){r.stopCountdown(),r.setState(function(a){return{count:a.count+e}},r.startCountdown)},r}return z(s,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?v.cloneElement(this.props.children,{count:this.state.count}):null}}]),s}(v.Component);H.propTypes={count:l.number,children:l.element,onComplete:l.func};var C=function(t){$(s,t);var n=U(s);function s(r){var e;if(M(this,s),e=n.call(this,r),e.mounted=!1,e.initialTimestamp=e.calcOffsetStartTimestamp(),e.offsetStartTimestamp=e.props.autoStart?0:e.initialTimestamp,e.offsetTime=0,e.legacyMode=!1,e.legacyCountdownRef=null,e.tick=function(){var i=e.calcTimeDelta(),c=i.completed&&!e.props.overtime?void 0:e.props.onTick;e.setTimeDeltaState(i,void 0,c)},e.setLegacyCountdownRef=function(i){e.legacyCountdownRef=i},e.start=function(){if(!e.isStarted()){var i=e.offsetStartTimestamp;e.offsetStartTimestamp=0,e.offsetTime+=i?e.calcOffsetStartTimestamp()-i:0;var c=e.calcTimeDelta();e.setTimeDeltaState(c,"STARTED",e.props.onStart),!e.props.controlled&&(!c.completed||e.props.overtime)&&(e.clearTimer(),e.interval=window.setInterval(e.tick,e.props.intervalDelay))}},e.pause=function(){e.isPaused()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.setTimeDeltaState(e.state.timeDelta,"PAUSED",e.props.onPause))},e.stop=function(){e.isStopped()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.offsetTime=e.offsetStartTimestamp-e.initialTimestamp,e.setTimeDeltaState(e.calcTimeDelta(),"STOPPED",e.props.onStop))},e.isStarted=function(){return e.isStatus("STARTED")},e.isPaused=function(){return e.isStatus("PAUSED")},e.isStopped=function(){return e.isStatus("STOPPED")},e.isCompleted=function(){return e.isStatus("COMPLETED")},r.date){var a=e.calcTimeDelta();e.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else e.legacyMode=!0;return e}return z(s,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,a=e.date,i=e.now,c=e.precision,u=e.controlled,m=e.overtime;return Me(a,{now:i,precision:c,controlled:u,offsetTime:this.offsetTime,overtime:m})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,a,i){var c=this;if(this.mounted){var u=e.completed&&!this.state.timeDelta.completed,m=e.completed&&a==="STARTED";u&&!this.props.overtime&&this.clearTimer();var h=function(){i&&i(c.state.timeDelta),c.props.onComplete&&(u||m)&&c.props.onComplete(e,m)};return this.setState(function(p){var f=a||p.status;return e.completed&&!c.props.overtime?f="COMPLETED":!a&&f==="COMPLETED"&&(f="STOPPED"),{timeDelta:e,status:f}},h)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,a=e.daysInHours,i=e.zeroPadTime,c=e.zeroPadDays,u=this.state.timeDelta;return Object.assign(Object.assign({},u),{api:this.getApi(),props:this.props,formatted:ze(u,{daysInHours:a,zeroPadTime:i,zeroPadDays:c})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,a=e.count,i=e.children,c=e.onComplete;return v.createElement(H,{ref:this.setLegacyCountdownRef,count:a,onComplete:c},i)}var u=this.props,m=u.className,h=u.overtime,p=u.children,f=u.renderer,d=this.getRenderProps();if(f)return f(d);if(p&&this.state.timeDelta.completed&&!h)return v.cloneElement(p,{countdown:d});var y=d.formatted,O=y.days,L=y.hours,W=y.minutes,q=y.seconds;return v.createElement("span",{className:m},d.total<0?"-":"",O,O?":":"",L,":",W,":",q)}}]),s}(v.Component);C.defaultProps=Object.assign(Object.assign({},F),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});C.propTypes={date:l.oneOfType([l.instanceOf(Date),l.string,l.number]),daysInHours:l.bool,zeroPadTime:l.number,zeroPadDays:l.number,controlled:l.bool,intervalDelay:l.number,precision:l.number,autoStart:l.bool,overtime:l.bool,className:l.string,children:l.element,renderer:l.func,now:l.func,onMount:l.func,onStart:l.func,onPause:l.func,onStop:l.func,onTick:l.func,onComplete:l.func};function $e({token:t,open:n,setOpen:s}){return o.jsx(Y,{open:n,onOpenChange:s,children:o.jsxs(K,{className:"max-w-[700px]",children:[o.jsx(Q,{children:o.jsx(X,{children:"API Token Created Successfully"})}),o.jsxs("div",{className:"space-y-3 overflow-hidden px-7 py-5",children:[o.jsx(Ue,{}),o.jsx(Fe,{}),o.jsx(He,{token:t}),o.jsx(ve,{fallbackRender:()=>null,children:o.jsx(We,{token:t})}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(qe,{token:t}),o.jsx(Be,{}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(Ve,{})]})]})})}function Ue(){return o.jsxs("section",{children:[o.jsx("p",{className:"font-semibold",children:"Here is your new API Token"}),o.jsx("p",{className:"text-theme-text-secondary",children:"This token provides temporary access to your ZenML Server"})]})}function Fe(){return o.jsx(he,{children:"Important: This token expires in 1 hour and cannot be retrieved later. Please, copy it now."})}function He({token:t}){const[n,s]=v.useState(!1);function r(e){navigator.clipboard&&(navigator.clipboard.writeText(e),s(!0),setTimeout(()=>{s(!1)},2e3))}return o.jsxs("section",{className:"flex items-center gap-5 py-5",children:[o.jsx("code",{className:"block overflow-x-auto whitespace-nowrap font-sans text-display-xs",children:t}),n?o.jsxs("div",{className:"flex h-7 items-center",children:[o.jsx(ye,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),o.jsx("p",{className:"sr-only",children:"copied successfully"})]}):o.jsxs(D,{onClick:()=>r(t),size:"md",intent:"secondary",className:"flex items-center gap-1",emphasis:"subtle",children:[o.jsx(ee,{className:"size-4 shrink-0 fill-inherit"}),"Copy"]})]})}const Le=({days:t,hours:n,minutes:s,seconds:r,completed:e})=>{if(e)return o.jsx("span",{className:"font-semibold text-theme-text-error",children:"Expired"});const a=c=>String(c).padStart(2,"0"),i=[];return t>0&&i.push(`${t}`),(t>0||n>0)&&i.push(`${a(n)}`),(t>0||n>0||s>0)&&i.push(`${a(s)}`),i.push(`${a(r)}`),o.jsx("span",{className:"font-semibold",children:i.join(":")})};function We({token:t}){if(!t)return null;const n=je(t);return n.exp?o.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 rounded-sm border border-theme-border-moderate bg-theme-surface-tertiary py-1 text-center",children:[o.jsx(fe,{className:"size-5 shrink-0 fill-theme-text-secondary"}),o.jsxs("div",{children:["Expires in:"," ",o.jsx(C,{daysInHours:!0,renderer:Le,zeroPadTime:2,date:new Date(n.exp*1e3)})]})]}):null}function qe({token:t}){const n=`${window.location.origin}/api/v1/current-user`;return o.jsxs("section",{className:"space-y-1",children:[o.jsx("div",{className:"font-semibold",children:"Using your API Token"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-theme-text-secondary",children:"To use the API token to run queries against the Server API, you can run the following commands:"}),o.jsx(I,{code:Ze(t,n)}),o.jsx(I,{code:Ge(t,n)})]})]})}function Be(){const t=`${window.location.origin}/docs`;return o.jsxs("section",{className:"space-y-2",children:[o.jsx("p",{className:"font-semibold",children:"API Documentation"}),o.jsx("p",{className:"text-theme-text-secondary",children:"Access our OpenAPI dashboard for comprehensive documentation on all available REST API endpoints:"}),o.jsx(D,{asChild:!0,size:"md",intent:"secondary",className:"flex w-fit items-center gap-1",emphasis:"subtle",children:o.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:[o.jsx("span",{children:"Open the documentation"}),o.jsx(te,{className:"size-5 shrink-0 fill-inherit"})]})})]})}function Ve(){return o.jsxs("p",{children:["For long-term programmatic access, consider"," ",o.jsx(Te,{className:"link text-theme-text-brand",to:re.settings.service_accounts.overview,children:"setting up a service account instead."})]})}function Ze(t,n){return`curl -H "Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Ge(t,n){return`wget -qO- --header="Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Je({size:t}){return o.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:o.jsx(ne,{children:o.jsxs(oe,{children:[o.jsx(se,{className:"z-10",children:o.jsx("div",{className:R(ae({size:t}),"pointer-events-none bg-primary-50"),children:"Create new token"})}),o.jsx(ie,{children:"API-Tokens are not available for local deployments"})]})})})}const k=v.forwardRef(({className:t,onClick:n,...s},r)=>{const{toast:e}=ce(),[a,i]=v.useState(""),[c,u]=v.useState(!1),m=le(),{mutate:h,isPending:p}=ge({onError:d=>{de(d)&&e({title:"Error",emphasis:"subtle",rounded:!0,status:"error",description:d.message}),console.log(d)},onSuccess:d=>{i(d),u(!0)}});function f(d){u(d),d||i("")}return m.isPending?o.jsx(ue,{className:"h-7 w-10"}):m.isError?null:pe(m.data.auth_scheme||"other")?o.jsx(Je,{size:s.size}):o.jsxs(o.Fragment,{children:[o.jsxs(D,{disabled:p,ref:r,...s,onClick:()=>h({params:{token_type:"generic"}}),className:R(t),children:[p&&o.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Create new token"]}),o.jsx($e,{open:c,setOpen:f,token:a})]})});k.displayName="CreateTokenButton";function ct(){return o.jsxs(N,{className:"flex flex-col gap-5 p-5",children:[o.jsx("h1",{className:"text-text-xl font-semibold",children:"API Tokens"}),o.jsx("div",{className:"flex items-center justify-end",children:o.jsx(k,{size:"sm"})}),o.jsxs(N,{className:"flex w-full flex-col items-center justify-center space-y-5 p-9 text-center",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-display-xs font-semibold",children:"Create a new API Token"}),o.jsx("p",{className:"text-text-xl text-theme-text-secondary",children:"Generate a temporary access key for quick, secure automation tasks in your Tenant. An API Token is temporary (max. 1 hour) and won't be stored anywhere."})]}),o.jsx(k,{size:"md"})]})]})}export{ct as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as e}from"./@radix-Cdvw4jJ8.js";import{c as A,u as _}from"./bulk-delete-CzYA--cC.js";import{q as E,c as O,b as I}from"./@tanstack-5gTMR7G2.js";import{i as C,j as w,o as F,f as B,n as L,F as y,A as q,k as z,B as P,D as $,l as M,m as G,p as H,C as g,r as p,T as U,q as K,s as Q,t as J,v as j,w as V,z as d,x as W,g as D}from"./index-BgEfQ3_G.js";import{S as X}from"./refresh-BcTM09NW.js";import{P as Y}from"./Pagination-CWnEpSpN.js";import{S as Z}from"./SearchField-BtUi6cYl.js";import{S}from"./trash-DP6Tpp_E.js";import{D as v,a as T}from"./DeleteAlertDialog-DEI0YDzP.js";import{S as ee}from"./pipeline-CSUlkd50.js";import{S as te}from"./terminal-XFL_4QN-.js";import{g as se,E as ne,a as ae}from"./ExecutionStatus-BuhNAE9w.js";import{L as m,f as ie}from"./@react-router-DeDfXbUF.js";import{A as re}from"./AlertDialogDropdownItem-DsOmO1FH.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";async function oe({params:t}){const n=C(w.pipelines.all+"?"+F(t)),s=await B(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&L(),!s.ok)throw new y({message:"Error while fetching pipelines",status:s.status,statusText:s.statusText});return s.json()}const x={all:["pipelines"],pipelineList:t=>E({queryKey:[...x.all,t],queryFn:async()=>oe({params:t})})};async function le({pipelineId:t}){const n=C(w.pipelines.detail(t)),s=await fetch(n,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!s.ok){const a=await s.json().then(i=>i.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new y({status:s.status,statusText:s.statusText,message:a})}return s.json()}function ce(t){return O({mutationFn:le,...t})}const{ContextProvider:de,useContext:u}=A();function b(){const{setRowSelection:t}=u(),{mutateAsync:n}=ce();async function s(a){await n({pipelineId:a})}return _({deleteFn:s,queryKeyToInvalidate:x.all,setRowSelection:t})}function ue(){const[t,n]=c.useState(!1),{selectedRowCount:s,selectedRowIDs:a}=u(),{bulkDelete:i}=b();async function r(){await i(a),n(!1)}return e.jsxs(q,{open:t,onOpenChange:n,children:[e.jsx(z,{asChild:!0,children:e.jsxs(P,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(S,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(v,{title:`Delete Pipeline${s>=2?"s":""}`,handleDelete:r,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function pe(){const{selectedRowCount:t}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ue,{})]})}function me({id:t}){const[n,s]=c.useState(!1),[a,i]=c.useState(!1),r=c.useRef(null),o=c.useRef(null),{bulkDelete:N}=b();async function R(){await N([t]),f(!1)}function k(){o.current=r.current}function f(l){if(l===!1){i(!1),setTimeout(()=>{s(l)},200);return}s(l)}return e.jsxs($,{onOpenChange:i,open:a,children:[e.jsx(M,{ref:r,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(H,{hidden:n,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(re,{onSelect:k,open:n,onOpenChange:f,triggerChildren:"Delete",icon:e.jsx(S,{fill:"red"}),children:e.jsx(v,{title:"Delete Pipeline",handleDelete:R,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function he(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:n=>t.toggleAllRowsSelected(n==="indeterminate"?!0:n)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var n,s,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(ee,{className:`h-5 w-5 ${se((n=t.original.resources)==null?void 0:n.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(U,{children:e.jsxs(K,{children:[e.jsx(Q,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(ne,{status:(s=t.original.resources)==null?void 0:s.latest_run_status})}),e.jsx(J,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(j,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(j,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var n,s;return{status:(n=t.resources)==null?void 0:n.latest_run_status,runId:(s=t.resources)==null?void 0:s.latest_run_id}},cell:({getValue:t})=>{const{runId:n,status:s}=t();return!n||!s?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(n),children:e.jsxs(V,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ae(s),children:[e.jsx(te,{className:"h-3 w-3 fill-current"}),n==null?void 0:n.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(me,{id:t.original.id})}]}const h=1,xe=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function fe(){const[t]=ie(),{page:n,name:s,operator:a}=xe.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:n,name:s,logical_operator:a}}function ge(){const t=fe(),{selectedRowCount:n,rowSelection:s,setRowSelection:a}=u(),{data:i,refetch:r}=I({...x.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx(pe,{}):e.jsx(Z,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(P,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(X,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:i?e.jsx(W,{rowSelection:s,onRowSelectionChange:a,getRowId:o=>o.id,columns:he(),data:i.items}):e.jsx(D,{className:"h-[500px] w-full"})}),i?i.total_pages>1&&e.jsx(Y,{searchParams:t,paginate:i}):e.jsx(D,{className:"h-[36px] w-[300px]"})]})]})}function qe(){return e.jsx(de,{children:e.jsx(ge,{})})}export{qe as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as j,j as s}from"./@radix-Cdvw4jJ8.js";import{R as g,u as b,a as y,b as v}from"./ButtonGroup-4sPZDv70.js";import{y as N,E as P,r as c,P as S,z as i,C as p,T as k,q as C,s as R,t as T,v as u,w as x,G as w,B as E,x as _,g as h}from"./index-BgEfQ3_G.js";import{S as B}from"./pipeline-CSUlkd50.js";import{f as D,L as l,a as f}from"./@react-router-DeDfXbUF.js";import{S as A}from"./refresh-BcTM09NW.js";import{u as F}from"./all-pipeline-runs-query-DpKw9WL9.js";import{S as I}from"./SearchField-BtUi6cYl.js";import{P as z}from"./Pagination-CWnEpSpN.js";import{S as G}from"./terminal-XFL_4QN-.js";import{D as H}from"./DisplayDate-8RESqe5H.js";import{g as L,E as U}from"./ExecutionStatus-BuhNAE9w.js";import"./trash-DP6Tpp_E.js";import"./AlertDialogDropdownItem-DsOmO1FH.js";import"./DeleteAlertDialog-DEI0YDzP.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./bulk-delete-CzYA--cC.js";import"./@tanstack-5gTMR7G2.js";import"./delete-run-BkyDsKQc.js";import"./@reactflow-B_iCtR7X.js";import"./index-DWpiv-Ft.js";import"./chevron-right-double-Dgp_gEsp.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";function q(e){const{setBreadcrumbs:t}=N();j.useEffect(()=>{e&&t([P,{label:e,href:c.projects.pipelines.namespace(e)}])},[t,e])}function $({namespace:e}){return s.jsx(S,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(B,{className:"h-5 w-5 fill-neutral-400"}),s.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(e)})]})})}const d=1,O=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function J(){const[e]=D(),{page:t,name:a,operator:r}=O.parse({page:e.get("page")||void 0,name:e.get("name")||void 0});return{page:t,name:a,logical_operator:r}}function K(){return[{id:"select",meta:{width:"1%"},header:({table:e})=>s.jsx(p,{id:"check-all",checked:e.getIsAllRowsSelected(),onCheckedChange:t=>e.toggleAllRowsSelected(t==="indeterminate"?!0:t)}),cell:({row:e})=>s.jsx(p,{id:`check-${e.id}`,checked:e.getIsSelected(),onCheckedChange:e.getToggleSelectedHandler()})},{id:"run",header:"Run",accessorFn:e=>{var t;return{name:e.name,id:e.id,status:(t=e.body)==null?void 0:t.status}},cell:({getValue:e})=>{const{name:t,status:a,id:r}=e();return s.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[s.jsx(G,{className:`h-5 w-5 shrink-0 ${L(a)}`}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(l,{to:c.projects.runs.detail(r),className:"flex items-center gap-1",children:s.jsx("h2",{className:"text-text-md font-semibold",children:t})}),s.jsx(k,{children:s.jsxs(C,{children:[s.jsx(R,{className:"hover:text-theme-text-brand hover:underline",children:s.jsx(U,{status:a})}),s.jsx(T,{className:"z-20 capitalize",children:a})]})}),s.jsx(u,{copyText:t})]}),s.jsxs(l,{to:c.projects.runs.detail(r),className:"flex items-center gap-1",children:[s.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),s.jsx(u,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:e=>{var t,a,r,o;return{name:(a=(t=e.body)==null?void 0:t.stack)==null?void 0:a.name,id:(o=(r=e.body)==null?void 0:r.stack)==null?void 0:o.id}},cell:({getValue:e})=>{const{name:t,id:a}=e();return!t||!a?null:s.jsx(l,{to:c.stacks.overview,children:s.jsx(x,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:t})})}},{id:"repository",header:"Repository",accessorFn:e=>{var t,a,r,o,n,m;return{name:(r=(a=(t=e.body)==null?void 0:t.code_reference)==null?void 0:a.body)==null?void 0:r.code_repository.name,id:(m=(n=(o=e.body)==null?void 0:o.code_reference)==null?void 0:n.body)==null?void 0:m.code_repository.id}},cell:({getValue:e})=>{const{name:t,id:a}=e();return!t||!a?null:s.jsx("div",{children:s.jsx(x,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:t})})}},{id:"created",header:"Created at",accessorFn:e=>{var t;return(t=e.body)==null?void 0:t.created},cell:({getValue:e})=>s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.jsx(H,{dateString:e()})})},{id:"author",header:"Author",accessorFn:e=>{var t;return{author:(t=e.resources)==null?void 0:t.user}},cell:({getValue:e})=>{const{author:t}=e();return s.jsx(w,{username:t.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:e})=>s.jsx(g,{id:e.original.id})}]}function M(){const{namespace:e}=f(),t=J(),a=K(),{selectedRowCount:r}=b(),{data:o,refetch:n}=F({params:{pipeline_name:decodeURIComponent(e),...t,sort_by:"desc:updated"}},{throwOnError:!0});return s.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[r?s.jsx(y,{}):s.jsx(I,{searchParams:t}),s.jsxs(E,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[s.jsx(A,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),s.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s.jsx("div",{className:"w-full",children:o?s.jsx(_,{columns:a,data:o.items}):s.jsx(h,{className:"h-[500px] w-full"})}),o?o.total_pages>1&&s.jsx(z,{searchParams:t,paginate:o}):s.jsx(h,{className:"h-[36px] w-[300px]"})]})]})}function be(){const{namespace:e}=f();return q(e),s.jsx("div",{children:s.jsxs(v,{children:[s.jsx($,{namespace:e}),s.jsx(M,{})]})})}export{be as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-Cdvw4jJ8.js";import{a as p,u as D,S as v,E as S}from"./SecretTooltip-
|
1
|
+
import{r as l,j as e}from"./@radix-Cdvw4jJ8.js";import{a as p,u as D,S as v,E as S}from"./SecretTooltip-B5u1UsQ9.js";import{b as f,h as b}from"./@tanstack-5gTMR7G2.js";import{aC as C,b3 as N,aD as w,I as j,b4 as E,aF as k,B as h,aB as T,b5 as A,D as K,l as V,m as B,p as O,g as F,as as L,at as z,x as I,y as Q,b6 as R,r as q,b as P,v as H}from"./index-BgEfQ3_G.js";import{S as M}from"./eye-CbVlAYty.js";import{S as _}from"./key-icon-C07HKw8z.js";import{S as $}from"./trash-DP6Tpp_E.js";import{A as U}from"./AlertDialogDropdownItem-DsOmO1FH.js";import{a as G}from"./@react-router-DeDfXbUF.js";import"./plus-Cl0_rCVF.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./CodeSnippet-Ctplhzdc.js";import"./info-QkbQz4QU.js";import"./@reactflow-B_iCtR7X.js";function J({secretId:t,keyName:s}){const{data:a,isLoading:r,isError:u}=f({...p.secretDetail(t)}),i=b(),{mutate:c}=D({onError(d){T(d)&&A({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){i.invalidateQueries({queryKey:["secrets"]}),i.invalidateQueries({queryKey:["secretDetail",t]})}}),[n,m]=l.useState(""),x=()=>{var d;if(a){const g={...(d=a.body)==null?void 0:d.values};delete g[s];const y={name:a.name,values:g};c({id:t,body:y})}};function o(d){m(d.target.value)}return r?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(C,{children:[e.jsx(N,{children:e.jsx(w,{children:"Delete Key"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this key?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:n})]}),e.jsxs(E,{className:"gap-[10px]",children:[e.jsx(k,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function W({secretId:t,keyName:s}){const[a,r]=l.useState(!1),[u,i]=l.useState(!1),c=l.useRef(null),n=l.useRef(null);function m(){n.current=c.current}function x(o){if(o===!1){r(!1),setTimeout(()=>{i(o)},200);return}i(o)}return e.jsxs(K,{onOpenChange:r,open:a,children:[e.jsx(V,{ref:c,children:e.jsx(B,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(O,{hidden:u,onCloseAutoFocus:o=>{n.current&&(n.current.focus(),n.current=null,o.preventDefault())},align:"end",sideOffset:7,children:e.jsx(U,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx($,{}),children:e.jsx(J,{secretId:t,keyName:s})})})]})}const X=({value:t})=>{const[s,a]=l.useState(!1),r=typeof t=="string"?t:"",u="•".repeat(r.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(M,{onClick:()=>a(!s),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:s?r:u})]})};function Y(t,s){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:a})=>{const r=`from zenml.client import Client
|
2
2
|
secret = Client().get_secret("${s}")
|
3
3
|
|
4
4
|
# 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,j as e}from"./@radix-Cdvw4jJ8.js";import{S as Z}from"./code-browser-CiD8qkBx.js";import{S as d}from"./help-Co6aedki.js";import{S as x}from"./info-QkbQz4QU.js";import{b as T,h as R,br as B,bs as P,d as M,g as V,aq as E,r as m,T as a,q as l,s as n,t as c}from"./index-BFqbGSck.js";import{f as z,L as h}from"./@react-router-DeDfXbUF.js";import{S as F}from"./clock-B_mTG8PH.js";import{C as L}from"./ProviderIcon-DPwMR6nF.js";import{S as _}from"./layout-DBbfEFBe.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-8OCk19Fi.js";import"./gcp-B1I3Qvcx.js";const q=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H11C11.5523 18 12 18.4477 12 19C12 19.5523 11.5523 20 11 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM5.40001 6.00001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001ZM4.60001 18C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15C17 14.4477 17.4477 14 18 14Z"}));function S(){return e.jsx("div",{className:"group absolute z-20 flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"This option is not available for local deployments"})})}const D=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),t.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),t.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"}));function u({children:s,className:r,...i}){return e.jsx(T,{...i,className:R("h-full w-full space-y-1 px-6 py-5",r),children:s})}function C({children:s}){return e.jsx(e.Fragment,{children:s})}function j({children:s}){return e.jsx("div",{className:"space-y-0.5",children:s})}function f({children:s}){return e.jsx("div",{className:"flex items-center gap-1",children:s})}function p({children:s}){return e.jsx("h2",{className:"text-text-lg font-semibold",children:s})}function g({children:s}){return e.jsx("p",{className:"text-theme-text-secondary",children:s})}function y({children:s}){return e.jsx("div",{className:"flex w-full flex-wrap items-start justify-between gap-y-1",children:s})}function v({hasTerraform:s=!1}){return e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{className:"h-4 w-4 shrink-0"}),e.jsx(L,{className:"h-4 w-4",provider:"aws"}),e.jsx(L,{className:"h-4 w-4",provider:"gcp"}),e.jsx(L,{className:"h-4 w-4",provider:"azure"})]})}function w({min:s}){return e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(F,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N({flexibility:s,children:r}){return e.jsxs("div",{className:"flex w-full items-center gap-0.5 lg:w-1/3",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Flexibility"}),r]}),e.jsx(P,{className:"h-1 flex-1 shrink-0 rounded-rounded",value:s})]})}function b({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function k({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx(B,{className:"h-3 w-3 shrink-0 fill-theme-text-success"}),e.jsxs("p",{children:["Recommended for ",s]})]})}const H="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function U(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Create New Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to create a new Cloud infrastructure a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx($,{isLocalDeployment:o}),e.jsx(O,{isLocalDeployment:o})]})]})}function $({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(Z,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"In-browser Experience"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on remote stack with a single click."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Provision cloud infrastructure via browser UI. No local installs needed. Quick setup for cloud resources."})]}),e.jsx(k,{recommendataion:"data scientists"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:25,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Low flexibility:"})," Best for straightforward setups with minimal customization."]})]})})})]})]})})]})}function O({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(q,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{hasTerraform:!0})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Infrastructure-as-code"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Infrastructure-as-code (IaC) refers to using a dynamic codebase to provision and manage infrastructure, rather than deferring to manual processes."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Use Terraform modules to deploy infrastructure and register it back to ZenML."})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"3"}),e.jsx(N,{flexibility:75,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"High flexibility:"})," Offers extensive customization for advanced users or complex setups."]})]})})})]})]})]})})]})}const A=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 6.14303C6.0632 3.17816 8.7764 1 12 1C15.2236 1 17.9368 3.17816 18.7508 6.14303C21.1861 6.70961 23 8.8925 23 11.5C23 13.8963 21.4681 15.9322 19.3332 16.6868C18.8125 16.8708 18.2412 16.5979 18.0572 16.0772C17.8731 15.5565 18.146 14.9851 18.6668 14.8011C20.0275 14.3201 21 13.0224 21 11.5C21 9.67779 19.6067 8.17984 17.828 8.01511C17.375 7.97315 17.0073 7.63059 16.9335 7.18159C16.5436 4.80968 14.4822 3 12 3C9.51785 3 7.45643 4.80968 7.0665 7.18159C6.99268 7.63059 6.62505 7.97315 6.17196 8.01511C4.39329 8.17984 3 9.67779 3 11.5C3 13.0224 3.97251 14.3201 5.33325 14.8011C5.85396 14.9851 6.12689 15.5565 5.94284 16.0772C5.75879 16.5979 5.18747 16.8708 4.66675 16.6868C2.53192 15.9322 1 13.8963 1 11.5C1 8.8925 2.8139 6.70961 5.24923 6.14303Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12ZM6 13C6 11.3431 7.34315 10 9 10C10.6569 10 12 11.3431 12 13C12 14.3062 11.1652 15.4175 10 15.8293V17C10 18.1046 10.8954 19 12 19H14V21H12C9.79086 21 8 19.2091 8 17V15.8293C6.83481 15.4175 6 14.3062 6 13Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 19C15.4477 19 15 19.4477 15 20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20C17 19.4477 16.5523 19 16 19ZM13 20C13 18.3431 14.3431 17 16 17C17.6569 17 19 18.3431 19 20C19 21.6569 17.6569 23 16 23C14.3431 23 13 21.6569 13 20Z"})),I="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function Q(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Connect Existing Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and components using existing resources that are already provisioned."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(J,{isLocalDeployment:o}),e.jsx(G,{})]})]})}function G(){const[s]=z(),r=m.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(_,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Manual Setup"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Customize your ML stack by selecting each component individually through the ZenML interface. Choose from a list of pre-configured components or add new ones tailored to your needs."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Register stack and components manually using ZenML. Recommended for advanced or custom configurations."})]}),e.jsx(k,{recommendataion:"advanced users"}),e.jsxs(b,{children:[e.jsx(w,{min:"5-10"}),e.jsx(N,{flexibility:100,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Full flexibility:"})," Complete control and customization. For expert users and highly specialized requirements."]})]})})})]})]})})})}function J({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:m.stacks.create.existingInfra,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(A,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Scan your Cloud"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"The stack wizard allows you to browse through your existing infrastructure and use it to register a ZenML cloud stack."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Input your credentials and scan existing infrastructure on your cloud provider. Best for users with existing resources."})]}),e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:50,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Medium flexibility:"})," Balances ease-of-use with some customization options."]})]})})})]})]})})]})}function c1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(U,{}),e.jsx(Q,{})]})}export{c1 as default};
|
1
|
+
import{r as t,j as e}from"./@radix-Cdvw4jJ8.js";import{S as Z}from"./code-browser-CiD8qkBx.js";import{S as d}from"./help-Co6aedki.js";import{S as x}from"./info-QkbQz4QU.js";import{b as T,h as R,br as B,bs as P,d as M,g as V,aq as E,r as m,T as a,q as l,s as n,t as c}from"./index-BgEfQ3_G.js";import{f as z,L as h}from"./@react-router-DeDfXbUF.js";import{S as F}from"./clock-B_mTG8PH.js";import{C as L}from"./ProviderIcon-DHejyg7C.js";import{S as _}from"./layout-DBbfEFBe.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";import"./gcp-B1I3Qvcx.js";const q=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H11C11.5523 18 12 18.4477 12 19C12 19.5523 11.5523 20 11 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM5.40001 6.00001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001ZM4.60001 18C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15C17 14.4477 17.4477 14 18 14Z"}));function S(){return e.jsx("div",{className:"group absolute z-20 flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"This option is not available for local deployments"})})}const D=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),t.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),t.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"}));function u({children:s,className:r,...i}){return e.jsx(T,{...i,className:R("h-full w-full space-y-1 px-6 py-5",r),children:s})}function C({children:s}){return e.jsx(e.Fragment,{children:s})}function j({children:s}){return e.jsx("div",{className:"space-y-0.5",children:s})}function f({children:s}){return e.jsx("div",{className:"flex items-center gap-1",children:s})}function p({children:s}){return e.jsx("h2",{className:"text-text-lg font-semibold",children:s})}function g({children:s}){return e.jsx("p",{className:"text-theme-text-secondary",children:s})}function y({children:s}){return e.jsx("div",{className:"flex w-full flex-wrap items-start justify-between gap-y-1",children:s})}function v({hasTerraform:s=!1}){return e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{className:"h-4 w-4 shrink-0"}),e.jsx(L,{className:"h-4 w-4",provider:"aws"}),e.jsx(L,{className:"h-4 w-4",provider:"gcp"}),e.jsx(L,{className:"h-4 w-4",provider:"azure"})]})}function w({min:s}){return e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(F,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N({flexibility:s,children:r}){return e.jsxs("div",{className:"flex w-full items-center gap-0.5 lg:w-1/3",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Flexibility"}),r]}),e.jsx(P,{className:"h-1 flex-1 shrink-0 rounded-rounded",value:s})]})}function b({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function k({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx(B,{className:"h-3 w-3 shrink-0 fill-theme-text-success"}),e.jsxs("p",{children:["Recommended for ",s]})]})}const H="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function U(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Create New Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to create a new Cloud infrastructure a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx($,{isLocalDeployment:o}),e.jsx(O,{isLocalDeployment:o})]})]})}function $({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(Z,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"In-browser Experience"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on remote stack with a single click."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Provision cloud infrastructure via browser UI. No local installs needed. Quick setup for cloud resources."})]}),e.jsx(k,{recommendataion:"data scientists"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:25,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Low flexibility:"})," Best for straightforward setups with minimal customization."]})]})})})]})]})})]})}function O({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(q,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{hasTerraform:!0})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Infrastructure-as-code"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Infrastructure-as-code (IaC) refers to using a dynamic codebase to provision and manage infrastructure, rather than deferring to manual processes."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Use Terraform modules to deploy infrastructure and register it back to ZenML."})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"3"}),e.jsx(N,{flexibility:75,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"High flexibility:"})," Offers extensive customization for advanced users or complex setups."]})]})})})]})]})]})})]})}const A=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 6.14303C6.0632 3.17816 8.7764 1 12 1C15.2236 1 17.9368 3.17816 18.7508 6.14303C21.1861 6.70961 23 8.8925 23 11.5C23 13.8963 21.4681 15.9322 19.3332 16.6868C18.8125 16.8708 18.2412 16.5979 18.0572 16.0772C17.8731 15.5565 18.146 14.9851 18.6668 14.8011C20.0275 14.3201 21 13.0224 21 11.5C21 9.67779 19.6067 8.17984 17.828 8.01511C17.375 7.97315 17.0073 7.63059 16.9335 7.18159C16.5436 4.80968 14.4822 3 12 3C9.51785 3 7.45643 4.80968 7.0665 7.18159C6.99268 7.63059 6.62505 7.97315 6.17196 8.01511C4.39329 8.17984 3 9.67779 3 11.5C3 13.0224 3.97251 14.3201 5.33325 14.8011C5.85396 14.9851 6.12689 15.5565 5.94284 16.0772C5.75879 16.5979 5.18747 16.8708 4.66675 16.6868C2.53192 15.9322 1 13.8963 1 11.5C1 8.8925 2.8139 6.70961 5.24923 6.14303Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12ZM6 13C6 11.3431 7.34315 10 9 10C10.6569 10 12 11.3431 12 13C12 14.3062 11.1652 15.4175 10 15.8293V17C10 18.1046 10.8954 19 12 19H14V21H12C9.79086 21 8 19.2091 8 17V15.8293C6.83481 15.4175 6 14.3062 6 13Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 19C15.4477 19 15 19.4477 15 20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20C17 19.4477 16.5523 19 16 19ZM13 20C13 18.3431 14.3431 17 16 17C17.6569 17 19 18.3431 19 20C19 21.6569 17.6569 23 16 23C14.3431 23 13 21.6569 13 20Z"})),I="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function Q(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Connect Existing Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and components using existing resources that are already provisioned."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(J,{isLocalDeployment:o}),e.jsx(G,{})]})]})}function G(){const[s]=z(),r=m.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(_,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Manual Setup"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Customize your ML stack by selecting each component individually through the ZenML interface. Choose from a list of pre-configured components or add new ones tailored to your needs."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Register stack and components manually using ZenML. Recommended for advanced or custom configurations."})]}),e.jsx(k,{recommendataion:"advanced users"}),e.jsxs(b,{children:[e.jsx(w,{min:"5-10"}),e.jsx(N,{flexibility:100,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Full flexibility:"})," Complete control and customization. For expert users and highly specialized requirements."]})]})})})]})]})})})}function J({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:m.stacks.create.existingInfra,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(A,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Scan your Cloud"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"The stack wizard allows you to browse through your existing infrastructure and use it to register a ZenML cloud stack."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Input your credentials and scan existing infrastructure on your cloud provider. Best for users with existing resources."})]}),e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:50,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Medium flexibility:"})," Balances ease-of-use with some customization options."]})]})})})]})]})})]})}function c1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(U,{}),e.jsx(Q,{})]})}export{c1 as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as t}from"./@radix-Cdvw4jJ8.js";import{C as o,S as r}from"./StackComponentList-Bi8BKqCu.js";import"./plus-Cl0_rCVF.js";import"./refresh-BcTM09NW.js";import"./Pagination-CWnEpSpN.js";import"./index-BgEfQ3_G.js";import"./@tanstack-5gTMR7G2.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./SearchField-BtUi6cYl.js";import"./index-DWpiv-Ft.js";import"./DisplayDate-8RESqe5H.js";import"./expand-full-BPiXpch2.js";import"./SheetHeader-DkH7aG9K.js";import"./Tabs-D4dv48ry.js";import"./terminal-XFL_4QN-.js";import"./chevron-down-jbbQh82s.js";import"./transform-CeZdrxDZ.js";import"./NestedCollapsible-CMuDIJlp.js";import"./type-guards-CNgPYg8l.js";import"./eye-CbVlAYty.js";import"./CollapsibleCard-CBKenz9f.js";import"./check-circle-C4tYvbtw.js";import"./CodeSnippet-Ctplhzdc.js";import"./all-pipeline-runs-query-DpKw9WL9.js";import"./ExecutionStatus-BuhNAE9w.js";import"./help-Co6aedki.js";import"./index-BBt0LDtR.js";import"./stack-detail-query-CNmVZ0Bo.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./trash-DP6Tpp_E.js";import"./DeleteAlertDialog-DEI0YDzP.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./Infobox-CSBRrM6r.js";import"./info-QkbQz4QU.js";import"./bulk-delete-CzYA--cC.js";function O(){return t.jsx("div",{className:"pt-5",children:t.jsx(o,{children:t.jsx(r,{})})})}export{O as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-Cdvw4jJ8.js";import{P as r,a as n,b as o,c as i,d as l,e as c}from"./ProCta-
|
1
|
+
import{j as e}from"./@radix-Cdvw4jJ8.js";import{P as r,a as n,b as o,c as i,d as l,e as c}from"./ProCta-CNyp04C8.js";import{C as m}from"./CodeSnippet-Ctplhzdc.js";import{b as d}from"./index-BgEfQ3_G.js";import{f}from"./@react-router-DeDfXbUF.js";import"./check-B9QMTa3f.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";const u="/assets/acp-DOsXjFc7.webp";function x(){const[a]=f(),t=a.get("artifact");function s(){return t?`zenml artifact list --name='contains:${t}'`:"zenml artifact list"}return e.jsxs(d,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your artifacts"})]}),e.jsx(m,{code:s()})]})}function S(){return e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsxs(r,{className:"relative overflow-y-hidden",children:[e.jsxs("div",{className:"w-full max-w-none space-y-5 lg:max-w-[900px]",children:[e.jsx(n,{children:"Advanced Artifact Management Features with ZenML Pro"}),e.jsx(o,{}),e.jsx(i,{features:[{title:"Artifact Control Plane Dashboard",subtitle:"Artifact management and monitoring"},{title:"Enterprise Security",subtitle:"Social SSO, RBAC, and User Management"},{title:"Managed ZenML Server",subtitle:"On your VPC or hosted on our infrastructure"},{title:"Advanced MLOps",subtitle:"CI/CD/CT, Model Control Plane and more"}]}),e.jsx(l,{})]}),e.jsx(c,{className:"absolute translate-x-[30%] translate-y-[15%] scale-[40%]",src:u,alt:"Screenshot of the ZenML Pro Artifact Control Plane"})]}),e.jsx(x,{})]})}export{S as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as a,j as e}from"./@radix-Cdvw4jJ8.js";import{y as g,bg as C,r as p,P as y,aZ as b,B as i,ai as c}from"./index-
|
1
|
+
import{r as a,j as e}from"./@radix-Cdvw4jJ8.js";import{y as g,bg as C,r as p,P as y,aZ as b,B as i,ai as c}from"./index-BgEfQ3_G.js";import{H as u,B as x,F as v,W as N}from"./Wizard-BHvY75u_.js";import{S as f}from"./arrow-left-MRXv5pAH.js";import{C as S}from"./configuration-form-DSoMMiPE.js";import{c as k,L as F}from"./@react-router-DeDfXbUF.js";import{S as B,s as w}from"./constants-DTfsIqHy.js";import{C as T}from"./ComponentIcon-CMiVW-O6.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";import"./index-eoDB_1XX.js";import"./form-BgtamtJm.js";import"./plus-Cl0_rCVF.js";import"./trash-DP6Tpp_E.js";import"./index.esm-DhJo3mA6.js";import"./type-guards-CNgPYg8l.js";import"./zod-XdS2h1ws.js";import"./transform-CeZdrxDZ.js";import"./check-B9QMTa3f.js";import"./CodeSnippet-Ctplhzdc.js";import"./file-text-Cd8wVfq5.js";import"./terminal-square-XFL_4QN-.js";import"./layout-DBbfEFBe.js";function z(){const{setBreadcrumbs:s}=g();a.useEffect(()=>{s([C,{label:"Create",href:p.components.create}])},[s])}function H(){return z(),e.jsx(y,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{className:"h-5 w-5 fill-turquoise-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:"Register new Component"})]})})}function I({flavor:s,type:t,handleBack:r}){const l=a.useId(),o=k();function m(d){o(p.components.detail(d))}return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Configure your ",c(s.name)," ",c(t)]})]}),e.jsx(x,{className:"p-0",children:e.jsx(S,{flavorId:s.id,formId:l,successHandler:m,FooterComponent:L})})]})}function L({formId:s,isPending:t}){return e.jsxs(v,{children:[e.jsx(i,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(F,{to:p.components.overview,children:"Cancel"})}),e.jsxs(i,{size:"md",disabled:t,type:"submit",form:s,children:[t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})}function R({type:s,handleFlavorSelect:t,handleBack:r}){return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Select your ",c(s)," Flavor"]})," "]}),e.jsx(x,{children:e.jsx(B,{type:s,setSelectedFlavor:t})})]})}function q({selectTypeHandler:s}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{children:"Select your Component Type"}),e.jsx(x,{children:e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:w.map(t=>e.jsx(E,{type:t,selectTypeHandler:s},t))})})]})}function E({type:s,selectTypeHandler:t}){return e.jsxs("button",{onClick:()=>t(s),className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm",children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:s}),e.jsx("span",{children:c(s)})]})}function W(){const[s,t]=a.useState(0),[r,l]=a.useState(null),[o,m]=a.useState();function d(n){l(n),t(1)}function j(n){m(n),t(2)}function h(){t(n=>n-1)}return e.jsxs(N,{children:[s===0&&e.jsx(q,{selectTypeHandler:d}),s===1&&r&&e.jsx(R,{type:r,handleFlavorSelect:j,handleBack:h}),s===2&&o&&r&&e.jsx(I,{flavor:o,type:r,handleBack:h})]})}function ie(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(H,{}),e.jsx("section",{className:"layout-container pb-5",children:e.jsx(W,{})})]})}export{ie as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{f as D,i as C,n as $,F as k,j as E,au as T,av as P,aw as F,I as j,az as O,aA as A,B as u,D as K,l as H,m as G,p as U,b2 as J,r as S,v,G as W,z as f,e as X,g as N,as as Y,at as Z,a as ee,aB as se,x as te,b as ae}from"./index-BgEfQ3_G.js";import{P as re}from"./Pagination-CWnEpSpN.js";import{S as ne}from"./SearchField-BtUi6cYl.js";import{E as ie,S as le,s as ce,a as oe}from"./SecretTooltip-B5u1UsQ9.js";import{c as V,h as q,b as me}from"./@tanstack-5gTMR7G2.js";import{S as de}from"./Lock-CrIAdQo6.js";import{D as ue}from"./DisplayDate-8RESqe5H.js";import{c as xe}from"./code-snippets-CqONne41.js";import{L as w,f as he}from"./@react-router-DeDfXbUF.js";import{S as I}from"./trash-DP6Tpp_E.js";import{D as b}from"./DialogItem-CRCDpYU6.js";import{S as pe}from"./eye-CbVlAYty.js";import{S as L}from"./plus-Cl0_rCVF.js";import{t as fe}from"./zod-XdS2h1ws.js";import{u as je,b as ge,C as g}from"./index.esm-DhJo3mA6.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./CodeSnippet-Ctplhzdc.js";import"./info-QkbQz4QU.js";async function ye(t){const s=C(E.secrets.detail(t)),a=await D(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&$(),!a.ok)throw new k({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ne(t){return V({mutationFn:async s=>ye(s),...t})}function Se({secretId:t}){const s=q(),{mutate:a}=Ne({onSuccess(){s.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=p.useState("");function o(){a(t)}function m(x){n(x.target.value)}return e.jsxs(T,{children:[e.jsx(P,{children:e.jsx(F,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:m,className:"w-full",required:!0,value:r})]}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:o,disabled:r!=="DELETE",children:"Delete"})]})]})}function ve({secretId:t}){const[s,a]=p.useState(!1),[r,n]=p.useState(!1),o=p.useRef(null),m=p.useRef(null);function x(){m.current=o.current}function h(d){if(d===!1){a(!1),setTimeout(()=>{n(d)},200);return}n(d)}return e.jsxs(K,{onOpenChange:a,open:s,children:[e.jsx(H,{ref:o,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(U,{hidden:r,onCloseAutoFocus:d=>{m.current&&(m.current.focus(),m.current=null,d.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Edit ",icon:e.jsx(J,{}),children:e.jsx(ie,{secretId:t,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Delete ",icon:e.jsx(I,{}),children:e.jsx(Se,{secretId:t})})]})]})}const we=[{id:"secret",header:"Secret",accessorFn:t=>t.name,cell:({getValue:t,row:s})=>{const a=xe(s.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(de,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(w,{className:"text-text-md font-semibold text-theme-text-primary",to:S.settings.secrets.detail(s.original.id),children:s.original.name}),e.jsx(le,{code:a})]}),e.jsx(v,{copyText:t()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{to:S.settings.secrets.detail(s.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:s.original.id.slice(0,8)}),e.jsx(v,{copyText:s.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.resources)==null?void 0:s.user)==null?void 0:a.name},cell:({getValue:t})=>{const s=t();return s?e.jsx(W,{username:s}):null}},{id:"created_at",header:"Created At",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ue,{dateString:t()})})},{id:"admin_actions",header:"",accessorFn:t=>String(t.id),cell:({row:t,getValue:s})=>{var r,n,o;const a=s();return(o=(n=(r=t.original.resources)==null?void 0:r.user)==null?void 0:n.body)!=null&&o.is_admin?e.jsx(ve,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,be=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function De(){const[t]=he(),{page:s,name:a,operator:r}=be.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:a,logical_operator:r}}async function Ce(t){const s=C(E.secrets.all),a=await D(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new k({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ke(t){return V({mutationFn:async s=>Ce(s),...t})}function Ee(){const[t,s]=p.useState(!1),a=X();if(a.isPending)return e.jsx(N,{className:"h-7 w-full"});if(a.isError)return e.jsx("div",{children:"Error loading user"});const r=a.data.id;return e.jsxs(Y,{open:t,onOpenChange:s,children:[e.jsx(Z,{asChild:!0,children:e.jsxs(u,{size:"md",className:"shrink-0",intent:"primary",children:[e.jsx(L,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Secret"})]})}),e.jsxs(T,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(F,{children:"Register New Secret"})}),e.jsx(Te,{userId:r,setOpen:s})]})]})}function Te({userId:t,setOpen:s}){const{handleSubmit:a,control:r,watch:n,setValue:o,formState:{isValid:m},reset:x}=je({resolver:fe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:h,append:d,remove:_}=ge({control:r,name:"keysValues"}),{toast:z}=ee(),R=q(),{mutate:M}=ke({onError(i){se(i)&&z({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},onSuccess(){R.invalidateQueries({queryKey:["secrets"]}),s(!1),x()}}),Q=i=>{M({user:t,name:i.secretName,values:i.keysValues.reduce((l,c)=>(c.key&&c.value&&(l[c.key]=c.value),l),{})})},B=i=>{Q(i)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:a(B),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:r,render:({field:i})=>e.jsx(j,{...i,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),h.map((i,l)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsx("div",{className:"relative flex-grow",children:e.jsx(g,{name:`keysValues.${l}.key`,control:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${l}.value`,control:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:n(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const c=n(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!c)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===h.length-1&&e.jsx(u,{intent:"primary",emphasis:"subtle",onClick:()=>d({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(L,{className:"flex-shrink-0 fill-primary-600"})}),l!==h.length-1&&e.jsx(u,{intent:"secondary",emphasis:"minimal",onClick:()=>_(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(I,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},i.id))]})}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"primary",disabled:!m,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}function Pe(){const t=De(),{data:s}=me({...oe.secretList({...t,sort_by:"desc:created"}),throwOnError:!0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(ne,{searchParams:t}),e.jsx(Ee,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(te,{columns:we,data:s.items}):e.jsx(N,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(re,{searchParams:t,paginate:s}):e.jsx(N,{className:"h-[36px] w-[300px]"})]})]})}function Ye(){return e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Pe,{})]})}export{Ye as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as d,j as e}from"./@radix-Cdvw4jJ8.js";import{T as y,P as g}from"./ProCta-
|
1
|
+
import{r as d,j as e}from"./@radix-Cdvw4jJ8.js";import{T as y,P as g}from"./ProCta-CNyp04C8.js";import{z as c,a as N,f as b,c as v,d as w,e as S,g as k,I as m,B as p,h as F,r as P}from"./index-BgEfQ3_G.js";import{t as U}from"./zod-XdS2h1ws.js";import{c as C}from"./@tanstack-5gTMR7G2.js";import{u as E}from"./index.esm-DhJo3mA6.js";import{S as M}from"./check-circle-C4tYvbtw.js";import{L}from"./@react-router-DeDfXbUF.js";import"./check-B9QMTa3f.js";import"./@reactflow-B_iCtR7X.js";const h=d.createContext(null);function z({children:s}){const[t,a]=d.useState(!1);return e.jsx(h.Provider,{value:{setSubmitSuccess:a,submitSuccess:t},children:s})}function f(){const s=d.useContext(h);if(s===null)throw new Error("useUpgradeContext must be used within an UpgradeProvider");return s}const B=c.object({name:c.string().min(1),company:c.string().min(1),email:c.string().email()});function T(){const{setSubmitSuccess:s}=f(),{toast:t}=N(),a=E({resolver:U(B),defaultValues:{company:"",email:"",name:""}}),n=C({mutationFn:I,onSuccess:()=>s(!0),onError:r=>{t({emphasis:"subtle",status:"error",rounded:!0,description:r.message})}});async function i(r,o,l){n.mutate({...r,userId:o,isDebug:l})}return{form:a,submitFormMutation:n,handleSubmitForm:i}}async function I({company:s,email:t,isDebug:a,name:n,userId:i}){return b(v,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify([{debug:a,event:"Upgrade initiated",type:"track",user_id:i,properties:{company:s,email:t,name:n}}])})}function Z(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(_,{}),e.jsx(D,{})]})}function _(){return e.jsxs("div",{className:"flex flex-col items-center space-y-0.5",children:[e.jsx("h1",{className:"text-center text-display-xs font-semibold",children:"Upgrade to ZenML Pro on your own VPC"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Direct self-deployment, no sales calls"})]})}function D(){const s=w(),t=S(),{form:a,handleSubmitForm:n,submitFormMutation:i}=T(),{register:r,handleSubmit:o,formState:{isValid:l,isSubmitting:u}}=a,{isPending:x}=i;return s.isPending||t.isPending?e.jsx(k,{className:"h-[250px] w-full"}):s.isError||t.isError?e.jsx("p",{children:"Something went wrong...."}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("form",{onSubmit:o(j=>n(j,t.data.id,!!s.data.debug)),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"name",className:"text-text-sm",children:"Your Name"}),e.jsx(m,{...r("name"),id:"name",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"company",className:"text-text-sm",children:"Company"}),e.jsx(m,{...r("company"),id:"company",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"email",className:"text-text-sm",children:"Email address"}),e.jsx(m,{...r("email"),id:"email",className:"w-full"})]}),e.jsxs(p,{size:"md",className:"w-full justify-center",disabled:u||x||!l,type:"submit",children:[(x||u)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Continue"]})]}),e.jsxs("p",{className:"text-center text-text-xs text-theme-text-secondary",children:["By submitting the form you accept our"," ",e.jsx("a",{className:"link",href:"https://www.zenml.io/cloud-terms-and-privacy",target:"_blank",rel:"noopener noreferrer",children:"terms of use"})," ","and"," ",e.jsx("a",{href:"https://www.zenml.io/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"link",children:"privacy policy"}),"."]})]})}function R(){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"As easy as following the steps"}),e.jsx("p",{className:"text-theme-text-secondary",children:"From sign-up to deployment in minutes"})]}),e.jsx(W,{})]})}const V=["Fill out your details","Receive comprehensive ZenML Pro documentation","Deploy ZenML Pro and upgrade your tenant","Get a free 14-day trial license"];function W(){return e.jsx("ol",{className:"space-y-3",children:V.map((s,t)=>e.jsxs("li",{className:"flex items-center space-x-1",children:[e.jsx(Y,{children:t+1}),e.jsx("span",{children:s})]},t))})}function Y({className:s,...t}){return e.jsx("div",{...t,className:F("flex h-4 w-4 shrink-0 items-center justify-center rounded-rounded bg-warning-400 text-text-xs text-theme-text-negative")})}function q(){return e.jsxs("section",{className:"flex w-full flex-col-reverse items-center justify-end gap-5 lg:flex-row lg:gap-[100px] xl:pl-[200px] 2xl:pl-[300px]",children:[e.jsx(R,{}),e.jsx(Z,{})]})}const G="/assets/upgrade-form-CwRHBuXB.webp",H=["Comprehensive documentation to get started","Your 14-day trial license key","Step-by-step deployment instructions"];function O(){return e.jsxs("section",{className:"flex h-full w-full flex-col items-center justify-center space-y-5",children:[e.jsx(M,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"space-y-7",children:[e.jsxs("div",{className:"max-w-[500px] space-y-2 text-center",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"You're on your way to ZenML Pro!"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Thank you for choosing to upgrade to ZenML Pro. We've received your request and you'll receive an email with:"}),e.jsx("ul",{className:"mx-auto w-fit space-y-3",children:H.map((s,t)=>e.jsxs("li",{className:"flex items-center gap-1",children:[e.jsx(y,{}),e.jsx("span",{children:s})]},t))}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Meanwhile, you can ask your questions in our"," ",e.jsx("a",{className:"link",href:"https://zenml.io/slack",target:"_blank",rel:"noopener noreferrer",children:"Slack channel"})," ","or"," ",e.jsx("a",{className:"link",href:"https://docs.zenml.io",target:"_blank",rel:"noopener noreferrer",children:"check our documentation."})]})]}),e.jsx(p,{size:"md",className:"mx-auto",children:e.jsx(L,{to:P.home,children:"Go to Dashboard"})})]})]})}function A(){const{submitSuccess:s}=f();return e.jsxs(g,{className:"relative min-h-[620px]",children:[e.jsx("img",{src:G,className:"absolute hidden -translate-x-3/4 -rotate-[5deg] scale-75 xl:block 2xl:-translate-x-[60%]"}),s===!1&&e.jsx(q,{}),s===!0&&e.jsx(O,{})]})}function ne(){return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"layout-container",children:e.jsx(z,{children:e.jsx(A,{})})})})}export{ne as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as n}from"./@radix-Cdvw4jJ8.js";import{f as p,i as f,F as y,j,as as g,au as v,V as C,B as d,ap as u,aQ as x,aO as N,g as w,ac as E,ad as b,ae as F,af as k,S as V}from"./index-
|
1
|
+
import{j as e,r as n}from"./@radix-Cdvw4jJ8.js";import{f as p,i as f,F as y,j,as as g,au as v,V as C,B as d,ap as u,aQ as x,aO as N,g as w,ac as E,ad as b,ae as F,af as k,S as V}from"./index-BgEfQ3_G.js";import{S as _}from"./chevron-down-jbbQh82s.js";import{I as H}from"./Infobox-CSBRrM6r.js";import{c as S,b as P}from"./@tanstack-5gTMR7G2.js";import{a as B}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";async function D({connectorId:t}){const s=f(j.serviceConnectors.verifyExisting(t)),a=await p(s,{method:"PUT",headers:{"Content-Type":"application/json"}});if(!a.ok){const r=await a.json().then(l=>Array.isArray(l.detail)?l.detail[1]:l.detail).catch(()=>"Failed to verify connector");throw new y({status:a.status,statusText:a.statusText,message:r})}return a.json()}function A(t){return S({...t,mutationFn:async({connectorId:s})=>D({connectorId:s})})}const M="/assets/connectivity-4UKGMYnr.webp";function R({open:t,isLoading:s,isError:a,onClose:r,onSuccess:l,data:c}){const i=!!(c!=null&&c.error),o=(c==null?void 0:c.error)??void 0;return e.jsx(g,{open:t,children:e.jsx(v,{onPointerDownOutside:m=>s?m.preventDefault():r==null?void 0:r(),onEscapeKeyDown:m=>s?m.preventDefault():r==null?void 0:r(),className:"max-w-[540px] p-8",children:e.jsxs("div",{className:"flex w-full flex-col items-center justify-center space-y-5",children:[s&&!c&&e.jsx(T,{onClose:r}),!s&&!a&&!i&&e.jsx(O,{onSuccess:l}),!s&&(a||i)&&e.jsx(Z,{error:o,onClose:r})]})})})}function T({onClose:t}){return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Verifying your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["Please wait while we check your connection ",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(d,{size:"md",emphasis:"subtle",onClick:t,intent:"secondary",className:"mt-4",children:"Cancel"})]})}function O({onSuccess:t}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{width:180,height:180,className:"fill-theme-text-success"}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Connection verified successfully!"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Ready to show your available resources"})]}),e.jsx(d,{size:"md",onClick:t,className:"mt-4",children:"Display Resources"})]})}function Z({onClose:t,error:s}){return e.jsxs(e.Fragment,{children:[e.jsx("img",{src:M,alt:"Connectivity",width:180,height:180}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"We couldn't verify your connection"}),s&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:s}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Please try again to list your resources"})]}),e.jsx(d,{size:"md",emphasis:"subtle",onClick:t,intent:"secondary",className:"mt-4",children:"Close"})]})}function h({children:t}){const{setResources:s}=x(),{connectorId:a}=B(),r=P({...N.serviceConnectorDetail(a),throwOnError:!0}),[l,c]=n.useState(!1),i=A();if(r.isPending)return e.jsx(w,{className:"h-7 w-[150px]"});if(r.isError)return null;const o=()=>{c(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(R,{data:i.data,open:l,isLoading:i.isPending,isError:i.isError,onClose:o,onSuccess:()=>{i.data&&(s(i.data),c(!1))}}),e.jsxs(d,{disabled:i.isPending&&l,onClick:()=>{c(!0),i.mutate({connectorId:a})},className:"gap-1",size:"md",children:[e.jsx(u,{width:24,height:24,className:"size-5 shrink-0 fill-white"}),t]})]})}function z(){var a;const{resources:t}=x();if(!t)return null;const s=t.connector_type;return!s||typeof s=="string"?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{children:e.jsx("span",{children:"Reverify now"})})}),(a=t.resources)==null?void 0:a.map(r=>{var l,c;return e.jsx(I,{title:(l=s.resource_types.find(i=>i.resource_type===r.resource_type))==null?void 0:l.name,logoUrl:((c=s.resource_types.find(i=>i.resource_type===r.resource_type))==null?void 0:c.logo_url)??void 0,resource:r},r.resource_type)})]})}function I({resource:t,title:s,logoUrl:a}){const[r,l]=n.useState(!0),c=t.error,i=t.resource_ids??[];return e.jsxs(E,{open:r,onOpenChange:l,children:[e.jsx(b,{className:"flex items-center gap-[10px]",children:e.jsxs(F,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(_,{className:` ${r?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s||t.resource_type]})}),e.jsx(k,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary",children:c?e.jsx("div",{className:"p-5",children:e.jsx(H,{intent:"error",children:c})}):e.jsx("ul",{className:"divide-y divide-theme-border-moderate",children:i.map(o=>e.jsxs("li",{className:"flex items-center space-x-2 py-3 pl-8",children:[!!a&&e.jsx("img",{width:24,height:24,src:a,alt:s,className:"size-5 shrink-0"}),e.jsx("span",{children:o})]},o))})})]})}const Q=t=>n.createElement("svg",{width:182,height:104,viewBox:"0 0 182 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},n.createElement("path",{d:"M35 12C35 7.58172 38.5817 4 43 4H147C151.418 4 155 7.58172 155 12V96C155 100.418 151.418 104 147 104H43C38.5817 104 35 100.418 35 96V12Z",fill:"#F1EBFE"}),n.createElement("path",{d:"M1 56H181",stroke:"#7A3EF4",strokeLinecap:"round"}),n.createElement("path",{d:"M16 61H166",stroke:"#7A3EF4",strokeLinecap:"round"}),n.createElement("g",{clipPath:"url(#clip0_8218_459)"},n.createElement("path",{d:"M31 8C31 3.58172 34.5817 0 39 0H143C147.418 0 151 3.58172 151 8V92C151 96.4183 147.418 100 143 100H39C34.5817 100 31 96.4183 31 92V8Z",fill:"white"}),n.createElement("mask",{id:"path-6-inside-1_8218_459",fill:"white"},n.createElement("path",{d:"M31 0H151V12H31V0Z"})),n.createElement("path",{d:"M31 0H151V12H31V0Z",fill:"#FBF9FF"}),n.createElement("path",{d:"M151 11H31V13H151V11Z",fill:"#7A3EF4",mask:"url(#path-6-inside-1_8218_459)"}),n.createElement("circle",{cx:41,cy:6,r:2,fill:"#AF8BF8"}),n.createElement("circle",{cx:47,cy:6,r:2,fill:"#AF8BF8"}),n.createElement("circle",{cx:53,cy:6,r:2,fill:"#AF8BF8"})),n.createElement("path",{d:"M31.5 8C31.5 3.85786 34.8579 0.5 39 0.5H143C147.142 0.5 150.5 3.85786 150.5 8V92C150.5 96.1421 147.142 99.5 143 99.5H39C34.8579 99.5 31.5 96.1421 31.5 92V8Z",stroke:"#7A3EF4"}),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_8218_459"},n.createElement("path",{d:"M31 8C31 3.58172 34.5817 0 39 0H143C147.418 0 151 3.58172 151 8V92C151 96.4183 147.418 100 143 100H39C34.5817 100 31 96.4183 31 92V8Z",fill:"white"}))));function K({icon:t}){return e.jsxs("div",{className:"relative",children:[e.jsx(Q,{}),e.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-rounded bg-primary-25 p-3",children:t})]})}function L(){return e.jsx("div",{className:"p-9",children:e.jsxs("div",{className:"flex flex-col items-center space-y-5",children:[e.jsx(K,{icon:e.jsx(V,{className:"h-[36px] w-[36px] fill-primary-400"})}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Please verify your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["We'll check your connection and load available resources.",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(h,{children:e.jsx("span",{children:"Verify now"})})]})})}function ee(){const{resources:t}=x();return t===null?e.jsx(L,{}):e.jsx(z,{})}export{ee as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r}from"./@radix-Cdvw4jJ8.js";import{as as m,at as i,B as o,au as p,aw as x,az as h,aA as u,b as n,a_ as f}from"./index-
|
1
|
+
import{j as e,r}from"./@radix-Cdvw4jJ8.js";import{as as m,at as i,B as o,au as p,aw as x,az as h,aA as u,b as n,a_ as f}from"./index-BgEfQ3_G.js";import{I as l}from"./Infobox-CSBRrM6r.js";import{H as C}from"./Helpbox-DtUG2Bf_.js";import{C as g}from"./CodeSnippet-Ctplhzdc.js";import"./@tanstack-5gTMR7G2.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";import"./help-Co6aedki.js";const j=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}];function y(s){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.description}),e.jsx(g,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:s.command})]})}const w=s=>r.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM11.2451 7.43304C11.2546 7.43912 11.264 7.44517 11.2734 7.45121L15.994 10.4859C16.0026 10.4914 16.0112 10.497 16.02 10.5026C16.171 10.5996 16.3361 10.7057 16.4676 10.8083C16.6071 10.917 16.8273 11.1089 16.9571 11.4162C17.1148 11.7894 17.1148 12.2106 16.9571 12.5838C16.8273 12.8911 16.6071 13.083 16.4676 13.1917C16.3361 13.2943 16.171 13.4004 16.02 13.4974C16.0112 13.503 16.0026 13.5086 15.994 13.5141L11.2734 16.5488C11.264 16.5548 11.2545 16.5609 11.2451 16.567C11.0694 16.68 10.8846 16.7988 10.7219 16.8835C10.5582 16.9687 10.2611 17.1066 9.89314 17.0804C9.45914 17.0494 9.05999 16.8314 8.79923 16.4831C8.57813 16.1878 8.5335 15.8633 8.51664 15.6796C8.49989 15.4969 8.49995 15.2772 8.49999 15.0683C8.5 15.057 8.5 15.0458 8.5 15.0347V8.96533C8.5 8.95417 8.5 8.94296 8.49999 8.93173C8.49995 8.72279 8.49989 8.50311 8.51664 8.32042C8.5335 8.13665 8.57813 7.81219 8.79923 7.51687C9.05999 7.16856 9.45914 6.95064 9.89314 6.91964C10.2611 6.89336 10.5582 7.03127 10.7219 7.11647C10.8846 7.20117 11.0694 7.32001 11.2451 7.43304ZM10.5 9.33167V14.6683L14.6507 12L10.5 9.33167Z"}));function a({videoLink:s,isButton:t=!0,buttonText:c,fallbackImage:d}){return e.jsxs(m,{children:[t?e.jsx(i,{asChild:!0,children:e.jsxs(o,{className:"mt-5 h-auto gap-1 px-2 py-1 sm:h-7",size:"md",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 fill-white"}),c??e.jsx(e.Fragment,{children:"Watch the Quickstart Guide (3 min)"})]})}):e.jsx(i,{children:d}),e.jsxs(p,{className:"max-w-[1000px]",children:[e.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:e.jsx(x,{className:"text-text-lg",children:"Get Started"})}),e.jsx("div",{className:"",children:e.jsx("iframe",{className:"aspect-video w-full overflow-hidden",src:s,allowFullScreen:!0,allow:"fullscreen"})}),e.jsx(h,{children:e.jsx(u,{asChild:!0,children:e.jsx(o,{size:"md",children:"Close"})})})]})]})}const N="/assets/repos-video-D8kpu60k.svg";function v(){return e.jsx(l,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function R(){const s="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(n,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(a,{videoLink:s,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(a,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:s,isButton:!1})})]})}function O(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),j.map((s,t)=>e.jsx(e.Fragment,{children:y(s)},t)),e.jsx(C,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function T(){return e.jsxs(n,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(v,{}),e.jsx(R,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{}),"Administering your Code Repositories"]}),e.jsx(O,{})]})}export{T as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as o,j as e}from"./@radix-Cdvw4jJ8.js";import{f as C,i as b,F as y,j as v,as as M,at as F,B as h,au as E,av as T,aw as P,ax as U,a as w,I as k,ay as O,az as I,aA as H,aB as R,S as D,z as u,aC as _,aD as z,aE as B,aF as Z,aG as q,D as V,l as G,m as L,p as K,G as Q,a3 as j,aH as J,e as $,g as f,x as W,b as X}from"./index-BgEfQ3_G.js";import{S as Y}from"./SearchField-BtUi6cYl.js";import{C as ee}from"./CodeSnippet-Ctplhzdc.js";import{c as N,h as A}from"./@tanstack-5gTMR7G2.js";import{u as se}from"./index.esm-DhJo3mA6.js";import{D as te}from"./DisplayDate-8RESqe5H.js";import{A as ae}from"./AlertDialogDropdownItem-DsOmO1FH.js";import{f as re}from"./@react-router-DeDfXbUF.js";import{P as ne}from"./Pagination-CWnEpSpN.js";import"./@reactflow-B_iCtR7X.js";import"./index-DWpiv-Ft.js";import"./chevron-right-double-Dgp_gEsp.js";const ie=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function oe(a){const s=b(v.users.all),t=await C(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new y({status:t.status,statusText:t.statusText,message:r})}return t.json()}function le(a){return N({mutationFn:async s=>oe(s),...a})}function ce(){const[a,s]=o.useState(!1),[t,r]=o.useState(null);return e.jsxs(M,{open:a,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(F,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(E,{className:"",children:[e.jsx(T,{children:e.jsx(P,{children:" Add a New Member"})}),t?e.jsx(me,{name:t.name,token:U(t)}):e.jsx(de,{setSuccessMember:r})]})]})}u.object({username:u.string(),isAdmin:u.boolean()});function de({setSuccessMember:a}){const{toast:s}=w(),t=A(),{mutate:r,isPending:n}=le({onError(d){R(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){a(d),t.invalidateQueries({queryKey:["users"]})}}),c=o.useId(),l=o.useId(),{register:i,handleSubmit:x,watch:p,setValue:m}=se();function S(d){r({is_admin:d.isAdmin,name:d.username})}return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-user-form",onSubmit:x(S),className:"space-y-5 p-7",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Username"}),e.jsx(k,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:l,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(O,{onCheckedChange:d=>m("isAdmin",!!d),...i("isAdmin",{value:!1}),id:l})]})]})}),e.jsxs(I,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function me({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(ie,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(ee,{className:"mx-auto",code:a})]})}const ue=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231ZM6.38231 4.9681L19.0319 17.6177C20.2635 16.078 21 14.125 21 12C21 7.02944 16.9706 3 12 3C9.87499 3 7.92199 3.73647 6.38231 4.9681ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z"}));async function he(a){const s=b(v.users.detail(a)),t=await C(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new y({status:t.status,statusText:t.statusText,message:r})}return t.json()}function xe(a){return N({mutationFn:async s=>he(s),...a})}function pe({userId:a,name:s}){const{toast:t}=w(),r=A(),{isPending:n,mutate:c}=xe({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&t({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function l(){c(a)}return e.jsxs(_,{className:"p-0",children:[e.jsx(z,{className:"py-2 pl-5 pr-3 text-text-lg font-semibold",children:"Delete Member"}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(B,{children:["Deleting ",e.jsx("strong",{children:s})," cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(Z,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(q,{asChild:!0,children:e.jsx(h,{onClick:l,disabled:n,intent:"danger",children:"Delete"})})]})]})}function fe({userId:a,name:s}){const[t,r]=o.useState(!1),[n,c]=o.useState(!1),l=o.useRef(null),i=o.useRef(null);function x(){i.current=l.current}function p(m){if(m===!1){c(!1),setTimeout(()=>{r(m)},200);return}r(m)}return e.jsxs(V,{onOpenChange:c,open:n,children:[e.jsx(G,{ref:l,children:e.jsx(L,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(K,{hidden:t,onCloseAutoFocus:m=>{i.current&&(i.current.focus(),i.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ae,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(ue,{fill:"red"}),children:e.jsx(pe,{name:s,userId:a})})})]})}function ge({isAdmin:a}){return[{id:"name",accessorFn:s=>{var t;return{name:s.name,is_admin:!!((t=s.body)!=null&&t.is_admin)}},cell:({getValue:s})=>{const{name:t,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(Q,{username:t}),r&&e.jsx("div",{children:e.jsx(j,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var t;return{status:(t=s.body)==null?void 0:t.active}},cell:({getValue:s})=>{const{status:t}=s();return e.jsx(j,{className:"capitalize",color:t?"green":"grey",children:t?"Active":"Inactive"})}},{id:"created",header:"Created",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(te,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:s.name}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(fe,{name:r,userId:t})}}]:[]]}const g=1,je=u.object({page:u.coerce.number().min(g).optional().default(g).catch(g),name:u.string().optional(),operator:u.enum(["and","or"]).optional()});function Ce(){const[a]=re(),{page:s,name:t,operator:r}=je.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:s,name:t,logical_operator:r}}function be(){var l,i;const a=Ce(),{data:s,isError:t}=J({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=$();return t||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(Y,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(ce,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(W,{columns:ge({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(ne,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function ke(){return e.jsxs(X,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(be,{})]})}export{ke as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as f,j as e}from"./@radix-Cdvw4jJ8.js";import{u as y,W as X,L as $}from"./LeftSideMenu-
|
1
|
+
import{r as f,j as e}from"./@radix-Cdvw4jJ8.js";import{u as y,W as X,L as $}from"./LeftSideMenu-DPsCCK3z.js";import{u,R as ee,a as te,E as se,D as F,G as re,A as ae,C as O,b as oe,N as ne}from"./Partials-CfHD6OH5.js";import{g as V,b as Y,bf as ie,B as ce,r as T}from"./index-BgEfQ3_G.js";import{f as de,c as le}from"./@react-router-DeDfXbUF.js";import{S as me,C as ue}from"./StackName-CFSZL8ec.js";import{I as G}from"./Infobox-CSBRrM6r.js";import{t as H}from"./zod-XdS2h1ws.js";import{u as Q,F as pe}from"./index.esm-DhJo3mA6.js";import{b as xe,c as q,d as fe,p as he}from"./persist-BsdEtCkd.js";import{C as h}from"./ProviderIcon-DHejyg7C.js";import{s as J}from"./index-BBt0LDtR.js";import{b as K}from"./@tanstack-5gTMR7G2.js";import{C as v,P as N}from"./ProviderRadio-tGtie8Gc.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";import"./package-miExReQl.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./logs-CQKlJjo0.js";import"./CodeSnippet-Ctplhzdc.js";import"./NumberBox-DtCv7jh3.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";import"./sharedSchema-C_HkejsG.js";import"./index.es-C1gfATPn.js";import"./gcp-B1I3Qvcx.js";import"./stack-detail-query-CNmVZ0Bo.js";function je(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),n=Q({resolver:H(xe),mode:"onChange",defaultValues:{region:o.location,stackName:o.stackName||""}});f.useEffect(()=>{s(!n.formState.isValid)},[n.formState.isValid,s]);function l(r){a(m=>({...m,location:r.region,stackName:r.stackName}))}return e.jsx(j,{title:"Review Stack Configuration",children:e.jsx(pe,{...n,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(G,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{onSubmit:n.handleSubmit(l),ref:t,className:"space-y-5",children:[e.jsx(ee,{provider:o.provider||"aws"}),e.jsx(me,{})]}),e.jsx(te,{provider:o.provider||"aws"}),e.jsx(se,{provider:o.provider||"aws"})]})})})}function ve(){const{data:t,timestamp:s,setIsNextButtonDisabled:a}=u(),{setCurrentStep:o}=y(),{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t.provider,stack_name:t.stackName,date_start:s}),refetchInterval:5e3,throwOnError:!0});return f.useEffect(()=>{r&&(q(),o(m=>m+1),a(!1))},[r]),n?e.jsx(V,{className:"h-[200px] w-full"}):l?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Ne,{}),e.jsx(ye,{stack:r})]})}function Ne(){const{data:t}=u();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs(Y,{className:"flex items-center justify-between gap-4 px-6 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(h,{provider:t.provider,className:"h-6 w-6 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploying the Stack..."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps in your Cloud console to finish the setup. You can come back to check once your components are deployed."})]})]}),t.provider==="azure"?e.jsx(F,{children:e.jsx("span",{children:"Deploy in Azure"})}):e.jsx(F,{})]}),t.provider==="gcp"&&e.jsx(re,{}),t.provider==="azure"&&e.jsx(ae,{})]})}function ye({stack:t}){const s=!!t;return e.jsxs("div",{className:"space-y-5",children:[!s&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(ie,{className:"h-5 w-5 fill-primary-400"}),"Creating your stack and components..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are creating your stack and stack components based on your configuration. Once you finish the setup, come back to check your brand new stack and components ready."})]}),e.jsx(ke,{isReady:s}),e.jsx(ge,{stack:t})]})}function ge({stack:t}){const s=!!t,{data:a}=u();return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[!s&&e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(O,{type:a.provider,componentProps:{isLoading:!s,isSuccess:s,stackName:a.stackName}})]})}function ke({isReady:t}){const[s,a]=f.useState(!1);return f.useEffect(()=>{const o=setTimeout(()=>{a(!0)},3e5);return()=>clearTimeout(o)},[]),!s||t?null:e.jsx(G,{children:"Your stack is taking longer than usual to deploy. Please check your Cloud console, or the stacks list in ZenML."})}function Se(){return e.jsx(j,{title:"Deploy ZenML Stack",children:e.jsx(be,{})})}function be(){const{setIsNextButtonDisabled:t,isLoading:s}=u();return f.useEffect(()=>{t(!0)},[]),s?e.jsx(ve,{}):e.jsx(oe,{})}function we(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),{register:n,handleSubmit:l,formState:{isValid:r}}=Q({resolver:H(fe),defaultValues:{provider:o.provider}});f.useEffect(()=>{s(!r)},[r,s]);function m(d){a(c=>({...c,provider:d.provider}))}return e.jsx(j,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:l(m),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:t,children:[e.jsx(v,{id:"aws-provider",...n("provider"),value:"aws",children:e.jsx(N,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(v,{id:"gcp-provider",...n("provider"),value:"gcp",children:e.jsx(N,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(v,{id:"azure-provider",...n("provider"),value:"azure",children:e.jsx(N,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function Ce({provider:t,stackName:s,timestamp:a,isTerraform:o}){var g,k,S,b,w,C,P,D,I,z,L,R,B,E,W,M,_,A;const{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t,stack_name:s,date_start:a,terraform:o}),throwOnError:!0});if(n)return e.jsx(V,{className:"h-[200px] w-full"});if(l)return null;const m=r.stack.name,d=(g=r.stack.metadata)==null?void 0:g.components.orchestrator,c=(k=r.stack.metadata)==null?void 0:k.components.artifact_store,i=(S=r.stack.metadata)==null?void 0:S.components.container_registry,p=(b=r.stack.metadata)==null?void 0:b.components.image_builder,x=(w=r.stack.metadata)==null?void 0:w.components.step_operator,U={orchestrator:{name:((C=d==null?void 0:d[0])==null?void 0:C.name)??"Orchestrator",id:((P=d==null?void 0:d[0])==null?void 0:P.id.split("-")[0])??""},artifactStore:{name:((D=c==null?void 0:c[0])==null?void 0:D.name)??"Artifact Store",id:((I=c==null?void 0:c[0])==null?void 0:I.id.split("-")[0])??""},registry:{name:((z=i==null?void 0:i[0])==null?void 0:z.name)??"Container Registry",id:((L=i==null?void 0:i[0])==null?void 0:L.id.split("-")[0])??""},connector:{name:(R=r.service_connector)==null?void 0:R.name,id:((E=(B=r.service_connector)==null?void 0:B.id)==null?void 0:E.split("-")[0])??""},imageBuilder:{name:((W=p==null?void 0:p[0])==null?void 0:W.name)??"Image Builder",id:((M=p==null?void 0:p[0])==null?void 0:M.id.split("-")[0])??""},operator:{name:((_=x==null?void 0:x[0])==null?void 0:_.name)??"Step Operator",id:((A=x==null?void 0:x[0])==null?void 0:A.id.split("-")[0])??""}};return e.jsx(O,{type:t,componentProps:{components:U,isSuccess:!0,stackName:m}})}function Pe(){const{setIsNextButtonDisabled:t,data:s,timestamp:a}=u();return t(!1),e.jsx(j,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(Ce,{provider:s.provider||"aws",stackName:s.stackName||"",timestamp:a})]})})}function De(){const{currentStep:t}=y();if(t===1)return e.jsx(we,{});if(t===2)return e.jsx(je,{});if(t===3)return e.jsx(Se,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=de(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=le(),m=s.get("origin")==="onboarding";async function d(){n.current&&(n.current.requestSubmit(),await new Promise(i=>setTimeout(i,20))),a(i=>i<4?i+1:i),o===4&&(q(),r(m?T.onboarding:T.stacks.overview))}return e.jsx(ce,{form:(c=n.current)==null?void 0:c.id,disabled:l,onClick:()=>d(),size:"md",children:o===4?"Finish":"Next"})}function j({children:t,title:s}){return e.jsxs(Y,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:t}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx(ue,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function nt(){const{success:t}=he();return e.jsx(X,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ne,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx($,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{nt as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as x,j as e}from"./@radix-Cdvw4jJ8.js";import{s as j,A as E,d as ae,u as re,b as C,a as B}from"./service-k-9Vsb30.js";import{h as A,c as N,b as S}from"./@tanstack-5gTMR7G2.js";import{as as q,at as ie,B as f,au as _,av as z,aw as $,a as K,I as D,az as V,aA as H,aB as k,f as T,i as F,F as R,j as P,A as Q,k as oe,n as G,z as v,ay as L,T as ce,q as le,s as de,t as ue,g as b,D as me,l as xe,m as he,p as pe,an as fe,aC as ye,b3 as je,aD as ge,b4 as be,aF as Ae,C as I,b as U,x as ve,y as De,b8 as we,r as Ce,a3 as Ne}from"./index-BgEfQ3_G.js";import{P as Se}from"./Pagination-CWnEpSpN.js";import{S as Ke}from"./SearchField-BtUi6cYl.js";import{t as Y}from"./zod-XdS2h1ws.js";import{u as J,C as w}from"./index.esm-DhJo3mA6.js";import{S as Z}from"./trash-DP6Tpp_E.js";import{c as ke,u as Te}from"./bulk-delete-CzYA--cC.js";import{D as W,a as X}from"./DeleteAlertDialog-DEI0YDzP.js";import{S as ee}from"./key-icon-C07HKw8z.js";import{D as M}from"./DisplayDate-8RESqe5H.js";import{i as Fe,a as Re}from"./dates-Buh6SMo7.js";import{S as Pe}from"./refresh-BcTM09NW.js";import{A as Oe}from"./AlertDialogDropdownItem-DsOmO1FH.js";import{S as Ie}from"./info-QkbQz4QU.js";import{I as Me}from"./Infobox-CSBRrM6r.js";import{a as O}from"./@react-router-DeDfXbUF.js";import"./CodeSnippet-Ctplhzdc.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";function te({serviceAccountId:t,isFallback:s}){const n=A(),[i,a]=x.useState(!1),[r,o]=x.useState(""),u=!!r;function m(){return u?e.jsx(E,{value:r}):e.jsx(Ee,{isFallback:s,serviceAccountId:t,setApikeyValue:o})}return e.jsx(e.Fragment,{children:e.jsxs(q,{open:i,onOpenChange:l=>{s&&!l&&n.invalidateQueries({queryKey:j.apiKeysKey(t)}),a(l),o("")},children:[e.jsx(ie,{asChild:!0,children:e.jsx(f,{className:"shrink-0",intent:"primary",size:"sm",children:"Generate API Key"})}),e.jsxs(_,{"data-success":u,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(z,{children:e.jsx($,{children:u?"API Key Created Successfully":"Generate API Key"})}),m()]})]})})}function Ee({serviceAccountId:t,setApikeyValue:s,isFallback:n}){const{toast:i}=K(),a=A(),{handleSubmit:r,control:o,formState:{isValid:u},reset:m}=J({resolver:Y(ae),defaultValues:{name:"",description:""}}),{mutate:l}=re({onError(c){k(c)&&i({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},onSuccess(c){var y;n||a.invalidateQueries({queryKey:j.apiKeysKey(t)}),s(((y=c.body)==null?void 0:y.key)||""),m()}});function d(c){l({serviceAccountId:t,body:{name:c.name,description:c.description}})}return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:r(d),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(w,{name:"name",control:o,render:({field:c})=>e.jsx(D,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(w,{name:"description",control:o,render:({field:c})=>e.jsx(D,{...c,className:"w-full",placeholder:"Add description"})})]})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Generate Key"})]})]})}async function Be(t,s){const n=F(P.serviceAccounts.apiKeys.detail(t,s)),i=await T(n,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!i.ok){const a=await i.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>`Failed to delete api key ${s}`);throw new R({status:i.status,statusText:i.statusText,message:a})}return i.json()}function qe(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n})=>{await Be(s,n)}})}const{ContextProvider:_e,useContext:g}=ke();function se(t){const{setRowSelection:s}=g(),{mutateAsync:n}=qe();async function i(a){await n({serviceAccountId:t,apiKeyId:a})}return Te({deleteFn:i,queryKeyToInvalidate:j.serviceAccountsKey(),setRowSelection:s})}function ze({serviceAccountId:t}){const[s,n]=x.useState(!1),{bulkDelete:i}=se(t),{selectedRowIDs:a,selectedRowCount:r}=g();async function o(){await i(a),n(!1)}return e.jsxs(Q,{open:s,onOpenChange:n,children:[e.jsx(oe,{asChild:!0,children:e.jsxs(f,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(Z,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(W,{title:`Delete Api Key${r>=2?"s":""}`,handleDelete:o,children:e.jsxs(X,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function $e({serviceAccountId:t}){const{selectedRowCount:s}=g();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s} Api Key${s>1?"s":""} selected`}),e.jsx(ze,{serviceAccountId:t})]})}async function Ve({apiKeyId:t,body:s,serviceAccountId:n}){const i=F(P.serviceAccounts.apiKeys.rotate(n,t)),a=await T(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(a.status===404&&G(),!a.ok){const r=await a.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Failed to rotate key ${t}`);throw new R({status:a.status,statusText:a.statusText,message:r})}return a.json()}function He(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:i})=>Ve({serviceAccountId:s,apiKeyId:n,body:i})})}const Qe=v.object({enableRetention:v.boolean(),rotateMinutes:v.coerce.number().int().min(1).optional()}).refine(t=>!(t.enableRetention&&!t.rotateMinutes));function Ge({serviceAccountId:t,apiKeyId:s,open:n,setOpen:i}){const[a,r]=x.useState(""),o=!!a;function u(){return o?e.jsx(E,{value:a}):e.jsx(Le,{setApiKeyValue:r,apiKeyId:s,serviceAccountId:t})}return e.jsx(q,{open:n,onOpenChange:m=>{i(m),r("")},children:e.jsxs(_,{className:"mx-auto max-w-[800px] overflow-x-auto",children:[e.jsx(z,{children:e.jsx($,{children:"Rotate API Key"})}),u()]})})}function Le({apiKeyId:t,serviceAccountId:s,setApiKeyValue:n}){const{toast:i}=K(),a=A(),{control:r,watch:o,register:u,handleSubmit:m,formState:{errors:l,isValid:d}}=J({resolver:Y(Qe),defaultValues:{enableRetention:!1,rotateMinutes:void 0}});function c(p){const h={retain_period_minutes:p.rotateMinutes};y({serviceAccountId:s,apiKeyId:t,body:h})}const{mutate:y}=He({onError(p){k(p)&&i({status:"error",emphasis:"subtle",description:p.message,rounded:!0})},onSuccess(p){var h;i({description:"The API key has been rotated successfully.",status:"success",emphasis:"subtle",rounded:!0}),n(((h=p.body)==null?void 0:h.key)||""),a.invalidateQueries({queryKey:[...j.apiKeysKey(s)]})}});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx(Ue,{apiKeyId:t,serviceAccountId:s}),e.jsx(Ye,{}),e.jsxs("form",{onSubmit:m(c),id:"retention-form",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-t-md border bg-theme-surface-secondary p-1",children:[e.jsx(w,{control:r,name:"enableRetention",render:({field:{onChange:p,value:h}})=>e.jsx(L,{className:"data-[state=unchecked]:bg-neutral-200",checked:h,id:"enable-retention",onCheckedChange:ne=>p(!!ne)})}),"Include Retention Period",e.jsx(ce,{children:e.jsxs(le,{children:[e.jsx(de,{asChild:!0,children:e.jsxs("button",{type:"button",children:[e.jsx(Ie,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsx("div",{className:"sr-only",children:"Info tooltip"})]})}),e.jsx(ue,{className:"z-50 flex max-w-[480px] bg-black",children:e.jsx("p",{className:"text-text-xs text-white",children:"To minimize disruption, you can set a retention period for your current key. Enter the duration(in minutes) you'd like the old key to remain active alongside the new one."})})]})})]}),e.jsxs("fieldset",{disabled:!o("enableRetention"),className:"space-y-5 rounded-b-md border-x border-b p-5 text-text-md text-theme-text-primary",children:[e.jsx("p",{className:"text-text-md text-theme-text-primary",children:"Keep the current key working for the next"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-text-sm text-theme-text-primary",htmlFor:"retention-minutes",children:"Minutes"}),e.jsx(D,{id:"retention-minutes",...u("rotateMinutes"),disabled:!o("enableRetention"),placeholder:"0"}),l.rotateMinutes&&e.jsx("p",{className:"text-text-sm text-theme-text-error",children:l.rotateMinutes.message})]})]})]})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{intent:"primary",disabled:!d,size:"sm",form:"retention-form",children:"Rotate Key"})]})]})}function Ue({apiKeyId:t,serviceAccountId:s}){var r;const{data:n,isPending:i,isError:a}=S({...C.ApiKeysDetail(s,t),throwOnError:!0});return i?e.jsx(b,{className:"h-8 w-full"}):a?null:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ee,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:n&&n.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:n&&((r=n.metadata)==null?void 0:r.description)})]})]})}function Ye(){return e.jsxs(Me,{children:[e.jsx("strong",{children:"Your current API Key will be deactivated."})," This means any processes or integrations using the old key will no longer function once the new key is generated."]})}function Je({serviceAccountId:t,apiKeyId:s}){const[n,i]=x.useState(!1),[a,r]=x.useState(!1),[o,u]=x.useState(!1),m=x.useRef(null),l=x.useRef(null),{bulkDelete:d}=se(t);function c(){l.current=m.current}function y(h){u(h),h||i(!1)}async function p(){await d([s]),y(!1)}return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{setOpen:r,open:a,serviceAccountId:t,apiKeyId:s}),e.jsxs(me,{onOpenChange:i,open:n,children:[e.jsx(xe,{ref:m,children:e.jsx(he,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsxs(pe,{hidden:o,onCloseAutoFocus:h=>{l.current&&(l.current.focus(),l.current=null,h.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(fe,{className:"px-3",onClick:()=>r(!0),icon:e.jsx(Pe,{}),children:e.jsx("span",{children:"Rotate"})}),e.jsx(Oe,{onSelect:c,open:o,onOpenChange:y,triggerChildren:"Delete",icon:e.jsx(Z,{fill:"red"}),children:e.jsx(W,{title:"Delete API Key",handleDelete:p,children:e.jsxs(X,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})]})]})]})}async function Ze({apiKeyId:t,body:s,serviceAccountId:n}){const i=F(P.serviceAccounts.apiKeys.detail(n,t)),a=await T(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(a.status===404&&G(),!a.ok){const r=await a.json().then(o=>Array.isArray(o.detail)?o.detail[0]:o.detail||"An error occurred").catch(()=>`Failed to update key ${t}`);throw new R({status:a.status,statusText:a.statusText,message:r})}return a.json()}function We(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:i})=>{await Ze({serviceAccountId:s,apiKeyId:n,body:i})}})}function Xe({isActive:t,serviceAccountId:s,apiKeyId:n}){const{toast:i}=K(),a=A(),[r,o]=x.useState(!1),{mutate:u}=We({onError(d){k(d)&&i({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){a.invalidateQueries({queryKey:j.apiKeysKey(s)})}});function m(d){d?l(d):o(!0)}async function l(d){u({serviceAccountId:s,apiKeyId:n,body:{active:d}})}return e.jsxs(e.Fragment,{children:[e.jsx(Q,{open:r,onOpenChange:o,children:e.jsxs(ye,{children:[e.jsx(je,{children:e.jsx(ge,{children:"Deactivate API Key"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use this API Key to authenticate with the server anymore."})]}),e.jsxs(be,{className:"gap-[10px]",children:[e.jsx(Ae,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{onClick:()=>l(!1).then(d=>o(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(L,{checked:t,onCheckedChange:m})]})}function et(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(I,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(I,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Name",accessorFn:t=>({name:t.name}),cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ee,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1 text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx("div",{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:(s=t.original.metadata)==null?void 0:s.description})]})]})}},{id:"last-login",header:"Last Login",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_login},cell:({row:t})=>{var s,n;return(s=t.original.metadata)!=null&&s.last_login?e.jsx("p",{children:e.jsx(M,{short:!0,dateString:(n=t.original.metadata)==null?void 0:n.last_login})}):e.jsx("p",{children:"Never"})}},{id:"last-rotated",header:"Last Rotated",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_rotated},cell:({row:t})=>{var r;const s=(r=t.original.metadata)==null?void 0:r.last_rotated;if(!s)return e.jsx("p",{children:"Never"});const n=new Date(`${s}Z`),i=Fe(n),a=Re(n);return e.jsxs("div",{children:[e.jsx("p",{children:e.jsx(M,{short:!0,dateString:s})}),(i||a)&&e.jsx("p",{className:`${a?"text-theme-text-error":"text-theme-text-warning"} text-text-xs`,children:a?"More than 1 year old":"More than 6 months old"})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s,n;return e.jsx(Xe,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:((n=t.original.body)==null?void 0:n.service_account.id)||"",apiKeyId:t.original.id})}},{id:"actions",header:"",meta:{width:"5%"},cell:({row:t})=>{var n;const s=(n=t.original.body)==null?void 0:n.service_account.id;return s?e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Je,{serviceAccountId:s,apiKeyId:t.original.id})}):null}}]}function tt(){const{serviceAccountId:t}=O();return e.jsxs(U,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"This service account doesn't have any API Keys yet"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Generate your first API Key to enable secure interactions with the ZenML Server."})]}),e.jsx(te,{isFallback:!0,serviceAccountId:t})]})}function st(){const{serviceAccountId:t}=O(),s=B(),{rowSelection:n,setRowSelection:i}=g(),a=x.useMemo(()=>et(),[]),{data:r}=S({...C.serviceAccountApiKeys(t,{...s,sort_by:"desc:created",hydrate:!0})});return r&&(r==null?void 0:r.items.length)<1&&!s.name?e.jsx(tt,{}):e.jsxs(e.Fragment,{children:[e.jsx(nt,{serviceAccountId:t}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(ve,{getRowId:o=>o.id,rowSelection:n,onRowSelectionChange:i,columns:a,data:r.items}):e.jsx(b,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(Se,{searchParams:s,paginate:r}):e.jsx(b,{className:"h-[36px] w-[300px]"})]})]})}function nt({serviceAccountId:t}){const s=B(),{selectedRowCount:n}=g();return e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[n?e.jsx($e,{serviceAccountId:t}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(Ke,{searchParams:s})}),e.jsx(te,{isFallback:!1,serviceAccountId:t})]})}function at(t){const{setBreadcrumbs:s}=De();x.useEffect(()=>{t&&s([...we,{label:t.name,href:Ce.settings.service_accounts.detail(t.id)}])},[s,t])}function Ft(){return e.jsxs(U,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx(rt,{}),e.jsx("h1",{className:"my-5 text-text-lg font-semibold",children:"API Keys"})]}),e.jsx(_e,{children:e.jsx(st,{})})]})}function rt(){var i,a,r;const{serviceAccountId:t}=O(),s=S({...C.serviceAccountDetail(t),throwOnError:!0});if(at(s.data),s.isPending)return e.jsx(b,{className:"h-9 w-full"});if(s.isError)return null;const n=s.data;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-text-xl font-semibold",children:n.name}),e.jsx(Ne,{size:"sm",color:(i=n.body)!=null&&i.active?"light-purple":"light-grey",className:"text-text-xs font-semibold uppercase",children:(a=n.body)!=null&&a.active?"active":"inactive"})]}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:(r=n.metadata)==null?void 0:r.description})]})}export{rt as APIKeyHeader,Ft as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-
|
1
|
+
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-dyDkAxXP.js";import{E as w}from"./EmptyState-CjrgDtVk.js";import{A,I as U,P as b,U as P,S as g}from"./UsageReason-DhiUV1bu.js";import{f as _}from"./@react-router-DeDfXbUF.js";import{f as F,i as C,F as E,j as N,u as k,a as H,S as I}from"./index-BgEfQ3_G.js";import{c as M}from"./@tanstack-5gTMR7G2.js";import{u as D}from"./login-mutation-C1hvP_cX.js";import{S as R}from"./SetPassword-BmbgL_ed.js";import"./check-circle-C4tYvbtw.js";import"./UpdatePasswordSchemas-D_DCETSO.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./gcp-B1I3Qvcx.js";import"./@reactflow-B_iCtR7X.js";import"./PasswordChecker-B88WjuCe.js";const S=p.createContext(null);function T({children:t,initialUser:r}){const[a,s]=p.useState(r||{});return e.jsx(S.Provider,{value:{newUser:a,setNewUser:s},children:t})}function l(){const t=p.useContext(S);if(t===null)throw new Error("useActivationContext must be used within an ActivationProvider");return t}function L(){const{setSurveyStep:t}=d(),{setNewUser:r,newUser:a}=l();function s({fullName:n,getUpdates:o,email:u}){r(c=>({...c,...u?{email:u}:{email:null},full_name:n,email_opted_in:o})),t(c=>c+1)}return e.jsx(A,{email:a.email,fullName:a.full_name,submitHandler:s})}async function z({userId:t,body:r}){const a=C(N.users.activate(t)),s=await F(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to update activate user");throw new E({status:s.status,statusText:s.statusText,message:n})}return s.json()}function J(t){return M({mutationFn:async r=>z(r),...t})}function O({userId:t,setUsername:r}){const{newUser:a}=l(),{setAuthState:s}=k(),{setSurveyStep:n}=d(),{mutate:o}=D({onSuccess:()=>{s("true"),n(i=>i+1)}}),{toast:u}=H(),{mutate:c}=J({onSuccess:async i=>{r(i.name),o({username:i.name,password:a.password??void 0})},onError:i=>{i instanceof Error&&u({status:"error",emphasis:"subtle",icon:e.jsx(I,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function m({other:i,providers:f,otherVal:x}){const v={infra_providers:i?[...f,x]:f,finished_onboarding_survey:!0};c({userId:t,body:{...a,user_metadata:{...a.user_metadata,...v}}})}return e.jsx(U,{submitHandler:m})}function W(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({newPassword:s}){r(n=>({...n,password:s})),t(n=>n+1)}return e.jsx(R,{submitHandler:a})}function Y(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({primaryUse:s}){const n={primary_use:s};r(o=>({...o,user_metadata:{...o.user_metadata,...n}})),t(o=>o+1)}return e.jsx(b,{submitHandler:a})}function Z(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({usageReason:s,comparison_tools:n,otherTool:o,otherToolVal:u}){const c={usage_reason:s,...!!n&&{comparing_tools:o&&u?[...n,u]:n}};r(m=>({...m,user_metadata:{...m.user_metadata,...c}})),t(m=>m+1)}return e.jsx(P,{submitHandler:a})}function q(){const{surveyStep:t}=d(),[r]=_(),[a,s]=p.useState(""),n=r.get("user"),o=r.get("token");return!n||!o?e.jsx(w,{children:e.jsx("p",{children:"Invalid activation link."})}):e.jsx(e.Fragment,{children:e.jsxs(T,{initialUser:{activation_token:o},children:[e.jsx(h,{stepAmount:6}),t===1&&e.jsx(L,{}),t===2&&e.jsx(W,{}),t===3&&e.jsx(Y,{}),t===4&&e.jsx(Z,{}),t===5&&e.jsx(O,{setUsername:s,userId:n}),t===6&&e.jsx(g,{}),t===7&&e.jsx(j,{subHeader:"Your created your ZenML account",username:a})]})})}function mt(){return e.jsx("div",{children:e.jsx(y,{children:e.jsx(q,{})})})}export{mt as default};
|