mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-05-17 21:16:39 +02:00
fix: change "repository" to "repositoryName"
This commit is contained in:
parent
695e360d07
commit
a7beb7b37f
|
@ -29,7 +29,7 @@ export default function QuickCommands(props) {
|
|||
// Asynchronously call copy to clipboard
|
||||
navigator.clipboard
|
||||
.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(() => {
|
||||
// If successful, update the isCopied state value
|
||||
|
@ -51,7 +51,7 @@ export default function QuickCommands(props) {
|
|||
<div className={classes.tooltip}>
|
||||
borg init -e repokey-blake2 ssh://{props.unixUser}@
|
||||
{HOSTNAME}:{SSH_SERVER_PORT}/./
|
||||
{props.repository}
|
||||
{props.repositoryName}
|
||||
</div>
|
||||
)}
|
||||
<div className={classes.icons}>
|
||||
|
|
|
@ -79,7 +79,7 @@ export default function Repo(props) {
|
|||
)}
|
||||
<QuickCommands
|
||||
unixUser={props.unixUser}
|
||||
repository={props.repository}
|
||||
repositoryName={props.repositoryName}
|
||||
lanCommand={props.lanCommand}
|
||||
/>
|
||||
</div>
|
||||
|
@ -103,7 +103,7 @@ export default function Repo(props) {
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{props.repository}</th>
|
||||
<th>{props.repositoryName}</th>
|
||||
<th>{props.storageSize}Go</th>
|
||||
<th style={{ padding: '0 4% 0 4%' }}>
|
||||
<StorageBar
|
||||
|
|
|
@ -41,10 +41,10 @@ function WizardStep2(props) {
|
|||
borg init -e repokey-blake2 ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
</div>
|
||||
<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 className={classes.note}>
|
||||
|
@ -97,10 +97,10 @@ function WizardStep2(props) {
|
|||
ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
</div>
|
||||
<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>
|
||||
For more information about the Vorta graphical client, please
|
||||
|
|
|
@ -40,7 +40,7 @@ function WizardStep3(props) {
|
|||
borg create ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
::archive1 /your/pathToBackup
|
||||
</div>
|
||||
<CopyButton
|
||||
|
@ -87,10 +87,10 @@ function WizardStep3(props) {
|
|||
borg check -v --progress ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
</div>
|
||||
<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>
|
||||
<li>List the remote archives with :</li>
|
||||
|
@ -105,10 +105,10 @@ function WizardStep3(props) {
|
|||
borg list ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
</div>
|
||||
<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>
|
||||
<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://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
::archive1 archive1.tar.gz
|
||||
</div>
|
||||
<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>
|
||||
<li>
|
||||
|
@ -145,11 +145,11 @@ function WizardStep3(props) {
|
|||
borg mount ssh://
|
||||
{props.selectedOption.unixUser}@{HOSTNAME}:
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedOption.repository}
|
||||
{props.selectedOption.repositoryName}
|
||||
::archive1 /tmp/yourMountPoint
|
||||
</div>
|
||||
<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>
|
||||
<br />
|
||||
|
|
|
@ -29,7 +29,7 @@ function WizardStep4(props) {
|
|||
|
||||
repositories:
|
||||
# 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:
|
||||
archive_name_format: '{HOSTNAME}-documents-{now}'
|
||||
|
|
|
@ -100,7 +100,7 @@ export default function RepoList() {
|
|||
alias={repo.alias}
|
||||
status={repo.status}
|
||||
lastSave={repo.lastSave}
|
||||
repository={repo.repository}
|
||||
repositoryName={repo.repositoryName}
|
||||
storageSize={repo.storageSize}
|
||||
storageUsed={repo.storageUsed}
|
||||
sshPublicKey={repo.sshPublicKey}
|
||||
|
|
|
@ -59,7 +59,7 @@ function SetupWizard(props) {
|
|||
label: `${repo.alias} - #${repo.id}`,
|
||||
value: `${repo.alias} - #${repo.id}`,
|
||||
id: repo.id,
|
||||
repository: repo.repository,
|
||||
repositoryName: repo.repositoryName,
|
||||
unixUser: repo.unixUser,
|
||||
lanCommand: repo.lanCommand,
|
||||
}));
|
||||
|
|
|
@ -49,7 +49,7 @@ export default async function handler(req, res) {
|
|||
const newRepo = {
|
||||
id: newID,
|
||||
alias: alias,
|
||||
repository: 'repo' + newID,
|
||||
repositoryName: '',
|
||||
status: false,
|
||||
lastSave: 0,
|
||||
alert: alert,
|
||||
|
@ -67,7 +67,7 @@ export default async function handler(req, res) {
|
|||
const shellsDirectory = path.join(process.cwd(), '/helpers');
|
||||
//Exec the shell
|
||||
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) {
|
||||
console.log('stderr:', stderr);
|
||||
|
@ -77,7 +77,7 @@ export default async function handler(req, res) {
|
|||
});
|
||||
return;
|
||||
}
|
||||
newRepo.unixUser = stdout.trim();
|
||||
newRepo.repositoryName = stdout.trim();
|
||||
|
||||
//Create the new repoList with the new repo
|
||||
let newRepoList = [newRepo, ...repoList];
|
||||
|
|
Loading…
Reference in a new issue