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

Kai Reinhard
09.07.2018 eaaca9f88557dac359707d48d9cabd347a25f40a
web...
4 files modified
50 ■■■■ changed files
README.adoc 8 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/Start.jsx 8 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/develop/RestServices.jsx 30 ●●●●● patch | view | raw | blame | history
borgbutler-webapp/src/containers/WebApp.jsx 4 ●●●● patch | view | raw | blame | history
README.adoc
@@ -19,3 +19,11 @@
[.text-center]
https://projectlombok.org/[Lombok home page^] +
[.text-left]
=== Work with borgbutler-server
==== npm
1. `cd borgbutler-webapp`
2. `npm install`
3. `npm start`
4. Start borgbutler-server's Main.
borgbutler-webapp/src/components/views/Start.jsx
@@ -7,11 +7,11 @@
        return (
            <React.Fragment>
                <PageHeader>
                    <I18n name={'startscreen.welcome.title'}/>
                    Welcome to BorgButler
                </PageHeader>
                <div className="welcome-intro"><I18n name={'startscreen.welcome.text'}/></div>
                <div className="welcome-enjoy"><I18n name={'startscreen.welcome.enjoy'}/></div>
                <div className="welcome-documentation-link"><a className={'btn btn-link btn-outline-primary'} href={'/docs/index.html'} target="_blank" rel="noopener noreferrer"><I18n name={'startscreen.welcome.documentation'}/></a></div>
                <div className="welcome-intro">BorgButler is the frontend for BorgBackup.</div>
                <div className="welcome-enjoy">Enjoy your work with BorgButler.</div>
                <div className="welcome-documentation-link"><a className={'btn btn-link btn-outline-primary'} href={'https://github.com/micromata/borgbackup-butler'} target="_blank" rel="noopener noreferrer">Documentation</a></div>
            </React.Fragment>
        );
    }
borgbutler-webapp/src/components/views/develop/RestServices.jsx
@@ -92,46 +92,16 @@
                <PageHeader>
                    Rest Services
                </PageHeader>
                <h3>Templates</h3>
                <ul>
                    <li><RestUrlLink service='templates/list'/></li>
                    <li><RestUrlLink service='templates/definition-list'/></li>
                    <li><RestUrlLink service={'templates/definition'} params={`id=${this.state.templateDefinitionId}`}/> (by id)</li>
                </ul>
                <h4>How to get and run a template:</h4>
                <ol>
                    <li>Get a list of all templates:<br/>
                        <RestUrlLink service='templates/list'/></li>
                    <li>Get a single template from list or get one by its primary key via rest
                        (primaryKey={this.state.templatePrimaryKey}):<br/>
                        <RestUrlLink service='templates/template'
                                     params={'primaryKey=' + encodeURIComponent(this.state.templatePrimaryKey)}/>
                    </li>
                    <li>You will receive a template including its template definition if assigned.</li>
                    <li>Run template with <a
                        href={getRestServiceUrl('templates/example-run-data') + '?prettyPrinter=true'}>json post parameter</a> for service<br/>
                        <button tabIndex={1} onClick={this.onRun} type="button" className="btn btn-link">rest/templates/run</button>
                    </li>
                </ol>
                <h3>
                    Config
                </h3>
                <ul>
                    <li><RestUrlLink service='configuration/user'/></li>
                    <li><RestUrlLink service='configuration/config'/></li>
                    <li><RestUrlLink service='configuration/config-ui'/> (as a trial for dynamic forms)</li>
                    <li><RestUrlLink service='version'/> Gets the version and build date of the server.</li>
                    <li><RestUrlLink service='updates/info'/> Gets the update version.</li>
                    <li><RestUrlLink service='i18n/list'/> Gets all translations. And keys only:{' '}
                        <RestUrlLink service='i18n/list' params={'keysOnly=true'}/> </li>
                </ul>
                <h3>Browse local filesystem</h3>
                <ul>
                    <li><RestUrlLink service='files/browse-local-filesystem' params='type=dir'/></li>
                    <li><RestUrlLink service='files/browse-local-filesystem' params='type=excel'/></li>
                    <li><RestUrlLink service='files/browse-local-filesystem' params='type=word'/></li>
                    <li><RestUrlLink service='files/browse-local-filesystem' params='type=file'/></li>
                </ul>
                <h3>Logging</h3>
                <ul>
                    <li><RestUrlLink service='logging/query'/> (all, default is info log level as treshold)</li>
borgbutler-webapp/src/containers/WebApp.jsx
@@ -26,8 +26,8 @@
    render() {
        let routes = [
            ['Start', '/', Start],
            [getTranslation('logviewer'), '/logging', LogPage],
            [getTranslation('configuration'), '/config', ConfigurationPage]
            ['Log viewer', '/logging', LogPage],
            ['Configuration', '/config', ConfigurationPage]
        ];
        if (isDevelopmentMode()) {