!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},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=0)}([function(e,t,n){"use strict";n.r(t);var o=function(e,t){var n=new a(e,t);return function(){return n.current()}};Object.defineProperty(o,"default",{value:o});var i=o;o.root=function(e){var t=m,n=0===e.length?y:new a(null,null),o=void 0,i=0===e.length?null:function(){null!==g?p.disposes.add(n):O(n)};return m=n,null===g?o=function(e,t,n){try{return null===t?e():e(t)}finally{m=n}}(e,i,t):(o=null===i?e():e(i),m=t),o},o.on=function(e,t,n,i){var l;return Array.isArray(e)&&(l=e,e=function(){for(var e=0;e0||p.updates.count>0)&&(p.time++,C(p))}finally{g=m=v=null}}(this):this.value=this.fn(this.value),n&&n!==y&&(null===n.owned?n.owned=[this]:n.owned.push(this)),m=n,v=o}}return e.prototype.current=function(){if(null!==v){if(this.age===p.time){if(this.state===h)throw new Error("circular dependency");N(this)}!function(e,t){null===e.log&&(e.log=new u);x(e.log,t)}(this,v)}return this.value},e.prototype.clock=function(){return r},e}(),u=function(){return function(){this.node1=null,this.node1slot=0,this.nodes=null,this.nodeslots=null}}(),c=function(){function e(){this.items=[],this.count=0}return e.prototype.reset=function(){this.count=0},e.prototype.add=function(e){this.items[this.count++]=e},e.prototype.run=function(e){for(var t=this.items,n=0;n0&&e.time++,e.changes.run(k),e.updates.run(N),e.disposes.run(O),n++>1e5)throw new Error("Runaway clock detected");g=t}function k(e){e.value=e.pending,e.pending=d,e.log&&_(e.log)}function _(e){var t=e.node1,n=e.nodes;if(null!==t&&w(t),null!==n)for(var o=0,i=n.length;oI(e,t(),i,o))}const $=new Set;function G(e){return e&&(e.model||G(e.host||e.parentNode))}function X(e){const t=`__${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const o=n[t];if(o){if(o(e,o.length>1?G(n):void 0),e.cancelBubble)return}n=n.host||n.parentNode}}function K(e,t,n,o,i){let l,r,s;const{afterRender:a,fallback:u}=o;i&&(l=i.previousSibling),E(function(){s&&s()}),M(o=>{const c=t();return c===o?o:P(()=>(e=i&&i.parentNode||e,s&&s(),null==c||!1===c?(R(e,r,i,l?l.nextSibling:e.firstChild),r=null,a&&a(r,i),u&&T(t=>{s=t,r=I(e,u(),r,i)}),c):(T(t=>{s=t,r=I(e,n(c),r,i)}),a&&a(r,i),c)))})}function Q(e,t,n,o){let i;for(;t!==n;)i=t.nextSibling,e.insertBefore(t,o),t=i}function U(e,t){let n;(n=e.get(t))&&n(),e.delete(t)}function V(e,t){let n=-1,o=e.length;if(o>0&&e[o-1]<=t)return o-1;for(;o-n>1;){let i=Math.floor((n+o)/2);e[i]>t?o=i:n=i}return n}function W(e,t,n,o,i){let l=new Map,r=!1,s=i?i.previousSibling:null;const{afterRender:a,fallback:u}=o;function c(t,o,i){return T(r=>{const s=D(e,n(t,o),i,++B);return l.set(s,r),s})}function d(){a&&a(s?s.nextSibling:e.firstChild,i)}E(function(){for(let e of l.keys())l.get(e)();l.clear()}),M((n=[])=>{const o=t()||[];return P(()=>{e=i&&i.parentNode||e;const t=o.length;if(r){if(void 0!==s||void 0!==i){let t=null!=s?s.nextSibling:e.firstChild;q(e,t,void 0===i?null:i)}else e.textContent="";for(let e of l.keys())l.get(e)();l.clear(),r=!1}if(0===t){if(void 0!==s||void 0!==i){let t=null!=s?s.nextSibling:e.firstChild;q(e,t,void 0===i?null:i)}else e.textContent="";for(let e of l.keys())l.get(e)();return l.clear(),d(),u&&(r=!0,T(t=>{const n=D(e,u(),i,++B);l.set(n,t)})),[]}if(0===n.length){let e=new Array(t);for(let n=0;n=0;e=l[e],i--)n[i]=e;return n}(C,h),A=[];let j,O=m,M=N.length-1;for(let e=b;e<=g;e++)A[e]=O,O=F(O,z);for(let t=0;t=h;t--)N[M]===t?(S=A[C[N[M]]],M--):(-1===C[t]?j=c(o[t],t,S):(j=A[C[t]],Q(e,j,F(j,z),S)),S=j);return d(),o.slice(0)})})}const Y=Symbol("solid-node"),Z=Symbol("solid-proxy");function ee(e){return e[Z]||(e[Z]=new Proxy(e,ie))}function te(e){return null!==e&&"object"==typeof e&&(e.__proto__===Object.prototype||Array.isArray(e))}function ne(e){let t,n,o;if(t=null!=e&&e._state)return t;if(!te(e))return e;if(Array.isArray(e)){Object.isFrozen(e)&&(e=e.slice(0));for(let t=0,i=e.length;t!0,deleteProperty:()=>!0};function le(e,t,n){if(n=ne(n),e[t]===n)return;const o=Array.isArray(e)||!(t in e);void 0===n?delete e[t]:e[t]=n;let i,l=oe(e);(i=l[t])&&i.next(),o&&(i=l._self)&&i.next()}function re(e,t){const n=Object.keys(t);for(let o=0;o{if(!t(e,o)){const t=n.clock().time();if(t===i)throw new Error(`Conflicting value update: ${o} is not the same as ${e}`);i=t,e=o,n.next(o)}})}else o=n.next.bind(n);return[n.current.bind(n),o]}const{root:ue,cleanup:ce,sample:de,freeze:fe}=i,be=document.createElement("template"),he=document.createElement("template"),pe=document.createElement("template"),ge=document.createElement("template"),ve=document.createElement("template"),me=document.createElement("template"),ye=document.createElement("template");function xe(e){const[t,n]=function(e){return[ee(e=ne(e||{})),function(){const t=arguments;i.freeze(()=>{if(Array.isArray(t[0]))for(let n=0;nlocalStorage.odoodockerssh=JSON.stringify(t)),l?i.on(l,o,void 0,r):i.makeComputationNode(o),[t,n]}be.innerHTML="

🛠 Configuration\x3c!--5--\x3e\x3c!--6--\x3e

",he.innerHTML="

📙 Bases de donnĂ©es

Merci de renseigner toutes les bases de votre domaine ici. Pour effectuer une installation ou mise à jour de module, sélectionnez les bases sur lesquelles agir.

    ",pe.innerHTML="
  • ",ge.innerHTML="

    đŸš© Actions

    ",ve.innerHTML="

    🗄 Modules

    Bases sélectionnées : \x3c!--73--\x3e

    ",me.innerHTML="

    đŸ–„ Retour serveur

    ",ye.innerHTML="

    Odoo Docker SSH Admin

    \x3c!--98--\x3e\x3c!--99--\x3e\x3c!--100--\x3e\x3c!--101--\x3e\x3c!--102--\x3e";const Se={address:"",port:"",username:"",key:"",database:"",databases:[],modules:"",serverlog:"",connected:!1,stop:!1},[Ce,ke]=ae(!1),_e=()=>{const[e,t]=xe(Se),n=({target:e})=>t(e.name,e.value),o=n=>{if(n.preventDefault(),e.database){let n={name:e.database,checked:!1};t(["databases",[...e.databases,n]],["database",""])}},i=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!e.checked})))},l=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!0})))},r=()=>{let n=e.databases.map(e=>Object.assign({},e));t("databases",n.map(e=>Object.assign(e,{checked:!1})))};return function(){const s=he.content.firstChild.cloneNode(!0),a=s.firstChild.nextSibling.nextSibling,u=a.firstChild.firstChild,c=u.nextSibling,d=c.nextSibling,f=d.nextSibling,b=a.nextSibling.firstChild.firstChild.firstChild.firstChild,h=b.firstChild,p=b.nextSibling.firstChild;return u.__click=i,c.__click=l,d.__click=r,W(f,()=>e.databases,(n,o)=>(function(){const o=pe.content.firstChild.cloneNode(!0),i=o.firstChild,l=i.nextSibling,r=l.nextSibling;return i.__click=(e=>(({target:{checked:e}},n)=>{t("databases",e=>e.name===n,{name:n,checked:e})})(e,n.name)),M(()=>i.checked=n.checked),J(l,()=>n.name),r.__click=(()=>(n=>{t("databases",e.databases.filter(e=>e.name!==n))})(n.name)),o})(),{}),h.__input=n,M(()=>h.value=e.database),p.__click=o,M(()=>p.disabled=!e.database),s}()},we=()=>{const[e,t]=ae("configuration"),n=t=>e()===t?"active":"";return function(){const o=ye.content.cloneNode(!0),i=o.firstChild.nextSibling,l=i.firstChild,r=l.nextSibling,s=r.nextSibling,a=s.nextSibling,u=a.nextSibling,c=i.nextSibling,d=c.nextSibling,f=d.nextSibling,b=f.nextSibling,h=b.nextSibling;return l.__click=(()=>t("configuration")),M(()=>l.className=n("configuration")),r.__click=(()=>t("actions")),M(()=>r.className=n("actions")),s.__click=(()=>t("databases")),M(()=>s.className=n("databases")),a.__click=(()=>t("modules")),M(()=>a.className=n("modules")),u.__click=(()=>t("serverlog")),M(()=>u.className=n("serverlog")),K(o,()=>"configuration"===e(),()=>(()=>{const[e,t]=xe(Se),[n,o]=ae(""),i=({target:e})=>t(e.name,e.value);e.address&&e.username&&e.key&&e.port;const l=()=>{fetch("/connect",{method:"POST",body:JSON.stringify({address:e.address,port:e.port,username:e.username,key:e.key,password:n()}),headers:{"Content-Type":"application/json"}}).then(e=>(ke(200==e.status),e.json())).then(e=>humane.log(e))},r=()=>{fetch("/disconnect").then(e=>(ke(!(200==e.status)),e.json())).then(e=>humane.log(e))};return function(){const t=be.content.firstChild.cloneNode(!0),s=t.firstChild,a=s.firstChild.nextSibling,u=a.firstChild,c=u.nextSibling,d=s.nextSibling.firstChild,f=d.firstChild,b=f.firstChild.nextSibling,h=b.nextSibling.nextSibling,p=f.nextSibling,g=p.firstChild.nextSibling,v=p.nextSibling.firstChild.nextSibling,m=v.nextSibling.nextSibling,y=d.nextSibling,x=y.nextSibling;return K(a,()=>Ce(),()=>"đŸ””",{},u),K(a,()=>!Ce(),()=>"🔮",{},c),b.onchange=i,M(()=>b.value=e.address),h.onchange=i,M(()=>h.value=e.port),g.onchange=i,M(()=>g.value=e.username),v.onchange=i,M(()=>v.value=e.key),m.__input=(({target:e})=>o(e.value)),M(()=>m.value=n()),y.__click=l,x.__click=r,t}()})(),{},c),K(o,()=>"databases"===e(),()=>_e(),{},d),K(o,()=>"modules"===e(),()=>(()=>{const[e,t]=xe(Se),n=({target:e})=>t(e.name,e.value),o=n=>()=>{Ce()?(humane.log("Commande lancĂ©e, veuillez patienter."),fetch("/odooaction",{method:"POST",body:JSON.stringify({stop:e.stop,databases:e.databases.filter(e=>e.checked).map(e=>e.name),modules:e.modules,action:n}),headers:{"Content-Type":"application/json"}}).then(e=>(200!=e.status&&humane.log("Erreur : voyez le retour serveur"),e.json())).then(n=>{humane.log("Commande terminĂ©e."),t("serverlog",e.serverlog+n)})):humane.log("Non connectĂ© : impossible de lancer une commande Odoo.")};return function(){const i=ve.content.firstChild.cloneNode(!0),l=i.firstChild.nextSibling.firstChild,r=l.firstChild.nextSibling,s=l.nextSibling,a=s.firstChild,u=a.firstChild.nextSibling,c=a.nextSibling.firstChild.nextSibling,d=s.nextSibling,f=d.nextSibling;return J(l,(e=>{let t=e.filter(e=>e.checked).map(e=>e.name);return t.length?t.join(", "):"Aucune base sĂ©lectionnĂ©e"})(e.databases),null,r),u.__input=n,M(()=>u.value=e.modules),c.onchange=(e=>t("stop",e.target.checked)),M(()=>c.checked=e.stop),d.__click=o("install"),f.__click=o("update"),i}()})(),{},f),K(o,()=>"actions"===e(),()=>(()=>{const[e,t]=xe(Se),n=n=>()=>{Ce()?(humane.log("Commande lancĂ©e, veuillez patienter."),fetch("/cmd/"+n).then(e=>e.json()).then(n=>{humane.log("Commande terminĂ©e."),t("serverlog",e.serverlog+n)})):humane.log("Non connectĂ© : impossible de lancer une commande.")},o=n("webstart"),i=n("webstop"),l=n("webrestart"),r=n("odoostart"),s=n("odoostop"),a=n("odoorestart"),u=n("dbstart"),c=n("dbstop"),d=n("dbrestart");return function(){const e=ge.content.firstChild.cloneNode(!0),t=e.firstChild.nextSibling,n=t.firstChild,f=n.firstChild,b=n.nextSibling,h=b.firstChild,p=b.nextSibling.firstChild,g=t.nextSibling,v=g.firstChild,m=v.firstChild,y=v.nextSibling,x=y.firstChild,S=y.nextSibling.firstChild,C=g.nextSibling.firstChild,k=C.firstChild,_=C.nextSibling,w=_.firstChild,N=_.nextSibling.firstChild;return f.__click=r,h.__click=s,p.__click=a,m.__click=o,x.__click=i,S.__click=l,k.__click=u,w.__click=c,N.__click=d,e}()})(),{},b),K(o,()=>"serverlog"===e(),()=>(()=>{const[e,t]=xe(Se),n=()=>t("serverlog","");return function(){const t=me.content.firstChild.cloneNode(!0),o=t.firstChild.nextSibling.firstChild,i=o.firstChild,l=o.nextSibling.firstChild;return J(i,()=>e.serverlog),l.__click=n,t}()})(),{},h),o}()};ue(()=>document.body.appendChild(we())),function(e){for(let t=0,n=e.length;t