fix: change "repository" to "repositoryName"

This commit is contained in:
bsourisse 2023-08-20 21:38:55 +02:00 committed by Ravinou
parent 695e360d07
commit a7beb7b37f
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7
8 changed files with 23 additions and 23 deletions

View file

@ -29,7 +29,7 @@ export default function QuickCommands(props) {
// Asynchronously call copy to clipboard // Asynchronously call copy to clipboard
navigator.clipboard navigator.clipboard
.writeText( .writeText(
`borg init -e repokey-blake2 ssh://${props.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.repository}` `borg init -e repokey-blake2 ssh://${props.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.repositoryName}`
) )
.then(() => { .then(() => {
// If successful, update the isCopied state value // If successful, update the isCopied state value
@ -51,7 +51,7 @@ export default function QuickCommands(props) {
<div className={classes.tooltip}> <div className={classes.tooltip}>
borg init -e repokey-blake2 ssh://{props.unixUser}@ borg init -e repokey-blake2 ssh://{props.unixUser}@
{HOSTNAME}:{SSH_SERVER_PORT}/./ {HOSTNAME}:{SSH_SERVER_PORT}/./
{props.repository} {props.repositoryName}
</div> </div>
)} )}
<div className={classes.icons}> <div className={classes.icons}>

View file

@ -79,7 +79,7 @@ export default function Repo(props) {
)} )}
<QuickCommands <QuickCommands
unixUser={props.unixUser} unixUser={props.unixUser}
repository={props.repository} repositoryName={props.repositoryName}
lanCommand={props.lanCommand} lanCommand={props.lanCommand}
/> />
</div> </div>
@ -103,7 +103,7 @@ export default function Repo(props) {
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th>{props.repository}</th> <th>{props.repositoryName}</th>
<th>{props.storageSize}Go</th> <th>{props.storageSize}Go</th>
<th style={{ padding: '0 4% 0 4%' }}> <th style={{ padding: '0 4% 0 4%' }}>
<StorageBar <StorageBar

View file

@ -41,10 +41,10 @@ function WizardStep2(props) {
borg init -e repokey-blake2 ssh:// borg init -e repokey-blake2 ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
</div> </div>
<CopyButton <CopyButton
dataToCopy={`borg init -e repokey-blake2 ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}`} dataToCopy={`borg init -e repokey-blake2 ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}`}
/> />
</div> </div>
<div className={classes.note}> <div className={classes.note}>
@ -97,10 +97,10 @@ function WizardStep2(props) {
ssh:// ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
</div> </div>
<CopyButton <CopyButton
dataToCopy={`ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}`} dataToCopy={`ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}`}
/> />
</div> </div>
For more information about the Vorta graphical client, please For more information about the Vorta graphical client, please

View file

@ -40,7 +40,7 @@ function WizardStep3(props) {
borg create ssh:// borg create ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
::archive1 /your/pathToBackup ::archive1 /your/pathToBackup
</div> </div>
<CopyButton <CopyButton
@ -87,10 +87,10 @@ function WizardStep3(props) {
borg check -v --progress ssh:// borg check -v --progress ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
</div> </div>
<CopyButton <CopyButton
dataToCopy={`borg check -v --progress ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}`} dataToCopy={`borg check -v --progress ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}`}
/> />
</div> </div>
<li>List the remote archives with :</li> <li>List the remote archives with :</li>
@ -105,10 +105,10 @@ function WizardStep3(props) {
borg list ssh:// borg list ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
</div> </div>
<CopyButton <CopyButton
dataToCopy={`borg list ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}`} dataToCopy={`borg list ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}`}
/> />
</div> </div>
<li>Download a remote archive with the following command :</li> <li>Download a remote archive with the following command :</li>
@ -123,11 +123,11 @@ function WizardStep3(props) {
borg export-tar --tar-filter="gzip -9" ssh:// borg export-tar --tar-filter="gzip -9" ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
::archive1 archive1.tar.gz ::archive1 archive1.tar.gz
</div> </div>
<CopyButton <CopyButton
dataToCopy={`borg export-tar --tar-filter="gzip -9" ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}::archive1 archive1.tar.gz`} dataToCopy={`borg export-tar --tar-filter="gzip -9" ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}::archive1 archive1.tar.gz`}
/> />
</div> </div>
<li> <li>
@ -145,11 +145,11 @@ function WizardStep3(props) {
borg mount ssh:// borg mount ssh://
{props.selectedOption.unixUser}@{HOSTNAME}: {props.selectedOption.unixUser}@{HOSTNAME}:
{SSH_SERVER_PORT}/./ {SSH_SERVER_PORT}/./
{props.selectedOption.repository} {props.selectedOption.repositoryName}
::archive1 /tmp/yourMountPoint ::archive1 /tmp/yourMountPoint
</div> </div>
<CopyButton <CopyButton
dataToCopy={`borg mount ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository}::archive1 /tmp/yourMountPoint`} dataToCopy={`borg mount ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}::archive1 /tmp/yourMountPoint`}
/> />
</div> </div>
<br /> <br />

View file

@ -29,7 +29,7 @@ function WizardStep4(props) {
repositories: repositories:
# Paths of local or remote repositories to backup to. # Paths of local or remote repositories to backup to.
- ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repository} - ssh://${props.selectedOption.unixUser}@${HOSTNAME}:${SSH_SERVER_PORT}/./${props.selectedOption.repositoryName}
storage: storage:
archive_name_format: '{HOSTNAME}-documents-{now}' archive_name_format: '{HOSTNAME}-documents-{now}'

View file

@ -100,7 +100,7 @@ export default function RepoList() {
alias={repo.alias} alias={repo.alias}
status={repo.status} status={repo.status}
lastSave={repo.lastSave} lastSave={repo.lastSave}
repository={repo.repository} repositoryName={repo.repositoryName}
storageSize={repo.storageSize} storageSize={repo.storageSize}
storageUsed={repo.storageUsed} storageUsed={repo.storageUsed}
sshPublicKey={repo.sshPublicKey} sshPublicKey={repo.sshPublicKey}

View file

@ -59,7 +59,7 @@ function SetupWizard(props) {
label: `${repo.alias} - #${repo.id}`, label: `${repo.alias} - #${repo.id}`,
value: `${repo.alias} - #${repo.id}`, value: `${repo.alias} - #${repo.id}`,
id: repo.id, id: repo.id,
repository: repo.repository, repositoryName: repo.repositoryName,
unixUser: repo.unixUser, unixUser: repo.unixUser,
lanCommand: repo.lanCommand, lanCommand: repo.lanCommand,
})); }));

View file

@ -49,7 +49,7 @@ export default async function handler(req, res) {
const newRepo = { const newRepo = {
id: newID, id: newID,
alias: alias, alias: alias,
repository: 'repo' + newID, repositoryName: '',
status: false, status: false,
lastSave: 0, lastSave: 0,
alert: alert, alert: alert,
@ -67,7 +67,7 @@ export default async function handler(req, res) {
const shellsDirectory = path.join(process.cwd(), '/helpers'); const shellsDirectory = path.join(process.cwd(), '/helpers');
//Exec the shell //Exec the shell
const { stdout, stderr } = await exec( const { stdout, stderr } = await exec(
`${shellsDirectory}/shells/createRepo.sh ${newRepo.repository} "${newRepo.sshPublicKey}" ${newRepo.storageSize}` `${shellsDirectory}/shells/createRepo.sh "${newRepo.sshPublicKey}" ${newRepo.storageSize}`
); );
if (stderr) { if (stderr) {
console.log('stderr:', stderr); console.log('stderr:', stderr);
@ -77,7 +77,7 @@ export default async function handler(req, res) {
}); });
return; return;
} }
newRepo.unixUser = stdout.trim(); newRepo.repositoryName = stdout.trim();
//Create the new repoList with the new repo //Create the new repoList with the new repo
let newRepoList = [newRepo, ...repoList]; let newRepoList = [newRepo, ...repoList];