mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
22.30.2019 9905c43d6c23ca89806cd36bc05a0b1ba951d221
Repo configuration...
1 files renamed
2 files modified
25 ■■■■■ changed files
borgbutler-webapp/src/components/views/repos/ConfigureRepoPage.jsx 19 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/repos/RepoListView.jsx 2 ●●● patch | view | raw | blame | history
borgbutler-webapp/src/containers/WebApp.jsx 4 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/repos/ConfigureRepoPage.jsx
File was renamed from borgbutler-webapp/src/components/views/repos/CreateRepoPage.jsx
@@ -13,7 +13,7 @@
import I18n from "../../general/translation/I18n";
import {PageHeader} from "../../general/BootstrapComponents";
class CreateRepoPage extends React.Component {
class ConfigureRepoPage extends React.Component {
    constructor(props) {
        super(props);
@@ -109,10 +109,17 @@
            ['kwallet', 'KWallet'],
            ['passphrase', 'Passphrase (not recommended)']
        ];
        let repoPlaceHolder = 'Enter the repo used by Borg.';
        if (this.state.mode === 'initNewRepo') {
            if (this.state.localRemote === 'local') {
                repoPlaceHolder = 'Enter the local path of the repo home dir.';
            } else {
                repoPlaceHolder = 'Enter the remote path of the repo, such as user@hostname:backup.';
            }
        }
        return <React.Fragment>
            <PageHeader>
                Configure new repository
                Configure repository
            </PageHeader>
            <form>
                <FormGroup>
@@ -149,7 +156,7 @@
                <FormLabelInputField label={'Repo'} fieldLength={12}
                                     name={'repo'} value={repoConfig.repo}
                                     onChange={this.handleRepoTextChange}
                                     placeholder="Enter the name of the repo, used by Borg."/>
                                     placeholder={repoPlaceHolder}/>
                <FormLabelInputField label={'RSH'} fieldLength={12}
                                     name={'rsh'} value={repoConfig.rsh}
                                     onChange={this.handleRepoTextChange}
@@ -194,7 +201,7 @@
                <FormLabelInputField label={'Password command'} fieldLength={12}
                                     name={'passwordCommand'} value={repoConfig.passwordCommand}
                                     onChange={this.handleRepoTextChange}
                                     placeholder="Enter the password command to get the command from."
                                     placeholder="Enter the password command to get the command from or choose a method above."
                                     className={this.state.passwordMethod === 'passphrase' ? 'hidden' : null}
                />
                <FormLabelInputField label={'Password'} fieldLength={6} type={'password'}
@@ -225,5 +232,5 @@
    }
}
export default CreateRepoPage;
export default ConfigureRepoPage;
borgbutler-webapp/src/components/views/repos/RepoListView.jsx
@@ -97,7 +97,7 @@
            </PageHeader>
            {content}
            <br/>
            <Link to={'/repo/new'}
            <Link to={'/repo/configure'}
                  className={'btn btn-outline-primary'}
            >
                <IconAdd/>
borgbutler-webapp/src/containers/WebApp.jsx
@@ -17,7 +17,7 @@
import Footer from '../components/views/footer/Footer';
import {loadVersion} from '../actions';
import {getTranslation} from '../utilities/i18n';
import CreateRepoPage from "../components/views/repos/CreateRepoPage";
import ConfigureRepoPage from "../components/views/repos/ConfigureRepoPage";
class WebApp extends React.Component {
@@ -84,7 +84,7 @@
                            }
                            <Route path={'/repoArchives/:id/:displayName'} component={RepoArchiveListView}/>
                            <Route path={'/archives/:repoId/:archiveId'} component={ArchiveView}/>
                            <Route path={'/repo/new'} component={CreateRepoPage}/>
                            <Route path={'/repo/configure'} component={ConfigureRepoPage}/>
                        </Switch>
                    </div>
                    <Footer versionInfo={this.props.version}/>