From c93b33672ac60d9ce6dd0b1fa8b4bdd512634e79 Mon Sep 17 00:00:00 2001 From: Georges KABBOUCHI Date: Fri, 8 Apr 2022 22:24:30 +0300 Subject: [PATCH] translations --- dist/js/tool.js | 2 +- resources/js/api.js | 26 +- resources/js/components/LogsTool.vue | 465 +++++++++--------- resources/js/components/icons/IconAlert.vue | 20 +- .../js/components/icons/IconCritical.vue | 19 +- resources/js/components/icons/IconDebug.vue | 19 +- .../js/components/icons/IconEmergency.vue | 18 +- resources/js/components/icons/IconError.vue | 19 +- resources/js/components/icons/IconInfo.vue | 20 +- resources/js/components/icons/IconNotice.vue | 18 +- resources/js/components/icons/IconWarning.vue | 18 +- resources/js/tool.js | 8 +- 12 files changed, 369 insertions(+), 283 deletions(-) diff --git a/dist/js/tool.js b/dist/js/tool.js index 14960d5..cac145a 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 h=u.functional,d=h?u.render:u.beforeCreate;h?(u._injectStyles=c,u.render=function(e,t){return c.call(t),d(e,t)}):u.beforeCreate=d?[].concat(d,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 Nova.request().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 Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/daily-log-files").then(function(e){return e.data})},s=function(e){return Nova.request().delete("/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e).then(function(e){return e.data})},l=function(e){return Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/logs/permissions").then(function(e){return e.data})},c=n(15),u=n.n(c),h=n(17),d=n.n(h),f=n(19),p=n.n(f),g=n(21),v=n.n(g),m=n(23),y=n.n(m),w=n(25),x=n.n(w),b=n(27),_=n.n(b),k=n(29),C=n.n(k),L=n(31),S=n.n(L);n(33);function P(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,permissions:{}}},components:{IconError:u.a,IconInfo:d.a,IconWarning:p.a,IconEmergency:v.a,IconAlert:y.a,IconCritical:x.a,IconNotice:_.a,IconDebug:C.a},mounted:function(){},created:function(){var e=P(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return document.addEventListener("keydown",this.handleKeydown),e.next=3,this.getLogsPermissions();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)}}(),computed:{hasPreviousPages:function(){return Boolean(this.logs&&this.logs.prev_page_url)},hasMorePages:function(){return Boolean(this.logs&&this.logs.next_page_url)}},methods:{handleKeydown:function(e){"Escape"===e.code&&(this.showLog=null)},download:function(){window.open("/nova-vendor/KABBOUCHI/logs-tool/logs/"+this.file+"?time="+(new Date).getTime(),"_parent")},getLogsPermissions:function(){var e=this;return l().then(function(t){e.permissions=t})},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(){S.a.highlightElement(t.$refs.outputCodeMessage),S.a.highlightElement(t.$refs.outputCodeStack)})},openDeleteModal:function(){this.deleteModalOpen=!0},closeDeleteModal:function(){this.deleteModalOpen=!1},confirmDelete:function(){var e=P(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 h="suspendedStart",d="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(j),!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),j(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;j(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=h;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return N()}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===h)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:d,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 E(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,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(d.lastIndex=x,!(P=d.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;E=C-w,b=e.slice(x,L),P.index-=x}else{d.lastIndex=0;var P=d.exec(b),E=1}if(P){p&&(v=P[1]?P[1].length:0);k=(_=P.index+v)+(P=P[0].slice(v)).length;var j=b.slice(0,_),M=b.slice(k),O=[w,E];j&&(++w,x+=j.length,O.push(j));var N=new l(c,f?r.tokenize(P,f):P,m,P,g);if(O.push(N),M&&O.push(M),Array.prototype.splice.apply(t,O),1!=E&&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"},[e.permissions.canDownload?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._e(),e._v(" "),e.permissions.canDelete?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._e(),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 relative"},[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-4 flex-1"},[n("pre",{staticClass:"w-full text-left"},[n("code",{ref:"outputCodeMessage",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s("[message]\n"+e.showLog.text)}})]),e._v(" "),n("pre",{staticClass:"w-full text-left"},[n("code",{ref:"outputCodeStack",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.showLog.stack)}}),e._v("\n ")])]),e._v(" "),n("div",{staticClass:"pin-r pin-t absolute p-2"},[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._v(" "),n("div",{},[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,f=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),f(e,t)}):u.beforeCreate=f?[].concat(f,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}.token.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 Nova.request().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 Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/daily-log-files").then(function(e){return e.data})},s=function(e){return Nova.request().delete("/nova-vendor/KABBOUCHI/logs-tool/logs?file="+e).then(function(e){return e.data})},l=function(e){return Nova.request().get("/nova-vendor/KABBOUCHI/logs-tool/logs/permissions").then(function(e){return e.data})},c=n(15),u=n.n(c),d=n(17),f=n.n(d),p=n(19),h=n.n(p),g=n(21),v=n.n(g),m=n(23),_=n.n(m),y=n(25),x=n.n(y),w=n(27),b=n.n(w),S=n(29),k=n.n(S),E=n(31),C=n.n(E);n(33);function L(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,permissions:{}}},components:{IconError:u.a,IconInfo:f.a,IconWarning:h.a,IconEmergency:v.a,IconAlert:_.a,IconCritical:x.a,IconNotice:b.a,IconDebug:k.a},mounted:function(){},created:function(){var e=L(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return document.addEventListener("keydown",this.handleKeydown),e.next=3,this.getLogsPermissions();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)}}(),computed:{hasPreviousPages:function(){return Boolean(this.logs&&this.logs.prev_page_url)},hasMorePages:function(){return Boolean(this.logs&&this.logs.next_page_url)}},methods:{handleKeydown:function(e){"Escape"===e.code&&(this.showLog=null)},download:function(){window.open("/nova-vendor/KABBOUCHI/logs-tool/logs/"+this.file+"?time="+(new Date).getTime(),"_parent")},getLogsPermissions:function(){var e=this;return l().then(function(t){e.permissions=t})},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(){C.a.highlightElement(t.$refs.outputCodeMessage),C.a.highlightElement(t.$refs.outputCodeStack)})},openDeleteModal:function(){this.deleteModalOpen=!0},closeDeleteModal:function(){this.deleteModalOpen=!1},confirmDelete:function(){var e=L(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",f="suspendedYield",p="executing",h="completed",g={},v={};v[i]=function(){return this};var m=Object.getPrototypeOf,_=m&&m(m(P([])));_&&_!==r&&o.call(_,i)&&(v=_);var y=k.prototype=b.prototype=Object.create(v);S.prototype=y.constructor=k,k.constructor=S,k[l]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(y),e},u.awrap=function(e){return{__await:e}},E(C.prototype),C.prototype[s]=function(){return this},u.AsyncIterator=C,u.async=function(e,t,n,r){var o=new C(x(e,t,n,r));return u.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},E(y),y[l]="Generator",y[i]=function(){return this},y.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=P,N.prototype={constructor:N,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(A),!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),A(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;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function x(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),i=new N(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return I()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=L(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=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=w(e,t,n);if("normal"===l.type){if(r=n.done?h:f,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,i),a}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function b(){}function S(){}function k(){}function E(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function C(e){var t;this._invoke=function(n,r){function a(){return new Promise(function(t,a){!function t(n,r,a,i){var s=w(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 L(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,L(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=w(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 O(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 A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(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(;++r=d.reach);S+=b.value.length,b=b.next){var k=b.value;if(n.length>t.length)return;if(!(k instanceof a)){var E,C=1;if(_){if(!(E=i(w,S,t,m))||E.index>=t.length)break;var L=E.index,O=E.index+E[0].length,A=S;for(A+=b.value.length;L>=A;)b=b.next,A+=b.value.length;if(A-=b.value.length,S=A,b.value instanceof a)continue;for(var N=b;N!==n.tail&&(Ad.reach&&(d.reach=R);var D=b.prev;I&&(D=s(n,D,I),S+=I.length),l(n,D,C);var M=new a(f,v?o.tokenize(P,v):P,y,P);if(b=s(n,D,M),T&&s(n,b,T),C>1){var B={cause:f+","+h,reach:R};e(t,n,r,b.prev,S,B),d&&B.reach>d.reach&&(d.reach=B.reach)}}}}}}(e,c,t,c.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(c)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function l(e,t,n){for(var r=t.next,o=0;o"+a.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()},!1),o):o;var c=o.util.currentScript();function u(){o.manual||o.highlightAll()}if(c&&(o.filename=c.src,c.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var d=document.readyState;"loading"===d||"interactive"===d&&c&&c.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});void 0!==e&&e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n)}).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="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,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:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i0?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 "+e._s(e.__("Level"))+"\n ")])]),e._v(" "),n("th",{staticClass:"text-left",staticStyle:{width:"140px"}},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n "+e._s(e.__("Created at"))+"\n ")])]),e._v(" "),n("th",{staticClass:"text-left"},[n("span",{staticClass:"cursor-pointer inline-flex items-center"},[e._v("\n "+e._s(e.__("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){return 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 "+e._s(e.__("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){return 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){return 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 relative"},[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-4 flex-1"},[n("pre",{staticClass:"w-full text-left"},[n("code",{ref:"outputCodeMessage",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s("[message]\n"+e.showLog.text)}})]),e._v(" "),n("pre",{staticClass:"w-full text-left"},[n("code",{ref:"outputCodeStack",staticClass:"language-bash",staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.showLog.stack)}}),e._v("\n ")])]),e._v(" "),n("div",{staticClass:"pin-r pin-t absolute p-2"},[n("button",{staticClass:"flex-no-shrink text-info py-2 px-4 rounded",on:{click:function(t){e.showLog=null}}},[e._v("\n "+e._s(e.__("OK"))+"\n ")])]),e._v(" "),n("div",{},[n("button",{staticClass:"flex-no-shrink text-info py-2 px-4 rounded",on:{click:function(t){e.showLog=null}}},[e._v("\n "+e._s(e.__("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 "+e._s(e.__("Delete Log file"))+"\n ")]),e._v(" "),n("p",{staticClass:"text-80 leading-normal"},[e._v("\n "+e._s(e.__("Are you sure you want to delete this ':fileName' file?",{fileName:this.file}))+"\n ")])],1)]):e._e()],1)],1)],1)},staticRenderFns:[]}},function(e,t){}]); \ No newline at end of file diff --git a/resources/js/api.js b/resources/js/api.js index 07c742c..40618c6 100644 --- a/resources/js/api.js +++ b/resources/js/api.js @@ -1,20 +1,26 @@ export default { - getLogs(file = null,current_page = 1, search = null) { - - return Nova.request().get( search ? `/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}&page=${current_page}&search=${search}` : `/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}&page=${current_page}`) + getLogs(file = null, current_page = 1, search = null) { + return Nova.request() + .get( + search + ? `/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}&page=${current_page}&search=${search}` + : `/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}&page=${current_page}` + ) .then(response => response.data); }, - getDailyLogFiles(file = null,current_page = 1) { - return Nova.request().get(`/nova-vendor/KABBOUCHI/logs-tool/daily-log-files`) + getDailyLogFiles(file = null, current_page = 1) { + return Nova.request() + .get(`/nova-vendor/KABBOUCHI/logs-tool/daily-log-files`) .then(response => response.data); }, deleteFile(file) { - return Nova.request().delete(`/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}`) + return Nova.request() + .delete(`/nova-vendor/KABBOUCHI/logs-tool/logs?file=${file}`) .then(response => response.data); }, getLogsPermissions(file) { - return Nova.request().get(`/nova-vendor/KABBOUCHI/logs-tool/logs/permissions`) + return Nova.request() + .get(`/nova-vendor/KABBOUCHI/logs-tool/logs/permissions`) .then(response => response.data); - }, - -} \ No newline at end of file + } +}; diff --git a/resources/js/components/LogsTool.vue b/resources/js/components/LogsTool.vue index 1806e21..e511f6a 100644 --- a/resources/js/components/LogsTool.vue +++ b/resources/js/components/LogsTool.vue @@ -1,123 +1,105 @@ diff --git a/resources/js/components/icons/IconCritical.vue b/resources/js/components/icons/IconCritical.vue index 059c6b5..8218be8 100644 --- a/resources/js/components/icons/IconCritical.vue +++ b/resources/js/components/icons/IconCritical.vue @@ -1,4 +1,17 @@ \ No newline at end of file + + diff --git a/resources/js/components/icons/IconDebug.vue b/resources/js/components/icons/IconDebug.vue index 5b2d59d..65092fc 100644 --- a/resources/js/components/icons/IconDebug.vue +++ b/resources/js/components/icons/IconDebug.vue @@ -1,3 +1,18 @@ \ No newline at end of file + + diff --git a/resources/js/components/icons/IconEmergency.vue b/resources/js/components/icons/IconEmergency.vue index 7260060..e28e62d 100644 --- a/resources/js/components/icons/IconEmergency.vue +++ b/resources/js/components/icons/IconEmergency.vue @@ -1,3 +1,17 @@ \ No newline at end of file + + diff --git a/resources/js/components/icons/IconError.vue b/resources/js/components/icons/IconError.vue index 2d31d6e..fa348e8 100644 --- a/resources/js/components/icons/IconError.vue +++ b/resources/js/components/icons/IconError.vue @@ -1,6 +1,17 @@ \ No newline at end of file + diff --git a/resources/js/components/icons/IconInfo.vue b/resources/js/components/icons/IconInfo.vue index 3c5055d..d505415 100644 --- a/resources/js/components/icons/IconInfo.vue +++ b/resources/js/components/icons/IconInfo.vue @@ -1,7 +1,17 @@ \ No newline at end of file + diff --git a/resources/js/components/icons/IconNotice.vue b/resources/js/components/icons/IconNotice.vue index 77a3f76..2ff7222 100644 --- a/resources/js/components/icons/IconNotice.vue +++ b/resources/js/components/icons/IconNotice.vue @@ -1,3 +1,17 @@ \ No newline at end of file + + diff --git a/resources/js/components/icons/IconWarning.vue b/resources/js/components/icons/IconWarning.vue index 61ff7bf..27f4ad5 100644 --- a/resources/js/components/icons/IconWarning.vue +++ b/resources/js/components/icons/IconWarning.vue @@ -1,3 +1,17 @@ \ No newline at end of file + + diff --git a/resources/js/tool.js b/resources/js/tool.js index 5c82d03..2502e9f 100644 --- a/resources/js/tool.js +++ b/resources/js/tool.js @@ -3,7 +3,7 @@ Nova.booting((Vue, router) => { { name: 'LogsTool', path: '/logs', - component: require('./components/LogsTool.vue'), - }, - ]) -}) \ No newline at end of file + component: require('./components/LogsTool.vue') + } + ]); +});