Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
7.4 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{5685:function(n,e,t){"use strict";var r=t(7892),i=t(5893);e.Z=(0,r.Z)((0,i.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"}),"QuestionMark")},7106:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(1686)}])},4629:function(n,e,t){"use strict";var r=t(5893),i=t(7357),o=t(7294),u=t(4188),a=t(4825),l=t(4690),s=t(7504),c=t(9099),p=t(7869),d=t(6284),f=t(2152),m=t(7987),h=t(8859),b=t(2749);function v(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function y(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function g(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){y(n,e,t[e])}))}return n}function x(n,e){if(null==n)return{};var t,r,i=function(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function j(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,i,o=[],u=!0,a=!1;try{for(t=t.call(n);!(u=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(l){a=!0,i=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw i}}return o}}(n,e)||P(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(n){return function(n){if(Array.isArray(n))return v(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||P(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(n,e){if(n){if("string"===typeof n)return v(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(n,e):void 0}}var O={width:"100%"},I="gate-input",Z="".concat(I,"-credential-id"),S="".concat(I,"-credential-passphrase"),A="access",L=(0,o.forwardRef)((function(n,e){var t,v,y=n.formContainer,P=void 0===y||y,I=n.gridProps,L=void 0===I?{}:I,C=L.columns,_=void 0===C?{xs:1,sm:2}:C,F=(L.layout,L.spacing),E=void 0===F?"1em":F,M=n.identifierId,R=void 0===M?Z:M,T=n.identifierInputTestBatchBuilder,B=void 0===T?m.Gn:T,k=n.identifierLabel,N=n.identifierOutlinedInputWithLabelProps,U=void 0===N?{}:N,W=U.formControlProps,G=void 0===W?{}:W,q=U.inputProps,z=n.onIdentifierBlurAppend,D=n.onSubmit,V=n.onSubmitAppend,X=n.passphraseId,H=void 0===X?S:X,Q=n.passphraseLabel,$=n.passphraseOutlinedInputWithLabelProps,J=void 0===$?{}:$,K=J.formControlProps,Y=void 0===K?{}:K,nn=J.inputProps,en=n.submitLabel,tn=n.allowSubmit,rn=void 0===tn?P:tn,on=x(n.gridProps,["columns","layout","spacing"]),un=x(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),an=x(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ln=G.sx,sn=x(G,["sx"]),cn=Y.sx,pn=x(Y,["sx"]),dn=(0,o.useRef)({}),fn=(0,o.useRef)({}),mn=(0,o.useRef)({}),hn=j((0,b.Z)(!1),2),bn=hn[0],vn=hn[1],yn=(0,h.Z)([Z,S],mn),gn=yn.buildFinishInputTestBatchFunction,xn=yn.buildInputFirstRenderFunction,jn=yn.buildInputUnmountFunction,wn=yn.isFormInvalid,Pn=yn.setMessage,On=(0,o.useMemo)((function(){return null!==D&&void 0!==D?D:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var r,i=e[0];i.preventDefault(),Pn(A),vn(!0);var o=i.target,u=o.elements,a=u.namedItem(Z),l=a.value,s=u.namedItem(S),c=s.value;null===V||void 0===V||(r=V).call.apply(r,[null,l,c,function(n){Pn(A,n)},vn].concat(w(e)))}}),[D,V,vn,Pn]),In=(0,o.useMemo)((function(){return bn?(0,r.jsx)(f.Z,{mt:0}):(0,r.jsx)(l.Z,{row:!0,sx:{justifyContent:"flex-end"},children:(0,r.jsx)(a.Z,{disabled:wn,type:"submit",children:en})})}),[wn,bn,en]),Zn=(0,o.useMemo)((function(){var n={};return rn&&(n["gate-cell-message-group"]={children:(0,r.jsx)(p.Z,{count:1,defaultMessageType:"warning",ref:mn}),sm:2},n["gate-cell-submit"]={children:In,sm:2}),n}),[rn,In]),Sn=(0,o.useMemo)((function(){var n={};return P&&(n.component="form",n.onSubmit=On),n}),[P,On]);return(0,o.useImperativeHandle)(e,(function(){return{get:function(){var n,e;return{identifier:null!==(t=null===(n=dn.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==t?t:"",passphrase:null!==(v=null===(e=fn.current.getValue)||void 0===e?void 0:e.call(null))&&void 0!==v?v:""}},messageGroup:g({},mn.current),setIsSubmitting:function(n){vn(n)}}})),(0,r.jsx)(i.Z,g({},Sn,{children:(0,r.jsx)(s.Z,g({columns:_,layout:g({"gate-input-cell-credential-id":{children:(0,r.jsx)(c.Z,{input:(0,r.jsx)(d.Z,g({formControlProps:g({},sn,{sx:g({},O,ln)}),id:R,inputProps:q,label:k},un)),inputTestBatch:B(k,(function(){Pn(R)}),{onFinishBatch:gn(R)},(function(n){Pn(R,{children:n})})),onBlurAppend:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var r;null===z||void 0===z||(r=z).call.apply(r,[null].concat(w(e)))},onFirstRender:xn(R),onUnmount:jn(R),ref:dn,required:!0})},"gate-input-cell-credential-passphrase":{children:(0,r.jsx)(c.Z,{input:(0,r.jsx)(d.Z,g({formControlProps:g({},pn,{sx:g({},O,cn)}),id:H,inputProps:nn,label:Q,type:u.Z.password},an)),inputTestBatch:(0,m.Gn)(Q,(function(){Pn(H)}),{onFinishBatch:gn(H)},(function(n){Pn(H,{children:n})})),onFirstRender:xn(H),onUnmount:jn(H),ref:fn,required:!0})}},Zn),spacing:E},on))}))}));L.displayName="GateForm",e.ZP=L},1686:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return d}});var r=t(5893),i=t(9008),o=t(1163),u=t(4390),a=t(4629),l=t(1770),s=t(3679),c=function(){var n=(0,o.useRouter)().query.rt;return(0,r.jsx)(s.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 14em)",minWidth:"16em",width:{xs:"fit-content",sm:"26em"}},children:(0,r.jsx)(a.ZP,{gridProps:{columns:1},identifierLabel:"Username",onSubmitAppend:function(e,t,r,i){i(!0),u.Z.post("/auth/login",{username:e,password:t}).then((function(){var e=n?String(n):"/";window.location.replace(e)})).catch((function(n){var e=(0,l.Z)(n,{onResponseErrorAppend:function(){return{children:"Credentials mismatched.",type:"warning"}}});r(e)})).finally((function(){i(!1)}))},passphraseLabel:"Passphrase",submitLabel:"Login"})})},p=t(5521),d=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:"Login"})}),(0,r.jsx)(p.Z,{}),(0,r.jsx)(c,{})]})}},1163:function(n,e,t){n.exports=t(387)}},function(n){n.O(0,[382,483,894,62,780,899,903,774,888,179],(function(){return e=7106,n(n.s=e);var e}));var e=n.O();_N_E=e}]);