~ K    A     L    I ~
UNAME : Linux web63.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
SERVER IP : 10.0.187.63 -________- CLIENT IP : 216.73.216.254
PATH :/usr/share/maxscale/gui/js/
UP FILE :
MINI SHELL D ZAB '
Current File : //usr/share/maxscale/gui/js/logs~c667b1c3.84bedda4.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["logs~c667b1c3"],{"144b":function(e,t,s){},b4ad:function(e,t,s){"use strict";s("144b")},f061:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("page-wrapper",{directives:[{name:"resize",rawName:"v-resize",value:e.setPageContentDim,expression:"setPageContentDim"}],staticClass:"fill-height",attrs:{fluid:""}},[s("page-header",{ref:"pageHeader"}),s("v-sheet",{style:{height:"calc(100% - 38px)"}},[s("div",{ref:"pageContent",staticClass:"fill-height"},[s("log-header",{ref:"logHeader",staticClass:"pb-4 pt-2"}),e.logViewHeight?s("div",{staticClass:"log-lines-container pa-4 mxs-color-helper bg-separator"},[s("log-container",{attrs:{logViewHeight:e.logViewHeight}})],1):e._e()],1)])],1)},o=[],l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("portal",{attrs:{to:"page-header"}},[s("div",{staticClass:"d-flex align-center"},[s("div",{staticClass:"d-inline-flex align-center"},[s("h4",{staticClass:"mb-0 mxs-color-helper text-navigation text-h4 text-capitalize",staticStyle:{"line-height":"normal"}},[e._v(" "+e._s(e.$mxs_t(e.$route.name))+" ")])])])])},a=[],r={name:"page-header"},n=r,c=s("2877"),h=Object(c["a"])(n,l,a,!1,null,null,null),g=h.exports,d=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"d-flex flex-row align-center"},[s("span",{staticClass:"mxs-color-helper text-grayed-out d-block mr-2"},[e._v(" log_source: "+e._s(e.log_source)+" ")]),s("v-spacer"),s("mxs-filter-list",{attrs:{returnObject:"",label:e.$mxs_t("filterBy"),items:e.allLogLevels,maxHeight:400},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.data,o=i.on,l=i.attrs,a=i.value,r=i.label;return[s("v-btn",e._g(e._b({staticClass:"text-capitalize font-weight-medium",attrs:{small:"",outlined:"",depressed:"",color:"accent-dark"}},"v-btn",l,!1),o),[s("v-icon",{staticClass:"mr-1",attrs:{size:"16",color:"accent-dark"}},[e._v(" $vuetify.icons.mxs_filter ")]),e._v(" "+e._s(r)+" "),s("v-icon",{class:[a?"rotate-up":"rotate-down"],attrs:{size:"24",color:"accent-dark"}},[e._v(" mdi-menu-down ")])],1)]}}]),model:{value:e.chosenLogLevels,callback:function(t){e.chosenLogLevels=t},expression:"chosenLogLevels"}})],1)},p=[],_=s("2f62"),v={name:"log-header",computed:{...Object(_["e"])({log_source:e=>e.maxscale.log_source,chosen_log_levels:e=>e.maxscale.chosen_log_levels,MAXSCALE_LOG_LEVELS:e=>e.app_config.MAXSCALE_LOG_LEVELS}),allLogLevels(){return this.strToObj(this.MAXSCALE_LOG_LEVELS)},chosenLogLevels:{get(){return this.strToObj(this.chosen_log_levels)},set(e){this.SET_CHOSEN_LOG_LEVELS(e.map(e=>e.text))}}},methods:{...Object(_["d"])({SET_CHOSEN_LOG_LEVELS:"maxscale/SET_CHOSEN_LOG_LEVELS"}),strToObj:e=>e.map(e=>({text:e}))}},f=v,m=s("6544"),u=s.n(m),L=s("8336"),w=s("132d"),x=s("2fa4"),b=Object(c["a"])(f,d,p,!1,null,null,null),y=b.exports;u()(b,{VBtn:L["a"],VIcon:w["a"],VSpacer:x["a"]});var C=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.isNotifShown?s("v-btn",{staticClass:"pa-2 new-log-btn font-weight-medium px-7 text-capitalize",attrs:{small:"",height:"36",color:"primary",rounded:"",depressed:""},on:{click:e.setVirtualListToBottom}},[e._v(" "+e._s(e.$mxs_t("newMessagesAvailable"))+"! "),s("v-icon",{staticClass:"rotate-down",attrs:{size:"32"}},[e._v(" mdi-chevron-down ")])],1):e._e(),e.logToShow.length?s("virtual-list",{ref:"vsl",staticClass:"log",class:{overflow:e.overflow},style:{height:e.logViewHeight+"px"},attrs:{"data-key":"id","data-sources":e.logToShow,"data-component":e.LogLine,keeps:e.logs_page_size,"estimate-size":72},on:{resized:e.onItemRendered,scroll:e.onScroll,totop:e.onTotop}},[s("template",{slot:"header"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.overflow,expression:"overflow"}]},[s("div",{staticClass:"d-flex flex-column align-center justify-center mt-2"},[s("v-progress-circular",{directives:[{name:"show",rawName:"v-show",value:!e.finished,expression:"!finished"}],attrs:{color:"primary",indeterminate:"",size:"24"}})],1)])])],2):e.isFetching?s("div",{staticClass:"d-flex flex-column align-center justify-center mt-2"},[s("v-progress-circular",{attrs:{color:"primary",indeterminate:"",size:"24"}}),s("p",{staticClass:"mt-1 loading-logs-text-indicator mxs-color-helper text-grayed-out"},[e._v(" "+e._s(e.$mxs_t("loadingLogs"))+"... ")])],1):s("div",{staticClass:"empty",style:{height:e.logViewHeight+"px"}},[s("code",{staticClass:"d-block mariadb-code-style"},[e._v(" "+e._s(e.$mxs_t("noLogsFound"))+" ")])])],1)},S=[],O=(s("caad"),s("ddb0"),s("13d5"),s("89c1")),E=s.n(O),k=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.source?s("code",{staticClass:"d-block mariadb-code-style text-wrap",class:e.logPriorityColorClasses(e.source.priority)},[s("span",{staticClass:"mxs-color-helper text-grayed-out"},[e._v(e._s(e.source.timestamp)+"  ")]),s("span",{staticClass:"log-level d-inline-block"},[s("icon-sprite-sheet",{attrs:{size:"13",frame:e.source.priority}},[e._v(" logPriorities ")]),s("span",{staticClass:"tk-azo-sans-web"},[e._v(" ")]),s("span",[e._v(e._s(e.source.priority))])],1),s("span",{domProps:{innerHTML:e._s(e.logLevelNbspGen(e.source.priority))}}),s("span",{staticClass:"log-level-divider mxs-color-helper text-code-color"},[e._v(":")]),s("span",[e._v(" ")]),s("span",[e._v(e._s(e.source.message))])]):e._e()},F=[],$={name:"log-line",props:{source:{type:Object,default(){return{id:"",timestamp:"",priority:"",message:""}}}},methods:{logPriorityColorClasses:e=>`mxs-color-helper text-${e} ${"alert"===e?"font-weight-bold":""}`,logLevelNbspGen(e){switch(e){case"error":case"alert":case"debug":return"  ";case"notice":return" ";case"info":return"   ";case"warning":return""}}}},V=$,T=Object(c["a"])(V,k,F,!1,null,null,null),H=T.exports,D={name:"log-container",components:{VirtualList:E.a},props:{logViewHeight:{type:Number,required:!0}},data(){return{connection:null,LogLine:H,overflow:!1,isFetching:!1,isFirstPageReady:!1,finished:!1,allLogData:[],prevLogData:[],filteredLogData:[],isNotifShown:!1,isAtBottom:!1}},computed:{...Object(_["e"])({MAXSCALE_LOG_LEVELS:e=>e.app_config.MAXSCALE_LOG_LEVELS,logs_page_size:e=>e.maxscale.logs_page_size,latest_logs:e=>e.maxscale.latest_logs,prev_log_link:e=>e.maxscale.prev_log_link,prev_log_data:e=>e.maxscale.prev_log_data,chosen_log_levels:e=>e.maxscale.chosen_log_levels,prev_filtered_log_link:e=>e.maxscale.prev_filtered_log_link,prev_filtered_log_data:e=>e.maxscale.prev_filtered_log_data}),logToShow(){return this.isFiltering?this.filteredLogData:this.allLogData},isFiltering:function(){return this.chosen_log_levels.length!==this.MAXSCALE_LOG_LEVELS.length}},watch:{prev_log_data:function(e){this.prevLogData=e},chosen_log_levels:{deep:!0,async handler(e){e.length&&this.isFiltering?this.filteredLogData=this.allLogData.filter(e=>this.chosen_log_levels.includes(e.priority)):(this["SET_PREV_FILTERED_LOG_LINK"](null),this.filteredLogData=[]),this.$nextTick(()=>this.setVirtualListToBottom())}}},async created(){this.finished=!1,await this.getLatestLogs(),this.checkOverFlow(),this.overflow||await this.loopGetOlderLogs(),await this.openConnection()},beforeDestroy(){this.cleanUp()},methods:{...Object(_["b"])("maxscale",["fetchLatestLogs","fetchPrevLog","fetchPrevFilteredLog"]),...Object(_["d"])("maxscale",["SET_PREV_FILTERED_LOG_LINK"]),async getLatestLogs(){this.isFetching=!0,await this.fetchLatestLogs(),this.isFetching=!1,this.allLogData=Object.freeze(this.latest_logs)},async onItemRendered(){this.$refs.vsl&&(this.checkOverFlow(),!this.isFirstPageReady&&this.overflow&&(this.isFirstPageReady=!0,this.setVirtualListToBottom()))},onScroll(e){e.target.scrollHeight>e.target.clientHeight&&(this.checkIsAtBottom(e)?(this.isAtBottom=!0,this.isNotifShown=!1):this.isAtBottom=!1)},async onTotop(){this.isFetching||this.finished||(this.isFetching=!0,this.isFiltering?(await this.handleUnionPrevFilteredLogs(),this.checkOverFlow(),this.overflow||await this.loopGetOlderLogs()):await this.handleUnionPrevLogs(),this.isFetching=!1)},showNotifHandler(){this.isAtBottom?this.setVirtualListToBottom():this.isNotifShown=!0},async openConnection(){const{protocol:e,host:t}=window.location,s="http:"===e?"ws":"wss",i=`${s}://${t}/maxscale/logs/stream`;this.connection=new WebSocket(i),this.connection.onmessage=async e=>{const t=JSON.parse(e.data);this.allLogData=Object.freeze([...this.allLogData,t]),this.isFiltering&&this.isMatchedFilter(t)&&(this.filteredLogData=Object.freeze([...this.filteredLogData,t])),this.$nextTick(()=>{!this.isFiltering|(this.isFiltering&&this.isMatchedFilter(t))&&this.showNotifHandler()})}},disconnect(){this.connection.close(),this.allLogData=[]},cleanUp(){this.connection&&this.disconnect()},async handleUnionPrevLogs(){if(!this.prev_log_link)return void(this.finished=!0);await this.fetchPrevLog();const e=this.getIds(this.prevLogData);this.allLogData=this.$helpers.lodash.unionBy(this.prevLogData,this.allLogData,"id"),e.length&&this.$nextTick(()=>this.preserveScrollHeight(e)),this.prevLogData=[]},async handleUnionPrevFilteredLogs(){if(this.prev_filtered_log_link||this.prev_log_link){await this.fetchPrevFilteredLog(),this.filteredLogData=Object.freeze(this.$helpers.lodash.unionBy(this.prev_filtered_log_data,this.filteredLogData,"id"));const e=this.getIds(this.prev_filtered_log_data);e.length?this.$nextTick(()=>this.preserveScrollHeight(e)):await this.handleUnionPrevFilteredLogs()}},async loopGetOlderLogs(){const e=this.prev_filtered_log_link||this.prev_log_link;while(!this.overflow&&e)this.isFetching=!0,this.isFiltering?await this.handleUnionPrevFilteredLogs():await this.handleUnionPrevLogs(),this.$nextTick(()=>this.checkOverFlow());this.isFetching=!1},getIds(e){return e.map(e=>e.id)},checkOverFlow(){const e=this.$refs.vsl;e&&(this.overflow=e.getScrollSize()>e.getClientSize())},setVirtualListToOffset(e){this.$refs.vsl&&this.$refs.vsl.scrollToOffset(e)},setVirtualListToBottom(){this.$refs.vsl&&this.$refs.vsl.scrollToBottom()},checkIsAtBottom:e=>{const t=1;return e.target.clientHeight+e.target.scrollTop+t>=e.target.scrollHeight},isMatchedFilter(e){return this.chosen_log_levels.includes(e.priority)},preserveScrollHeight(e){const t=this.$refs.vsl,s=e.reduce((e,s)=>{const i="string"===typeof e?t.getSize(e):e;return i+this.$refs.vsl.getSize(s)});this.setVirtualListToOffset(s)}}},z=D,P=(s("b4ad"),s("490a")),j=Object(c["a"])(z,C,S,!1,null,null,null),N=j.exports;u()(j,{VBtn:L["a"],VIcon:w["a"],VProgressCircular:P["a"]});var A={name:"logs",components:{PageHeader:g,LogHeader:y,LogContainer:N},data(){return{logViewHeight:0,isNotifShown:!1}},methods:{setPageContentDim(){this.$nextTick(()=>{const e=this.$typy(this.$refs,"pageContent.clientHeight").safeNumber-this.$typy(this.$refs,"logHeader.$el.clientHeight").safeNumber;e&&(this.logViewHeight=e-32)})}}},B=A,G=s("8dd9"),I=s("269a"),M=s.n(I),R=s("dc22"),U=Object(c["a"])(B,i,o,!1,null,null,null);t["default"]=U.exports;u()(U,{VSheet:G["a"]}),M()(U,{Resize:R["a"]})}}]);
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com