homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge
1 lines • 2.67 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{jaWL:function(n,t,o){"use strict";o.r(t);var e=o("8Y7J"),i=function(){},l=o("pMnS"),s=o("B4Mn"),r=o("Kj3r"),u=o("/POA"),c=o("R9As"),d=o("+WIb"),a=function(){function n(n){this.$ws=n,this.io=this.$ws.connectToNamespace("log"),this.term=new u.Terminal,this.fitAddon=new c.FitAddon,this.resize=new s.a,this.term.loadAddon(this.fitAddon)}return n.prototype.ngOnInit=function(){var n=this;window.document.querySelector("body").classList.add("bg-black"),this.termTarget=document.getElementById("log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.connected.subscribe((function(){n.io.socket.emit("tail-log",{cols:n.term.cols,rows:n.term.rows})})),this.io.socket.on("disconnect",(function(){n.term.write("Websocket failed to connect. Is the server running?\n\r\n\r")})),this.resize.pipe(Object(r.a)(500)).subscribe((function(t){n.io.socket.emit("resize",t)})),this.io.socket.on("stdout",(function(t){n.term.write(t)})),this.term.onResize((function(t){n.resize.next(t)}))},n.prototype.onWindowResize=function(n){this.fitAddon.fit()},n.prototype.ngOnDestroy=function(){window.document.querySelector("body").classList.remove("bg-black"),this.io.end(),this.term.dispose()},n}(),m=e["\u0275crt"]({encapsulation:2,styles:[],data:{}});function p(n){return e["\u0275vid"](0,[(n()(),e["\u0275eld"](0,0,null,null,1,"div",[["class","flex-column d-flex align-items-stretch h-100"]],null,null,null,null,null)),(n()(),e["\u0275eld"](1,0,null,null,0,"div",[["class","terminal align-self-end w-100 h-100 mb-1"],["id","log-output"]],null,null,null,null,null))],null,null)}var f=e["\u0275ccf"]("app-logs",a,(function(n){return e["\u0275vid"](0,[(n()(),e["\u0275eld"](0,0,null,null,1,"app-logs",[],null,[["window","resize"]],(function(n,t,o){var i=!0;return"window:resize"===t&&(i=!1!==e["\u0275nov"](n,1).onWindowResize(o)&&i),i}),p,m)),e["\u0275did"](1,245760,null,0,a,[d.a],null,null)],(function(n,t){n(t,1,0)}),null)}),{},{},[]),h=o("SVse"),w=o("iInd"),g=function(){};o.d(t,"LogsModuleNgFactory",(function(){return b}));var b=e["\u0275cmf"](i,[],(function(n){return e["\u0275mod"]([e["\u0275mpd"](512,e.ComponentFactoryResolver,e["\u0275CodegenComponentFactoryResolver"],[[8,[l.a,f]],[3,e.ComponentFactoryResolver],e.NgModuleRef]),e["\u0275mpd"](4608,h.NgLocalization,h.NgLocaleLocalization,[e.LOCALE_ID,[2,h["\u0275angular_packages_common_common_a"]]]),e["\u0275mpd"](1073742336,h.CommonModule,h.CommonModule,[]),e["\u0275mpd"](1073742336,w.p,w.p,[[2,w.u],[2,w.l]]),e["\u0275mpd"](1073742336,g,g,[]),e["\u0275mpd"](1073742336,i,i,[]),e["\u0275mpd"](1024,w.j,(function(){return[[{path:"",component:a}]]}),[])])}))}}]);