@duplicati/ngclient 0.0.201 → 0.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/sh.woff2 +0 -0
- package/{chunk-NEC5ZCCT.js → chunk-2BXGPMD6.js} +1 -1
- package/chunk-2Y2B4SFQ.js +1 -0
- package/{chunk-YDE34GTN.js → chunk-3QV6WLWV.js} +1 -1
- package/{chunk-V7OCP4NF.js → chunk-5REQ64AK.js} +1 -1
- package/{chunk-HETNGT36.js → chunk-7DCQVM6E.js} +1 -1
- package/{chunk-4GYWPC2V.js → chunk-7OT4OWQG.js} +1 -1
- package/chunk-7SNTP57H.js +1 -0
- package/chunk-BFTGDQ4K.js +1 -0
- package/{chunk-UK6PJVXG.js → chunk-C25WT56X.js} +1 -1
- package/chunk-C64L6XY3.js +1 -0
- package/{chunk-WNG24347.js → chunk-C7N24TZM.js} +1 -1
- package/{chunk-56MQ46JU.js → chunk-DJEDUAEJ.js} +1 -1
- package/{chunk-C5RNVTX6.js → chunk-DUYRB53D.js} +1 -1
- package/{chunk-F5SNXI4Q.js → chunk-EE27B3OV.js} +1 -1
- package/{chunk-ZMSYEF6G.js → chunk-GRVTXORM.js} +1 -1
- package/chunk-HRHF3TYJ.js +1 -0
- package/{chunk-XHIPGS6J.js → chunk-IGYSPFE7.js} +1 -1
- package/{chunk-MI7UAY44.js → chunk-JRLBD7M4.js} +1 -1
- package/chunk-K6G7ALTG.js +1 -0
- package/{chunk-JZRRR52Q.js → chunk-NDRKUUWC.js} +1 -1
- package/{chunk-POPZ47SS.js → chunk-OL7C46LY.js} +1 -1
- package/chunk-P3D2ZP6W.js +11 -0
- package/{chunk-44X4A7WY.js → chunk-PMRQJTYP.js} +1 -1
- package/{chunk-AMTYI2HA.js → chunk-Q2UQ5J3C.js} +1 -1
- package/{chunk-NQAH5AL7.js → chunk-QBBHHRS4.js} +1 -1
- package/{chunk-VIXVL2MX.js → chunk-S53N5WRU.js} +1 -1
- package/chunk-SXUG3CGT.js +1 -0
- package/{chunk-FRPWQ4C3.js → chunk-T4BXBCQI.js} +1 -1
- package/{chunk-ZESQ7CXK.js → chunk-TKB2SB6D.js} +1 -1
- package/{chunk-O64YAUSG.js → chunk-TX7JDBPD.js} +1 -1
- package/chunk-W3YBKYPJ.js +1 -0
- package/{chunk-BAGYEJI6.js → chunk-W67KMV7H.js} +1 -1
- package/{chunk-LODLMHG5.js → chunk-XLMLR5EV.js} +1 -1
- package/{chunk-XZH2SXWG.js → chunk-XS4CJ2AE.js} +1 -1
- package/index.html +1 -1
- package/{main-CMOWV2QF.js → main-MW67CCYR.js} +1 -1
- package/package.json +1 -1
- package/chunk-3TJKPVBA.js +0 -1
- package/chunk-4AQZL2UM.js +0 -1
- package/chunk-LPAIFT5I.js +0 -11
- package/chunk-MUFBZIQA.js +0 -1
- package/chunk-P7OUKLCO.js +0 -1
- package/chunk-PE34XFKC.js +0 -1
- package/chunk-SQNRZYPW.js +0 -1
- package/chunk-VLC2XPEM.js +0 -1
- package/chunk-VVQRXJRI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as j}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as m,C as N,G as w,L as z,u as O}from"./chunk-UNMDSCAN.js";import{c as H}from"./chunk-CFNARBNK.js";import{e as g}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as o,Bb as r,Pa as s,Pb as E,Qb as S,Rb as a,Sb as v,Tb as B,W as T,Xb as u,cb as A,ib as D,jc as p,mc as J,pb as G,qb as k,sb as R,tb as d,ub as y,wb as b,xb as x,xc as C,yb as l,yc as X,zb as n}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var q=()=>[N,m,O,g],V=()=>["/restore-from-files"],K=()=>["/restore/from-config"],Q=t=>["/restore",t];function U(t,i){if(t&1&&(n(0,"sh-card",10),r(1,"img",15),n(2,"div",12)(3,"h3"),a(4,7),o(),n(5,"p"),p(6),o()(),n(7,"button",13),E(8,8),r(9,"sh-icon"),S(),o()()),t&2){let e=i.$implicit;l("routerLink",X(4,Q,e.Backup.ID)),s(4),v(e.Backup.Name??"Backup name missing"),B(4),s(2),J(" ",(e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," ")}}function Y(t,i){if(t&1&&b(0,U,10,6,"sh-card",10,y),t&2){let e=u(2);x(e.backups())}}function Z(t,i){if(t&1&&R(0,Y,2,0),t&2){let e=u();d(e.backups().length?0:-1)}}function ee(t,i){t&1&&(n(0,"div",16),r(1,"sh-progress-bar",17),n(2,"div",12)(3,"h3"),a(4,9),o()()())}function te(t,i){t&1&&(n(0,"sh-divider"),p(1,"Or without a local configuration"),o())}var P=class t{#e=T(j);#t=T(H);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(i){this.#t.postApiV1BackupByIdRestore({id:i.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let c;c=$localize`Point to your backup files and restore from there.`;let f;f=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restore from configuration`;let M;M=$localize`Load destination from an exported job`;let h;h=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let L;return L=$localize`Loading backups...`,[i,e,c,f,F,M,h,I,$,L,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton",""],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,c){e&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),o(),D(4,Z,1,1)(5,ee,5,0),G(6,4,q,null,5),R(8,te,2,0,"sh-divider"),n(9,"sh-card",10),r(10,"img",11),n(11,"div",12)(12,"h3"),a(13,1),o(),n(14,"p"),a(15,2),o()(),n(16,"button",13),E(17,3),r(18,"sh-icon"),S(),o()(),n(19,"sh-card",10),r(20,"img",14),n(21,"div",12)(22,"h3"),a(23,4),o(),n(24,"p"),a(25,5),o()(),n(26,"button",13),E(27,6),r(28,"sh-icon"),S(),o()()()),e&2&&(s(6),k(!c.backupsLoading()),s(2),d(c.backups().length?8:-1),s(),l("routerLink",C(4,V)),s(10),l("routerLink",C(5,K)))},dependencies:[W,N,m,w,O,z,g],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as $t}from"./chunk-MZ5COKIP.js";import{a as At}from"./chunk-F5SNXI4Q.js";import"./chunk-Q74O3CWJ.js";import{a as yt}from"./chunk-AODNZLCK.js";import"./chunk-3TJKPVBA.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ee}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as ae}from"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import{a as x}from"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import{a as Ft}from"./chunk-HUZXJWCG.js";import{a as Et,c as ut}from"./chunk-7TWUW4XJ.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,u as w,w as Y,z as Nt}from"./chunk-UNMDSCAN.js";import{c as Gt}from"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as E,Ab as o,Bb as m,E as F,Ib as P,Ma as _t,Mc as v,Pa as l,Pb as O,Qb as h,Rb as _,Sb as V,Sc as gt,Tb as U,Ub as B,Vb as d,W as R,Xb as S,a as st,aa as u,b as at,c as lt,cb as b,cc as ct,dc as dt,gc as I,hb as oe,ib as rt,jc as $,kc as H,la as c,lc as se,na as k,oc as A,pb as Tt,pc as y,qb as St,qc as L,sb as C,tb as g,uc as Ct,xc as J,yb as N,zb as s}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-XZH2SXWG.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loader",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loader",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loader",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loader",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loader",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
1
|
+
import{a as $t}from"./chunk-MZ5COKIP.js";import{a as At}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{a as yt}from"./chunk-AODNZLCK.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ee}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as ae}from"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import{a as x}from"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import{a as Ft}from"./chunk-HUZXJWCG.js";import{a as Et,c as ut}from"./chunk-7TWUW4XJ.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,u as w,w as Y,z as Nt}from"./chunk-UNMDSCAN.js";import{c as Gt}from"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as E,Ab as o,Bb as m,E as F,Ib as P,Ma as _t,Mc as v,Pa as l,Pb as O,Qb as h,Rb as _,Sb as V,Sc as gt,Tb as U,Ub as B,Vb as d,W as R,Xb as S,a as st,aa as u,b as at,c as lt,cb as b,cc as ct,dc as dt,gc as I,hb as oe,ib as rt,jc as $,kc as H,la as c,lc as se,na as k,oc as A,pb as Tt,pc as y,qb as St,qc as L,sb as C,tb as g,uc as Ct,xc as J,yb as N,zb as s}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-XS4CJ2AE.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loader",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loader",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loader",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loader",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loader",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
2
2
|
registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=c($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(F(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updatingConsoleControl=c(!1);consoleControlDisabled=c(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;updateRemoteAccess(){let e=!this.allowRemoteAccess();this.allowRemoteAccess.set(e),this.#t.setRemoteAccessInterface(e?"any":"loopback").pipe(F(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(F(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(){let e=!this.consoleControlDisabled();this.updatingConsoleControl.set(!0),this.#t.setDisableConsoleControl(e).pipe(F(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=!this.disableTrayIconLogin();this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(F(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=c(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(e).pipe(F(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(F(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(yt);powerModeOptions=v(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=c(wt);timeTypeOptions=c(On);timeType=c("none");timeValue=Mn(0,300);timeRange=v(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),i=e==="none"||t===0?"":`${t}${e}`;i!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(i).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],i=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(i)?i:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(ae,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(ae,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#S(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let i=t[e].trim();if(i.startsWith("default-client="))return i.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-settings"]],decls:128,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let i;i=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let p;p=$localize`Language`;let M;M=$localize`Select a language for the platform`;let G;G=$localize`Use legacy interface`;let _e;_e=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let re;re=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=B(z);let Te;Te=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ce;ce=$localize`Allow remote access`;let de;de=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ee;Ee=$localize`Update channel`;let ue;ue=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let pe;pe=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Stable`;let me;me=$localize`Official stable release.`;let fe;fe=$localize`Beta`;let Ie;Ie=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Me;Me=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Re;Re=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Fe;Fe=$localize`Advanced options`;let $e;$e=$localize`Connect to console`;let Ae;Ae=$localize`Configure console control`;let ye;ye=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Le;Le=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ve;ve=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize`Toggle console connection status`;let xe;xe=$localize`Toggle the visibility of the console connection status indicator.`;let ke;ke=$localize`Console connection status is hidden`;let Je;Je=$localize`Console connection status is visible`;let Xe;Xe=$localize`Enter new password`;let ze;ze=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let Ve;Ve=$localize`Passphrase`;let Ue;Ue=$localize`Repeat passphrase`;let Be;Be=$localize`Cancel`;let He;He=$localize` Update passphrase `;let We;We=$localize` Update passphrase `;let qe;qe=$localize`Change password`;let je;je=$localize`Allowed hostnames`;let Ke;Ke=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Qe;Qe=$localize` Update allowed hostnames `;let Ye;Ye=$localize`Power mode provider`;let Ze;Ze=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let et;et=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tt;tt=$localize`Usage statistics`;let nt;nt=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let it;it=$localize`public usage statistics.`;let ot;return ot=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,[t,e,i,a,T,f,p,M,G,_e,re,z,Te,Se,ce,de,Ce,ge,Ee,ue,pe,Ne,me,fe,Ie,Pe,Me,Oe,he,Re,Ge,Fe,$e,Ae,ye,Le,ve,be,we,De,xe,ke,Je,Ve,Ue,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,nt,it,ot,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ze,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ie,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,i){if(e&1&&(m(0,"app-status-bar"),s(1,"div",59)(2,"header")(3,"div",60)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,ln,10,2),s(9,"section")(10,"div",61)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",62)(16,"div",63)(17,"img",64),d("click",function(){return i.setLightMode()}),o(),s(18,"img",65),d("click",function(){return i.setDarkMode()}),o()()()(),s(19,"section")(20,"div",61)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",66),C(26,cn,15,7)(27,Cn,4,1,"div",67),o()(),s(28,"section")(29,"div",61)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",62)(35,"sh-select",68)(36,"input",69),d("ngModelChange",function(T){return i.updateLocale(T)}),o()()()(),s(37,"section")(38,"div",61)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",70)(44,"button",71),d("click",function(){return i.openLegacyUI()}),O(45,10),m(46,"sh-icon"),h(),o(),s(47,"button",71),d("click",function(){return i.changeDefaultClientTo(i.defaultClient()==="ngclient"?"ngax":"ngclient")}),O(48,11),m(49,"sh-icon"),C(50,gn,2,0,"span")(51,En,2,0,"span"),h(),o()()(),s(52,"section")(53,"div",61)(54,"h3"),_(55,12),o(),s(56,"p"),_(57,13),o()(),s(58,"div",72)(59,"sh-toggle",73),d("click",function(){return i.updateRemoteAccess()}),s(60,"label"),_(61,14),o()(),C(62,un,8,3),o()(),s(63,"section")(64,"div",61)(65,"h3"),_(66,15),o(),s(67,"p"),_(68,16),o()(),s(69,"div",62)(70,"sh-toggle",73),d("click",function(){return i.saveDisableTrayIconLogin()}),s(71,"label"),_(72,17),o()()()(),C(73,pn,9,5,"section"),s(74,"section")(75,"div",61)(76,"h3"),_(77,18),o(),C(78,Nn,2,1,"p"),C(79,mn,1,0,"sh-progress-bar",74),o(),s(80,"div",75)(81,"div",76),d("click",function(){return i.setNewChannel("")}),s(82,"sh-radio",77),_(83,19),o(),s(84,"p"),_(85,20),o()(),s(86,"div",76),d("click",function(){return i.setNewChannel("stable")}),s(87,"sh-radio",77),_(88,21),o(),s(89,"p"),_(90,22),o()(),s(91,"div",76),d("click",function(){return i.setNewChannel("beta")}),s(92,"sh-radio",77),_(93,23),o(),s(94,"p"),_(95,24),o()(),s(96,"div",76),d("click",function(){return i.setNewChannel("experimental")}),s(97,"sh-radio",77),_(98,25),o(),s(99,"p"),_(100,26),o()(),s(101,"div",76),d("click",function(){return i.setNewChannel("canary")}),s(102,"sh-radio",77),_(103,27),o(),s(104,"p"),_(105,28),o()()()(),s(106,"section")(107,"div",61)(108,"h3"),_(109,29),o(),s(110,"p"),_(111,30),o()(),s(112,"div",62)(113,"div",78)(114,"sh-range-slider",79)(115,"input",80),L("ngModelChange",function(T){return y(i.timeValue,T)||(i.timeValue=T),T}),d("ngModelChange",function(T){return i.updateTimeValue(T)}),o()(),s(116,"sh-select",81)(117,"input",82),d("ngModelChange",function(T){return i.updateTimeType(T)}),o(),oe(118,fn,1,1,"ng-template"),o()()()(),C(119,Pn,17,5,"section"),o(),m(120,"sh-divider"),s(121,"div",59)(122,"section")(123,"div",83)(124,"h3"),_(125,31),o(),m(126,"app-advanced-options-settings"),o()()(),m(127,"sh-divider")),e&2){let a,T,f;l(8),g(i.isUsingRelay()?-1:8),l(9),I("active",!i.isDarkMode()),l(),I("active",i.isDarkMode()),l(8),g(i.showPassphraseForm()?26:27),l(9),N("options",i.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),N("ngModel",i.langCtrl())("ngModelOptions",J(42,ne)),l(14),g(i.defaultClient()==="ngax"?50:51),l(9),I("active",i.allowRemoteAccess()),l(3),g(i.allowRemoteAccess()?62:-1),l(8),I("active",i.disableTrayIconLogin()),l(3),g(i.powerModeOptions().length>0?73:-1),l(5),g((a=i.sysinfo())!=null&&a.ServerVersion?78:-1),l(),g(i.updatingChannel()?79:-1),l(3),I("active",i.updateChannel()===""),l(),V((T=i.sysinfo())==null?null:T.DefaultUpdateChannel),U(83),l(2),V((f=i.sysinfo())==null?null:f.ServerVersionType),U(85),l(2),I("active",i.updateChannel()==="stable"),l(5),I("active",i.updateChannel()==="beta"),l(5),I("active",i.updateChannel()==="experimental"),l(5),I("active",i.updateChannel()==="canary"),l(12),N("unit",i.timeType()==="none"?"s":i.timeType()),l(),N("min",i.timeRange()[0])("max",i.timeRange()[1])("disabled",i.timeType()==="none"),A("ngModel",i.timeValue),N("ngModelOptions",J(43,ne)),l(),N("options",i.timeTypeOptions())("isClearable",!1),l(),N("ngModel",i.timeType()),l(2),g(i.usageStatisticsDisabled()?-1:119)}},dependencies:[K,W,pt,q,j,Q,At,te,X,D,Pt,Mt,It,ht,Rt,Z,w,ft,Y,Ot],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{Mn as debounceSignal,le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as cn}from"./chunk-F5SNXI4Q.js";import"./chunk-Q74O3CWJ.js";import{b as ee,k as rn}from"./chunk-IMHM7ISI.js";import{b as an}from"./chunk-3TJKPVBA.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as _n}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ln}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import{a as on}from"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{A as je,B as Z,C as We,E as qe,G as Qe,K as Ye,L as Ze,S as en,T as nn,u as Y}from"./chunk-UNMDSCAN.js";import{c as tn}from"./chunk-CFNARBNK.js";import{e as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as N,Ab as i,Bb as C,Cc as P,Dc as G,E as j,Ec as h,Fb as O,Gb as m,Gc as q,Hb as f,Ib as A,Ma as J,Pa as a,Pb as c,Qb as s,Rb as T,Sb as L,Tb as H,Ub as W,Vb as D,W as x,Xb as r,aa as M,cb as Xe,ec as U,gc as R,hb as I,ib as Je,jc as u,la as X,lc as S,na as ve,oc as Ve,pb as we,pc as Ue,qb as ze,qc as Ke,sb as g,tb as p,ub as w,wb as z,xb as V,xc as K,yb as E,yc as $,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var un=()=>[Q,import("./chunk-ZWLAV6HO.js").then(e=>e.NgTemplateOutlet),Z,Y,qe,nn,en,import("./chunk-UNLX3IVU.js").then(e=>e.DurationFormatPipe),import("./chunk-G4IFZKMI.js").then(e=>e.BytesPipe),import("./chunk-XIYAYCFU.js").then(e=>e.RelativeTimePipe)],Fn=()=>["/add-backup"],Cn=()=>["/restore"],sn=e=>({$implicit:e}),Tn=()=>["/backup/new"],En=e=>["/backup",e],dn=e=>["/restore",e],gn=e=>["/backup",e,"export"],pn=e=>["/backup",e,"delete"],Sn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],mn=e=>["/backup",e,"log"];function Nn(e,t){e&1&&T(0,11,1)}function Mn(e,t){e&1&&T(0,11,2)}function In(e,t){if(e&1&&T(0,11,3),e&2){let n=r(2);L(n.timeType()),H(0)}}function Pn(e,t){if(e&1){let n=A();o(0,"button",56),D("click",function(){let F=N(n).$implicit,d=r(3);return M(d.sortByColumn.set(F.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function fn(e,t){if(e&1&&(o(0,"sh-menu",57)(1,"button",58),c(2,14),C(3,"strong")(4,"sh-icon"),s(),i(),O(5,59),z(6,Pn,2,3,"button",60,w),m(),i()),e&2){let n=r(2);a(4),L(n.orderBy()),H(2),a(2),V(n.sortOrderOptions())}}function Dn(e,t){if(e&1){let n=A();o(0,"div",54)(1,"sh-button-group",55)(2,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("list"))}),c(3,9),C(4,"sh-icon"),s(),i(),o(5,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("details"))}),c(6,10),C(7,"sh-icon"),s(),i()(),o(8,"sh-menu",57)(9,"button",58),c(10,11),o(11,"strong"),g(12,Nn,1,0)(13,Mn,1,0)(14,In,1,1),i(),C(15,"sh-icon"),s(),i(),O(16,59),o(17,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("relative"))}),T(18,12),i(),o(19,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("actual"))}),T(20,13),i(),m(),i(),g(21,fn,8,1,"sh-menu",57),i()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function $n(e,t){if(e&1){let n=A();o(0,"div",65)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()()(),o(7,"div",68)(8,"sh-chip",69),T(9,16),i()(),o(10,"div",54)(11,"button",70),D("click",function(){N(n);let F=r().$implicit,d=r(4);return M(d.openInConsole(F))}),c(12,17),C(13,"sh-icon"),s(),i()()()}if(e&2){let n=r().$implicit,_=r(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," ")}}function Rn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),u(3),P(4,"relativeTime"),i()),e&2){let n=r(2).$implicit,_=r(4);a(3),S(" ",h(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function hn(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r(2).$implicit,_=r(4);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function An(e,t){e&1&&(O(0),u(1,"-"),m())}function Ln(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Hn(e,t){e&1&&(O(0),u(1,"-"),m())}function xn(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Gn(e,t){e&1&&(O(0),u(1,"-"),m())}function kn(e,t){e&1&&(o(0,"sh-chip",69),T(1,24),i())}function yn(e,t){e&1&&f(0)}function Bn(e,t){if(e&1&&(o(0,"div",66)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()(),o(7,"p")(8,"span"),T(9,18),i(),u(10),P(11,"relativeTime"),i(),g(12,Rn,5,4,"p"),o(13,"p")(14,"span"),T(15,19),i(),g(16,hn,2,4)(17,An,2,0,"ng-container"),i(),o(18,"p")(19,"span"),T(20,20),i(),g(21,Ln,2,3)(22,Hn,2,0,"ng-container"),i(),o(23,"p")(24,"span"),T(25,21),i(),g(26,xn,2,3)(27,Gn,2,0,"ng-container"),i()(),o(28,"div",68)(29,"sh-chip",71),T(30,22),i(),g(31,kn,2,0,"sh-chip",69),i(),o(32,"div",54),I(33,yn,1,0,"ng-container",72),i()()),e&2){let n=r().$implicit,_=r(4),F=U(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",h(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(16,sn,n))}}function bn(e,t){if(e&1&&g(0,$n,14,3,"div",65)(1,Bn,34,18,"div",66),e&2){let n=t.$implicit;p(n.Backup.ExternalID?0:1)}}function vn(e,t){if(e&1&&z(0,bn,2,1,null,null,w),e&2){let n=r(3);V(n.backups())}}function Xn(e,t){e&1&&(o(0,"div",64),c(1,25),o(2,"button",73),C(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),E("routerLink",K(1,Tn)))}function Jn(e,t){if(e&1&&(o(0,"div",63),g(1,vn,2,0)(2,Xn,4,2,"div",64),i()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function wn(e,t){e&1&&(c(0,26,1),f(1),s())}function zn(e,t){e&1&&(c(0,27,1),f(1),s())}function Vn(e,t){e&1&&(c(0,28,1),f(1),s())}function Un(e,t){e&1&&(c(0,29,1),f(1),s())}function Kn(e,t){e&1&&(c(0,30,1),f(1),s())}function jn(e,t){e&1&&(c(0,31,1),f(1),s())}function Wn(e,t){e&1&&(c(0,32,1),f(1),s())}function qn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Qn(e,t){e&1&&(O(0),u(1,"-"),m())}function Yn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Zn(e,t){e&1&&(O(0),u(1,"-"),m())}function et(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function nt(e,t){e&1&&(O(0),u(1,"-"),m())}function tt(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function it(e,t){e&1&&(O(0),u(1,"-"),m())}function ot(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function _t(e,t){e&1&&(O(0),u(1,"-"),m())}function at(e,t){e&1&&f(0)}function lt(e,t){if(e&1&&(o(0,"tr")(1,"td"),u(2),i(),o(3,"td")(4,"sh-chip",84),C(5,"img",67),u(6),i()(),o(7,"td"),g(8,qn,2,4)(9,Qn,2,0,"ng-container"),i(),o(10,"td"),g(11,Yn,2,4)(12,Zn,2,0,"ng-container"),i(),o(13,"td"),g(14,et,2,4)(15,nt,2,0,"ng-container"),i(),o(16,"td"),g(17,tt,2,3)(18,it,2,0,"ng-container"),i(),o(19,"td"),g(20,ot,2,3)(21,_t,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),I(26,at,1,0,"ng-container",72),i()()),e&2){let n=t.$implicit,_=r(3),F=U(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(12,sn,n))}}function rt(e,t){if(e&1){let n=A();o(0,"sh-table",74),Ke("sortByColumnChange",function(F){N(n);let d=r(2);return Ue(d.sortByColumn,F)||(d.sortByColumn=F),M(F)}),o(1,"tr",75)(2,"th",76),c(3,26),I(4,wn,2,0,"ng-container",77),s(),i(),o(5,"th",78),c(6,27),I(7,zn,2,0,"ng-container",77),s(),i(),o(8,"th",79),c(9,28),I(10,Vn,2,0,"ng-container",77),s(),i(),o(11,"th",80),c(12,29),I(13,Un,2,0,"ng-container",77),s(),i(),o(14,"th",81),c(15,30),I(16,Kn,2,0,"ng-container",77),s(),i(),o(17,"th",82),c(18,31),I(19,jn,2,0,"ng-container",77),s(),i(),o(20,"th",83),c(21,32),I(22,Wn,2,0,"ng-container",77),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),z(27,lt,27,14,"tr",null,w),i()}if(e&2){let n=r(2),_=U(35);E("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),V(n.backups())}}function ct(e,t){if(e&1&&g(0,Jn,3,3,"div",61)(1,rt,29,10,"sh-table",62),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function st(e,t){e&1&&(o(0,"div",85),C(1,"sh-progress-bar",86),o(2,"div",50)(3,"h3"),T(4,36),i()()())}function ut(e,t){e&1&&T(0,37,1)}function Ft(e,t){e&1&&(o(0,"sh-icon"),u(1,"check"),i())}function Ct(e,t){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),i())}function Tt(e,t){if(e&1){let n=A();o(0,"button",87),D("click",function(){let F=N(n).$implicit,d=r();return M(d.startBackup(F.Backup.ID))}),c(1,37),C(2,"sh-icon"),g(3,ut,1,0),s(),i(),o(4,"button",88)(5,"sh-icon"),u(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",51),g(9,Ft,2,0,"sh-icon")(10,Ct,2,0,"sh-icon"),i(),O(11,59),o(12,"h3",89),u(13,"Operations"),i(),o(14,"button",90),c(15,38),C(16,"sh-icon"),s(),i(),o(17,"button",90),c(18,39),C(19,"sh-icon"),s(),i(),o(20,"button",90),c(21,40),C(22,"sh-icon"),s(),i(),C(23,"sh-divider"),o(24,"h3",89),T(25,41),i(),o(26,"button",90),c(27,42),C(28,"sh-icon"),s(),i(),o(29,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.verifyFiles(F.Backup.ID))}),c(30,43),C(31,"sh-icon"),s(),i(),o(32,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.compressBackup(F.Backup.ID))}),c(33,44),C(34,"sh-icon"),s(),i(),o(35,"button",90),c(36,45),C(37,"sh-icon"),s(),i(),C(38,"sh-divider"),o(39,"h3",89),T(40,46),i(),o(41,"button",90),c(42,47),C(43,"sh-icon"),s(),i(),m(),i()}if(e&2){let n=t.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,En,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,dn,n.Backup.ID)),a(3),E("routerLink",$(19,gn,n.Backup.ID)),a(3),E("routerLink",$(21,pn,n.Backup.ID)),a(6),E("routerLink",$(23,Sn,n.Backup.ID)),a(9),E("routerLink",$(25,On,n.Backup.ID)),a(6),E("routerLink",$(27,mn,n.Backup.ID))}}function Et(e,t){e&1&&(o(0,"sh-icon",91),u(1,"funnel-simple"),i(),o(2,"sh-icon",92),u(3,"sort-ascending"),i(),o(4,"sh-icon",93),u(5,"sort-descending"),i())}var dt={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=x(tn);#t=x(an);#e=x(_n);#i=x(ln);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=on("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#i.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){return t?ee(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=ee(t);if(!n)return"";let _=dt[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+t.split("?")[1],k=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[y,B]of Object.entries(rn))if(k.endsWith(y))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Xe({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let k;k=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Externally managed`;let ce;ce=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let se;se=$localize`Last successful backup:`;let ue;ue=$localize`Duration:`;let Fe;Fe=$localize`Source:`;let Ce;Ce=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Te;Te=$localize` ${b}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Next scheduled run:`;let de;de=$localize`Externally managed`;let ge;ge=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let pe;pe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Pe;Pe=$localize`Version`;let fe;fe=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let De;De=$localize` ${v}:ICU@@3521773141017690117: `;let $e;$e=$localize`Loading backups...`;let Re;Re=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let he;he=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Ae;Ae=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Le;Le=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let He;He=$localize`Advanced`;let xe;xe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ge;Ge=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ke;ke=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ye;ye=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Be;Be=$localize`Reporting`;let be;return be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,F,d,k,y,B,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,he,Ae,Le,He,xe,Ge,ke,ye,Be,be,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",48),C(4,"img",49),o(5,"div",50)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",51),c(11,4),C(12,"sh-icon"),s(),i()(),o(13,"sh-card",48),C(14,"img",52),o(15,"div",50)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",51),c(21,7),C(22,"sh-icon"),s(),i()()(),o(23,"div",53)(24,"h2"),O(25),T(26,8),m(),g(27,Dn,22,6,"div",54),i(),Je(28,ct,2,1)(29,st,5,0),we(30,28,un,null,29),i()(),I(32,Tt,44,29,"ng-template",null,0,q)(34,Et,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",K(4,Fn)),a(10),E("routerLink",K(5,Cn)),a(14),p(_.backups().length>0?27:-1),a(3),ze(!_.backupsLoading()))},dependencies:[Q,cn,We,Z,Y,Qe,Ye,Ze,je],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
|
|
1
|
+
import{a as cn}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{b as ee,k as rn}from"./chunk-IMHM7ISI.js";import{b as an}from"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as _n}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ln}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import{a as on}from"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{A as je,B as Z,C as We,E as qe,G as Qe,K as Ye,L as Ze,S as en,T as nn,u as Y}from"./chunk-UNMDSCAN.js";import{c as tn}from"./chunk-CFNARBNK.js";import{e as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as N,Ab as i,Bb as C,Cc as P,Dc as G,E as j,Ec as h,Fb as O,Gb as m,Gc as q,Hb as f,Ib as A,Ma as J,Pa as a,Pb as c,Qb as s,Rb as T,Sb as L,Tb as H,Ub as W,Vb as D,W as x,Xb as r,aa as M,cb as Xe,ec as U,gc as R,hb as I,ib as Je,jc as u,la as X,lc as S,na as ve,oc as Ve,pb as we,pc as Ue,qb as ze,qc as Ke,sb as g,tb as p,ub as w,wb as z,xb as V,xc as K,yb as E,yc as $,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var un=()=>[Q,import("./chunk-ZWLAV6HO.js").then(e=>e.NgTemplateOutlet),Z,Y,qe,nn,en,import("./chunk-UNLX3IVU.js").then(e=>e.DurationFormatPipe),import("./chunk-G4IFZKMI.js").then(e=>e.BytesPipe),import("./chunk-XIYAYCFU.js").then(e=>e.RelativeTimePipe)],Fn=()=>["/add-backup"],Cn=()=>["/restore"],sn=e=>({$implicit:e}),Tn=()=>["/backup/new"],En=e=>["/backup",e],dn=e=>["/restore",e],gn=e=>["/backup",e,"export"],pn=e=>["/backup",e,"delete"],Sn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],mn=e=>["/backup",e,"log"];function Nn(e,t){e&1&&T(0,11,1)}function Mn(e,t){e&1&&T(0,11,2)}function In(e,t){if(e&1&&T(0,11,3),e&2){let n=r(2);L(n.timeType()),H(0)}}function Pn(e,t){if(e&1){let n=A();o(0,"button",56),D("click",function(){let F=N(n).$implicit,d=r(3);return M(d.sortByColumn.set(F.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function fn(e,t){if(e&1&&(o(0,"sh-menu",57)(1,"button",58),c(2,14),C(3,"strong")(4,"sh-icon"),s(),i(),O(5,59),z(6,Pn,2,3,"button",60,w),m(),i()),e&2){let n=r(2);a(4),L(n.orderBy()),H(2),a(2),V(n.sortOrderOptions())}}function Dn(e,t){if(e&1){let n=A();o(0,"div",54)(1,"sh-button-group",55)(2,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("list"))}),c(3,9),C(4,"sh-icon"),s(),i(),o(5,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("details"))}),c(6,10),C(7,"sh-icon"),s(),i()(),o(8,"sh-menu",57)(9,"button",58),c(10,11),o(11,"strong"),g(12,Nn,1,0)(13,Mn,1,0)(14,In,1,1),i(),C(15,"sh-icon"),s(),i(),O(16,59),o(17,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("relative"))}),T(18,12),i(),o(19,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("actual"))}),T(20,13),i(),m(),i(),g(21,fn,8,1,"sh-menu",57),i()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function $n(e,t){if(e&1){let n=A();o(0,"div",65)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()()(),o(7,"div",68)(8,"sh-chip",69),T(9,16),i()(),o(10,"div",54)(11,"button",70),D("click",function(){N(n);let F=r().$implicit,d=r(4);return M(d.openInConsole(F))}),c(12,17),C(13,"sh-icon"),s(),i()()()}if(e&2){let n=r().$implicit,_=r(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," ")}}function Rn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),u(3),P(4,"relativeTime"),i()),e&2){let n=r(2).$implicit,_=r(4);a(3),S(" ",h(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function hn(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r(2).$implicit,_=r(4);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function An(e,t){e&1&&(O(0),u(1,"-"),m())}function Ln(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Hn(e,t){e&1&&(O(0),u(1,"-"),m())}function xn(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Gn(e,t){e&1&&(O(0),u(1,"-"),m())}function kn(e,t){e&1&&(o(0,"sh-chip",69),T(1,24),i())}function yn(e,t){e&1&&f(0)}function Bn(e,t){if(e&1&&(o(0,"div",66)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()(),o(7,"p")(8,"span"),T(9,18),i(),u(10),P(11,"relativeTime"),i(),g(12,Rn,5,4,"p"),o(13,"p")(14,"span"),T(15,19),i(),g(16,hn,2,4)(17,An,2,0,"ng-container"),i(),o(18,"p")(19,"span"),T(20,20),i(),g(21,Ln,2,3)(22,Hn,2,0,"ng-container"),i(),o(23,"p")(24,"span"),T(25,21),i(),g(26,xn,2,3)(27,Gn,2,0,"ng-container"),i()(),o(28,"div",68)(29,"sh-chip",71),T(30,22),i(),g(31,kn,2,0,"sh-chip",69),i(),o(32,"div",54),I(33,yn,1,0,"ng-container",72),i()()),e&2){let n=r().$implicit,_=r(4),F=U(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",h(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(16,sn,n))}}function bn(e,t){if(e&1&&g(0,$n,14,3,"div",65)(1,Bn,34,18,"div",66),e&2){let n=t.$implicit;p(n.Backup.ExternalID?0:1)}}function vn(e,t){if(e&1&&z(0,bn,2,1,null,null,w),e&2){let n=r(3);V(n.backups())}}function Xn(e,t){e&1&&(o(0,"div",64),c(1,25),o(2,"button",73),C(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),E("routerLink",K(1,Tn)))}function Jn(e,t){if(e&1&&(o(0,"div",63),g(1,vn,2,0)(2,Xn,4,2,"div",64),i()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function wn(e,t){e&1&&(c(0,26,1),f(1),s())}function zn(e,t){e&1&&(c(0,27,1),f(1),s())}function Vn(e,t){e&1&&(c(0,28,1),f(1),s())}function Un(e,t){e&1&&(c(0,29,1),f(1),s())}function Kn(e,t){e&1&&(c(0,30,1),f(1),s())}function jn(e,t){e&1&&(c(0,31,1),f(1),s())}function Wn(e,t){e&1&&(c(0,32,1),f(1),s())}function qn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Qn(e,t){e&1&&(O(0),u(1,"-"),m())}function Yn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Zn(e,t){e&1&&(O(0),u(1,"-"),m())}function et(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function nt(e,t){e&1&&(O(0),u(1,"-"),m())}function tt(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function it(e,t){e&1&&(O(0),u(1,"-"),m())}function ot(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function _t(e,t){e&1&&(O(0),u(1,"-"),m())}function at(e,t){e&1&&f(0)}function lt(e,t){if(e&1&&(o(0,"tr")(1,"td"),u(2),i(),o(3,"td")(4,"sh-chip",84),C(5,"img",67),u(6),i()(),o(7,"td"),g(8,qn,2,4)(9,Qn,2,0,"ng-container"),i(),o(10,"td"),g(11,Yn,2,4)(12,Zn,2,0,"ng-container"),i(),o(13,"td"),g(14,et,2,4)(15,nt,2,0,"ng-container"),i(),o(16,"td"),g(17,tt,2,3)(18,it,2,0,"ng-container"),i(),o(19,"td"),g(20,ot,2,3)(21,_t,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),I(26,at,1,0,"ng-container",72),i()()),e&2){let n=t.$implicit,_=r(3),F=U(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(12,sn,n))}}function rt(e,t){if(e&1){let n=A();o(0,"sh-table",74),Ke("sortByColumnChange",function(F){N(n);let d=r(2);return Ue(d.sortByColumn,F)||(d.sortByColumn=F),M(F)}),o(1,"tr",75)(2,"th",76),c(3,26),I(4,wn,2,0,"ng-container",77),s(),i(),o(5,"th",78),c(6,27),I(7,zn,2,0,"ng-container",77),s(),i(),o(8,"th",79),c(9,28),I(10,Vn,2,0,"ng-container",77),s(),i(),o(11,"th",80),c(12,29),I(13,Un,2,0,"ng-container",77),s(),i(),o(14,"th",81),c(15,30),I(16,Kn,2,0,"ng-container",77),s(),i(),o(17,"th",82),c(18,31),I(19,jn,2,0,"ng-container",77),s(),i(),o(20,"th",83),c(21,32),I(22,Wn,2,0,"ng-container",77),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),z(27,lt,27,14,"tr",null,w),i()}if(e&2){let n=r(2),_=U(35);E("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),V(n.backups())}}function ct(e,t){if(e&1&&g(0,Jn,3,3,"div",61)(1,rt,29,10,"sh-table",62),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function st(e,t){e&1&&(o(0,"div",85),C(1,"sh-progress-bar",86),o(2,"div",50)(3,"h3"),T(4,36),i()()())}function ut(e,t){e&1&&T(0,37,1)}function Ft(e,t){e&1&&(o(0,"sh-icon"),u(1,"check"),i())}function Ct(e,t){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),i())}function Tt(e,t){if(e&1){let n=A();o(0,"button",87),D("click",function(){let F=N(n).$implicit,d=r();return M(d.startBackup(F.Backup.ID))}),c(1,37),C(2,"sh-icon"),g(3,ut,1,0),s(),i(),o(4,"button",88)(5,"sh-icon"),u(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",51),g(9,Ft,2,0,"sh-icon")(10,Ct,2,0,"sh-icon"),i(),O(11,59),o(12,"h3",89),u(13,"Operations"),i(),o(14,"button",90),c(15,38),C(16,"sh-icon"),s(),i(),o(17,"button",90),c(18,39),C(19,"sh-icon"),s(),i(),o(20,"button",90),c(21,40),C(22,"sh-icon"),s(),i(),C(23,"sh-divider"),o(24,"h3",89),T(25,41),i(),o(26,"button",90),c(27,42),C(28,"sh-icon"),s(),i(),o(29,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.verifyFiles(F.Backup.ID))}),c(30,43),C(31,"sh-icon"),s(),i(),o(32,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.compressBackup(F.Backup.ID))}),c(33,44),C(34,"sh-icon"),s(),i(),o(35,"button",90),c(36,45),C(37,"sh-icon"),s(),i(),C(38,"sh-divider"),o(39,"h3",89),T(40,46),i(),o(41,"button",90),c(42,47),C(43,"sh-icon"),s(),i(),m(),i()}if(e&2){let n=t.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,En,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,dn,n.Backup.ID)),a(3),E("routerLink",$(19,gn,n.Backup.ID)),a(3),E("routerLink",$(21,pn,n.Backup.ID)),a(6),E("routerLink",$(23,Sn,n.Backup.ID)),a(9),E("routerLink",$(25,On,n.Backup.ID)),a(6),E("routerLink",$(27,mn,n.Backup.ID))}}function Et(e,t){e&1&&(o(0,"sh-icon",91),u(1,"funnel-simple"),i(),o(2,"sh-icon",92),u(3,"sort-ascending"),i(),o(4,"sh-icon",93),u(5,"sort-descending"),i())}var dt={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=x(tn);#t=x(an);#e=x(_n);#i=x(ln);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=on("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#i.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){return t?ee(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=ee(t);if(!n)return"";let _=dt[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+t.split("?")[1],k=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[y,B]of Object.entries(rn))if(k.endsWith(y))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Xe({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let k;k=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Externally managed`;let ce;ce=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let se;se=$localize`Last successful backup:`;let ue;ue=$localize`Duration:`;let Fe;Fe=$localize`Source:`;let Ce;Ce=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Te;Te=$localize` ${b}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Next scheduled run:`;let de;de=$localize`Externally managed`;let ge;ge=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let pe;pe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Pe;Pe=$localize`Version`;let fe;fe=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let De;De=$localize` ${v}:ICU@@3521773141017690117: `;let $e;$e=$localize`Loading backups...`;let Re;Re=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let he;he=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Ae;Ae=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Le;Le=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let He;He=$localize`Advanced`;let xe;xe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ge;Ge=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ke;ke=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ye;ye=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Be;Be=$localize`Reporting`;let be;return be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,F,d,k,y,B,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,he,Ae,Le,He,xe,Ge,ke,ye,Be,be,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",48),C(4,"img",49),o(5,"div",50)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",51),c(11,4),C(12,"sh-icon"),s(),i()(),o(13,"sh-card",48),C(14,"img",52),o(15,"div",50)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",51),c(21,7),C(22,"sh-icon"),s(),i()()(),o(23,"div",53)(24,"h2"),O(25),T(26,8),m(),g(27,Dn,22,6,"div",54),i(),Je(28,ct,2,1)(29,st,5,0),we(30,28,un,null,29),i()(),I(32,Tt,44,29,"ng-template",null,0,q)(34,Et,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",K(4,Fn)),a(10),E("routerLink",K(5,Cn)),a(14),p(_.backups().length>0?27:-1),a(3),ze(!_.backupsLoading()))},dependencies:[Q,cn,We,Z,Y,Qe,Ye,Ze,je],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ae}from"./chunk-ZHGDQABC.js";import"./chunk-MMEFBZO4.js";import{a as se}from"./chunk-Q74O3CWJ.js";import{a as Z,b as k}from"./chunk-BFTGDQ4K.js";import{a as ie}from"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import{a as te}from"./chunk-SZUNW4JO.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import{b as ne}from"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as Q,C as X,L as Y,u as J,z as K}from"./chunk-UNMDSCAN.js";import{c as ee}from"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import{R as $,S as H,fa as U,ka as q,oa as G}from"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as B,Ab as i,Bb as T,Cc as p,Dc as u,Ec as F,Fb as j,Gb as L,Ib as W,Mc as I,Pa as r,R as A,Vb as b,W as g,Xb as _,aa as z,cb as V,hb as f,jc as a,kc as m,la as M,lc as v,mc as y,na as N,yb as d,zb as s}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var E=class o{#e=g(k);#i=g(ne);#n=M([]);recentFiles=this.#n.asReadonly();#r=5;#o=1e4;#l=M(null);etaData=this.#l.asReadonly();#s=null;#t=null;#a=null;constructor(){N(()=>{let e=this.#e.statusData();e&&e.CurrentFilename&&e.CurrentFilesize!==void 0&&this.#c(e.CurrentFilename,e.CurrentFilesize)},{allowSignalWrites:!0})}#c(e,n){let t=new Date;this.#n.update(l=>{let c=l.filter(C=>t.getTime()-C.timestamp.getTime()<this.#o);return c.length>0&&c[0].filename===e?c:[{filename:e,filesize:n,timestamp:t},...c].slice(0,this.#r)})}activateView(){this.#s=new Date;let e=this.#e.statusData();e&&e.ProcessedFileCount!==void 0&&e.ProcessedFileSize!==void 0&&(this.#t={files:e.ProcessedFileCount,bytes:e.ProcessedFileSize}),this.#a=setInterval(()=>{this.#d(),this.#p()},1e3)}deactivateView(){this.#s=null,this.#t=null,this.#a&&(clearInterval(this.#a),this.#a=null)}#p(){let e=new Date;this.#n.update(n=>n.filter(t=>e.getTime()-t.timestamp.getTime()<this.#o))}#d(){if(!this.#s||!this.#t)return;let e=this.#e.statusData();if(!e)return;let n=new Date,t=(n.getTime()-this.#s.getTime())/1e3;if(t<5)return;let l=e.ProcessedFileCount||0,c=e.ProcessedFileSize||0,O=l-this.#t.files,C=c-this.#t.bytes,P=O/t,x=C/t,re=(e.TotalFileCount||0)-l,oe=(e.TotalFileSize||0)-c,h=null,S=null;P>0&&(h=re/P),x>0&&(S=oe/x);let D=null,w="bytes";if(h!==null&&S!==null){let le=Math.max(h,S);D=new Date(n.getTime()+le*1e3),w=h>S?"files":"bytes"}else h!==null?(D=new Date(n.getTime()+h*1e3),w="files"):S!==null&&(D=new Date(n.getTime()+S*1e3),w="bytes");this.#l.set({startTime:this.#s,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:P,currentBytesPerSecond:x,estimatedCompletion:D,metric:w})}static \u0275fac=function(n){return new(n||o)};static \u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})};function pe(o,e){if(o&1&&(s(0,"div",25)(1,"div",26),a(2),i(),s(3,"div",27),a(4),p(5,"bytes"),i()()),o&2){let n,t,l=_();r(2),m((n=l.statusData())==null?null:n.CurrentFilename),r(2),m(u(5,2,(t=l.statusData())==null?null:t.CurrentFilesize))}}function de(o,e){if(o&1&&(s(0,"div",28)(1,"span",26),a(2),i(),s(3,"span",27),a(4),p(5,"bytes"),i()()),o&2){let n=e.$implicit;r(2),m(n.filename),r(2),m(u(5,2,n.filesize))}}function me(o,e){if(o&1&&(s(0,"div",29)(1,"div",30),a(2),p(3,"date"),p(4,"relativeTime"),i(),s(5,"div",31)(6,"div"),a(7),p(8,"number"),i(),s(9,"div"),a(10),p(11,"bytes"),i()()()),o&2){let n,t,l,c=_();r(2),y(" ETA: ",F(3,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," (",u(4,7,(n=c.etaData())==null?null:n.estimatedCompletion),") "),r(5),v("",F(8,9,(t=c.etaData())==null?null:t.currentFilesPerSecond,"1.1-1")," files/s"),r(3),v("",u(11,12,(l=c.etaData())==null?null:l.currentBytesPerSecond),"/s")}}function ue(o,e){if(o&1&&(s(0,"div",34)(1,"div",35)(2,"span",36),a(3),i(),s(4,"span",37),a(5),p(6,"bytes"),i()(),T(7,"sh-progress-bar",2),i()),o&2){let n=e.$implicit;r(3),m(n.BackendPath),r(2),v("",u(6,3,n.BackendSpeed),"/s"),r(2),d("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function ge(o,e){if(o&1&&(s(0,"div",32),f(1,ue,8,5,"div",33),i()),o&2){let n,t=_();r(),d("ngForOf",(n=t.statusData())==null?null:n.ActiveTransfers)}}function fe(o,e){if(o&1&&(s(0,"div",21)(1,"span",5),a(2,"Next Task:"),i(),s(3,"div",6)(4,"div"),a(5),i(),s(6,"div",38),a(7),p(8,"date"),p(9,"relativeTime"),i()()()),o&2){let n,t=_();r(5),m((n=t.nextBackup().backup)==null?null:n.Name),r(2),y(" ",F(8,3,t.nextBackup().time,"medium")," (",u(9,6,t.nextBackup().time),") ")}}function _e(o,e){if(o&1){let n=W();j(0),s(1,"button",39),b("click",function(){B(n);let l=_();return z(l.stop())}),s(2,"sh-icon"),a(3,"stop"),i(),a(4," Stop "),i(),s(5,"button",39),b("click",function(){B(n);let l=_();return z(l.abort())}),s(6,"sh-icon"),a(7,"x-circle"),i(),a(8," Abort "),i(),L()}}var R=class o{#e=g(k);#i=g(E);#n=g(ee);#r=g(K);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#i.recentFiles;etaData=this.#i.etaData;transfersExpanded=M(!1);clientIsRunning=this.#e.clientIsRunning;statusText=I(()=>{let e=this.statusData()?.Phase;return e?Z[e]||e:""});progress=I(()=>{let e=this.statusData();return e?(e.OverallProgress||0)*100:0});nextBackup=I(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#i.activateView()}ngOnDestroy(){this.#i.deactivateView()}toggleTransfers(){this.transfersExpanded.update(e=>!e)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(se,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let e=this.statusData()?.TaskID;e&&this.#n.postApiV1TaskByTaskidStop({taskid:e}).subscribe()}abort(){let e=this.statusData()?.TaskID;e&&this.#n.postApiV1TaskByTaskidAbort({taskid:e}).subscribe()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=V({type:o,selectors:[["app-status"]],decls:62,vars:27,consts:[[1,"status-page"],[1,"progress-section"],[3,"value"],[1,"stats-grid"],[1,"stat-item"],[1,"label"],[1,"value"],[1,"files-section"],["class","current-file",4,"ngIf"],[1,"recent-files"],["class","recent-file",4,"ngFor","ngForOf"],[1,"speed-section"],[1,"speed-header"],[1,"aggregate-speed"],["class","eta-info",4,"ngIf"],[1,"transfers-toggle"],["shButton","",3,"click"],["class","transfer-details",4,"ngIf"],[1,"logs-section"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],["class","status-row",4,"ngIf"],[1,"actions"],[4,"ngIf"],[1,"current-file"],[1,"filename"],[1,"filesize"],[1,"recent-file"],[1,"eta-info"],[1,"eta-time"],[1,"speed-metrics"],[1,"transfer-details"],["class","transfer-item",4,"ngFor","ngForOf"],[1,"transfer-item"],[1,"transfer-info"],[1,"path"],[1,"speed"],[1,"sub-text"],["shButton","","color","warn",3,"click"]],template:function(n,t){if(n&1&&(s(0,"div",0)(1,"sh-card")(2,"div",1)(3,"h2"),a(4),i(),T(5,"sh-progress-bar",2),s(6,"div",3)(7,"div",4)(8,"span",5),a(9,"Files"),i(),s(10,"span",6),a(11),i()(),s(12,"div",4)(13,"span",5),a(14,"Size"),i(),s(15,"span",6),a(16),p(17,"bytes"),p(18,"bytes"),i()()()()(),s(19,"sh-card")(20,"div",7)(21,"h3"),a(22,"Current File"),i(),f(23,pe,6,4,"div",8),s(24,"h3"),a(25,"Recent Files"),i(),s(26,"div",9),f(27,de,6,4,"div",10),i()()(),s(28,"sh-card")(29,"div",11)(30,"div",12)(31,"h3"),a(32,"Transfer Speed"),i(),s(33,"div",13),a(34),p(35,"bytes"),i()(),f(36,me,12,14,"div",14),s(37,"div",15)(38,"button",16),b("click",function(){return t.toggleTransfers()}),a(39),i()(),f(40,ge,2,1,"div",17),i()(),s(41,"sh-card")(42,"div",18)(43,"h3"),a(44,"Live Logs"),i(),T(45,"app-logs-live",19),i()(),s(46,"sh-card")(47,"div",20)(48,"h3"),a(49,"Server Status"),i(),s(50,"div",21)(51,"span",5),a(52,"State:"),i(),s(53,"span",6),a(54),i()(),f(55,fe,10,8,"div",22),s(56,"div",23)(57,"button",16),b("click",function(){return t.pauseResume()}),s(58,"sh-icon"),a(59),i(),a(60),i(),f(61,_e,9,0,"ng-container",24),i()()()()),n&2){let l,c,O,C,P,x;r(4),m(t.statusText()),r(),d("value",t.progress()),r(6),y("",(l=t.statusData())==null?null:l.ProcessedFileCount," / ",(l=t.statusData())==null?null:l.TotalFileCount),r(5),y(" ",u(17,21,(c=t.statusData())==null?null:c.ProcessedFileSize)," / ",u(18,23,(c=t.statusData())==null?null:c.TotalFileSize)," "),r(7),d("ngIf",(O=t.statusData())==null?null:O.CurrentFilename),r(4),d("ngForOf",t.recentFiles()),r(7),v("",u(35,25,(C=t.statusData())==null?null:C.BackendSpeed),"/s"),r(2),d("ngIf",t.etaData()),r(3),v(" ",t.transfersExpanded()?"Hide Details":"Show Details"," "),r(),d("ngIf",t.transfersExpanded()),r(5),d("asSimpleList",!0)("polling",t.isTaskRunning())("whenFilter",(P=t.taskStartTime())==null?null:P.getTime())("backupIdFilter",t.currentBackupId()),r(9),m((x=t.serverState())==null?null:x.ProgramState),r(),d("ngIf",t.nextBackup()),r(4),m(t.clientIsRunning()?"pause":"play_arrow"),r(),v(" ",t.clientIsRunning()?"Pause":"Resume"," "),r(),d("ngIf",t.isTaskRunning())}},dependencies:[G,$,H,X,Y,Q,J,ae,q,U,te,ie],styles:["[_nghost-%COMP%]{display:block;padding:20px;max-width:1200px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:20px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1024px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.progress-section[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-top:0;margin-bottom:15px;font-size:1.2rem;color:var(--text-primary)}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:15px;height:20px;--progress-bar-color: var(--primary-color)}.progress-section[_ngcontent-%COMP%] .stats-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.progress-section[_ngcontent-%COMP%] .stats-grid[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;flex-direction:column}.progress-section[_ngcontent-%COMP%] .stats-grid[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.8rem;color:var(--text-secondary)}.progress-section[_ngcontent-%COMP%] .stats-grid[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:500}.files-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:10px;font-size:1rem;color:var(--text-secondary)}.files-section[_ngcontent-%COMP%] .current-file[_ngcontent-%COMP%]{margin-bottom:20px;padding:10px;background:var(--bg-secondary);border-radius:4px}.files-section[_ngcontent-%COMP%] .current-file[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{font-weight:500;word-break:break-all;margin-bottom:5px}.files-section[_ngcontent-%COMP%] .current-file[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{font-size:.8rem;color:var(--text-secondary)}.files-section[_ngcontent-%COMP%] .recent-files[_ngcontent-%COMP%] .recent-file[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px solid var(--border-color);font-size:.9rem}.files-section[_ngcontent-%COMP%] .recent-files[_ngcontent-%COMP%] .recent-file[_ngcontent-%COMP%]:last-child{border-bottom:none}.files-section[_ngcontent-%COMP%] .recent-files[_ngcontent-%COMP%] .recent-file[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.files-section[_ngcontent-%COMP%] .recent-files[_ngcontent-%COMP%] .recent-file[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);white-space:nowrap}.speed-section[_ngcontent-%COMP%] .speed-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.speed-section[_ngcontent-%COMP%] .speed-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;color:var(--text-secondary)}.speed-section[_ngcontent-%COMP%] .speed-header[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.speed-section[_ngcontent-%COMP%] .eta-info[_ngcontent-%COMP%]{margin-bottom:15px;padding:10px;background:var(--bg-secondary);border-radius:4px}.speed-section[_ngcontent-%COMP%] .eta-info[_ngcontent-%COMP%] .eta-time[_ngcontent-%COMP%]{font-weight:500;margin-bottom:5px}.speed-section[_ngcontent-%COMP%] .eta-info[_ngcontent-%COMP%] .speed-metrics[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.8rem;color:var(--text-secondary)}.speed-section[_ngcontent-%COMP%] .transfers-toggle[_ngcontent-%COMP%]{margin-bottom:10px;text-align:right}.speed-section[_ngcontent-%COMP%] .transfer-details[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto}.speed-section[_ngcontent-%COMP%] .transfer-details[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{margin-bottom:10px}.speed-section[_ngcontent-%COMP%] .transfer-details[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.8rem;margin-bottom:2px}.speed-section[_ngcontent-%COMP%] .transfer-details[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-info[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.speed-section[_ngcontent-%COMP%] .transfer-details[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:4px}.logs-section[_ngcontent-%COMP%]{grid-column:1/-1}.logs-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:10px;font-size:1rem;color:var(--text-secondary)}.logs-section[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:300px;display:block;border:1px solid var(--border-color);border-radius:4px}.server-status-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:15px;font-size:1rem;color:var(--text-secondary)}.server-status-section[_ngcontent-%COMP%] .status-row[_ngcontent-%COMP%]{display:flex;margin-bottom:10px}.server-status-section[_ngcontent-%COMP%] .status-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100px;color:var(--text-secondary)}.server-status-section[_ngcontent-%COMP%] .status-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{flex:1;font-weight:500}.server-status-section[_ngcontent-%COMP%] .status-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{font-size:.8rem;color:var(--text-secondary)}.server-status-section[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{margin-top:20px;display:flex;gap:10px;flex-wrap:wrap}"],changeDetection:0})};export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as C}from"./chunk-P3D2ZP6W.js";import"./chunk-HRHF3TYJ.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as G}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as h}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{L as M,M as $,R as I}from"./chunk-UNMDSCAN.js";import{c as L}from"./chunk-CFNARBNK.js";import{b as N,c as O,e as B,f as b}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk-
|
|
1
|
+
import{a as $}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as f}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as b,u as h}from"./chunk-UNMDSCAN.js";import{c as P}from"./chunk-CFNARBNK.js";import{b as B,e as A}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as F,Bb as _,Mc as D,Pa as i,Pb as c,Qb as d,Rb as r,Ub as N,Vb as L,W as C,cb as S,jc as M,la as l,lc as O,sb as s,tb as u,ub as T,wb as p,xb as I,yb as E,yc as R,zb as a}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var k=e=>({state:e});function v(e,t){e&1&&r(0,2,1)}function y(e,t){e&1&&r(0,2,2)}function U(e,t){e&1&&r(0,2,3)}function G(e,t){e&1&&r(0,2,4)}function K(e,t){if(e&1&&(M(0),_(1,"br")),e&2){let o=t.$implicit;O(" ",o," ")}}var g=class e{#t=C(P);#e=C(B);#n=f(this.#e.params);#o=f(this.#e.queryParams);runId=D(()=>this.#n()?.runId);stateId=D(()=>this.#o()?.state);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(o=>[...o,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=S({type:e,selectors:[["app-commandline-result"]],decls:18,vars:7,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,n=N(n),[t,o,n,[1,"back"],["type","button","shButton","","routerLink","../",1,"small",3,"queryParams"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(o,n){o&1&&(_(0,"app-status-bar"),a(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),F()(),a(6,"h3"),c(7,1),a(8,"button",5),L("click",function(){return n.abort()}),F(),d(),F(),a(9,"div",6),c(10,2),s(11,v,1,0),s(12,y,1,0),s(13,U,1,0),s(14,G,1,0),d(),F(),a(15,"code"),p(16,K,2,1,null,null,T),F()()),o&2&&(i(3),E("queryParams",R(5,k,n.stateId())),i(8),u(n.status()==="starting"?11:-1),i(),u(n.status()==="started"?12:-1),i(),u(n.status()==="finished"?13:-1),i(),u(n.status()==="aborted"?14:-1),i(2),I(n.messageLog()))},dependencies:[$,h,b,A],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-OL7C46LY.js";import"./chunk-HRHF3TYJ.js";import"./chunk-IMHM7ISI.js";import"./chunk-HSHF5HR7.js";import"./chunk-HUZXJWCG.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
package/index.html
CHANGED
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
<body>
|
|
125
125
|
<app-root></app-root>
|
|
126
126
|
<div class="loading">Connecting ...</div>
|
|
127
|
-
<link rel="modulepreload" href="chunk-AODNZLCK.js"><link rel="modulepreload" href="chunk-
|
|
127
|
+
<link rel="modulepreload" href="chunk-AODNZLCK.js"><link rel="modulepreload" href="chunk-GRVTXORM.js"><link rel="modulepreload" href="chunk-MDXSNEQZ.js"><link rel="modulepreload" href="chunk-BFTGDQ4K.js"><link rel="modulepreload" href="chunk-QHBOEY2O.js"><link rel="modulepreload" href="chunk-NK5WD6WE.js"><link rel="modulepreload" href="chunk-B62TPRVG.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-SZUNW4JO.js"><link rel="modulepreload" href="chunk-HSHF5HR7.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-MW67CCYR.js" type="module"></script></body>
|
|
128
128
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ke,c as Ae}from"./chunk-AODNZLCK.js";import{a as Te}from"./chunk-ZMSYEF6G.js";import{a as Ie}from"./chunk-MDXSNEQZ.js";import{b as k}from"./chunk-3TJKPVBA.js";import{a as Me}from"./chunk-QHBOEY2O.js";import{b as Ee}from"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import{a as D}from"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-SZUNW4JO.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-ZU6T3TW3.js";import{a as H}from"./chunk-HUZXJWCG.js";import{a as h,b as be,c as v,d as we,e as I}from"./chunk-7TWUW4XJ.js";import{v as Ce,x as ve}from"./chunk-UNMDSCAN.js";import{a as ye,d as Se}from"./chunk-CFNARBNK.js";import{c as me,d as de,g as ue,h as he,i as fe,j as ge}from"./chunk-I27PVH6D.js";import{a as re}from"./chunk-5VE6P5U5.js";import{a as se,b as ie,c as ae,e as pe,f as le,g as ce}from"./chunk-PO3L6MKW.js";import{fa as oe,ka as ne}from"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Bb as Z,E as M,I as K,Ic as ee,Jc as te,K as T,M as _,R as C,U as q,W as s,cb as Y,da as z,ea as X,f as W,g as $,l as G,la as d,m as B,na as Q,p as w,y as P,z as J}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var A=class e{#e=s(h);#a=s(v);ngOnInit(){be(),this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Y({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Z(0,"router-outlet")},dependencies:[me],encapsulation:2})};var Ne={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new q("ENVIRONMENT");var N=class e{#e=s(Se);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(_(n=>this.webmodules.set(n)),M(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=()=>{let e=s(I);return e.token()?!0:e.checkProxyAuthed().pipe(T(t=>t?G(!0):e.refreshToken().pipe(w(()=>!0))))},We=()=>{let e=s(v),t=s(k),o=s(z),n=e.relayIsEnabled()?"longpoll":"websocket",a=[o.get(H).preload(!0),o.get(H).preloadFilterGroups(!0),o.get(N).preload(!0)];return e.configLoaded===null?P(a).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(a)))},$e=()=>!0,Oe={path:"connect/:typeParam",loadComponent:()=>import("./chunk-NNNKIEPR.js")},Ge=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},xe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-HOGZ74SB.js")},{path:"logout",loadComponent:()=>import("./chunk-EE5SIDTF.js")},{path:"",canActivate:[Fe],children:[{path:"",canActivate:[We,$e,Ge],children:[{path:"welcome",loadComponent:()=>import("./chunk-NGNWWP6M.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-AIH3GSIT.js")},Oe]},{path:"",loadComponent:()=>import("./chunk-HETNGT36.js"),children:[{path:"",loadComponent:()=>import("./chunk-O64YAUSG.js")},Oe,{path:"add-backup",loadComponent:()=>import("./chunk-YDE34GTN.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-UK7MV4OF.js")},{path:"backup/import",loadComponent:()=>import("./chunk-QLENTLZJ.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-BAGYEJI6.js"),loadChildren:()=>import("./chunk-VVQRXJRI.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-BAGYEJI6.js"),loadChildren:()=>import("./chunk-VVQRXJRI.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-AMTYI2HA.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-XHIPGS6J.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-JZRRR52Q.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-LODLMHG5.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-U2E3ZQUP.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-FRPWQ4C3.js")},{path:"from-config",loadComponent:()=>import("./chunk-A2O2XHOB.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-VIXVL2MX.js"),loadChildren:()=>import("./chunk-SQNRZYPW.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-VIXVL2MX.js"),loadChildren:()=>import("./chunk-SQNRZYPW.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-VIXVL2MX.js"),loadChildren:()=>import("./chunk-SQNRZYPW.js")},{path:"status",loadComponent:()=>import("./chunk-PE34XFKC.js")},{path:"settings",loadComponent:()=>import("./chunk-ZESQ7CXK.js")},{path:"about",loadComponent:()=>import("./chunk-WNG24347.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-I2RQR4CB.js")},{path:"changelog",loadComponent:()=>import("./chunk-BYUBKTO5.js")},{path:"libraries",loadComponent:()=>import("./chunk-R5YJUVWW.js")},{path:"system-info",loadComponent:()=>import("./chunk-3K3BYB36.js")},{path:"server-settings",loadComponent:()=>import("./chunk-T4IKTBRQ.js")},{path:"logs",loadChildren:()=>import("./chunk-26MRZAFB.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-VFBRHP2H.js")}]}]}]}]}]}];var U=null,Le=(e,t)=>{let o=s(I),n=s(de),a=s(h),p=s(f),i=a.getItem("locale"),u=s(ve),l=ke(i),r=ye.BASE||"",m=e.url===`${r}/api/v1/auth/login`,S=e.url===`${r}/api/v1/auth/logout`,g=e.url===`${r}/api/v1/auth/refresh`,b=e.url===`${r}/api/v1/progressstate`,E=e.url===`${r}/api/v1/remoteoperation/test`,Ue=e.url===`${r}/api/v1/filesystem/validate`,je=e.url.startsWith(`${r}/api/v2/`),L=o.token(),j=e,F=e.headers.has("custom-proxy-check")||L===we;if(L&&e.url.startsWith(r+p.baseUrl)&&!F){let c=e.headers.set("Authorization",`Bearer ${L}`);i&&i!=="en-US"&&(c=c.set("X-Ui-Language",l)),j=e.clone({headers:c})}return t(j).pipe(w(c=>{if(c.type===4&&c.status===200&&je){let y=c.body;if(y?.Success===!1)throw{status:200,message:y?.Error??"Unknown error",error:{Error:y?.Error??"Unknown error"},requestBody:y}}return c}),J(c=>{let y=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;if(!F){let R=!0;if((b&&c.status===404||E||Ue)&&(R=!1),g&&c.status===401&&(R=!1,o.logout(),n.navigate(["/logout"])),!m&&!g&&!S&&c.status===401)return R=!1,U??=o.refreshToken().pipe(K()),U.pipe(T(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),M(()=>U=null));R&&u.error(y)}return B(()=>({error:c,message:y}))}))};var O=class e{#e=s(X);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let a=this.#e.createElement("div");a.classList.add("loading-error"),a.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,a,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Be="1.0.0",Pe=`portal-proxy-client-${D()}`,Je=1,x=class e{#e=1e3;#a=s(f);#d=s(O);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#l=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#c=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=Q(()=>{let t=this.#p(),o=this.#u(),n=this.#l();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),n=this.#h.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,a=this.wsState();(a==="disconnected"||a==="error"||n)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#l.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#l.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let l={token:t,publicKey:"",clientVersion:Be,protocolVersion:Je},r=this.createResponse(i,"authportal",l);this.#o.set("welcome"),this.#t?.send(r)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#c.length>0;){let l=this.#c.pop();l&&this.#r[l.messageId]&&this.activateCommand(l)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let l=this.#r[i.messageId];if(l){if(i.errorMessage)this.#i(i.errorMessage),l.reject(i.errorMessage);else{let r=JSON.parse(i.payload??"");r.statusCode>=400?this.#i(r.body||`Initial request failed with status code ${r.statusCode}`):this.#f(),r.body=r?.body==null?null:this.utf8Atob(r.body),l.resolve(r)}delete this.#r[i.messageId],window.clearTimeout(l.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let a={from:Pe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(a)}sendCommand(t,o,n,a,p,i,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((l,r)=>{let m=D(),g={from:Pe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:a,body:p,headers:i})},b={resolve:l,reject:r,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),E.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(g):this.#c.push(g)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function He(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let a=Ke(t.body),p={};t.headers.keys().forEach(r=>{p[r]=t.headers.get(r)??""});let i=t.headers.get("timeout"),u=i!==null?parseInt(i):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let l=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,a,p,u);return new W(r=>{l.then(m=>{let S=new se;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let g=new ie({body:m.body,status:m.statusCode,statusText:"OK",headers:S});r.next(g),r.complete()}).catch(m=>{r.error(new ae({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var De=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(x)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let a=new $;return o.relayconfigState.configLoaded.subscribe(p=>{p&&He(o,e,t).subscribe(a)}),a}return He(o,e,t)};var Ve={providers:[ee(),he(xe,ge(),fe(ue)),pe(ce(),le([De,Le])),h,{provide:f,useValue:Ne},{provide:te,useValue:Ae()},{provide:Ce,useValue:{alertVariant:"simple"}},Te,k,Ee,ne,Re,oe,Me,Ie]};re(A,Ve);
|
|
1
|
+
import{b as ke,c as Ae}from"./chunk-AODNZLCK.js";import{a as Te}from"./chunk-GRVTXORM.js";import{a as Ie}from"./chunk-MDXSNEQZ.js";import{b as k}from"./chunk-BFTGDQ4K.js";import{a as Me}from"./chunk-QHBOEY2O.js";import{b as Ee}from"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import{a as D}from"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-SZUNW4JO.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-ZU6T3TW3.js";import{a as H}from"./chunk-HUZXJWCG.js";import{a as h,b as be,c as v,d as we,e as I}from"./chunk-7TWUW4XJ.js";import{v as Ce,x as ve}from"./chunk-UNMDSCAN.js";import{a as ye,d as Se}from"./chunk-CFNARBNK.js";import{c as me,d as de,g as ue,h as he,i as fe,j as ge}from"./chunk-I27PVH6D.js";import{a as re}from"./chunk-5VE6P5U5.js";import{a as se,b as ie,c as ae,e as pe,f as le,g as ce}from"./chunk-PO3L6MKW.js";import{fa as oe,ka as ne}from"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Bb as Z,E as M,I as K,Ic as ee,Jc as te,K as T,M as _,R as C,U as q,W as s,cb as Y,da as z,ea as X,f as W,g as $,l as G,la as d,m as B,na as Q,p as w,y as P,z as J}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var A=class e{#e=s(h);#a=s(v);ngOnInit(){be(),this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Y({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Z(0,"router-outlet")},dependencies:[me],encapsulation:2})};var Ne={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new q("ENVIRONMENT");var N=class e{#e=s(Se);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(_(n=>this.webmodules.set(n)),M(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=()=>{let e=s(I);return e.token()?!0:e.checkProxyAuthed().pipe(T(t=>t?G(!0):e.refreshToken().pipe(w(()=>!0))))},We=()=>{let e=s(v),t=s(k),o=s(z),n=e.relayIsEnabled()?"longpoll":"websocket",a=[o.get(H).preload(!0),o.get(H).preloadFilterGroups(!0),o.get(N).preload(!0)];return e.configLoaded===null?P(a).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(a)))},$e=()=>!0,Oe={path:"connect/:typeParam",loadComponent:()=>import("./chunk-NNNKIEPR.js")},Ge=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},xe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-HOGZ74SB.js")},{path:"logout",loadComponent:()=>import("./chunk-EE5SIDTF.js")},{path:"",canActivate:[Fe],children:[{path:"",canActivate:[We,$e,Ge],children:[{path:"welcome",loadComponent:()=>import("./chunk-NGNWWP6M.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-AIH3GSIT.js")},Oe]},{path:"",loadComponent:()=>import("./chunk-7DCQVM6E.js"),children:[{path:"",loadComponent:()=>import("./chunk-TX7JDBPD.js")},Oe,{path:"add-backup",loadComponent:()=>import("./chunk-3QV6WLWV.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-UK7MV4OF.js")},{path:"backup/import",loadComponent:()=>import("./chunk-QLENTLZJ.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-W67KMV7H.js"),loadChildren:()=>import("./chunk-7SNTP57H.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-W67KMV7H.js"),loadChildren:()=>import("./chunk-7SNTP57H.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-Q2UQ5J3C.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-IGYSPFE7.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-NDRKUUWC.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-XLMLR5EV.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-U2E3ZQUP.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-T4BXBCQI.js")},{path:"from-config",loadComponent:()=>import("./chunk-A2O2XHOB.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-S53N5WRU.js"),loadChildren:()=>import("./chunk-C64L6XY3.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-S53N5WRU.js"),loadChildren:()=>import("./chunk-C64L6XY3.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-S53N5WRU.js"),loadChildren:()=>import("./chunk-C64L6XY3.js")},{path:"status",loadComponent:()=>import("./chunk-W3YBKYPJ.js")},{path:"settings",loadComponent:()=>import("./chunk-TKB2SB6D.js")},{path:"about",loadComponent:()=>import("./chunk-C7N24TZM.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-I2RQR4CB.js")},{path:"changelog",loadComponent:()=>import("./chunk-BYUBKTO5.js")},{path:"libraries",loadComponent:()=>import("./chunk-R5YJUVWW.js")},{path:"system-info",loadComponent:()=>import("./chunk-3K3BYB36.js")},{path:"server-settings",loadComponent:()=>import("./chunk-T4IKTBRQ.js")},{path:"logs",loadChildren:()=>import("./chunk-26MRZAFB.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-VFBRHP2H.js")}]}]}]}]}]}];var U=null,Le=(e,t)=>{let o=s(I),n=s(de),a=s(h),p=s(f),i=a.getItem("locale"),u=s(ve),l=ke(i),r=ye.BASE||"",m=e.url===`${r}/api/v1/auth/login`,S=e.url===`${r}/api/v1/auth/logout`,g=e.url===`${r}/api/v1/auth/refresh`,b=e.url===`${r}/api/v1/progressstate`,E=e.url===`${r}/api/v1/remoteoperation/test`,Ue=e.url===`${r}/api/v1/filesystem/validate`,je=e.url.startsWith(`${r}/api/v2/`),L=o.token(),j=e,F=e.headers.has("custom-proxy-check")||L===we;if(L&&e.url.startsWith(r+p.baseUrl)&&!F){let c=e.headers.set("Authorization",`Bearer ${L}`);i&&i!=="en-US"&&(c=c.set("X-Ui-Language",l)),j=e.clone({headers:c})}return t(j).pipe(w(c=>{if(c.type===4&&c.status===200&&je){let y=c.body;if(y?.Success===!1)throw{status:200,message:y?.Error??"Unknown error",error:{Error:y?.Error??"Unknown error"},requestBody:y}}return c}),J(c=>{let y=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;if(!F){let R=!0;if((b&&c.status===404||E||Ue)&&(R=!1),g&&c.status===401&&(R=!1,o.logout(),n.navigate(["/logout"])),!m&&!g&&!S&&c.status===401)return R=!1,U??=o.refreshToken().pipe(K()),U.pipe(T(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),M(()=>U=null));R&&u.error(y)}return B(()=>({error:c,message:y}))}))};var O=class e{#e=s(X);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let a=this.#e.createElement("div");a.classList.add("loading-error"),a.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,a,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Be="1.0.0",Pe=`portal-proxy-client-${D()}`,Je=1,x=class e{#e=1e3;#a=s(f);#d=s(O);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#l=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#c=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=Q(()=>{let t=this.#p(),o=this.#u(),n=this.#l();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),n=this.#h.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,a=this.wsState();(a==="disconnected"||a==="error"||n)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#l.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#l.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let l={token:t,publicKey:"",clientVersion:Be,protocolVersion:Je},r=this.createResponse(i,"authportal",l);this.#o.set("welcome"),this.#t?.send(r)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#c.length>0;){let l=this.#c.pop();l&&this.#r[l.messageId]&&this.activateCommand(l)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let l=this.#r[i.messageId];if(l){if(i.errorMessage)this.#i(i.errorMessage),l.reject(i.errorMessage);else{let r=JSON.parse(i.payload??"");r.statusCode>=400?this.#i(r.body||`Initial request failed with status code ${r.statusCode}`):this.#f(),r.body=r?.body==null?null:this.utf8Atob(r.body),l.resolve(r)}delete this.#r[i.messageId],window.clearTimeout(l.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let a={from:Pe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(a)}sendCommand(t,o,n,a,p,i,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((l,r)=>{let m=D(),g={from:Pe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:a,body:p,headers:i})},b={resolve:l,reject:r,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),E.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(g):this.#c.push(g)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function He(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let a=Ke(t.body),p={};t.headers.keys().forEach(r=>{p[r]=t.headers.get(r)??""});let i=t.headers.get("timeout"),u=i!==null?parseInt(i):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let l=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,a,p,u);return new W(r=>{l.then(m=>{let S=new se;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let g=new ie({body:m.body,status:m.statusCode,statusText:"OK",headers:S});r.next(g),r.complete()}).catch(m=>{r.error(new ae({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var De=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(x)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let a=new $;return o.relayconfigState.configLoaded.subscribe(p=>{p&&He(o,e,t).subscribe(a)}),a}return He(o,e,t)};var Ve={providers:[ee(),he(xe,ge(),fe(ue)),pe(ce(),le([De,Le])),h,{provide:f,useValue:Ne},{provide:te,useValue:Ae()},{provide:Ce,useValue:{alertVariant:"simple"}},Te,k,Ee,ne,Re,oe,Me,Ie]};re(A,Ve);
|
package/package.json
CHANGED
package/chunk-3TJKPVBA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunk-B62TPRVG.js";import{a as z}from"./chunk-SZUNW4JO.js";import{a as B}from"./chunk-HSHF5HR7.js";import{b as _}from"./chunk-ZU6T3TW3.js";import{a as $}from"./chunk-HUZXJWCG.js";import{z as S}from"./chunk-UNMDSCAN.js";import{c as P}from"./chunk-CFNARBNK.js";import{E as u,K as h,Mc as c,R as k,W as l,l as d,la as n,na as f,p as m}from"./chunk-26Z7TPJB.js";import{a,b as s}from"./chunk-7CGTOI24.js";var b={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var D=class g{#i=l(z);#t=l(P);#o=l(R);#e=l(_);#c=l(S);#g=l($);#l=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>s(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(s(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#s()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#s()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(B,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#s(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(h(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(m(t=>s(a({},e),{task:t??null})))}),u(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(s(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,r=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,r)=>(o??0)+(r??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?b[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,r=e.TotalFileSize-e.ProcessedFileSize-t,C=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${C}${o} files (${this.#i.transform(r)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=k({token:g,factory:g.\u0275fac,providedIn:"root"})};export{b as a,D as b};
|