Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/homebridge-config-ui-x/public/ drwxr-xr-x | |
| Viewing file: Select action/file-type: (self.webpackChunkui=self.webpackChunkui||[]).push([[471],{93471:function(t,n,e){"use strict";e.r(n),e.d(n,{LogsModule:function(){return w}});var o=e(38583),s=e(71271),i=e(63423),a=e(64762),r=e(79765),l=e(49457),c=e(81862),g=e(37716),u=e(92503),d=e(79274),h=e(76726),p=e(49344),m=e(95935);const f=["logoutput"];function b(t,n){if(1&t){const t=g.EpF();g.TgZ(0,"div",4),g.TgZ(1,"button",5),g.NdJ("click",function(){return g.CHM(t),g.oxw().downloadLogFile()}),g._UZ(2,"i",6),g.qZA(),g.TgZ(3,"button",7),g.NdJ("click",function(){return g.CHM(t),g.oxw().truncateLogFile()}),g._UZ(4,"i",8),g.qZA(),g.qZA()}}const _=[{path:"",component:(()=>{class t{constructor(t,n,e,o,s,i){this.$settings=t,this.$api=n,this.$log=e,this.$toastr=o,this.$translate=s,this.$modal=i,this.resizeEvent=new r.xQ}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget,{},this.resizeEvent)}onWindowResize(t){this.resizeEvent.next()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$log.destroyTerminal()}downloadLogFile(){const t=this.$modal.open(c.X);t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.message_download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("logs.label_download"),t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}).subscribe(t=>{(0,l.saveAs)(t.body,"homebridge.log.txt")},t=>(0,a.mG)(this,void 0,void 0,function*(){let n;try{n=JSON.parse(yield t.error.text()).message}catch(e){}this.$toastr.error(n||"Failed to download log file",this.$translate.instant("toast.title_error"))}))}).catch(()=>{})}truncateLogFile(){const t=this.$modal.open(c.X);t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.message_truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("logs.label_truncate"),t.result.then(()=>{this.$api.put("/platform-tools/hb-service/log/truncate",{}).subscribe(t=>{this.$toastr.success(this.$translate.instant("logs.message_log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()},t=>{this.$toastr.error(t.error.message||"Failed to truncate log file",this.$translate.instant("toast.title_error"))})}).catch(()=>{})}}return t.\u0275fac=function(n){return new(n||t)(g.Y36(u.g),g.Y36(d.s),g.Y36(h.$),g.Y36(p._W),g.Y36(m.sK),g.Y36(s.FF))},t.\u0275cmp=g.Xpm({type:t,selectors:[["app-logs"]],viewQuery:function(t,n){if(1&t&&g.Gf(f,7),2&t){let t;g.iGM(t=g.CRH())&&(n.termTarget=t.first)}},hostBindings:function(t,n){1&t&&g.NdJ("resize",function(t){return n.onWindowResize(t)},!1,g.Jf7)},decls:4,vars:1,consts:[["class","log-buttons",4,"ngIf"],[1,"flex-column","d-flex","align-items-stretch","h-100"],["id","log-output",1,"terminal","align-self-end","w-100","h-100","mb-1"],["logoutput",""],[1,"log-buttons"],[1,"btn","btn-primary",3,"click"],[1,"fas","fa-download"],[1,"btn","btn-danger",3,"click"],[1,"fas","fa-trash-alt"]],template:function(t,n){1&t&&(g.YNc(0,b,5,0,"div",0),g.TgZ(1,"div",1),g._UZ(2,"div",2,3),g.qZA()),2&t&&g.Q6J("ngIf",n.$settings.env.serviceMode)},directives:[o.O5],styles:[".log-buttons[_ngcontent-%COMP%]{position:fixed;top:80px;right:10px;z-index:1000}.log-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.4;transition:opacity .2s ease-in}@media (hover: hover){.log-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active, .log-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:1}}"]}),t})()}];let $=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=g.oAB({type:t}),t.\u0275inj=g.cJS({imports:[[i.Bz.forChild(_)],i.Bz]}),t})(),w=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=g.oAB({type:t}),t.\u0275inj=g.cJS({imports:[[o.ez,$,s.IJ]]}),t})()}}]); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0087 ]-- |