text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fa7939c0","chunk-3a83423a","chunk-4ba3d483","chunk-2d2104c5","chunk-2d0a4474"],{"0680":function(e,t,r){"use strict";r.r(t),r.d(t,"getDict",(function(){return i}));r("96cf");var n=r("1da1"),a=r("4360"),i=function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a["store"].dispatch("dictionary/getDictionary",t);case 2:return e.abrupt("return",a["store"].getters["dictionary/getDictionary"][t]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},2626:function(e,t,r){"use strict";var n=r("d066"),a=r("9bf2"),i=r("b622"),s=r("83ab"),o=i("species");e.exports=function(e){var t=n(e),r=a.f;s&&t&&!t[o]&&r(t,o,{configurable:!0,get:function(){return this}})}},"3bbe":function(e,t,r){var n=r("861d");e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"4d63":function(e,t,r){var n=r("83ab"),a=r("da84"),i=r("94ca"),s=r("7156"),o=r("9bf2").f,u=r("241c").f,l=r("44e7"),c=r("ad6d"),f=r("9f7f"),p=r("6eeb"),d=r("d039"),g=r("69f3").set,b=r("2626"),h=r("b622"),m=h("match"),v=a.RegExp,w=v.prototype,y=/a/g,C=/a/g,D=new v(y)!==y,x=f.UNSUPPORTED_Y,k=n&&i("RegExp",!D||x||d((function(){return C[m]=!1,v(y)!=y||v(C)==C||"/a/i"!=v(y,"i")})));if(k){var S=function(e,t){var r,n=this instanceof S,a=l(e),i=void 0===t;if(!n&&a&&e.constructor===S&&i)return e;D?a&&!i&&(e=e.source):e instanceof S&&(i&&(t=c.call(e)),e=e.source),x&&(r=!!t&&t.indexOf("y")>-1,r&&(t=t.replace(/y/g,"")));var o=s(D?new v(e,t):v(e,t),n?this:w,S);return x&&r&&g(o,{sticky:r}),o},K=function(e){e in S||o(S,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},O=u(v),R=0;while(O.length>R)K(O[R++]);w.constructor=S,S.prototype=w,p(a,"RegExp",S)}b("RegExp")},5319:function(e,t,r){"use strict";var n=r("d784"),a=r("825a"),i=r("7b0b"),s=r("50c4"),o=r("a691"),u=r("1d80"),l=r("8aa5"),c=r("14c3"),f=Math.max,p=Math.min,d=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,h=function(e){return void 0===e?e:String(e)};n("replace",2,(function(e,t,r,n){var m=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=n.REPLACE_KEEPS_$0,w=m?"$":"$0";return[function(r,n){var a=u(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,a,n):t.call(String(a),r,n)},function(e,n){if(!m&&v||"string"===typeof n&&-1===n.indexOf(w)){var i=r(t,e,this,n);if(i.done)return i.value}var u=a(e),d=String(this),g="function"===typeof n;g||(n=String(n));var b=u.global;if(b){var C=u.unicode;u.lastIndex=0}var D=[];while(1){var x=c(u,d);if(null===x)break;if(D.push(x),!b)break;var k=String(x[0]);""===k&&(u.lastIndex=l(d,s(u.lastIndex),C))}for(var S="",K=0,O=0;O<D.length;O++){x=D[O];for(var R=String(x[0]),_=f(p(o(x.index),d.length),0),j=[],E=1;E<x.length;E++)j.push(h(x[E]));var $=x.groups;if(g){var z=[R].concat(j,_,d);void 0!==$&&z.push($);var V=String(n.apply(void 0,z))}else V=y(R,d,_,j,$,n);_>=K&&(S+=d.slice(K,_)+V,K=_+R.length)}return S+d.slice(K)}];function y(e,r,n,a,s,o){var u=n+e.length,l=a.length,c=b;return void 0!==s&&(s=i(s),c=g),t.call(o,c,(function(t,i){var o;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,n);case"'":return r.slice(u);case"<":o=s[i.slice(1,-1)];break;default:var c=+i;if(0===c)return t;if(c>l){var f=d(c/10);return 0===f?t:f<=l?void 0===a[f-1]?i.charAt(1):a[f-1]+i.charAt(1):t}o=a[c-1]}return void 0===o?"":o}))}}))},7156:function(e,t,r){var n=r("861d"),a=r("d2bb");e.exports=function(e,t,r){var i,s;return a&&"function"==typeof(i=t.constructor)&&i!==r&&n(s=i.prototype)&&s!==r.prototype&&a(e,s),e}},"8fca":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"search-term"},[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.searchInfo}},[r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.openDialog}},[e._v("注册集群")])],1)],1)],1),r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.tableData.slice((e.page-1)*e.pageSize,e.page*e.pageSize),border:"",stripe:"","tooltip-effect":"dark","row-style":{height:"40px"},"cell-style":{padding:"0px"}},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),r("el-table-column",{attrs:{label:"ID",prop:"id",width:"100"}}),r("el-table-column",{attrs:{label:"集群名称",prop:"clusterName",width:"150"}}),r("el-table-column",{attrs:{label:"Kubeconfig内容",prop:"kubeConfig",width:"400","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{width:"900",placement:"top-start",trigger:"hover",content:t.row.kubeConfig}},[r("span",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[e._v(e._s(t.row.kubeConfig))])])]}}])}),r("el-table-column",{attrs:{label:"集群版本",prop:"clusterVersion",width:"100"}}),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{staticClass:"table-button",attrs:{size:"small",type:"primary",icon:"el-icon-edit"},on:{click:function(r){return e.updateK8sCluster(t.row)}}},[e._v("编辑")]),r("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.row.visible,callback:function(r){e.$set(t.row,"visible",r)},expression:"scope.row.visible"}},[r("p",[e._v("确定要删除吗？")]),r("div",{staticStyle:{"text-align":"right",margin:"0"}},[r("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.row.visible=!1}}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(r){return e.deleteK8sCluster(t.row)}}},[e._v("确定")])],1),r("el-button",{attrs:{slot:"reference",type:"danger",icon:"el-icon-delete",size:"mini"},slot:"reference"},[e._v("删除")])],1)]}}])})],1),r("el-pagination",{style:{float:"right",padding:"20px"},attrs:{"current-page":e.page,"page-size":e.pageSize,"page-sizes":[10,30,50,100],total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),r("el-dialog",{attrs:{"before-close":e.closeDialog,visible:e.dialogFormVisible,width:"60%"},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{ref:"form",attrs:{model:e.formData,"label-position":"right","label-width":"80px",rules:e.rules}},[r("el-form-item",{attrs:{label:"集群名称:","label-width":"120px",prop:"clusterName"}},[r("el-input",{attrs:{clearable:"",placeholder:"请输入集群名称"},model:{value:e.formData.clusterName,callback:function(t){e.$set(e.formData,"clusterName",t)},expression:"formData.clusterName"}})],1),r("el-form-item",{attrs:{"label-width":"120px",label:"kubeConfig:",prop:"KubeConfig"}},[r("el-input",{style:{width:"100%"},attrs:{type:"textarea",placeholder:"请输入KubeConfig文件内容",autosize:{minRows:4,maxRows:4}},model:{value:e.formData.KubeConfig,callback:function(t){e.$set(e.formData,"KubeConfig",t)},expression:"formData.KubeConfig"}})],1),r("el-form-item",{attrs:{"label-width":"120px",label:"k8s版本:",prop:"k8sVersion"}},[r("el-input",{style:{width:"100%"},attrs:{placeholder:"请输入k8s版本"},model:{value:e.formData.k8sVersion,callback:function(t){e.$set(e.formData,"k8sVersion",t)},expression:"formData.k8sVersion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.sureHandle}},[e._v("确 定")])],1)],1)],1)},a=[],i=(r("d81d"),r("96cf"),r("1da1")),s=r("b6fa"),o=r("c466"),u=r("a4a2"),l={name:"K8sCluster",mixins:[u["default"]],data:function(){return{listApi:s["getK8sClusterList"],dialogFormVisible:!1,visible:!1,type:"",deleteVisible:!1,multipleSelection:[],formData:{id:0,clusterName:"",KubeConfig:"",clusterVersion:0,k8sVersio:"k8sVersion"},rules:{clusterName:[{required:!0,message:"请输入集群名称",trigger:"blur"}],KubeConfig:[{required:!0,message:"请输入KubeConfig文件内容",trigger:"blur"}],k8sVersion:[{required:!0,message:"请输入k8sVersion版本",trigger:"blur"}]}}},filters:{formatDate:function(e){if(null!=e&&""!=e){var t=new Date(e);return Object(o["formatTimeToStr"])(t,"yyyy-MM-dd hh:mm:ss")}return""},formatBoolean:function(e){return null!=e?e?"是":"否":""}},methods:{onSubmit:function(){this.page=1,this.pageSize=10,this.getTableData()},handleSelectionChange:function(e){this.multipleSelection=e},onDelete:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=[],0!=e.multipleSelection.length){t.next=4;break}return e.$message({type:"warning",message:"请选择要删除的数据"}),t.abrupt("return");case 4:return e.multipleSelection&&e.multipleSelection.map((function(e){r.push(e.ID)})),t.next=7,Object(s["deleteK8sClusterByIds"])({ids:r});case 7:n=t.sent,0==n.code&&(e.$message({type:"success",message:"删除成功"}),e.deleteVisible=!1,e.getTableData());case 9:case"end":return t.stop()}}),t)})))()},updateK8sCluster:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(s["findK8sCluster"])({ID:e.ID});case 2:n=r.sent,t.type="update",0==n.code&&(t.formData=n.data.reK8sCluster,t.dialogFormVisible=!0);case 5:case"end":return r.stop()}}),r)})))()},closeDialog:function(){this.dialogFormVisible=!1,this.formData={id:0,clusterName:"",kubeConfig:"",clusterVersion:0}},findK8sCluster:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(s["findK8sCluster"])({ID:e.ID});case 2:n=r.sent,t.type="find",0==n.code&&(t.formData=n.data.reK8sCluster,t.dialogFormVisible=!0);case 5:case"end":return r.stop()}}),r)})))()},deleteK8sCluster:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.visible=!1,r.next=3,Object(s["deleteK8sCluster"])({ID:e.ID});case 3:n=r.sent,0==n.code&&(t.$message({type:"success",message:"删除成功"}),t.getTableData());case 5:case"end":return r.stop()}}),r)})))()},sureHandle:function(){var e=this;this.$refs.form.validate((function(t){t&&e.enterDialog()}))},enterDialog:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:t.t0=e.type,t.next="create"===t.t0?3:"update"===t.t0?7:11;break;case 3:return t.next=5,Object(s["createK8sCluster"])(e.formData);case 5:return r=t.sent,t.abrupt("break",15);case 7:return t.next=9,Object(s["updateK8sCluster"])(e.formData);case 9:return r=t.sent,t.abrupt("break",15);case 11:return t.next=13,Object(s["createK8sCluster"])(e.formData);case 13:return r=t.sent,t.abrupt("break",15);case 15:0==r.code&&(e.$message({type:"success",message:"创建/更改成功"}),e.closeDialog(),e.getTableData());case 16:case"end":return t.stop()}}),t)})))()},openDialog:function(){this.type="create",this.dialogFormVisible=!0}},created:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getTableData();case 2:case"end":return t.stop()}}),t)})))()}},c=l,f=r("2877"),p=Object(f["a"])(c,n,a,!1,null,null,null);t["default"]=p.exports},a4a2:function(e,t,r){"use strict";r.r(t);r("4de4");var n=r("5530"),a=(r("96cf"),r("1da1")),i=r("0680");t["default"]={data:function(){return{page:1,total:10,pageSize:10,tableData:[],searchInfo:{}}},methods:{filterDict:function(e,t){var r=this[t+"Options"]&&this[t+"Options"].filter((function(t){return t.value==e}));return r&&r[0]&&r[0].label},getDict:function(e){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["getDict"])(e);case 2:return n=r.sent,t[e+"Options"]=n,r.abrupt("return",n);case 5:case"end":return r.stop()}}),r)})))()},handleSizeChange:function(e){this.pageSize=e,this.getTableData()},handleCurrentChange:function(e){this.page=e,this.getTableData()},getTableData:function(){var e=arguments,t=this;return Object(a["a"])(regeneratorRuntime.mark((function r(){var a,i,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=e.length>0&&void 0!==e[0]?e[0]:t.page,i=e.length>1&&void 0!==e[1]?e[1]:t.pageSize,r.next=4,t.listApi(Object(n["a"])({page:a,pageSize:i},t.searchInfo));case 4:s=r.sent,0==s.code&&(t.tableData=s.data.list,t.total=s.data.total,t.page=s.data.page,t.pageSize=s.data.pageSize);case 6:case"end":return r.stop()}}),r)})))()}}}},b6fa:function(e,t,r){"use strict";r.r(t),r.d(t,"createK8sCluster",(function(){return a})),r.d(t,"deleteK8sCluster",(function(){return i})),r.d(t,"deleteK8sClusterByIds",(function(){return s})),r.d(t,"updateK8sCluster",(function(){return o})),r.d(t,"findK8sCluster",(function(){return u})),r.d(t,"getK8sClusterList",(function(){return l}));var n=r("b775"),a=function(e){return Object(n["default"])({url:"/k8sCluster/createK8sCluster",method:"post",data:e})},i=function(e){return Object(n["default"])({url:"/k8sCluster/deleteK8sCluster",method:"delete",data:e})},s=function(e){return Object(n["default"])({url:"/k8sCluster/deleteK8sClusterByIds",method:"delete",data:e})},o=function(e){return Object(n["default"])({url:"/k8sCluster/updateK8sCluster",method:"put",data:e})},u=function(e){return Object(n["default"])({url:"/k8sCluster/findK8sCluster",method:"get",data:e})},l=function(e){return Object(n["default"])({url:"/k8sCluster/getK8sClusterList",method:"get",params:e})}},c466:function(e,t,r){"use strict";r.r(t),r.d(t,"formatTimeToStr",(function(){return n}));r("4d63"),r("ac1f"),r("25f0"),r("5319");function n(e,t){var r=new Date(e).Format("yyyy-MM-dd hh:mm:ss");return t&&(r=new Date(e).Format(t)),r.toLocaleString()}Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var r in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+r+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[r]:("00"+t[r]).substr((""+t[r]).length)));return e}},d2bb:function(e,t,r){var n=r("825a"),a=r("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(r,[]),t=r instanceof Array}catch(i){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)}}]);