(this.webpackJsonp=this.webpackJsonp||[]).push([[124],{WYTE:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=f(a("2/Rp")),r=f(a("Vl3Y")),l=f(a("5rEg")),n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],s=!0,r=!1,l=void 0;try{for(var n,u=e[Symbol.iterator]();!(s=(n=u.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){r=!0,l=e}finally{try{!s&&u.return&&u.return()}finally{if(r)throw l}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("L/Qf"),a("tULf"),a("1vPl");var i=a("q1tI"),o=f(i),d=a("eO8H"),c=f(a("vDqi"));function f(e){return e&&e.__esModule?e:{default:e}}var m=l.default.TextArea;t.default=r.default.create()((0,i.forwardRef)((function(e){var t=e.form,a=e.showNotification,f=e.history,h=t.getFieldDecorator,p=t.validateFields,v=(t.setFieldsValue,(0,i.useState)(void 0)),y=u(v,2),g=y[0],E=y[1];return o.default.createElement("div",null,o.default.createElement("div",{className:"sshHead"},o.default.createElement("span",null,o.default.createElement(d.Link,{to:"/settings/SSH",className:"color-blue"},"SSH密钥"),o.default.createElement("i",{className:"iconfont icon-youjiantou ml5 mr5 font-12"}),"添加SSH密钥")),o.default.createElement(r.default,{className:"sshForm"},o.default.createElement(r.default.Item,{label:"标题",validateStatus:g&&10001===g.status?"error":void 0,help:g&&10001===g.status?g.message:void 0},h("title",{rules:[{required:!0,message:"请输入密钥标题"}]})(o.default.createElement(l.default,{placeholder:"请输入密钥标题",size:"large",maxLength:"200"}))),o.default.createElement(r.default.Item,{label:"密钥",validateStatus:g&&10002===g.status?"error":void 0,help:g&&10002===g.status?g.message:void 0},h("key",{rules:[{required:!0,message:"请输入密钥"}]})(o.default.createElement(m,{placeholder:"支持以'ssh-rsa','ssh-dss','ssh-ed25519','ecdsa-sha2-nistp256','ecdsa-sha2-nistp384','ecdsa-sha2-nistp521'开头",autoSize:{minRows:6,maxRows:6}}))),o.default.createElement(s.default,{type:"primary",style:{width:"100px"},onClick:function(){p((function(e,t){if(!e){c.default.post("/public_keys.json",n({},t)).then((function(e){if(e){0===e.data.status&&(f.push("/settings/SSH"),a("密钥创建成功!"));var t={status:e.data.status,message:e.data.message};E(t)}})).catch((function(e){}))}}))}},"确定")))})))}}]);