~ K A L I ~
UNAME : Linux web64.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64SERVER IP : 10.0.187.64 -________-
CLIENT IP : 216.73.216.230 MINI SHELL D ZAB '
Current File : //usr/share/maxscale/gui/js/service-detail~9452d869.7da5641f.js |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["service-detail~9452d869"],{"742b":function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("page-wrapper",[e.$helpers.lodash.isEmpty(e.current_service)?e._e():s("v-sheet",{staticClass:"pl-6"},[s("page-header",{attrs:{currentService:e.current_service,onEditSucceeded:e.fetchService},scopedSlots:e._u([{key:"refresh-rate",fn:function(){return[s("refresh-rate",{on:{"on-count-done":e.onCountDone},model:{value:e.refreshRate,callback:function(t){e.refreshRate=t},expression:"refreshRate"}})]},proxy:!0}],null,!1,87897366)}),s("overview-header",{ref:"overviewHeader",attrs:{currentService:e.current_service,serviceConnectionsDatasets:e.service_connections_datasets,serviceConnectionInfo:e.serviceConnectionInfo,refreshRate:e.refreshRate}}),s("v-tabs",{staticClass:"v-tabs--mariadb-style",model:{value:e.currentActiveTab,callback:function(t){e.currentActiveTab=t},expression:"currentActiveTab"}},[e._l(e.tabs,(function(t){return s("v-tab",{key:t.name},[e._v(" "+e._s(t.name)+" ")])})),s("v-tabs-items",{model:{value:e.currentActiveTab,callback:function(t){e.currentActiveTab=t},expression:"currentActiveTab"}},[s("v-tab-item",{staticClass:"pt-5"},[s("v-row",[s("v-col",{attrs:{cols:"8"}},[s("details-parameters-table",{attrs:{resourceId:e.current_service.id,parameters:e.current_service.attributes.parameters,updateResourceParameters:e.updateServiceParameters,onEditSucceeded:e.fetchService}})],1),s("v-col",{attrs:{cols:"4"}},[s("v-row",[s("v-col",{attrs:{cols:"12"}},[s("routing-target-table",{attrs:{routerId:e.current_service.id,tableRows:e.routingTargetsTableRows},on:{"on-relationship-update":e.dispatchRelationshipUpdate}})],1),s("v-col",{attrs:{cols:"12"}},[s("relationship-table",{ref:"filters-relationship-table",attrs:{relationshipType:"filters",addable:"",removable:"",tableRows:e.filtersTableRows,getRelationshipData:e.getRelationshipData},on:{"on-relationship-update":e.dispatchRelationshipUpdate}})],1),s("v-col",{attrs:{cols:"12"}},[s("relationship-table",{ref:"listeners-relationship-table",attrs:{relationshipType:"listeners",addable:"",tableRows:e.listenersTableRows},on:{"open-listener-form-dialog":function(t){return e.SET_FORM_TYPE(e.RESOURCE_FORM_TYPES.LISTENER)}}})],1)],1)],1)],1)],1),s("v-tab-item",{staticClass:"pt-5"},[s("v-row",[s("v-col",{attrs:{cols:"5"}},[s("details-readonly-table",{ref:"diagnostics-table",attrs:{title:""+e.$mxs_t("routerDiagnostics"),tableData:e.routerDiagnostics,expandAll:"",isTree:""}})],1),s("v-col",{attrs:{cols:"7"}},[s("sessions-table",{attrs:{collapsible:"",delayLoading:"",headers:e.sessionsTableHeader,items:e.sessionsTableRows,"server-items-length":e.getTotalFilteredSessions},on:{"get-data-from-api":function(t){return e.fetchSessionsWithFilter(e.filterSessionParam)},"confirm-kill":function(t){e.killSession({id:t.id,callback:e.fetchSessionsWithFilter(e.filterSessionParam)})}}})],1)],1)],1)],1)],2)],1)],1)},i=[],a=(s("ddb0"),s("caad"),s("2f62")),n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-sheet",{staticClass:"d-flex mb-2"},[s("div",{staticClass:"d-flex",staticStyle:{width:"40%"}},[s("outlined-overview-card",{attrs:{wrapperClass:"mt-5"},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.$mxs_t("overview"))+" ")]},proxy:!0},{key:"card-body",fn:function(){return[s("span",{staticClass:"text-caption text-uppercase font-weight-bold mxs-color-helper text-deep-ocean"},[e._v(" ROUTER ")]),s("span",{staticClass:"router text-no-wrap text-body-2"},[e._v(" "+e._s(e.currentService.attributes.router)+" ")])]},proxy:!0}])}),s("outlined-overview-card",{attrs:{wrapperClass:"mt-5"},scopedSlots:e._u([{key:"card-body",fn:function(){return[s("span",{staticClass:"text-caption text-uppercase font-weight-bold mxs-color-helper text-deep-ocean"},[e._v(" STARTED AT ")]),s("span",{staticClass:"started text-no-wrap text-body-2"},[e._v(" "+e._s(e.$helpers.dateFormat({moment:e.$moment,value:e.currentService.attributes.started}))+" ")])]},proxy:!0}])})],1),s("div",{staticClass:"pl-3",staticStyle:{width:"60%"}},[s("outlined-overview-card",{attrs:{tile:!1,wrapperClass:"mt-5"},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.$mxs_tc("currentConnections",2))+" "),s("span",{staticClass:"text-lowercase font-weight-medium"},[e._v(" ("+e._s(e.serviceConnectionInfo.connections)+"/"+e._s(e.serviceConnectionInfo.total_connections)+")")])]},proxy:!0},{key:"card-body",fn:function(){return[s("v-sheet",{attrs:{width:"100%"}},[e.serviceConnectionsDatasets.length?s("mxs-line-chart-stream",{ref:"connsChart",attrs:{chartData:{datasets:e.serviceConnectionsDatasets},height:70,refreshRate:e.refreshRate}}):e._e()],1)]},proxy:!0}])})],1)])},o=[],c={name:"overview-header",props:{currentService:{type:Object,required:!0},serviceConnectionsDatasets:{type:Array,required:!0},serviceConnectionInfo:{type:Object,required:!0},refreshRate:{type:Number,required:!0}},methods:{updateChart(){const e=Date.now(),{connsChart:t}=this.$refs;if(t){const{connections:s}=this.serviceConnectionInfo;t.chartData.datasets.forEach((function(t){t.data.push({x:e,y:s})})),t.$data._chart.update({preservation:!0})}}}},l=c,d=s("2877"),u=s("6544"),p=s.n(u),h=s("8dd9"),v=Object(d["a"])(l,n,o,!1,null,null,null),f=v.exports;p()(v,{VSheet:h["a"]});var _=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("details-page-title",{scopedSlots:e._u([{key:"setting-menu",fn:function(){return[s("details-icon-group-wrapper",{attrs:{multiIcons:""},scopedSlots:e._u([{key:"body",fn:function(){return[s("mxs-tooltip-btn",{attrs:{tooltipProps:{bottom:!0},btnClass:"stop-btn",text:"",color:"primary",disabled:"Stopped"===e.serviceState},on:{click:function(t){return e.actionHandle("stop")}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"22"}},[e._v("$vuetify.icons.mxs_stopped")])]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("stop"))+" "+e._s(e.$mxs_tc("services",1))+" ")]),s("mxs-tooltip-btn",{attrs:{tooltipProps:{bottom:!0},btnClass:"start-btn",text:"",color:"primary",disabled:"Started"===e.serviceState},on:{click:function(t){return e.actionHandle("start")}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"22"}},[e._v("$vuetify.icons.mxs_running")])]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("start"))+" "+e._s(e.$mxs_tc("services",1))+" ")])]},proxy:!0}])}),s("details-icon-group-wrapper",{scopedSlots:e._u([{key:"body",fn:function(){return[s("mxs-tooltip-btn",{attrs:{tooltipProps:{bottom:!0},btnClass:"delete-btn",text:"",color:"error"},on:{click:function(t){return e.actionHandle("destroy")}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"18"}},[e._v("$vuetify.icons.mxs_delete")])]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("destroy"))+" "+e._s(e.$mxs_tc("services",1))+" ")])]},proxy:!0}])})]},proxy:!0},{key:"append",fn:function(){return[s("portal",{attrs:{to:"page-header--right"}},[e._t("refresh-rate"),s("global-search",{staticClass:"ml-4 d-inline-block"}),s("create-resource",{staticClass:"ml-4 d-inline-block",attrs:{defFormType:e.RESOURCE_FORM_TYPES.SERVER,defRelationshipObj:{id:e.$route.params.id,type:e.RELATIONSHIP_TYPES.SERVICES}}})],2),s("mxs-conf-dlg",{attrs:{title:e.dialogTitle,saveText:e.dialogType,type:e.dialogType,item:e.currentService,onSave:e.confirmSave},model:{value:e.isConfDlgOpened,callback:function(t){e.isConfDlgOpened=t},expression:"isConfDlgOpened"}}),s("icon-sprite-sheet",{staticClass:"service-state-icon mr-1",attrs:{size:"16",frame:e.$helpers.serviceStateIcon(e.serviceState)}},[e._v(" services ")]),s("span",{staticClass:"service-state mxs-color-helper text-navigation text-body-2"},[e._v(" "+e._s(e.serviceState)+" ")])]},proxy:!0}],null,!0)})},m=[],b=s("51ff"),S={name:"page-header",mixins:[b["a"]],props:{onEditSucceeded:{type:Function,required:!0},currentService:{type:Object,required:!0}},data(){return{dialogTitle:"",dialogType:"destroy",isConfDlgOpened:!1}},computed:{...Object(a["e"])({RESOURCE_FORM_TYPES:e=>e.app_config.RESOURCE_FORM_TYPES,RELATIONSHIP_TYPES:e=>e.app_config.RELATIONSHIP_TYPES}),serviceState(){return this.currentService.attributes.state}},methods:{...Object(a["b"])("service",["destroyService","stopOrStartService"]),actionHandle(e){this.dialogType=e,this.dialogTitle=`${this.$mxs_t(e)} ${this.$mxs_tc("services",1)}`,this.isConfDlgOpened=!0},async confirmSave(){await this.performAsyncLoadingAction(this.dialogType)},async performAsyncLoadingAction(e){const{id:t}=this.currentService;switch(e){case"destroy":await this.destroyService(t),this.goBack();break;default:await this.stopOrStartService({id:t,mode:e,callback:this.onEditSucceeded})}}}},y=S,R=s("132d"),T=Object(d["a"])(y,_,m,!1,null,null,null),g=T.exports;p()(T,{VIcon:R["a"]});var w=s("7f29"),x={name:"service-detail",components:{PageHeader:g,OverviewHeader:f},mixins:[w["a"]],data(){return{currentActiveTab:null,tabs:[{name:`${this.$mxs_tc("parameters",2)} & ${this.$mxs_tc("relationships",2)}`},{name:`${this.$mxs_tc("sessions",2)} & ${this.$mxs_tc("diagnostics",2)}`}],routingTargetsTableRows:[],listenersTableRows:[],filtersTableRows:[],sessionsTableHeader:[{text:"ID",value:"id"},{text:"Client",value:"user"},{text:"Connected",value:"connected"},{text:"IDLE (s)",value:"idle"},{text:"Memory",value:"memory"}]}},computed:{...Object(a["e"])({search_keyword:"search_keyword",should_refresh_resource:"should_refresh_resource",current_service:e=>e.service.current_service,service_connections_datasets:e=>e.service.service_connections_datasets,filtered_sessions:e=>e.session.filtered_sessions,RESOURCE_FORM_TYPES:e=>e.app_config.RESOURCE_FORM_TYPES,ROUTING_TARGET_RELATIONSHIP_TYPES:e=>e.app_config.ROUTING_TARGET_RELATIONSHIP_TYPES}),serviceId(){return this.$route.params.id},...Object(a["c"])({getTotalFilteredSessions:"session/getTotalFilteredSessions",getFilterParamByServiceId:"session/getFilterParamByServiceId"}),serviceConnectionInfo(){const{total_connections:e,connections:t}=this.$typy(this.current_service,"attributes.statistics").safeObjectOrEmpty;return{total_connections:e,connections:t}},routerDiagnostics(){return this.$typy(this.current_service,"attributes.router_diagnostics").safeObjectOrEmpty},routerModule(){return this.current_service.attributes.router},sessionsTableRows(){return this.filtered_sessions.map(({id:e,attributes:{idle:t,connected:s,user:r,remote:i,memory:a}})=>({id:e,user:`${r}@${i}`,connected:this.$helpers.dateFormat({moment:this.$moment,value:s}),idle:t,memory:a}))},filterSessionParam(){return this.getFilterParamByServiceId(this.$route.params.id)}},watch:{async should_refresh_resource(e){e&&(this.SET_REFRESH_RESOURCE(!1),await this.fetchAll())},async currentActiveTab(e){0===e&&await this.fetchModuleParameters(this.routerModule)},async $route(){await this.fetchAll(),0===this.currentActiveTab&&await this.fetchModuleParameters(this.routerModule)}},async created(){await this.fetchAll(),this.genServiceConnectionsDataSets()},methods:{...Object(a["b"])({getResourceState:"getResourceState",fetchModuleParameters:"fetchModuleParameters",fetchServiceById:"service/fetchServiceById",genServiceConnectionsDataSets:"service/genDataSets",updateServiceRelationship:"service/updateServiceRelationship",updateServiceParameters:"service/updateServiceParameters",fetchSessionsWithFilter:"session/fetchSessionsWithFilter",fetchAllFilters:"filter/fetchAllFilters",killSession:"session/killSession"}),...Object(a["d"])({SET_FORM_TYPE:"SET_FORM_TYPE",SET_REFRESH_RESOURCE:"SET_REFRESH_RESOURCE"}),async fetchAll(){await this.fetchService(),await Promise.all([this.fetchSessionsWithFilter(this.filterSessionParam),this.processRoutingTargetsTable(),this.processRelationshipTable("filters"),this.processRelationshipTable("listeners")])},async fetchService(){await this.fetchServiceById(this.serviceId)},async onCountDone(){await this.fetchAll(),await this.$refs.overviewHeader.updateChart()},async genRelationshipRows(e){const{relationships:{[""+e]:{data:t=[]}={}}={}}=this.current_service;let s=[];for(const r of t){const{attributes:{state:t=null}={}}=await this.getRelationshipData(e,r.id);let i={id:r.id,type:e,state:t};"filters"===e&&delete i.state,s.push(i)}return s},async processRoutingTargetsTable(){const{relationships:e={}}=this.current_service;let t=[];for(const s of Object.keys(e))if(this.ROUTING_TARGET_RELATIONSHIP_TYPES.includes(s)){const e=await this.genRelationshipRows(s);t=[...t,...e]}this.routingTargetsTableRows=t},async processRelationshipTable(e){this[e+"TableRows"]=await this.genRelationshipRows(e)},async getRelationshipData(e,t){const s=await this.getResourceState({resourceId:t,resourceType:e,caller:"service-detail-page-getRelationshipData"});return s},async dispatchRelationshipUpdate({type:e,data:t,isFilterDrag:s,isUpdatingRouteTarget:r}){switch(await this.updateServiceRelationship({id:this.current_service.id,type:e,data:t,callback:this.fetchService}),e){case"filters":s||await this.processRelationshipTable(e);break}r&&this.processRoutingTargetsTable()}}},E=x,C=s("62ad"),O=s("0fd9"),$=s("71a3"),I=s("c671"),P=s("fe57"),k=s("aac8"),A=Object(d["a"])(E,r,i,!1,null,null,null);t["default"]=A.exports;p()(A,{VCol:C["a"],VRow:O["a"],VSheet:h["a"],VTab:$["a"],VTabItem:I["a"],VTabs:P["a"],VTabsItems:k["a"]})}}]);
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com