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

Kai Reinhard
06.05.2019 3ee7c3649c4e63f073e2a8e90c06741780c3cf14
style
1 files modified
9 ■■■■ changed files
borgbutler-webapp/src/components/views/jobs/Job.jsx 9 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/jobs/Job.jsx
@@ -26,10 +26,14 @@
        let job = this.props.job;
        if (job.status === 'RUNNING') {
            let progressPercent = 100;
            let color = 'success';
            if (job.cancellationRequested) {
                color = 'warning';
            }
            if (job.progressPercent >= 0 && job.progressPercent <= 100) {
                progressPercent = job.progressPercent;
            }
            content = <Progress animated color={'success'} value={progressPercent}>{job.progressText}</Progress>;
            content = <Progress animated color={color} value={progressPercent}>{job.progressText}</Progress>;
        } else {
            content = <Progress color={'info'} value={100}>{job.status}</Progress>
        }
@@ -41,7 +45,8 @@
            <div>
                <Button color="link" onClick={this.toggle}>{job.description}</Button>
                <div>{content}
                    <Button color={'danger'} onClick={() => this.cancelJob(job.uniqueJobNumber)} disabled={cancelDisabled}><IconCancel/></Button>
                    <Button color={'danger'} onClick={() => this.cancelJob(job.uniqueJobNumber)}
                            disabled={cancelDisabled}><IconCancel/></Button>
                </div>
                <Collapse isOpen={this.state.collapse}>
                    <Card>