diff --git a/dist/js/tool.js b/dist/js/tool.js index 18a2ca9..ecb1067 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e,t,n,r,o,a){var i,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(i=e,s=e.default);var c,u="function"==typeof s?s.options:s;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):r&&(c=r),c){var d=u.functional,h=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),h(e,t)}):u.beforeCreate=h?[].concat(h,c):[c]}return{esModule:i,exports:s,options:u}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),a=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(a).concat([o]).join("\n")}var i;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(o=0;ocode[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}",""])},function(e,t){e.exports=function(e,t){for(var n=[],r={},o=0;o0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return window.axios.get(n?"/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e+"&page="+t+"&search="+n:"/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e+"&page="+t).then(function(e){return e.data})},i=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]&&arguments[1];return window.axios.get("/nova-vendor/KABBOUCHI/logs-tool/daily-log-files").then(function(e){return e.data})},s=function(e){return window.axios.delete("/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e).then(function(e){return e.data})},l=n(15),c=n.n(l),u=n(17),d=n.n(u),h=n(19),f=n.n(h),p=n(21),g=n.n(p),v=n(23),m=n.n(v),y=n(25),w=n.n(y),x=n(27),b=n.n(x),_=n(29),k=n.n(_),C=n(31),L=n.n(C);n(33);function S(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}t.default={data:function(){return{deleteModalOpen:!1,search:null,loading:!0,file:"laravel.log",files:[],logs:{total:0,per_page:2,from:1,to:0,data:!1,current_page:1},showLog:null}},components:{IconError:c.a,IconInfo:d.a,IconWarning:f.a,IconEmergency:g.a,IconAlert:m.a,IconCritical:w.a,IconNotice:b.a,IconDebug:k.a},mounted:function(){},created:function(){var e=S(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDailyLogFiles();case 2:return e.next=4,this.getLogs();case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),computed:{hasPreviousPages:function(){return Boolean(this.logs&&this.logs.prev_page_url)},hasMorePages:function(){return Boolean(this.logs&&this.logs.next_page_url)}},methods:{download:function(){window.open("/nova-vendor/KABBOUCHI/logs-tool/logs/"+this.file,"_parent")},getDailyLogFiles:function(){var e=this;return i().then(function(t){e.files=t,t.length&&(e.file=t[0])})},getLogs:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.loading=!0,a(this.file,t,this.search).then(function(t){e.logs=t,e.loading=!1})},changeFile:function(){this.search=null,this.getLogs()},selectPreviousPage:function(){this.getLogs(this.logs.current_page-1)},selectNextPage:function(){this.getLogs(this.logs.current_page+1)},performSearch:function(){var e=this;this.$nextTick(function(){e.getLogs()})},viewLog:function(e){var t=this;this.showLog=e,this.$nextTick(function(){L.a.highlightElement(t.$refs.outputCode)})},openDeleteModal:function(){this.deleteModalOpen=!0},closeDeleteModal:function(){this.deleteModalOpen=!1},confirmDelete:function(){var e=S(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.deleteModalOpen=!1,e.next=3,s(this.file);case 3:return e.next=5,this.getDailyLogFiles();case 5:return e.next=7,this.getLogs();case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}}},function(e,t,n){e.exports=n(13)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(14),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=x;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",g={},v={};v[i]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(O([])));y&&y!==r&&o.call(y,i)&&(v=y);var w=C.prototype=_.prototype=Object.create(v);k.prototype=w.constructor=C,C.constructor=k,C[l]=k.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(w),e},u.awrap=function(e){return{__await:e}},L(S.prototype),S.prototype[s]=function(){return this},u.AsyncIterator=S,u.async=function(e,t,n,r){var o=new S(x(e,t,n,r));return u.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},L(w),w[l]="Generator",w[i]=function(){return this},w.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=O,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return s.type="throw",s.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function x(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,a=Object.create(o.prototype),i=new M(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return z()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=P(i,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=b(e,t,n);if("normal"===l.type){if(r=n.done?p:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,i),a}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function k(){}function C(){}function L(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e){var t;this._invoke=function(n,r){function a(){return new Promise(function(t,a){!function t(n,r,a,i){var s=b(e[n],e,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},i)}i(s.arg)}(n,r,t,a)})}return t=t?t.then(a,a):a()}}function P(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,P(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=b(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,g;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++re.length)return;if(!(b instanceof l)){if(g&&w!=t.length-1){if(h.lastIndex=x,!(P=h.exec(e)))break;for(var _=P.index+(p?P[1].length:0),k=P.index+P[0].length,C=w,L=x,S=t.length;C=(L+=t[C].length)&&(++w,x=L);if(t[w]instanceof l)continue;j=C-w,b=e.slice(x,L),P.index-=x}else{h.lastIndex=0;var P=h.exec(b),j=1}if(P){p&&(v=P[1]?P[1].length:0);k=(_=P.index+v)+(P=P[0].slice(v)).length;var E=b.slice(0,_),M=b.slice(k),O=[w,j];E&&(++w,x+=E.length,O.push(E));var z=new l(c,f?r.tokenize(P,f):P,m,P,g);if(O.push(z),M&&O.push(M),Array.prototype.splice.apply(t,O),1!=j&&r.matchGrammar(e,t,n,w,x,!0,c),i)break}else if(i)break}}}}},tokenize:function(e,t,n){var o=[e],a=t.rest;if(a){for(var i in a)t[i]=a[i];delete t.rest}return r.matchGrammar(e,o,t,0,0,!1),o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}}},o=r.Token=function(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o};if(o.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return o.stringify(n,t,e)}).join("");var a={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var i="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,i)}r.hooks.run("wrap",a);var s=Object.keys(a.attributes).map(function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(s?" "+s:"")+">"+a.content+""},!n.document)return n.addEventListener?(r.disableWorkerMessageHandler||n.addEventListener("message",function(e){var t=JSON.parse(e.data),o=t.language,a=t.code,i=t.immediateClose;n.postMessage(r.highlight(a,r.languages[o],o)),i&&n.close()},!1),n.Prism):n.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(r.filename=a.src,r.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),n.Prism}();void 0!==e&&e.exports&&(e.exports=r),void 0!==t&&(t.Prism=r)}).call(t,n(32))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,function:{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var n=t.variable[1].inside;n.string=e.languages.bash.string,n.function=e.languages.bash.function,n.keyword=e.languages.bash.keyword,n.boolean=e.languages.bash.boolean,n.operator=e.languages.bash.operator,n.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism)},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("heading",{staticClass:"mb-3"},[e._v(" Logs")]),e._v(" "),n("div",{staticClass:"flex justify-between"},[n("div",{staticClass:"relative h-9 flex items-center mb-6"},[n("icon",{staticClass:"absolute ml-3 text-70",attrs:{type:"search"}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none form-control form-input w-search pl-search",attrs:{placeholder:"Search",type:"search"},domProps:{value:e.search},on:{keydown:function(t){return t.stopPropagation(),e.performSearch(t)},input:function(t){t.target.composing||(e.search=t.target.value)}}})],1),e._v(" "),!e.loading&&e.files.length?n("div",{staticClass:"p-3 flex items-center border-b border-50"},[n("button",{staticClass:"cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:"Download"},on:{click:function(t){return t.preventDefault(),e.download(t)}}},[n("icon",{attrs:{type:"download"}})],1),e._v(" "),n("button",{staticClass:"cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:"Delete"},on:{click:function(t){return t.preventDefault(),e.openDeleteModal(t)}}},[n("icon",{attrs:{type:"delete"}})],1),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.file,expression:"file"}],staticClass:"form-control form-select",on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.file=t.target.multiple?n:n[0]},e.changeFile]}},e._l(e.files,function(t){return n("option",{domProps:{textContent:e._s(t)}})}))]):e._e()]),e._v(" "),n("div",{staticClass:"relative",class:{"overflow-hidden":e.loading}},[e.loading?n("div",{staticClass:"flex items-center justify-center z-50 p-6",staticStyle:{"min-height":"150px"}},[n("loader",{staticClass:"text-60"})],1):[n("card",[n("div",{staticClass:"overflow-hidden overflow-x-auto relative"},[e.logs.data.length>0?n("table",{staticClass:"table w-full",attrs:{cellpadding:"0",cellspacing:"0"}},[n("thead",[n("tr",[n("th",{staticClass:"text-left",staticStyle:{width:"100px"}},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Level\n ")])]),e._v(" "),n("th",{staticClass:"text-left",staticStyle:{width:"140px"}},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Created at\n ")])]),e._v(" "),n("th",{staticClass:"text-left"},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Message\n ")])]),e._v(" "),n("th")])]),e._v(" "),e._l(e.logs.data,function(t,r){return n("tbody",[n("tr",{staticClass:"hover:bg-blue-lightest"},[n("td",[n("span",{staticClass:"whitespace-no-wrap flex flex-col items-center"},["error"===t.level?n("icon-error"):e._e(),e._v(" "),"info"===t.level?n("icon-info"):e._e(),e._v(" "),"warning"===t.level?n("icon-warning"):e._e(),e._v(" "),"emergency"===t.level?n("icon-emergency"):e._e(),e._v(" "),"alert"===t.level?n("icon-alert"):e._e(),e._v(" "),"critical"===t.level?n("icon-critical"):e._e(),e._v(" "),"notice"===t.level?n("icon-notice"):e._e(),e._v(" "),"debug"===t.level?n("icon-debug"):e._e(),e._v(" "),n("span",[e._v(e._s(t.level))])],1)]),e._v(" "),n("td",[n("span",{staticClass:"whitespace-no-wrap"},[e._v(e._s(t.date))])]),e._v(" "),n("td",[n("span",{staticClass:"text-sm text-grey-darker"},[e._v(" "+e._s(t.text))])]),e._v(" "),n("td",{staticClass:"td-fit text-right pr-6"},[n("span",{on:{click:function(n){e.viewLog(t)}}},[n("icon",{attrs:{type:"view",width:"22",height:"18","view-box":"0 0 22 16"}})],1)])])])})],2):e._e()]),e._v(" "),e.logs.data.length?e._e():n("div",{staticClass:"flex justify-center items-center px-6 py-8"},[n("div",{staticClass:"text-center"},[n("icon",{staticClass:"mb-3",staticStyle:{color:"#A8B9C5"},attrs:{type:"search",width:"50",height:"50"}}),e._v(" "),n("h3",{staticClass:"text-base text-80 font-normal mb-6"},[e._v("\n No Logs.\n ")])],1)]),e._v(" "),n("div",{staticClass:"bg-20 rounded-b"},[e.logs.data.length>0?n("nav",{staticClass:"flex"},[n("button",{staticClass:"btn btn-link py-3 px-4",class:{"text-primary dim":e.hasPreviousPages,"text-80 opacity-50":!e.hasPreviousPages},attrs:{disabled:!e.hasPreviousPages,rel:"prev",dusk:"previous"},on:{click:function(t){t.preventDefault(),e.selectPreviousPage()}}},[e._v("\n "+e._s(e.__("Previous"))+"\n ")]),e._v(" "),n("button",{staticClass:"ml-auto btn btn-link py-3 px-4",class:{"text-primary dim":e.hasMorePages,"text-80 opacity-50":!e.hasMorePages},attrs:{disabled:!e.hasMorePages,rel:"next",dusk:"next"},on:{click:function(t){t.preventDefault(),e.selectNextPage()}}},[e._v("\n "+e._s(e.__("Next"))+"\n ")])]):e._e()])])]],2),e._v(" "),e.showLog?n("transition",{attrs:{name:"modal"},on:{click:function(t){if(t.target!==t.currentTarget)return null;e.showLog=null}}},[n("div",{staticClass:"pin absolute flex items-center justify-center bg-modal",staticStyle:{"z-index":"100"}},[n("div",{staticClass:"bg-white p-4 w-full h-full text-center overflow-y-scroll flex flex-col"},[n("div",{staticClass:"mb-4 text-grey-darker"},[n("span",{staticClass:"whitespace-no-wrap flex flex-col items-center"},["error"===e.showLog.level?n("icon-error",{attrs:{width:"100px"}}):e._e(),e._v(" "),"info"===e.showLog.level?n("icon-info",{attrs:{width:"100px"}}):e._e(),e._v(" "),"warning"===e.showLog.level?n("icon-warning",{attrs:{width:"100px"}}):e._e(),e._v(" "),"emergency"===e.showLog.level?n("icon-emergency",{attrs:{width:"100px"}}):e._e(),e._v(" "),"alert"===e.showLog.level?n("icon-alert",{attrs:{width:"100px"}}):e._e(),e._v(" "),"critical"===e.showLog.level?n("icon-critical"):e._e(),e._v(" "),"notice"===e.showLog.level?n("icon-notice",{attrs:{width:"100px"}}):e._e(),e._v(" "),"debug"===e.showLog.level?n("icon-debug",{attrs:{width:"100px"}}):e._e(),e._v(" "),n("span",{staticClass:"mt-3"},[e._v(e._s(e.showLog.level.toUpperCase()))]),e._v(" "),n("span",{staticClass:"mt-3"},[e._v(e._s(e.showLog.date))])],1)]),e._v(" "),n("div",{staticClass:"mb-8 flex-1"},[n("pre",{staticClass:"w-full h-full p-2 text-left",attrs:{id:"output"}},[n("code",{ref:"outputCode",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.showLog.text)}})])]),e._v(" "),n("div",{staticClass:"flex justify-center"},[n("button",{staticClass:"flex-no-shrink text-info py-2 px-4 rounded",on:{click:function(t){e.showLog=null}}},[e._v("\n Ok\n ")])])])])]):e._e(),e._v(" "),n("portal",{attrs:{to:"modals"}},[n("transition",{attrs:{name:"fade"}},[e.deleteModalOpen?n("delete-resource-modal",{attrs:{mode:"delete"},on:{confirm:e.confirmDelete,close:e.closeDeleteModal}},[n("div",{staticClass:"p-8"},[n("heading",{staticClass:"mb-6",attrs:{level:2}},[e._v("\n Delete Log file\n ")]),e._v(" "),n("p",{staticClass:"text-80 leading-normal"},[e._v("\n Are you sure you want to delete this '"+e._s(this.file)+"' file?\n ")])],1)]):e._e()],1)],1)],1)},staticRenderFns:[]}},function(e,t){}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e,t,n,r,o,a){var i,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(i=e,s=e.default);var c,u="function"==typeof s?s.options:s;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):r&&(c=r),c){var d=u.functional,h=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),h(e,t)}):u.beforeCreate=h?[].concat(h,c):[c]}return{esModule:i,exports:s,options:u}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),a=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(a).concat([o]).join("\n")}var i;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(o=0;ocode[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}",""])},function(e,t){e.exports=function(e,t){for(var n=[],r={},o=0;o0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return window.axios.get(n?"/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e+"&page="+t+"&search="+n:"/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e+"&page="+t).then(function(e){return e.data})},i=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]&&arguments[1];return window.axios.get("/nova-vendor/KABBOUCHI/logs-tool/daily-log-files").then(function(e){return e.data})},s=function(e){return window.axios.delete("/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e).then(function(e){return e.data})},l=n(15),c=n.n(l),u=n(17),d=n.n(u),h=n(19),f=n.n(h),p=n(21),g=n.n(p),v=n(23),m=n.n(v),y=n(25),w=n.n(y),x=n(27),b=n.n(x),_=n(29),k=n.n(_),C=n(31),L=n.n(C);n(33);function S(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}t.default={data:function(){return{deleteModalOpen:!1,search:null,loading:!0,file:"laravel.log",files:[],logs:{total:0,per_page:2,from:1,to:0,data:!1,current_page:1},showLog:null}},components:{IconError:c.a,IconInfo:d.a,IconWarning:f.a,IconEmergency:g.a,IconAlert:m.a,IconCritical:w.a,IconNotice:b.a,IconDebug:k.a},mounted:function(){},created:function(){var e=S(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDailyLogFiles();case 2:return e.next=4,this.getLogs();case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),computed:{hasPreviousPages:function(){return Boolean(this.logs&&this.logs.prev_page_url)},hasMorePages:function(){return Boolean(this.logs&&this.logs.next_page_url)}},methods:{download:function(){window.open("/nova-vendor/KABBOUCHI/logs-tool/logs/"+this.file,"_parent")},getDailyLogFiles:function(){var e=this;return i().then(function(t){e.files=t,t.length&&(e.file=t[0])})},getLogs:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.loading=!0,a(this.file,t,this.search).then(function(t){e.logs=t,e.loading=!1})},changeFile:function(){this.search=null,this.getLogs()},selectPreviousPage:function(){this.getLogs(this.logs.current_page-1)},selectNextPage:function(){this.getLogs(this.logs.current_page+1)},performSearch:function(){var e=this;this.$nextTick(function(){e.getLogs()})},viewLog:function(e){var t=this;this.showLog=e,this.$nextTick(function(){L.a.highlightElement(t.$refs.outputCode)})},openDeleteModal:function(){this.deleteModalOpen=!0},closeDeleteModal:function(){this.deleteModalOpen=!1},confirmDelete:function(){var e=S(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.deleteModalOpen=!1,e.next=3,s(this.file);case 3:return e.next=5,this.getDailyLogFiles();case 5:return e.next=7,this.getLogs();case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}}},function(e,t,n){e.exports=n(13)},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(14),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=x;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",g={},v={};v[i]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(O([])));y&&y!==r&&o.call(y,i)&&(v=y);var w=C.prototype=_.prototype=Object.create(v);k.prototype=w.constructor=C,C.constructor=k,C[l]=k.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(w),e},u.awrap=function(e){return{__await:e}},L(S.prototype),S.prototype[s]=function(){return this},u.AsyncIterator=S,u.async=function(e,t,n,r){var o=new S(x(e,t,n,r));return u.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},L(w),w[l]="Generator",w[i]=function(){return this},w.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=O,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return s.type="throw",s.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function x(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,a=Object.create(o.prototype),i=new M(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return z()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=P(i,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=b(e,t,n);if("normal"===l.type){if(r=n.done?p:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,i),a}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function k(){}function C(){}function L(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e){var t;this._invoke=function(n,r){function a(){return new Promise(function(t,a){!function t(n,r,a,i){var s=b(e[n],e,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},i)}i(s.arg)}(n,r,t,a)})}return t=t?t.then(a,a):a()}}function P(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,P(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=b(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,g;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++re.length)return;if(!(b instanceof l)){if(g&&w!=t.length-1){if(h.lastIndex=x,!(P=h.exec(e)))break;for(var _=P.index+(p?P[1].length:0),k=P.index+P[0].length,C=w,L=x,S=t.length;C=(L+=t[C].length)&&(++w,x=L);if(t[w]instanceof l)continue;j=C-w,b=e.slice(x,L),P.index-=x}else{h.lastIndex=0;var P=h.exec(b),j=1}if(P){p&&(v=P[1]?P[1].length:0);k=(_=P.index+v)+(P=P[0].slice(v)).length;var E=b.slice(0,_),M=b.slice(k),O=[w,j];E&&(++w,x+=E.length,O.push(E));var z=new l(c,f?r.tokenize(P,f):P,m,P,g);if(O.push(z),M&&O.push(M),Array.prototype.splice.apply(t,O),1!=j&&r.matchGrammar(e,t,n,w,x,!0,c),i)break}else if(i)break}}}}},tokenize:function(e,t,n){var o=[e],a=t.rest;if(a){for(var i in a)t[i]=a[i];delete t.rest}return r.matchGrammar(e,o,t,0,0,!1),o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}}},o=r.Token=function(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o};if(o.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return o.stringify(n,t,e)}).join("");var a={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var i="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,i)}r.hooks.run("wrap",a);var s=Object.keys(a.attributes).map(function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(s?" "+s:"")+">"+a.content+""},!n.document)return n.addEventListener?(r.disableWorkerMessageHandler||n.addEventListener("message",function(e){var t=JSON.parse(e.data),o=t.language,a=t.code,i=t.immediateClose;n.postMessage(r.highlight(a,r.languages[o],o)),i&&n.close()},!1),n.Prism):n.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(r.filename=a.src,r.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),n.Prism}();void 0!==e&&e.exports&&(e.exports=r),void 0!==t&&(t.Prism=r)}).call(t,n(32))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,function:{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var n=t.variable[1].inside;n.string=e.languages.bash.string,n.function=e.languages.bash.function,n.keyword=e.languages.bash.keyword,n.boolean=e.languages.bash.boolean,n.operator=e.languages.bash.operator,n.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism)},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("heading",{staticClass:"mb-3"},[e._v(" Logs")]),e._v(" "),n("div",{staticClass:"flex justify-between"},[n("div",{staticClass:"relative h-9 flex items-center mb-6"},[n("icon",{staticClass:"absolute ml-3 text-70",attrs:{type:"search"}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none form-control form-input w-search pl-search",attrs:{placeholder:"Search",type:"search"},domProps:{value:e.search},on:{keydown:function(t){return t.stopPropagation(),e.performSearch(t)},input:function(t){t.target.composing||(e.search=t.target.value)}}})],1),e._v(" "),!e.loading&&e.files.length?n("div",{staticClass:"p-3 flex items-center border-b border-50"},[n("button",{staticClass:"cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:"Download"},on:{click:function(t){return t.preventDefault(),e.download(t)}}},[n("icon",{attrs:{type:"download","view-box":"0 0 24 24",width:"24",height:"24"}})],1),e._v(" "),n("button",{staticClass:"cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:"Delete"},on:{click:function(t){return t.preventDefault(),e.openDeleteModal(t)}}},[n("icon",{attrs:{type:"delete"}})],1),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.file,expression:"file"}],staticClass:"form-control form-select",on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.file=t.target.multiple?n:n[0]},e.changeFile]}},e._l(e.files,function(t){return n("option",{domProps:{textContent:e._s(t)}})}))]):e._e()]),e._v(" "),n("div",{staticClass:"relative",class:{"overflow-hidden":e.loading}},[e.loading?n("div",{staticClass:"flex items-center justify-center z-50 p-6",staticStyle:{"min-height":"150px"}},[n("loader",{staticClass:"text-60"})],1):[n("card",[n("div",{staticClass:"overflow-hidden overflow-x-auto relative"},[e.logs.data.length>0?n("table",{staticClass:"table w-full",attrs:{cellpadding:"0",cellspacing:"0"}},[n("thead",[n("tr",[n("th",{staticClass:"text-left",staticStyle:{width:"100px"}},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Level\n ")])]),e._v(" "),n("th",{staticClass:"text-left",staticStyle:{width:"140px"}},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Created at\n ")])]),e._v(" "),n("th",{staticClass:"text-left"},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n Message\n ")])]),e._v(" "),n("th")])]),e._v(" "),e._l(e.logs.data,function(t,r){return n("tbody",[n("tr",{staticClass:"hover:bg-blue-lightest"},[n("td",[n("span",{staticClass:"whitespace-no-wrap flex flex-col items-center"},["error"===t.level?n("icon-error"):e._e(),e._v(" "),"info"===t.level?n("icon-info"):e._e(),e._v(" "),"warning"===t.level?n("icon-warning"):e._e(),e._v(" "),"emergency"===t.level?n("icon-emergency"):e._e(),e._v(" "),"alert"===t.level?n("icon-alert"):e._e(),e._v(" "),"critical"===t.level?n("icon-critical"):e._e(),e._v(" "),"notice"===t.level?n("icon-notice"):e._e(),e._v(" "),"debug"===t.level?n("icon-debug"):e._e(),e._v(" "),n("span",[e._v(e._s(t.level))])],1)]),e._v(" "),n("td",[n("span",{staticClass:"whitespace-no-wrap"},[e._v(e._s(t.date))])]),e._v(" "),n("td",[n("span",{staticClass:"text-sm text-grey-darker"},[e._v(" "+e._s(t.text))])]),e._v(" "),n("td",{staticClass:"td-fit text-right pr-6"},[n("span",{on:{click:function(n){e.viewLog(t)}}},[n("icon",{attrs:{type:"view",width:"22",height:"18","view-box":"0 0 22 16"}})],1)])])])})],2):e._e()]),e._v(" "),e.logs.data.length?e._e():n("div",{staticClass:"flex justify-center items-center px-6 py-8"},[n("div",{staticClass:"text-center"},[n("icon",{staticClass:"mb-3",staticStyle:{color:"#A8B9C5"},attrs:{type:"search",width:"50",height:"50"}}),e._v(" "),n("h3",{staticClass:"text-base text-80 font-normal mb-6"},[e._v("\n No Logs.\n ")])],1)]),e._v(" "),n("div",{staticClass:"bg-20 rounded-b"},[e.logs.data.length>0?n("nav",{staticClass:"flex"},[n("button",{staticClass:"btn btn-link py-3 px-4",class:{"text-primary dim":e.hasPreviousPages,"text-80 opacity-50":!e.hasPreviousPages},attrs:{disabled:!e.hasPreviousPages,rel:"prev",dusk:"previous"},on:{click:function(t){t.preventDefault(),e.selectPreviousPage()}}},[e._v("\n "+e._s(e.__("Previous"))+"\n ")]),e._v(" "),n("button",{staticClass:"ml-auto btn btn-link py-3 px-4",class:{"text-primary dim":e.hasMorePages,"text-80 opacity-50":!e.hasMorePages},attrs:{disabled:!e.hasMorePages,rel:"next",dusk:"next"},on:{click:function(t){t.preventDefault(),e.selectNextPage()}}},[e._v("\n "+e._s(e.__("Next"))+"\n ")])]):e._e()])])]],2),e._v(" "),e.showLog?n("transition",{attrs:{name:"modal"},on:{click:function(t){if(t.target!==t.currentTarget)return null;e.showLog=null}}},[n("div",{staticClass:"pin absolute flex items-center justify-center bg-modal",staticStyle:{"z-index":"100"}},[n("div",{staticClass:"bg-white p-4 w-full h-full text-center overflow-y-scroll flex flex-col"},[n("div",{staticClass:"mb-4 text-grey-darker"},[n("span",{staticClass:"whitespace-no-wrap flex flex-col items-center"},["error"===e.showLog.level?n("icon-error",{attrs:{width:"100px"}}):e._e(),e._v(" "),"info"===e.showLog.level?n("icon-info",{attrs:{width:"100px"}}):e._e(),e._v(" "),"warning"===e.showLog.level?n("icon-warning",{attrs:{width:"100px"}}):e._e(),e._v(" "),"emergency"===e.showLog.level?n("icon-emergency",{attrs:{width:"100px"}}):e._e(),e._v(" "),"alert"===e.showLog.level?n("icon-alert",{attrs:{width:"100px"}}):e._e(),e._v(" "),"critical"===e.showLog.level?n("icon-critical"):e._e(),e._v(" "),"notice"===e.showLog.level?n("icon-notice",{attrs:{width:"100px"}}):e._e(),e._v(" "),"debug"===e.showLog.level?n("icon-debug",{attrs:{width:"100px"}}):e._e(),e._v(" "),n("span",{staticClass:"mt-3"},[e._v(e._s(e.showLog.level.toUpperCase()))]),e._v(" "),n("span",{staticClass:"mt-3"},[e._v(e._s(e.showLog.date))])],1)]),e._v(" "),n("div",{staticClass:"mb-8 flex-1"},[n("pre",{staticClass:"w-full h-full p-2 text-left",attrs:{id:"output"}},[n("code",{ref:"outputCode",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.showLog.text)}})])]),e._v(" "),n("div",{staticClass:"flex justify-center"},[n("button",{staticClass:"flex-no-shrink text-info py-2 px-4 rounded",on:{click:function(t){e.showLog=null}}},[e._v("\n Ok\n ")])])])])]):e._e(),e._v(" "),n("portal",{attrs:{to:"modals"}},[n("transition",{attrs:{name:"fade"}},[e.deleteModalOpen?n("delete-resource-modal",{attrs:{mode:"delete"},on:{confirm:e.confirmDelete,close:e.closeDeleteModal}},[n("div",{staticClass:"p-8"},[n("heading",{staticClass:"mb-6",attrs:{level:2}},[e._v("\n Delete Log file\n ")]),e._v(" "),n("p",{staticClass:"text-80 leading-normal"},[e._v("\n Are you sure you want to delete this '"+e._s(this.file)+"' file?\n ")])],1)]):e._e()],1)],1)],1)},staticRenderFns:[]}},function(e,t){}]); \ No newline at end of file diff --git a/docs/screenshot.png b/docs/screenshot.png index 858640a..648a275 100644 Binary files a/docs/screenshot.png and b/docs/screenshot.png differ diff --git a/resources/js/components/LogsTool.vue b/resources/js/components/LogsTool.vue index e7f2507..7e098ca 100644 --- a/resources/js/components/LogsTool.vue +++ b/resources/js/components/LogsTool.vue @@ -24,7 +24,7 @@ title="Download" class="cursor-pointer text-70 hover:text-primary mr-3" > - +