mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 17:00:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
webpackJsonp([127],{"84Uy":function(e,t,a){var n=a("65SV"),i=a("Y3Z5"),o=a("4ghE"),s=a("/Eb4").f,l=function(e){return function(t){for(var a,l=o(t),r=i(l),c=r.length,d=0,u=[];c>d;)a=r[d++],n&&!s.call(l,a)||u.push(e?[a,l[a]]:l[a]);return u}};e.exports={entries:l(!0),values:l(!1)}},FRTc:function(e,t,a){e.exports=a("X0Zn")},JCDK:function(e,t,a){var n=a("eltu"),i=a("84Uy").entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},N2Ap:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var n=a("r6Af"),i=Object(n.a)({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-date-picker",{staticStyle:{width:"380px","padding-right":"0"},attrs:{editable:!1,"picker-options":e.startPickerOptions,type:"datetimerange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss","default-time":["00:00:00","23:59:59"]},on:{change:e.out},model:{value:e.timeArr,callback:function(t){e.timeArr=t},expression:"timeArr"}})},staticRenderFns:[]},void 0,{data:function(){var e=this;return{timeArr:[],startPickerOptions:{shortcuts:[{text:"最近30分钟",onClick:function(e){var t=new Date,a=new Date;a.setHours(0,0,0,0),a.setTime(t.getTime()-18e5),e.$emit("pick",[a,t])}},{text:"最近1小时",onClick:function(e){var t=new Date,a=new Date;a.setHours(0,0,0,0),a.setTime(t.getTime()-36e5),e.$emit("pick",[a,t])}},{text:"最近三小时",onClick:function(e){var t=new Date,a=new Date;a.setHours(0,0,0,0),a.setTime(t.getTime()-108e5),e.$emit("pick",[a,t])}},{text:"当天",onClick:function(e){var t=new Date,a=new Date;a.setHours(0,0,0,0),t.setHours(23,59,59,0),e.$emit("pick",[a,t])}},{text:"近三天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-1728e5),a.setHours(0,0,0,0),t.setHours(23,59,59,0),e.$emit("pick",[a,t])}},{text:"近七天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-5184e5),a.setHours(0,0,0,0),t.setHours(23,59,59,0),e.$emit("pick",[a,t])}},{text:"近三十天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-25056e5),a.setHours(0,0,0,0),t.setHours(23,59,59,0),e.$emit("pick",[a,t])}}],onPick:function(t){var a=t.maxDate,n=t.minDate;e.choiceDate=n.getTime(),a&&(e.choiceDate="")},disabledDate:function(t){var a=new Date;a.setHours(23),a.setMinutes(59),a.setSeconds(59);var n=e.timeRange.reference?a.getTime():e.choiceDate;if(n){var i=n+864e5*e.timeRange.min,o=n+864e5*e.timeRange.max;return t.getTime()<i||t.getTime()>o}}}}},props:{value:{type:Array,default:function(){return[]}},timeRange:{type:Array,default:{min:-365,max:365,reference:0}}},watch:{value:{immediate:!0,handler:function(e){this.timeArr=e}}},created:function(){this.out()},methods:{out:function(){this.$emit("input",this.timeArr)}},components:{}},void 0,!1,void 0,!1,void 0,void 0,void 0)},X0Zn:function(e,t,a){var n=a("gXSx");e.exports=n},gXSx:function(e,t,a){a("JCDK");var n=a("C6iB");e.exports=n.Object.entries},mpof:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("hOsK"),i=a.n(n),o=a("kqC4"),s=a.n(o),l=a("lv5w"),r=a.n(l),c=a("2bj9"),d=a.n(c),u=a("44wJ"),p=a.n(u),f=a("6zSr"),h=a.n(f),v=a("23M+"),m=a.n(v),g=a("DixE"),b=a.n(g),_=a("cTKJ"),w=a.n(_),y=a("oiss"),k=a("H5tE"),D=a.n(k),C=a("ex/y"),x=a("r6Af"),T=a("5kpk"),S=a("FCLc"),$=(a.n(S),a("cSe6")),I=(a.n($),a("YO+z")),N=a.n(I),L=a("I3KW"),O=a.n(L),A=a("g8nV"),E=a("Mnsi"),j=(a.n(E),a("SBIS")),R=(a.n(j),a("Iy39")),z=(a.n(R),a("Ek6n")),F=(a.n(z),a("r7d2")),P=a("mtWM"),U=(a.n(P),a("zL8q")),V=(a.n(U),a("N2Ap")),H=a("zCeI"),B=a("2x6p"),M=a.n(B),q=a("FRTc"),J=a.n(q),K=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{attrs:{data:e.detailVm.roleList}},[a("el-table-column",{attrs:{label:"角色名",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goInstance(t.row)}}},[e._v(e._s(t.row.name))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"安装数量",prop:"installCount"}})],1)],1)},staticRenderFns:[]},void 0,{name:"statuList",inject:["detailVm"],components:{},data:function(){return{tableData:[]}},computed:{id:function(){return this.detailVm.id}},created:function(){},methods:{goInstance:function(e){this.$emit("go",e.id)}}},"data-v-0baf1375",!1,void 0,!1,void 0,void 0,void 0),Q=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible,title:e.title,"show-close":!1,width:"90%"},on:{"update:visible":function(t){e.visible=t},open:e.handleOpen,close:e.handleDialogClose}},[a("div",[a("div",{staticStyle:{"font-size":"0.8em",padding:"0 0 20px",color:"#C0C4CC"}},[a("i",{staticClass:"el-icon-info"}),e._v(" "),a("span",{staticStyle:{"font-size":"0.8em",color:"#C0C4CC"}},[e._v("已安装该角色的节点,无法选择。如果想删除已安装节点上的角色,请先停用该角色实例,在实例列表删除")])]),e._v(" "),a("el-table",{ref:"tableData",staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark","max-height":"400",border:""},on:{select:e.handleSelecte,"select-all":e.handleSelecteAll}},[a("el-table-column",{attrs:{selectable:e.selectable,type:"selection",align:"center",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"节点信息",prop:"name","show-overflow-tooltip":"",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{"margin-top":"10px"}},[e._v("\n "+e._s(t.row.name)+"\n ")]),e._v(" "),a("div",{staticStyle:{margin:"10px auto"}},[a("span",{staticStyle:{"margin-right":"10px"}},[e._v("CPU:"+e._s(t.row.cpuCount)+"核")]),e._v(" "),a("span",[e._v("GPU:"+e._s(t.row.gpuCount)+"个")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"内存消耗",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",placement:"top"}},[!1===t.row.checked?a("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n "+e._s(t.row.memUsedUnchecked)+"/"+e._s(t.row.memTotal)+"\n ")]):e._e(),e._v(" "),!0===t.row.checked?a("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n "+e._s(t.row.memUsedChecked)+"/"+e._s(t.row.memTotal)+"\n ")]):e._e(),e._v(" "),a("el-progress",{attrs:{"text-inside":!0,"stroke-width":20,percentage:t.row.checked?t.row.memUsedPercentChecked:t.row.memUsedPercentUnchecked,color:e.getProgressColor(t.row.checked?t.row.memUsedPercentChecked:t.row.memUsedPercentUnchecked)}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"应用"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{class:t.row.toggle?"allArea":"fixedArea"},[t.row.checked&&"app"===e.instanceType?a("span",[a("el-tag",{staticClass:"new-tag"},[e._v("\n "+e._s(e.roleName)+"\n ")])],1):e._e(),e._v(" "),e._l(t.row.instances,function(t,n){return a("sapn",{key:n},["app"===t.type?a("span",[a("el-tag",[e._v("\n "+e._s(t.name)+"\n ")])],1):e._e()])})],2)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"引擎"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{class:t.row.toggle?"allArea":"fixedArea"},[t.row.checked&&"engine"===e.instanceType?a("span",[a("el-tag",{staticClass:"new-tag"},[e._v("\n "+e._s(e.roleName)+"\n ")])],1):e._e(),e._v(" "),e._l(t.row.instances,function(t,n){return a("span",{key:n},["engine"===t.type?a("span",[a("el-tag",{attrs:{type:"warning"}},[e._v("\n "+e._s(t.name)+"\n ")])],1):e._e()])})],2)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"CWOS"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{class:t.row.toggle?"allArea":"fixedArea"},[t.row.checked&&"cwos"===e.instanceType?a("span",[a("el-tag",{staticClass:"new-tag"},[e._v("\n "+e._s(e.roleName)+"\n ")])],1):e._e(),e._v(" "),e._l(t.row.instances,function(t,n){return a("span",{key:n},["cwos"===t.type?a("span",[a("el-tag",{attrs:{type:"success"}},[e._v("\n "+e._s(t.name)+"\n ")])],1):e._e()])})],2)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"中间件"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{class:t.row.toggle?"allArea":"fixedArea"},[t.row.checked&&"middleware"===e.instanceType?a("span",[a("el-tag",{staticClass:"new-tag"},[e._v("\n "+e._s(e.roleName)+"\n ")])],1):e._e(),e._v(" "),e._l(t.row.instances,function(t,n){return a("span",{key:n},["middleware"===t.type?a("span",[a("el-tag",{attrs:{type:"danger"}},[e._v("\n "+e._s(t.name)+"\n ")])],1):e._e()])})],2),e._v(" "),a("i",{staticClass:"toggle-btn",class:{"el-icon-arrow-up":!t.row.toggle,"el-icon-arrow-down":t.row.toggle},on:{click:function(a){return e.getAllInstance(t.row)}}})]}}])})],1)],1),e._v(" "),a("div",{staticStyle:{},attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),e._v(" "),e.confirmInstall?a("el-button",{staticClass:"confirmBtn",attrs:{disabled:"disabled",type:"info"}},[e._v("正在安装......")]):e._e(),e._v(" "),e.confirmInstall?e._e():a("el-button",{staticClass:"confirmBtn",attrs:{type:"warning"},on:{click:e.handleConfirm}},[e._v("确 定")])],1)])},staticRenderFns:[]},void 0,{name:"AddInstance",props:{value:{type:Boolean,default:!1},list:{type:Object,default:{}},instanceType:{type:"",default:""}},data:function(){return{title:"",seletedState:null,canCancel:!0,confirmInstall:!1,tableData:[],selected:[],roleName:"",nodeIds:[]}},computed:{visible:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},watch:{value:function(e){}},methods:{fetchData:function(){var e=this;F.g.instanceGetByNode({roleId:this.list.id}).then(function(t){var a;e.tableData=t.data,b()(a=e.tableData).call(a,function(t){e.$set(t,"toggle",!1)}),e.$nextTick(function(){var t;b()(t=e.tableData).call(t,function(t){t.checked&&(e.selected.push(t),e.$refs.tableData.toggleRowSelection(t,!0))}),e.title="选择了"+e.selected.length+"台节点"})}).catch(function(e){})},selectable:function(e,t){if(!this.list.nodeNames.length)return!0;for(var a in this.list.nodeNames)return e.name!==this.list.nodeNames[a]},getProgressColor:function(e){return e<=60?"#67C23A":e<=80?"#E6A23C":"#F56C6C"},handleOpen:function(){var e=this;return Object(A.a)(O.a.mark(function(){return O.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.confirmInstall=!1,e.roleName=e.list.name,t.next=4,e.fetchData();case 4:case"end":return t.stop()}},s.a)}))()},handleDialogClose:function(){this.canCancel=!0,this.selected=[]},handleSelecte:function(e,t){t.checked=!t.checked,this.selected=Object(H.a)(e),"启用"===this.list.currentStateText?t.id!==this.list.nodeId||t.checked?this.canCancel=!0:this.canCancel=!1:this.canCancel=!0,this.title="选择了"+this.selected.length+"台节点"},handleSelecteAll:function(e){var t,a,n,i,o=this;this.selected=Object(H.a)(e),"启用"===this.list.currentStateText?this.selected.length?b()(t=this.selected).call(t,function(e){e.checked?o.canCancel=!0:(o.canCancel=!0,e.checked=!e.checked)}):b()(a=this.tableData).call(a,function(e){e.checked=!e.checked,o.canCancel=!1}):(this.canCancel=!0,this.selected.length?b()(n=this.selected).call(n,function(e){e.checked||(e.checked=!e.checked)}):b()(i=this.tableData).call(i,function(e){e.checked=!e.checked})),this.title="选择了"+this.selected.length+"台节点"},handleClose:function(){this.selected=[],this.visible=!1,this.$message({message:"取消安装成功",type:"success",duration:2e3})},getParams:function(){var e,t=this;return this.nodeIds=[],b()(e=this.tableData).call(e,function(e){e.checked&&t.nodeIds.push(e.id)}),{nodeIds:Object(H.a)(this.nodeIds),roleId:this.list.id}},handleConfirm:function(){var e=this,t=this.getParams();this.confirmInstall=!0,F.g.installInstance(t).then(function(t){D()(t?function(){e.$emit("success",!0),e.visible=!1,e.$message({message:"安装成功",type:"success",duration:2e3})}:function(){e.visible=!1,e.$message({message:"安装失败",type:"error",duration:2e3})},3e3)}).catch(function(t){e.confirmInstall=!0,D()(function(){e.visible=!1},1e3)})},getAllInstance:function(e){e.toggle=!e.toggle}}},"data-v-6275a940",!1,void 0,!1,void 0,void 0,void 0),X=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"container"},[e.showAdd?e._e():a("div",[a("el-select",{staticStyle:{width:"180px","margin-bottom":"12px"},attrs:{disabled:!e.selected.length,placeholder:"请选择"},on:{change:e.handleChange},model:{value:e.optType,callback:function(t){e.optType=t},expression:"optType"}},[e._l(e.optTypes,function(e,t){return[a("el-option",{key:t,attrs:{label:e.label,value:e.value}})]})],2),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.tableData},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{selectable:e.selectInit,type:"selection"}}),e._v(" "),a("el-table-column",{attrs:{label:"角色类型",prop:"roleName"}}),e._v(" "),a("el-table-column",{attrs:{label:"运行状态",prop:"currentStateText"}}),e._v(" "),a("el-table-column",{attrs:{label:"安装节点名称",prop:"nodeName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v(e._s(t.row.nodeName))])]}}],null,!1,1445785922)}),e._v(" "),a("el-table-column",{attrs:{label:"安装时间","show-overflow-tooltip":"",prop:"createTime"}}),e._v(" "),a("el-table-column",{attrs:{label:"启用时长","show-overflow-tooltip":"",prop:"run"}})],1)],1),e._v(" "),e.showAdd?a("div",[a("el-row",{attrs:{gutter:20}},e._l(e.roleList,function(t,n){return a("el-col",{key:n,attrs:{span:6}},[a("el-card",{attrs:{"body-style":{padding:"0px"}}},[a("div",{staticClass:"title"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),a("div",{staticClass:"content"},[e._l(t.nodeNames,function(t,n){return a("div",{key:n,staticClass:"node"},[e._v(e._s(t))])}),e._v(" "),0===t.nodeNames.length?a("div",{staticClass:"node"},[e._v(" ")]):e._e()],2),e._v(" "),a("div",{staticClass:"content"},[a("div",{staticClass:"btn"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editInstance(t)}}},[e._v("点击修改")])],1)])])],1)}),1),e._v(" "),a("AddInstance",{attrs:{list:e.list,"instance-type":e.instanceType},on:{success:e.installSuccess},model:{value:e.showEditDialog,callback:function(t){e.showEditDialog=t},expression:"showEditDialog"}}),e._v(" "),a("el-button",{staticStyle:{"margin-top":"20px"},on:{click:e.handleBack}},[a("i",{staticClass:"el-icon-arrow-left"}),e._v("返回")])],1):e._e(),e._v(" "),a("el-dialog",{staticStyle:{"margin-top":"10%"},attrs:{visible:e.showDeleteDialog,title:"确认删除",width:"30%"},on:{"update:visible":function(t){e.showDeleteDialog=t}}},[a("span",{staticStyle:{"font-size":"1.2em"}},[a("i",{staticClass:"el-icon-warning",staticStyle:{color:"#E6A23C","margin-right":"10px","margin-left":"50px"}}),e._v("\n 请确定是否删除?\n ")]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.handleDeleteConfirm}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:e.handleDeleteClose}},[e._v("取 消")])],1)])],1)},staticRenderFns:[]},void 0,{name:"InstanceList",inject:["detailVm"],components:{AddInstance:Q},props:{instanceType:{type:"",default:""}},data:function(){return{timer:null,loading:!1,roleId:"",optType:"",optTypes:[],selected:[],preSelected:[],tableData:[],roleList:[],showAdd:!1,showEditDialog:!1,list:{},deleteArr:[],showDeleteDialog:!1}},computed:{id:function(){return this.detailVm.id}},created:function(){this.polling(),this.fetchOptions()},beforeDestroy:function(){clearInterval(this.timer)},methods:{selectInit:function(e,t){try{return!!this.detailVm.info.canOperate}catch(e){return!0}},goDetail:function(e){this.$router.push("/nodeManage/detail?id=".concat(e.nodeId))},handleChange:function(e){var t=this;return Object(A.a)(O.a.mark(function(){var a,n,i,o;return O.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(4!==e){s.next=5;break}t.canDelete()?t.showDeleteDialog=!0:(t.optType="",t.$message({message:" 提示:已启动的角色实例无法删除。如果想删除已启动的角色实例,请先停用该角色实例。",type:"warning",showClose:!0,duration:0})),s.next=15;break;case 5:return i={softId:t.id,ids:N()(a=t.selected).call(a,function(e){return e.id}),type:e},o={1:"启动",2:"停用",3:"重启"}[e]||"操作",s.next=9,F.g.batchOper(i);case 9:s.sent,t.optType="",t.$message.success("".concat(o,"成功")),b()(n=t.selected).call(n,function(e){var a,n=M()(a=t.tableData).call(a,function(t){return t.id===e.id});n&&(n.currentStateText="正在获取中",t.$refs.table.toggleRowSelection(n))}),t.preSelected=[],t.selected=[];case 15:case"end":return s.stop()}},r.a)}))()},canDelete:function(){var e=null;for(var t in this.selected){if("停用"!==this.selected[t].currentStateText){e=!1;break}e=!0}return e},handleDeleteClose:function(){var e,t=this;this.showDeleteDialog=!1,this.optType="",b()(e=this.selected).call(e,function(e){var a,n=M()(a=t.tableData).call(a,function(t){return t.id===e.id});n&&t.$refs.table.toggleRowSelection(n)}),this.selected=[]},handleDeleteConfirm:function(){var e,t=this;b()(e=this.selected).call(e,function(e){t.deleteArr.push(e.id)});var a={softId:this.id,ids:Object(H.a)(this.deleteArr),type:6};this.optType="",F.g.batchOper(a).then(function(e){e?(t.showDeleteDialog=!1,t.$message.success("删除成功"),clearInterval(t.timer),t.polling()):(t.showDeleteDialog=!1,t.$message.error("删除失败"),clearInterval(t.timer),t.polling())}).catch(function(e){t.showDeleteDialog=!1,clearInterval(t.timer),t.polling()}),this.selected=[]},chooseBeforeRows:function(){var e=this;this.$nextTick(function(){var t;b()(t=e.preSelected).call(t,function(t){var a,n=M()(a=e.tableData).call(a,function(e){return e.id===t.id});n&&e.$refs.table.toggleRowSelection(n)})})},fetchOptions:function(){var e=this;F.g.optTypes().then(function(t){e.optTypes=t})},handleSelectionChange:function(e){e.length&&(this.optType=""),this.selected=e},search:function(e){this.roleId=e,clearInterval(this.timer),this.polling()},polling:function(){var e=this;this.getData(),this.timer=w()(function(){e.getData()},3e4)},getData:function(){var e=this;this.loading=!0,F.g.instanceList(this.id,this.roleId).then(function(t){e.loading=!1,e.selected.length&&(e.preSelected=Object(H.a)(e.selected)),e.tableData=t,e.chooseBeforeRows()}).catch(function(t){e.loading=!1})},installSuccess:function(e){var t=this;e&&F.g.statusList(this.id).then(function(e){t.roleList=e})},addInstance:function(){var e=this;F.g.statusList(this.id).then(function(t){e.roleList=t}),this.showAdd=!0},handleBack:function(){this.showAdd=!1},editInstance:function(e){this.list=e,this.showEditDialog=!0}}},"data-v-6ab0a901",!1,void 0,!1,void 0,void 0,void 0),W=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{attrs:{data:e.config}},[a("el-table-column",{attrs:{label:"属性",prop:"key"}}),e._v(" "),a("el-table-column",{attrs:{label:"值"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}])})],1),e._v(" "),a("el-alert",{staticStyle:{margin:"10px 0"},attrs:{title:"温馨提示:请谨慎操作配置修改,一旦确认修改,该软件将自动重新启动。",type:"warning",closable:!1}}),e._v(" "),a("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.checkSave}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.reset}},[e._v("返回")]),e._v(" "),a("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("span",[e._v("请确定是否,立即修改软件配置?")]),e._v(" "),a("el-alert",{staticStyle:{margin:"10px 0"},attrs:{title:"温馨提示:请谨慎操作配置修改,一旦确认修改,该软件将自动重新启动。",type:"warning",closable:!1}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.sureSave}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")])],1)],1)],1)},staticRenderFns:[]},void 0,{name:"editConfig",components:{},data:function(){return{dialogVisible:!1}},props:{roleId:String,config:{type:Array,default:function(){return[]}}},methods:{sureSave:function(){this.dialogVisible=!1,this.save()},checkSave:function(){this.dialogVisible=!0},save:function(){var e=this;return Object(A.a)(O.a.mark(function(){var t,a,n;return O.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e.loading=!0,i.prev=1,a={},b()(t=e.config).call(t,function(e){a[e.key]=e.value}),n={roleId:e.roleId,settings:a},i.next=7,F.g.saveSettings(n);case 7:e.$message.success("修改成功"),e.$emit("success"),e.loading=!1,i.next=16;break;case 12:i.prev=12,i.t0=i.catch(1),e.$message.error(i.t0.message),e.loading=!1;case 16:case"end":return i.stop()}},s.a,null,[[1,12]])}))()},reset:function(){this.$emit("reset")}}},"data-v-2b7a374d",!1,void 0,!1,void 0,void 0,void 0),Z=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{directives:[{name:"show",rawName:"v-show",value:!e.showEdit,expression:"!showEdit"}],attrs:{data:e.detailVm.roleList}},[a("el-table-column",{attrs:{label:"角色名",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",prop:"installCount"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",disabled:!t.row.canOperate},on:{click:function(a){return e.goEdit(t.row)}}},[e._v("修改配置")])]}}])})],1),e._v(" "),a("editConfig",{directives:[{name:"show",rawName:"v-show",value:e.showEdit,expression:"showEdit"}],attrs:{config:e.current,roleId:e.settingObj.roleId},on:{success:function(t){e.showEdit=!1},reset:function(t){e.showEdit=!1}}})],1)},staticRenderFns:[]},void 0,{name:"configList",inject:["detailVm"],components:{editConfig:W},data:function(){return{tableData:[],current:[],showEdit:!1,settingObj:{}}},computed:{id:function(){return this.detailVm.id}},created:function(){},methods:{goEdit:function(e){var t=this;return Object(A.a)(O.a.mark(function(){var a,n;return O.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,F.g.getSettings(e.id);case 2:n=i.sent,t.settingObj=n.data,t.current=N()(a=J()(t.settingObj.settings)).call(a,function(e){return{key:e[0],value:e[1]}}),t.showEdit=!0;case 6:case"end":return i.stop()}},r.a)}))()}}},"data-v-4429fd3d",!1,void 0,!1,void 0,void 0,void 0);function G(e,t){var a=m()(e);if(h.a){var n=h()(e);t&&(n=p()(n).call(n,function(t){return d()(e,t).enumerable})),a.push.apply(a,n)}return a}function Y(e){for(var t=1;t<arguments.length;t++){var a,n=null!=arguments[t]?arguments[t]:{};if(t%2)b()(a=G(Object(n),!0)).call(a,function(t){Object(y.a)(e,t,n[t])});else if(r.a)s()(e,r()(n));else{var o;b()(o=G(Object(n))).call(o,function(t){i()(e,t,d()(n,t))})}}return e}var ee=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("search-page",{attrs:{"page-size":e.form.pageSize,"page-num":e.form.pageNum,total:e.total},on:{"update:pageSize":function(t){return e.$set(e.form,"pageSize",t)},"update:page-size":function(t){return e.$set(e.form,"pageSize",t)},"update:pageNum":function(t){return e.$set(e.form,"pageNum",t)},"update:page-num":function(t){return e.$set(e.form,"pageNum",t)},change:e.fetchData}},[a("el-form",{ref:"queryForm",attrs:{model:e.form,inline:""}},[a("el-form-item",{attrs:{prop:"logName",label:"日志名称:"}},[a("el-input",{model:{value:e.form.logName,callback:function(t){e.$set(e.form,"logName",t)},expression:"form.logName"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"updateTime",label:"更新时间:"}},[a("dates",{model:{value:e.form.updateTime,callback:function(t){e.$set(e.form,"updateTime",t)},expression:"form.updateTime"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.handleQuery}},[e._v("查询")]),e._v(" "),a("el-button",{attrs:{type:""},on:{click:e.reset}},[e._v("重置")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"logName","show-overflow-tooltip":"",label:"日志名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v(e._s(t.row.logName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"logSize","show-overflow-tooltip":"",label:"文件大小(byte)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"nodeName","show-overflow-tooltip":"",label:"节点名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipv4","show-overflow-tooltip":"",label:"IP地址"}}),e._v(" "),a("el-table-column",{attrs:{prop:"updateTime","show-overflow-tooltip":"",label:"更新时间"}})],1)],1)],1)},staticRenderFns:[]},void 0,{name:"SoftLog",components:{searchPage:C.a,dates:V.a},data:function(){return{total:0,isShow:!1,tableData:[],tableLoading:!1,statusOptions:[],softTypes:[],statusTypes:[],optType:"",optTypes:[],selected:[],form:{updateTime:[],logName:null,pageSize:10,pageNum:1}}},computed:{},created:function(){this.fetchData()},methods:{fetchData:function(){var e=this;this.tableLoading=!0;var t=Y(Y({},this.form),{},{softId:this.$route.query.id});t.updateTimeStart=t.updateTime[0],t.updateTimeEnd=t.updateTime[1],delete t.updateTime,F.g.logList(t).then(function(t){e.tableData=t.data.list,e.total=t.data.total,e.tableLoading=!1}).catch(function(t){e.tableLoading=!1})},goDetail:function(e){var t=this.$router.resolve({path:"/soft/getLogById",query:{id:e.id}});window.open(t.href,"_blank")},reset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.form.pageNum=1,this.fetchData()}}},"data-v-7c9450a4",!1,void 0,!1,void 0,void 0,void 0),te=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.show,"before-close":e.handleClose,title:"日志详情",width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("el-row",[a("el-col",{attrs:{span:8}},[e._v(e._s(e.main.operRecord))]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("执行结果:"+e._s(e.main.operResultText))]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("耗时:"+e._s(e.main.takeTime))]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n 操作人:"+e._s(e.main.operUser)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n 开始时间:"+e._s(e.main.startTime)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:24}},[a("pre",{staticStyle:{"font-size":"1em","white-space":"pre-wrap !important","word-wrap":"break-word !important","*white-space":"normal !important"}},[e._v(" "+e._s(e.current.operLog)+"\n ")])])],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.handleClose}},[e._v("确 定")])],1)],1)},staticRenderFns:[]},void 0,{name:"OptionLogDialog",components:{},props:{show:Boolean},data:function(){return{}},computed:{main:function(){return this.$attrs.row.main},current:function(){return this.$attrs.row.current||{}}},methods:{handleClose:function(){this.$emit("update:show",!1)}}},"data-v-78b3c9b6",!1,void 0,!1,void 0,void 0,void 0),ae=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("el-card",{staticStyle:{"font-size":"14px"}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("svg-icon",{staticStyle:{cursor:"pointer"},attrs:{"icon-class":"icon_back"},nativeOn:{click:function(t){return e.goBack(t)}}})],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:6}},[e._v("\n "+e._s(e.row.operRecord))]),e._v(" "),a("el-col",{attrs:{span:10}},[e._v("\n 执行结果:"+e._s(e.row.operResultText)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n 耗时:"+e._s(e.row.takeTime)+"\n ")])],1),e._v(" "),a("p",[e._v(" ")]),e._v(" "),a("el-row",[a("el-col",{staticStyle:{"padding-right":"40px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},attrs:{span:16,title:e.staticTxt}},[e._v("\n 统计:"+e._s(e.staticTxt)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n 操作人:"+e._s(e.row.operUser)+"\n ")]),e._v(" "),a("p",[e._v(" ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n 发起时间:"+e._s(e.row.startTime)+"\n ")])],1)],1),e._v(" "),a("el-button",{staticStyle:{margin:"12px 0"},attrs:{type:"primary"},on:{click:e.fetchData}},[e._v("刷新")]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"softRoleName","show-overflow-tooltip":"",label:"角色实例"}}),e._v(" "),a("el-table-column",{attrs:{prop:"operResultText",label:"执行结果"}}),e._v(" "),a("el-table-column",{attrs:{prop:"startTime","show-overflow-tooltip":"",label:"开始时间"}}),e._v(" "),a("el-table-column",{attrs:{prop:"takeTime","show-overflow-tooltip":"",label:"耗时"}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime","show-overflow-tooltip":"",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v("查看日志")])]}}])})],1),e._v(" "),a("detailDialog",{attrs:{show:e.showDialog,row:{main:e.row,current:e.selected}},on:{"update:show":function(t){e.showDialog=t}}})],1)},staticRenderFns:[]},void 0,{name:"OptLog",components:{searchPage:C.a,myPoint:T.a,detailDialog:te},data:function(){return{isShow:!1,showDialog:!1,selected:null,tableData:[],tableLoading:!1,staticTxt:"",form:{}}},computed:{row:function(){return this.$attrs.row}},created:function(){this.fetchData()},methods:{goBack:function(){this.$emit("back")},fetchData:function(){var e=this;this.tableLoading=!0,F.g.optionLogDetail(this.row.id).then(function(t){e.staticTxt=(t.data.countRoleList||[]).join(","),e.tableData=t.data.softOperInstanceRstList,e.row.operResultText=e.tableData[0].operResultText,e.row.takeTime=e.tableData[0].takeTime,e.tableLoading=!1}).catch(function(t){e.tableLoading=!1})},goAdd:function(){this.$router.push({path:"/nodeManage/add"})},goDetail:function(e){this.selected=e,this.showDialog=!0},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.form.pageNum=1,this.fetchData()}}},"data-v-77b4a2be",!1,void 0,!1,void 0,void 0,void 0);function ne(e,t){var a=m()(e);if(h.a){var n=h()(e);t&&(n=p()(n).call(n,function(t){return d()(e,t).enumerable})),a.push.apply(a,n)}return a}function ie(e){for(var t=1;t<arguments.length;t++){var a,n=null!=arguments[t]?arguments[t]:{};if(t%2)b()(a=ne(Object(n),!0)).call(a,function(t){Object(y.a)(e,t,n[t])});else if(r.a)s()(e,r()(n));else{var o;b()(o=ne(Object(n))).call(o,function(t){i()(e,t,d()(n,t))})}}return e}var oe=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("search-page",{directives:[{name:"show",rawName:"v-show",value:!e.selected,expression:"!selected"}],attrs:{"page-size":e.form.pageSize,"page-num":e.form.pageNum,total:e.total},on:{"update:pageSize":function(t){return e.$set(e.form,"pageSize",t)},"update:page-size":function(t){return e.$set(e.form,"pageSize",t)},"update:pageNum":function(t){return e.$set(e.form,"pageNum",t)},"update:page-num":function(t){return e.$set(e.form,"pageNum",t)},change:e.fetchData}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"operRecord","show-overflow-tooltip":"",label:"操作记录"}}),e._v(" "),a("el-table-column",{attrs:{prop:"operUser","show-overflow-tooltip":"",label:"操作人"}}),e._v(" "),a("el-table-column",{attrs:{prop:"startTime",label:"发起时间"}}),e._v(" "),a("el-table-column",{attrs:{prop:"operResultText",label:"执行结果"}}),e._v(" "),a("el-table-column",{attrs:{prop:"takeTime","show-overflow-tooltip":"",label:"耗时"}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime","show-overflow-tooltip":"",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v("详情")])]}}])})],1)],1),e._v(" "),e.selected?a("optionLogDetail",{attrs:{row:e.selected},on:{back:e.back}}):e._e()],1)},staticRenderFns:[]},void 0,{name:"OptLog",components:{searchPage:C.a,myPoint:T.a,optionLogDetail:ae},data:function(){return{total:0,isShow:!1,tableData:[],tableLoading:!1,statusOptions:[],softTypes:[],statusTypes:[],optType:"",optTypes:[],selected:null,form:{pageSize:10,pageNum:1}}},computed:{},created:function(){this.fetchData()},methods:{back:function(){this.selected=null},fetchData:function(){var e=this;this.tableLoading=!0;var t=ie(ie({},this.form),{},{softId:this.$route.query.id});this.tableData=[{}],F.g.optionLogList(t).then(function(t){D()(function(){e.tableData=t.data.list,e.total=t.data.total,e.tableLoading=!1},500)}).catch(function(t){e.tableLoading=!1})},goAdd:function(){this.$router.push({path:"/nodeManage/add"})},goDetail:function(e){this.selected=e},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.form.pageNum=1,this.fetchData()}}},"data-v-6d9d0b61",!1,void 0,!1,void 0,void 0,void 0),se=Object(x.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-card",[a("el-form",{attrs:{inline:"","label-width":"120px","label-position":"left"}},[a("el-row",[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"软件名称:"}},[e._v(e._s(e.info.name))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[e.isCanEdit?e._e():a("el-form-item",{attrs:{label:"软件实例名称:"}},[e._v("\n "+e._s(e.info.appName)+"\n ")]),e._v(" "),e.isCanEdit?a("el-form-item",{attrs:{label:"软件实例名称:"}},[a("el-input",{staticStyle:{width:"150px"},attrs:{placeholder:"请输入软件实例名称"},model:{value:e.info.appName,callback:function(t){e.$set(e.info,"appName",t)},expression:"info.appName"}}),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:e.confirmEdit}},[e._v("确认更改")])],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"软件类型:"}},[e._v(e._s(e.info.typeCn))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"软件版本:"}},[e._v(e._s(e.info.version))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"供应商:"}},[e._v(e._s(e.info.supplier))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"安装时间:"}},[e._v(e._s(e.info.createTime))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"修改时间:"}},[e._v(e._s(e.info.updateTime))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"运行状态:"}},[e._v(e._s(e.info.currentStateText))])],1)],1)],1),e._v(" "),a("el-tabs",{ref:"elTab",on:{"tab-click":e.beforeClickChange},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"状态",name:"first"}},[a("statusList",{on:{go:e.goInstance}})],1),e._v(" "),a("el-tab-pane",{attrs:{label:"实例",name:"second"}},[e.instanceInited?a("instance",{ref:"instance",attrs:{"instance-type":e.instanceType}}):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"日志",name:"third"}},[e.logInited?a("softLog",{ref:"log"}):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"配置",name:"fourth"}},[e.configInited?a("configList"):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"操作记录",name:"fifth"}},[e.optInited?a("optLog",{ref:"optLog"}):e._e()],1),e._v(" "),e.monitorUrl?a("el-tab-pane",{attrs:{label:"监控",name:"sixth"}}):e._e()],1)],1)],1)},staticRenderFns:[]},void 0,{name:"SoftDetail",components:{statusList:K,instance:X,configList:Z,softLog:ee,optLog:oe},data:function(){return{id:this.$route.query.id,activeName:"first",before:"first",monitorUrl:"",info:{},instanceInited:!1,logInited:!1,configInited:!1,optInited:!1,roleList:[],instanceType:"",isCanEdit:!1}},provide:function(){return{detailVm:this}},mounted:function(){var e=this;F.g.detail(this.id).then(function(t){e.info=t,e.instanceType=e.info.typeCn}),this.getData()},methods:{goInstance:function(e){var t=this;this.activeName="second",this.instanceInited=!0,this.$nextTick(function(){t.$refs.instance.search(e)})},openMonitor:function(){window.open(this.monitorUrl,"_blank")},beforeClickChange:function(){var e=this;switch(this.activeName){case"second":this.instanceInited=!0;break;case"third":this.logInited=!0;break;case"fourth":this.configInited=!0;break;case"fifth":this.optInited=!0}this.$nextTick(function(){e.handleClick()})},handleClick:function(){switch(this.activeName){case"third":this.$refs.log.fetchData();break;case"fifth":this.$refs.optLog.fetchData()}"sixth"!==this.activeName?(this.before=this.activeName,"second"===this.activeName&&this.$refs.instance.search("")):(this.activeName=this.before,this.$refs.elTab.currentName=this.activeName,this.openMonitor())},getData:function(){var e=this;F.g.statusList(this.id).then(function(t){e.roleList=t})},editName:function(){this.isCanEdit=!0},confirmEdit:function(){this.isCanEdit=!1}}},"data-v-18989539",!1,void 0,!1,void 0,void 0,void 0);t.default=se}}); |