@duplicati/ngclient 0.0.157 → 0.0.158
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/dest-icons/s3compat.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/{chunk-UXOJBG6Z.js → chunk-2IE65QDC.js} +1 -1
- package/{chunk-FPVRHFKW.js → chunk-363K6H7I.js} +1 -1
- package/{chunk-2GCNISUZ.js → chunk-3AGOCPNZ.js} +1 -1
- package/chunk-6XXAHUOH.js +1 -0
- package/{chunk-YZNZ5RQI.js → chunk-BGKZFATT.js} +1 -1
- package/{chunk-VOLZIA33.js → chunk-BTJVI7MG.js} +1 -1
- package/chunk-CFN5U5PK.js +1 -0
- package/{chunk-F7PHZYZX.js → chunk-CUL5FHDH.js} +1 -1
- package/chunk-FMEVVC6D.js +7 -0
- package/chunk-HWCUMKYF.js +1 -0
- package/{chunk-OX4HQVUD.js → chunk-J2Y5AVUU.js} +1 -1
- package/chunk-JH4DRDIH.js +1 -0
- package/{chunk-DILTD4XG.js → chunk-JRDR23NB.js} +1 -1
- package/chunk-KSEFQ2XA.js +1 -0
- package/chunk-L3RU4D2N.js +1 -0
- package/{chunk-IB6ESS57.js → chunk-LANFQDZE.js} +1 -1
- package/{chunk-DBQGZZI2.js → chunk-M6SIMFCD.js} +1 -1
- package/chunk-MSX2SJC7.js +1 -0
- package/{chunk-BSMAYTZR.js → chunk-NC73IOHK.js} +1 -1
- package/chunk-O4WI3VDE.js +1 -0
- package/{chunk-YC5FPDJH.js → chunk-RADP6NAN.js} +1 -1
- package/{chunk-GYDGMSUA.js → chunk-U4U2GCS5.js} +1 -1
- package/chunk-X3XJ26NZ.js +2 -0
- package/{chunk-UDF726AD.js → chunk-XH5CTH3O.js} +1 -1
- package/{chunk-ZGC3K2EK.js → chunk-XHITDSWR.js} +1 -1
- package/{chunk-USX4C3JC.js → chunk-Y75ZS4Q2.js} +1 -1
- package/{chunk-LTQOZB7Q.js → chunk-YHOYPGPD.js} +1 -1
- package/{chunk-Q3BXXS7G.js → chunk-ZKX6JJ6S.js} +1 -1
- package/{chunk-CAJEHCFP.js → chunk-ZWO4SECL.js} +1 -1
- package/index.html +1 -1
- package/{main-UHBWCAT4.js → main-ATSCYMRN.js} +1 -1
- package/package.json +1 -1
- package/chunk-2AVDJBM7.js +0 -1
- package/chunk-3N6V4QBS.js +0 -1
- package/chunk-4NLJRM5D.js +0 -1
- package/chunk-6NY5MUS6.js +0 -1
- package/chunk-E7Y6L3W6.js +0 -1
- package/chunk-NRUGLQRY.js +0 -1
- package/chunk-P4SN4J3W.js +0 -1
- package/chunk-SJ3V6DON.js +0 -2
- package/chunk-TWMGET5I.js +0 -7
- package/chunk-VVVEOA35.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as k,r as w}from"./chunk-QF4DQYEP.js";import{h as U}from"./chunk-PD73DDOS.js";import{H as C,Qc as R,V as E,_ as A,pa as z,r as S}from"./chunk-QONLYWYC.js";import{a as i,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(C(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=A(U);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#s=new h(()=>this.getS3Config("StorageClasses"));#i=R(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new w,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},V={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return i({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},G=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return i({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[k.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return v(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{server:a,path:u}=m(t);return i({destinationType:e,dynamic:i({"rclone-remote-repository":a,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return v(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,M(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return i({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:V.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],le={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function c(e,t,o,r){return v(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function v(e,t,o,r,n){let a=F(n),u=encodeURIComponent(j(t)),$=u==""?"":u+B(o),y=r??"",O=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=M($,I(y));return`${O}${f}${a}`}function N(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function M(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function I(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return decodeURIComponent(e.hostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function j(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function B(e){return e==null||e===""?"":":"+e.toString()}function b(e){return G.find(o=>o.key===e||o.customKey===e)??G.find(o=>`${o.key}s`===e)??null??i({key:e,displayName:e},V)}function m(e){return{server:decodeURIComponent(e.hostname),port:e.port,path:N(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=b(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function F(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function me(e){let t=e.destinationType??"";return b(t)?.mapper.to(e)??""}function de(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return b(t).mapper.from(t,new URL("http://localhost"),e);let n=b(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new URL(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),P=$.split("."),O=P.length===4&&P.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!O?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",u),null}}function L(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
|
+
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function he(e){return L(e).map(([t,o])=>({Name:t,Value:o}))}function ge(e){return Object.fromEntries(L(e))}export{b as a,me as b,de as c,he as d,ge as e,le as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-JRDR23NB.js";import{a as le}from"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import{h as ae}from"./chunk-KSEFQ2XA.js";import{b as oe,c as ie,d as se}from"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-Z27IQRKV.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import{b as W,d as V}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as ee,G as ne,O as te,c as H,e as q,i as Y,k as j,s as Q,u as Z}from"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as p,Bc as U,Cb as m,Db as t,Eb as i,Fb as O,Mb as h,Qc as J,Sa as c,Tb as S,Ub as C,Vb as r,Xc as X,Zb as I,_ as g,cb as z,ea as N,fa as P,gc as v,hc as x,kc as K,pa as B,sc as u,tc as d,uc as T,xb as E,yb as f}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var re=["formRef"],ce=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(a,l){a&1&&(S(0,1,1),O(1,"sh-icon",20),C())}function ue(a,l){a&1&&(t(0,"p",21),r(1,6),i())}function de(a,l){a&1&&(t(0,"p"),r(1,7),i())}function Te(a,l){if(a&1){let n=h();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionTime,s)||(o.optionsFields.backupRetentionTime=s),P(s)}),t(3,"label",30),r(4,9),i()()}if(a&2){let n=p();c(2),m("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function Se(a,l){if(a&1){let n=h();t(0,"p"),r(1,10),i(),t(2,"sh-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionVersions,s)||(o.optionsFields.backupRetentionVersions=s),P(s)}),i()()}if(a&2){let n=p();c(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Ce(a,l){a&1&&(t(0,"p"),r(1,12),i())}function me(a,l){if(a&1){let n=h();t(0,"p"),r(1,13),i(),t(2,"sh-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionCustom,s)||(o.optionsFields.backupRetentionCustom=s),P(s)}),i()()}if(a&2){let n=p();c(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Oe=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],ge=1024*1024*1024*2,Ne=1024*1024*5,F=class a{#e=g(ae);#n=g(V);#t=g(W);formRef=X.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=B(Oe);exceededVolumeSize=J(()=>{let{size:l,unit:n}=ie(this.optionsFields.remoteVolumeSize());if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,oe.findIndex(s=>s.value===n));return e>ge||e<Ne});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=z({type:a,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,re,5),n&2&&x()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let M;M=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let R;R=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let k;k=$localize`Number of versions`;let L;L=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let w;w=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let G;G=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let D;return D=$localize`Retention expression`,[l,n,e,s,o,M,R,A,b,y,$,k,L,w,G,D,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"sh-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),T("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),E(7,pe,2,0,"sh-icon",20),C(),i()(),E(8,ue,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),O(12,"sh-icon",23),i(),C(),i()(),t(13,"sh-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),T("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),E(17,de,2,0,"p")(18,Te,5,2)(19,Se,6,1)(20,Ce,2,0,"p")(21,me,8,1),t(22,"app-options-list",26),T("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),O(26,"sh-icon"),C(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),O(29,"sh-icon"),C(),i()()()),n&2&&(c(4),m("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),c(3),f(e.exceededVolumeSize()?7:-1),c(),f(e.exceededVolumeSize()?8:-1),c(5),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),c(3),u("ngModel",e.optionsFields.backupRetention),c(),f(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),c(5),u("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",U(15,ce)),c(5),K("loader",e.isSubmitting()))},dependencies:[Q,H,j,q,Y,_e,se,le,ee,Z,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y,f as tn}from"./chunk-SJ3V6DON.js";import{a as on}from"./chunk-TPBZNCDW.js";import{a as nn}from"./chunk-RDCD2W2C.js";import{a as en}from"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import{a as Ze}from"./chunk-XVWOVBC4.js";import"./chunk-WXF4HUYT.js";import{e as Xe}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as we,B as ze,C as Ve,E as Ue,F as je,J as Ke,K as We,R as qe,S as Qe,u as Je}from"./chunk-QF4DQYEP.js";import{h as Ye}from"./chunk-PD73DDOS.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as E,Cc as D,Db as o,Eb as t,Fb as T,Fc as M,Gc as G,H as j,Hc as R,Jb as O,Jc as Q,Kb as m,Lb as f,Mb as H,Pa as K,Rc as ve,Sa as a,Tb as c,Ub as s,Vb as d,Wb as h,Xb as A,Yb as W,Zb as $,_ as v,cb as He,ea as P,fa as I,hb as N,ib as Ge,ic as V,kc as L,nc as r,pa as X,pc as S,sb as xe,sc as ye,tb as ke,tc as Be,uc as be,xb as g,yb as p,zb as J}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-SR4YENFS.js").then(e=>e.NgTemplateOutlet),Ue,Qe,qe,import("./chunk-WNJSKJGQ.js").then(e=>e.DurationFormatPipe),import("./chunk-FIOBQPE7.js").then(e=>e.BytesPipe),import("./chunk-M7QQEZOU.js").then(e=>e.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],_n=e=>({$implicit:e}),cn=e=>["/backup",e],sn=e=>["/restore",e],un=e=>["/backup",e,"export"],Fn=e=>["/backup",e,"delete"],Cn=e=>["/backup",e,"database"],Tn=e=>["/backup",e,"commandline"],En=e=>["/backup",e,"log"];function dn(e,i){if(e&1){let n=H();o(0,"button",52),$("click",function(){let F=P(n).$implicit,C=u(2);return I(C.sortByColumn.set(F.value))}),d(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),h(n.label),A(1)}}function gn(e,i){if(e&1&&(o(0,"sh-menu",53)(1,"button",54),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,55),w(6,dn,2,3,"button",56,J),m(),t()),e&2){let n=u();a(4),h(n.orderBy()),A(2),a(2),z(n.sortOrderOptions())}}function pn(e,i){if(e&1&&(o(0,"p")(1,"span"),d(2,21),t(),r(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),S(" ",R(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Sn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function On(e,i){e&1&&(O(0),r(1,"-"),m())}function mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Nn(e,i){e&1&&(O(0),r(1,"-"),m())}function Mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),r(1,"-"),m())}function In(e,i){e&1&&(o(0,"sh-chip",63),d(1,22),t())}function fn(e,i){e&1&&f(0)}function Dn(e,i){if(e&1&&(o(0,"div",59)(1,"div",46)(2,"h3"),r(3),o(4,"sh-chip"),T(5,"img",60),r(6),t()(),o(7,"p")(8,"span"),d(9,16),t(),r(10),M(11,"relativeTime"),t(),g(12,pn,5,4,"p"),o(13,"p")(14,"span"),d(15,17),t(),g(16,Sn,2,4)(17,On,2,0,"ng-container"),t(),o(18,"p")(19,"span"),d(20,18),t(),g(21,mn,2,3)(22,Nn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),d(25,19),t(),g(26,Mn,2,3)(27,Pn,2,0,"ng-container"),t()(),o(28,"div",61)(29,"sh-chip",62),d(30,20),t(),g(31,In,2,0,"sh-chip",63),t(),o(32,"div",50),N(33,fn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",R(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 C=_.getBackupVersionCount(n);a(4),h(C)(C),A(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,_n,n))}}function $n(e,i){if(e&1&&w(0,Dn,34,18,"div",59,J),e&2){let n=u(3);z(n.backups())}}function Rn(e,i){e&1&&(O(0),d(1,23),m())}function hn(e,i){if(e&1&&(o(0,"div",57),g(1,$n,2,0)(2,Rn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),p(n.backups().length?1:2)}}function An(e,i){e&1&&(c(0,24,1),f(1),s())}function Ln(e,i){e&1&&(c(0,25,1),f(1),s())}function Hn(e,i){e&1&&(c(0,26,1),f(1),s())}function Gn(e,i){e&1&&(c(0,27,1),f(1),s())}function xn(e,i){e&1&&(c(0,28,1),f(1),s())}function kn(e,i){e&1&&(c(0,29,1),f(1),s())}function yn(e,i){e&1&&(c(0,30,1),f(1),s())}function Bn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function bn(e,i){e&1&&(O(0),r(1,"-"),m())}function vn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),r(1,"-"),m())}function Jn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),r(1,"-"),m())}function zn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Vn(e,i){e&1&&(O(0),r(1,"-"),m())}function Un(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function jn(e,i){e&1&&(O(0),r(1,"-"),m())}function Kn(e,i){e&1&&f(0)}function Wn(e,i){if(e&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td")(4,"sh-chip",51),T(5,"img",60),r(6),t()(),o(7,"td"),g(8,Bn,2,4)(9,bn,2,0,"ng-container"),t(),o(10,"td"),g(11,vn,2,4)(12,Xn,2,0,"ng-container"),t(),o(13,"td"),g(14,Jn,2,4)(15,wn,2,0,"ng-container"),t(),o(16,"td"),g(17,zn,2,3)(18,Vn,2,0,"ng-container"),t(),o(19,"td"),g(20,Un,2,3)(21,jn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),d(24,33),t()(),o(25,"td"),N(26,Kn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),K),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 C=_.getBackupVersionCount(n);a(4),h(C)(C),A(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,_n,n))}}function qn(e,i){if(e&1){let n=H();o(0,"sh-table",65),be("sortByColumnChange",function(F){P(n);let C=u(2);return Be(C.sortByColumn,F)||(C.sortByColumn=F),I(F)}),o(1,"tr",66)(2,"th",67),c(3,24),N(4,An,2,0,"ng-container",68),s(),t(),o(5,"th",69),c(6,25),N(7,Ln,2,0,"ng-container",68),s(),t(),o(8,"th",70),c(9,26),N(10,Hn,2,0,"ng-container",68),s(),t(),o(11,"th",71),c(12,27),N(13,Gn,2,0,"ng-container",68),s(),t(),o(14,"th",72),c(15,28),N(16,xn,2,0,"ng-container",68),s(),t(),o(17,"th",73),c(18,29),N(19,kn,2,0,"ng-container",68),s(),t(),o(20,"th",74),c(21,30),N(22,yn,2,0,"ng-container",68),s(),t(),o(23,"th"),d(24,31),t(),o(25,"th"),d(26,32),t()(),w(27,Wn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);E("data",n.backups())("loading",n.backupsLoading()),ye("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),z(n.backups())}}function Qn(e,i){if(e&1&&g(0,hn,3,1,"div",57)(1,qn,29,10,"sh-table",58),e&2){let n=u();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Yn(e,i){e&1&&(o(0,"div",75),T(1,"sh-progress-bar",76),o(2,"div",46)(3,"h3"),d(4,34),t()()())}function Zn(e,i){e&1&&d(0,35,1)}function et(e,i){e&1&&(o(0,"sh-icon"),r(1,"check"),t())}function nt(e,i){e&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function tt(e,i){if(e&1){let n=H();o(0,"button",77),$("click",function(){let F=P(n).$implicit,C=u();return I(C.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,Zn,1,0),s(),t(),o(4,"button",78)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",47),g(9,et,2,0,"sh-icon")(10,nt,2,0,"sh-icon"),t(),O(11,55),o(12,"h3",79),r(13,"Operations"),t(),o(14,"button",80),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",80),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",80),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",79),r(25,"Advanced"),t(),o(26,"button",80),c(27,39),T(28,"sh-icon"),s(),t(),o(29,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.verifyFiles(F.Backup.ID))}),c(30,40),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.compressBackup(F.Backup.ID))}),c(33,41),T(34,"sh-icon"),s(),t(),o(35,"button",80),c(36,42),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",79),r(40,"Reporting"),t(),o(41,"button",80),c(42,43),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,cn,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,sn,n.Backup.ID)),a(3),E("routerLink",D(19,un,n.Backup.ID)),a(3),E("routerLink",D(21,Fn,n.Backup.ID)),a(6),E("routerLink",D(23,Cn,n.Backup.ID)),a(9),E("routerLink",D(25,Tn,n.Backup.ID)),a(6),E("routerLink",D(27,En,n.Backup.ID))}}function it(e,i){e&1&&(o(0,"sh-icon",81),r(1,"funnel-simple"),t(),o(2,"sh-icon",82),r(3,"sort-ascending"),t(),o(4,"sh-icon",83),r(5,"sort-descending"),t())}var ot={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(Ye);#t=v(nn);#e=v(en);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=Ze("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)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=ot[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let C="http://null?"+i.split("?")[1],x=new URL(C).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(tn))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=He({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let C;C=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$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 oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$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 ce;ce=$localize` ${B}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Ce;Ce=$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 Te;Te=$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 Ee;Ee=$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 de;de=$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 ge;ge=$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 pe;pe=$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 Se;Se=$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 Oe;Oe=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${b}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$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 Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Re;Re=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Le;return Le=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,C,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Pe,Ie,fe,De,$e,Re,he,Ae,Le,[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","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[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,_){if(n&1){let F=H();T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",44),T(4,"img",45),o(5,"div",46)(6,"h3"),d(7,2),t(),o(8,"p"),d(9,3),t()(),o(10,"button",47),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",44),T(14,"img",48),o(15,"div",46)(16,"h3"),d(17,5),t(),o(18,"p"),d(19,6),t()(),o(20,"button",47),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",49)(24,"h2"),O(25),d(26,8),m(),o(27,"div",50)(28,"sh-button-group",51)(29,"button",52),$("click",function(){return P(F),I(_.viewMode.set("list"))}),c(30,9),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){return P(F),I(_.viewMode.set("details"))}),c(33,10),T(34,"sh-icon"),s(),t()(),o(35,"sh-menu",53)(36,"button",54),c(37,11),T(38,"strong")(39,"sh-icon"),s(),t(),O(40,55),o(41,"button",52),$("click",function(){return P(F),I(_.setTimeType("relative"))}),d(42,12),t(),o(43,"button",52),$("click",function(){return P(F),I(_.setTimeType("actual"))}),d(44,13),t(),m(),t(),g(45,gn,8,1,"sh-menu",53),t()(),Ge(46,Qn,2,1)(47,Yn,5,0),xe(48,46,an,null,47),t()(),N(50,tt,44,29,"ng-template",null,0,Q)(52,it,6,0,"ng-template",null,1,Q)}n&2&&(a(3),E("routerLink",q(9,ln)),a(10),E("routerLink",q(10,rn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),h(_.timeType()),A(37),a(6),p(_.viewMode()==="list"?45:-1),a(3),ke(!_.backupsLoading()))},dependencies:[Xe,on,Ve,ze,Je,je,Ke,We,we],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}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.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{Z as default};
|
|
1
|
+
import{a as Y,f as tn}from"./chunk-X3XJ26NZ.js";import{a as on}from"./chunk-TPBZNCDW.js";import{a as nn}from"./chunk-RDCD2W2C.js";import{a as en}from"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import{a as Ze}from"./chunk-XVWOVBC4.js";import"./chunk-WXF4HUYT.js";import{e as Xe}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as we,B as ze,C as Ve,E as Ue,F as je,J as Ke,K as We,R as qe,S as Qe,u as Je}from"./chunk-QF4DQYEP.js";import{h as Ye}from"./chunk-PD73DDOS.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as E,Cc as D,Db as o,Eb as t,Fb as T,Fc as M,Gc as G,H as j,Hc as R,Jb as O,Jc as Q,Kb as m,Lb as f,Mb as H,Pa as K,Rc as ve,Sa as a,Tb as c,Ub as s,Vb as d,Wb as h,Xb as A,Yb as W,Zb as $,_ as v,cb as He,ea as P,fa as I,hb as N,ib as Ge,ic as V,kc as L,nc as r,pa as X,pc as S,sb as xe,sc as ye,tb as ke,tc as Be,uc as be,xb as g,yb as p,zb as J}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-SR4YENFS.js").then(e=>e.NgTemplateOutlet),Ue,Qe,qe,import("./chunk-WNJSKJGQ.js").then(e=>e.DurationFormatPipe),import("./chunk-FIOBQPE7.js").then(e=>e.BytesPipe),import("./chunk-M7QQEZOU.js").then(e=>e.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],_n=e=>({$implicit:e}),cn=e=>["/backup",e],sn=e=>["/restore",e],un=e=>["/backup",e,"export"],Fn=e=>["/backup",e,"delete"],Cn=e=>["/backup",e,"database"],Tn=e=>["/backup",e,"commandline"],En=e=>["/backup",e,"log"];function dn(e,i){if(e&1){let n=H();o(0,"button",52),$("click",function(){let F=P(n).$implicit,C=u(2);return I(C.sortByColumn.set(F.value))}),d(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),h(n.label),A(1)}}function gn(e,i){if(e&1&&(o(0,"sh-menu",53)(1,"button",54),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,55),w(6,dn,2,3,"button",56,J),m(),t()),e&2){let n=u();a(4),h(n.orderBy()),A(2),a(2),z(n.sortOrderOptions())}}function pn(e,i){if(e&1&&(o(0,"p")(1,"span"),d(2,21),t(),r(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),S(" ",R(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Sn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function On(e,i){e&1&&(O(0),r(1,"-"),m())}function mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Nn(e,i){e&1&&(O(0),r(1,"-"),m())}function Mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),r(1,"-"),m())}function In(e,i){e&1&&(o(0,"sh-chip",63),d(1,22),t())}function fn(e,i){e&1&&f(0)}function Dn(e,i){if(e&1&&(o(0,"div",59)(1,"div",46)(2,"h3"),r(3),o(4,"sh-chip"),T(5,"img",60),r(6),t()(),o(7,"p")(8,"span"),d(9,16),t(),r(10),M(11,"relativeTime"),t(),g(12,pn,5,4,"p"),o(13,"p")(14,"span"),d(15,17),t(),g(16,Sn,2,4)(17,On,2,0,"ng-container"),t(),o(18,"p")(19,"span"),d(20,18),t(),g(21,mn,2,3)(22,Nn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),d(25,19),t(),g(26,Mn,2,3)(27,Pn,2,0,"ng-container"),t()(),o(28,"div",61)(29,"sh-chip",62),d(30,20),t(),g(31,In,2,0,"sh-chip",63),t(),o(32,"div",50),N(33,fn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",R(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 C=_.getBackupVersionCount(n);a(4),h(C)(C),A(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,_n,n))}}function $n(e,i){if(e&1&&w(0,Dn,34,18,"div",59,J),e&2){let n=u(3);z(n.backups())}}function Rn(e,i){e&1&&(O(0),d(1,23),m())}function hn(e,i){if(e&1&&(o(0,"div",57),g(1,$n,2,0)(2,Rn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),p(n.backups().length?1:2)}}function An(e,i){e&1&&(c(0,24,1),f(1),s())}function Ln(e,i){e&1&&(c(0,25,1),f(1),s())}function Hn(e,i){e&1&&(c(0,26,1),f(1),s())}function Gn(e,i){e&1&&(c(0,27,1),f(1),s())}function xn(e,i){e&1&&(c(0,28,1),f(1),s())}function kn(e,i){e&1&&(c(0,29,1),f(1),s())}function yn(e,i){e&1&&(c(0,30,1),f(1),s())}function Bn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function bn(e,i){e&1&&(O(0),r(1,"-"),m())}function vn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),r(1,"-"),m())}function Jn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),r(1,"-"),m())}function zn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Vn(e,i){e&1&&(O(0),r(1,"-"),m())}function Un(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function jn(e,i){e&1&&(O(0),r(1,"-"),m())}function Kn(e,i){e&1&&f(0)}function Wn(e,i){if(e&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td")(4,"sh-chip",51),T(5,"img",60),r(6),t()(),o(7,"td"),g(8,Bn,2,4)(9,bn,2,0,"ng-container"),t(),o(10,"td"),g(11,vn,2,4)(12,Xn,2,0,"ng-container"),t(),o(13,"td"),g(14,Jn,2,4)(15,wn,2,0,"ng-container"),t(),o(16,"td"),g(17,zn,2,3)(18,Vn,2,0,"ng-container"),t(),o(19,"td"),g(20,Un,2,3)(21,jn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),d(24,33),t()(),o(25,"td"),N(26,Kn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),K),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 C=_.getBackupVersionCount(n);a(4),h(C)(C),A(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,_n,n))}}function qn(e,i){if(e&1){let n=H();o(0,"sh-table",65),be("sortByColumnChange",function(F){P(n);let C=u(2);return Be(C.sortByColumn,F)||(C.sortByColumn=F),I(F)}),o(1,"tr",66)(2,"th",67),c(3,24),N(4,An,2,0,"ng-container",68),s(),t(),o(5,"th",69),c(6,25),N(7,Ln,2,0,"ng-container",68),s(),t(),o(8,"th",70),c(9,26),N(10,Hn,2,0,"ng-container",68),s(),t(),o(11,"th",71),c(12,27),N(13,Gn,2,0,"ng-container",68),s(),t(),o(14,"th",72),c(15,28),N(16,xn,2,0,"ng-container",68),s(),t(),o(17,"th",73),c(18,29),N(19,kn,2,0,"ng-container",68),s(),t(),o(20,"th",74),c(21,30),N(22,yn,2,0,"ng-container",68),s(),t(),o(23,"th"),d(24,31),t(),o(25,"th"),d(26,32),t()(),w(27,Wn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);E("data",n.backups())("loading",n.backupsLoading()),ye("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),z(n.backups())}}function Qn(e,i){if(e&1&&g(0,hn,3,1,"div",57)(1,qn,29,10,"sh-table",58),e&2){let n=u();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Yn(e,i){e&1&&(o(0,"div",75),T(1,"sh-progress-bar",76),o(2,"div",46)(3,"h3"),d(4,34),t()()())}function Zn(e,i){e&1&&d(0,35,1)}function et(e,i){e&1&&(o(0,"sh-icon"),r(1,"check"),t())}function nt(e,i){e&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function tt(e,i){if(e&1){let n=H();o(0,"button",77),$("click",function(){let F=P(n).$implicit,C=u();return I(C.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,Zn,1,0),s(),t(),o(4,"button",78)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",47),g(9,et,2,0,"sh-icon")(10,nt,2,0,"sh-icon"),t(),O(11,55),o(12,"h3",79),r(13,"Operations"),t(),o(14,"button",80),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",80),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",80),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",79),r(25,"Advanced"),t(),o(26,"button",80),c(27,39),T(28,"sh-icon"),s(),t(),o(29,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.verifyFiles(F.Backup.ID))}),c(30,40),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.compressBackup(F.Backup.ID))}),c(33,41),T(34,"sh-icon"),s(),t(),o(35,"button",80),c(36,42),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",79),r(40,"Reporting"),t(),o(41,"button",80),c(42,43),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,cn,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,sn,n.Backup.ID)),a(3),E("routerLink",D(19,un,n.Backup.ID)),a(3),E("routerLink",D(21,Fn,n.Backup.ID)),a(6),E("routerLink",D(23,Cn,n.Backup.ID)),a(9),E("routerLink",D(25,Tn,n.Backup.ID)),a(6),E("routerLink",D(27,En,n.Backup.ID))}}function it(e,i){e&1&&(o(0,"sh-icon",81),r(1,"funnel-simple"),t(),o(2,"sh-icon",82),r(3,"sort-ascending"),t(),o(4,"sh-icon",83),r(5,"sort-descending"),t())}var ot={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(Ye);#t=v(nn);#e=v(en);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=Ze("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)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=ot[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let C="http://null?"+i.split("?")[1],x=new URL(C).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(tn))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=He({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let C;C=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$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 oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$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 ce;ce=$localize` ${B}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Ce;Ce=$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 Te;Te=$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 Ee;Ee=$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 de;de=$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 ge;ge=$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 pe;pe=$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 Se;Se=$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 Oe;Oe=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${b}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$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 Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Re;Re=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Le;return Le=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,C,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Pe,Ie,fe,De,$e,Re,he,Ae,Le,[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","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[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,_){if(n&1){let F=H();T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",44),T(4,"img",45),o(5,"div",46)(6,"h3"),d(7,2),t(),o(8,"p"),d(9,3),t()(),o(10,"button",47),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",44),T(14,"img",48),o(15,"div",46)(16,"h3"),d(17,5),t(),o(18,"p"),d(19,6),t()(),o(20,"button",47),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",49)(24,"h2"),O(25),d(26,8),m(),o(27,"div",50)(28,"sh-button-group",51)(29,"button",52),$("click",function(){return P(F),I(_.viewMode.set("list"))}),c(30,9),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){return P(F),I(_.viewMode.set("details"))}),c(33,10),T(34,"sh-icon"),s(),t()(),o(35,"sh-menu",53)(36,"button",54),c(37,11),T(38,"strong")(39,"sh-icon"),s(),t(),O(40,55),o(41,"button",52),$("click",function(){return P(F),I(_.setTimeType("relative"))}),d(42,12),t(),o(43,"button",52),$("click",function(){return P(F),I(_.setTimeType("actual"))}),d(44,13),t(),m(),t(),g(45,gn,8,1,"sh-menu",53),t()(),Ge(46,Qn,2,1)(47,Yn,5,0),xe(48,46,an,null,47),t()(),N(50,tt,44,29,"ng-template",null,0,Q)(52,it,6,0,"ng-template",null,1,Q)}n&2&&(a(3),E("routerLink",q(9,ln)),a(10),E("routerLink",q(10,rn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),h(_.timeType()),A(37),a(6),p(_.viewMode()==="list"?45:-1),a(3),ke(!_.backupsLoading()))},dependencies:[Xe,on,Ve,ze,Je,je,Ke,We,we],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}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.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{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,g as b}from"./chunk-
|
|
1
|
+
import{f as a,g as b}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-Z27IQRKV.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Te}from"./chunk-
|
|
1
|
+
import{a as Te}from"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import{a as Me}from"./chunk-TPBZNCDW.js";import{h as A}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import{a as Se}from"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import{b as O}from"./chunk-Z27IQRKV.js";import{a as Ee}from"./chunk-RDCD2W2C.js";import"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-XVWOVBC4.js";import"./chunk-WXF4HUYT.js";import{b as j,d as q,e as Q}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as de,F as Ce,G as ce,K as ue,O as pe,c as Y,e as Z,f as ee,j as te,n as ne,o as ie,p as oe,q as ae,r as re,s as le,t as se,u as me,z as _e}from"./chunk-QF4DQYEP.js";import{g as Ne,h as ge}from"./chunk-PD73DDOS.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as M,Ab as B,Ac as z,Bb as G,Bc as H,Cb as p,Db as a,Eb as n,Fb as r,Jb as f,Kb as F,Mb as y,Rc as W,Sa as m,Tb as g,Ub as E,Vb as c,Wb as v,Xb as U,Zb as x,_ as C,cb as R,ea as S,fa as T,kc as w,pa as D,sc as K,tc as J,uc as X,xb as $,yb as b,zb as k,zc as V}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var fe=()=>["backup"];function Fe(l,t){l&1&&r(0,"sh-progress-bar",12)}function Oe(l,t){if(l&1&&(a(0,"sh-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),p("id",V("filter-",s))("formControl",e)}}function Ae(l,t){if(l&1){let e=y();a(0,"form",13)(1,"sh-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"sh-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"sh-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",13)(16,"sh-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"sh-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),f(25,26),c(26,7),F(),f(27,27),B(28,Oe,2,3,"sh-form-field",null,k),F(),n()(),a(30,"p"),g(31,8),r(32,"a",28),E(),n(),a(33,"app-options-list",29),X("optionsChange",function(o){S(e);let u=M();return J(u.settings,o)||(u.settings=o),T(o)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let o=M();return T(o.submit())}),g(36,9),r(37,"sh-icon"),E(),n()()}if(l&2){let e=M();p("formGroup",e.baseCmdForm),m(),p("options",e.commandOptions()??H(10,fe))("inlineSearch",!0),m(14),p("formGroup",e.standardFields),m(9),p("disallowToggle",!0),m(4),G(e.standardFields.controls.filters.controls),m(5),K("options",e.settings),p("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(36)}}var _=new re,P=class l{#e=C(A);#t=C(ge);#n=C(q);#i=C(j);#o=C(Ne);#a=C(Ee);#s=C(_e);#r=O(this.#i.params);commandOptions=O(this.#o.getApiV1Commandline());isSubmitting=D(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=W(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
|
|
2
2
|
`).filter(i=>i.length>0)??[],o=this.standardFields.value,u=o.filters??[],N=[t.command,e,...s,`--backup-name=${o["backup-name"]}`,`--dbpath=${o.dbpath}`,`--backup-id=${o["backup-id"]}`,...u.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(i=>{i.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",i.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=R({type:l,selectors:[["app-commandline"]],features:[z([A])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let o;o=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let N;N=$localize`Backup ID`;let i;i=$localize`Backup Name`;let I;I=$localize`Filters`;let h;h=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,o,u,N,i,I,h,L,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"sh-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),g(4,0),r(5,"sh-icon"),E(),n()(),$(6,Fe,1,0,"sh-progress-bar",12)(7,Ae,38,11),n()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[le,te,Y,Z,ee,Me,Te,Se,se,ne,ie,ae,oe,Q,ce,de,Ce,pe,ue,me],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-
|
|
1
|
+
import{e as a,f as b}from"./chunk-M6SIMFCD.js";import"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-Z27IQRKV.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-WXF4HUYT.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-BNWLPYK6.js";import"./chunk-QWQKYLNR.js";import{g as q}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-BNWLPYK6.js";import"./chunk-QWQKYLNR.js";import{g as q}from"./chunk-M6SIMFCD.js";import"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import{b as Z}from"./chunk-3LVCVLMO.js";import"./chunk-Z27IQRKV.js";import"./chunk-7FCBU2UO.js";import{a as V}from"./chunk-RDCD2W2C.js";import"./chunk-TJIZJNCK.js";import{a as H}from"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import{a as j}from"./chunk-LN26XMBJ.js";import"./chunk-XVWOVBC4.js";import"./chunk-WXF4HUYT.js";import{b as w}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{C as W,K as X,N as z,u as J}from"./chunk-QF4DQYEP.js";import{h as B}from"./chunk-PD73DDOS.js";import{qa as k}from"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Cb as C,Db as i,Eb as s,Fb as R,Fc as T,Gc as d,Jb as P,Kb as m,Qc as b,Sa as a,Tb as y,Ub as D,Vb as r,Wb as v,Xb as x,_ as c,cb as A,ga as u,ha as f,nc as M,pa as I,qc as N,xb as O,yb as p}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),u(),i(1,"svg",19),R(2,"circle",20),s(),f(),i(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),u(),i(1,"svg",19),R(2,"circle",20),s(),f(),i(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,o=g(2);N(" ",d(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,o=g(2);N(" ",d(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(P(0),r(1,9),m())}function ie(n,t){if(n&1&&(i(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),i(4,"div",24),R(5,"sh-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(o=S.statusData())==null?null:o.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#i=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#o(e)})}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,o,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,o){if(e&1&&(i(0,"section"),O(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),i(3,"sh-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),R(7,"app-notifications",13),s()(),i(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(o.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",o.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
|
package/index.html
CHANGED
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
<body>
|
|
84
84
|
<app-root></app-root>
|
|
85
85
|
<div class="loading">Connecting ...</div>
|
|
86
|
-
<link rel="modulepreload" href="chunk-YJPY33RI.js"><link rel="modulepreload" href="chunk-7FCBU2UO.js"><link rel="modulepreload" href="chunk-RDCD2W2C.js"><link rel="modulepreload" href="chunk-TJIZJNCK.js"><link rel="modulepreload" href="chunk-ZSZLXWN6.js"><link rel="modulepreload" href="chunk-72HORZFV.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-MTQKK2WN.js"><link rel="modulepreload" href="chunk-LN26XMBJ.js"><link rel="modulepreload" href="chunk-XVWOVBC4.js"><script src="polyfills-S663R3NQ.js" type="module"></script><script src="main-
|
|
86
|
+
<link rel="modulepreload" href="chunk-YJPY33RI.js"><link rel="modulepreload" href="chunk-7FCBU2UO.js"><link rel="modulepreload" href="chunk-RDCD2W2C.js"><link rel="modulepreload" href="chunk-TJIZJNCK.js"><link rel="modulepreload" href="chunk-ZSZLXWN6.js"><link rel="modulepreload" href="chunk-72HORZFV.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-MTQKK2WN.js"><link rel="modulepreload" href="chunk-LN26XMBJ.js"><link rel="modulepreload" href="chunk-XVWOVBC4.js"><script src="polyfills-S663R3NQ.js" type="module"></script><script src="main-ATSCYMRN.js" type="module"></script></body>
|
|
87
87
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ve,c as Ce}from"./chunk-YJPY33RI.js";import{a as fe}from"./chunk-7FCBU2UO.js";import{a as k}from"./chunk-RDCD2W2C.js";import"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import{a as P}from"./chunk-6Q6SSTBK.js";import{a as L}from"./chunk-MTQKK2WN.js";import{a as ue}from"./chunk-LN26XMBJ.js";import"./chunk-XVWOVBC4.js";import{a as b,b as v,c as he,d as I}from"./chunk-WXF4HUYT.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-ABYM5HWA.js";import{a as ee}from"./chunk-Z35OG2DV.js";import{v as le,x as me}from"./chunk-QF4DQYEP.js";import{a as te,b as oe,d as ne,e as re,f as se,i as de}from"./chunk-PD73DDOS.js";import{a as ye}from"./chunk-I2LW33GO.js";import{la as Y,qa as Z}from"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{a as be}from"./chunk-UCS5RU7N.js";import{b as ge}from"./chunk-JYWOYPSQ.js";import{A as x,B,Fb as
|
|
1
|
+
import{b as ve,c as Ce}from"./chunk-YJPY33RI.js";import{a as fe}from"./chunk-7FCBU2UO.js";import{a as k}from"./chunk-RDCD2W2C.js";import"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import{a as P}from"./chunk-6Q6SSTBK.js";import{a as L}from"./chunk-MTQKK2WN.js";import{a as ue}from"./chunk-LN26XMBJ.js";import"./chunk-XVWOVBC4.js";import{a as b,b as v,c as he,d as I}from"./chunk-WXF4HUYT.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-ABYM5HWA.js";import{a as ee}from"./chunk-Z35OG2DV.js";import{v as le,x as me}from"./chunk-QF4DQYEP.js";import{a as te,b as oe,d as ne,e as re,f as se,i as de}from"./chunk-PD73DDOS.js";import{a as ye}from"./chunk-I2LW33GO.js";import{la as Y,qa as Z}from"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{a as be}from"./chunk-UCS5RU7N.js";import{b as ge}from"./chunk-JYWOYPSQ.js";import{A as x,B,Fb as z,H as w,Lc as q,Mc as X,N as G,P as R,R as J,Rc as Q,V as M,Y as _,_ as s,cb as K,f as j,i as W,ja as $,n as F,o as U,pa as d,r as S}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var E=class e{#o=s(b);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=K({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&z(0,"router-outlet")},dependencies:[ie],encapsulation:2})};var Re={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new _("ENVIRONMENT");var A=class e{#o=s(de);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ae=()=>{let e=s(I);return e.token()?!0:e.checkProxyAuthed().pipe(R(t=>t?F(!0):e.refreshToken().pipe(S(()=>!0))))},Ne=()=>{let e=s(v),t=s(k),o=s($),n=e.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?x(i).pipe(S(()=>n)):e.configLoaded?.pipe(R(()=>x(i)))},Te=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-COUIDDUK.js")},{path:"logout",loadComponent:()=>import("./chunk-UQY3P37P.js")},{path:"",canActivate:[Ae],children:[{path:"",canActivate:[Ne],loadComponent:()=>import("./chunk-HWCUMKYF.js"),children:[{path:"",loadComponent:()=>import("./chunk-XHITDSWR.js")},{path:"add-backup",loadComponent:()=>import("./chunk-RIFNOGGK.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-FIUF53BE.js")},{path:"backup/import",loadComponent:()=>import("./chunk-6XXAHUOH.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-2IE65QDC.js"),loadChildren:()=>import("./chunk-CFN5U5PK.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-2IE65QDC.js"),loadChildren:()=>import("./chunk-CFN5U5PK.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-363K6H7I.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-CUL5FHDH.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-YHOYPGPD.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-L3RU4D2N.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-EVJPCAZV.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-J2Y5AVUU.js")},{path:"from-config",loadComponent:()=>import("./chunk-3AYCMVTF.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-3AGOCPNZ.js"),loadChildren:()=>import("./chunk-MSX2SJC7.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-3AGOCPNZ.js"),loadChildren:()=>import("./chunk-MSX2SJC7.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-3AGOCPNZ.js"),loadChildren:()=>import("./chunk-MSX2SJC7.js")},{path:"settings",loadComponent:()=>import("./chunk-JH4DRDIH.js")},{path:"about",loadComponent:()=>import("./chunk-HKL7ZJV5.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-ISNV5CM5.js")},{path:"changelog",loadComponent:()=>import("./chunk-7TF7DTKJ.js")},{path:"libraries",loadComponent:()=>import("./chunk-SKSEDWGR.js")},{path:"system-info",loadComponent:()=>import("./chunk-TG2ZSU7H.js")},{path:"server-settings",loadComponent:()=>import("./chunk-C2VSATF5.js")},{path:"logs",loadChildren:()=>import("./chunk-LYKQBVOC.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-K3VDFIJM.js")}]}]}]}]}];var V=null,we=(e,t)=>{let o=s(I),n=s(ae),i=s(b),l=s(h),r=i.getItem("locale"),u=s(me),a=ve(r),p=e.url==="/api/v1/auth/login",m=e.url==="/api/v1/auth/refresh",C=e.url==="/api/v1/progressstate",g=e.url==="/api/v1/remoteoperation/test",y=e.url==="/api/v1/filesystem/validate",T=e.url.startsWith("/api/v2/"),O=o.token(),D=e,H=e.headers.has("custom-proxy-check")||O===he;if(O&&e.url.startsWith(l.baseUrl)&&!H){let c=e.headers.set("Authorization",`Bearer ${O}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),D=e.clone({headers:c})}return t(D).pipe(S(c=>{if(c.type===4&&c.status===200&&T){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},requestBody:f}}return c}),B(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!H&&(C&&c.status===404||g||y||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(V??=o.refreshToken().pipe(G()),V.pipe(R(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>V=null))):U(()=>({error:c,message:f}))}))};var Oe="1.0.0",Me=`portal-proxy-client-${P()}`,xe=1,N=class e{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=Q(()=>{let t=this.#i(),o=this.#l(),n=this.#a();if(!n||!t||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(t){let o=Uint8Array.from(atob(t),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(t),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:t,publicKey:"",clientVersion:Oe,protocolVersion:xe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let i={from:Me,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(t,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((a,p)=>{let m=P(),g={from:Me,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,requestBody:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let T=this.#r[m];T&&(delete this.#r[m],T.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};function Le(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function Ie(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let i=Le(t.body),l={};t.headers.keys().forEach(p=>{l[p]=t.headers.get(p)??""});let r=t.headers.get("timeout"),u=r!==null?parseInt(r):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let a=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,i,l,u);return new j(p=>{a.then(m=>{let C=new te;l!=null&&Object.keys(l).forEach(y=>{C.set(y,l[y])});let g=new oe({body:m.body,status:m.code,statusText:"OK",headers:C});p.next(g),p.complete()})})}var ke=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(N)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new W;return o.relayconfigState.configLoaded.subscribe(l=>{l&&Ie(o,e,t).subscribe(i)}),i}return Ie(o,e,t)};var Ee={providers:[q(),pe(Te,ce()),ne(se(),re([ke,we])),b,{provide:h,useValue:Re},{provide:X,useValue:Ce()},{provide:le,useValue:{alertVariant:"simple"}},fe,k,ge,Z,ue,Y,ye,be]};ee(E,Ee);
|
package/package.json
CHANGED
package/chunk-2AVDJBM7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-IB6ESS57.js")},{path:"encryption",loadComponent:()=>import("./chunk-GYDGMSUA.js")},{path:"select-files",loadComponent:()=>import("./chunk-Q3BXXS7G.js")},{path:"options",loadComponent:()=>import("./chunk-YZNZ5RQI.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-CAJEHCFP.js")}],t=o;export{t as default};
|
package/chunk-3N6V4QBS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-YC5FPDJH.js")},{path:"destination",loadComponent:()=>import("./chunk-E7Y6L3W6.js")},{path:"source-data",loadComponent:()=>import("./chunk-USX4C3JC.js")},{path:"schedule",loadComponent:()=>import("./chunk-VOLZIA33.js")},{path:"options",loadComponent:()=>import("./chunk-UDF726AD.js")}];export{o as default};
|