all: sync with master; upd chlog
This commit is contained in:
@@ -4,13 +4,18 @@ import { withTranslation } from 'react-i18next';
|
||||
|
||||
import Card from '../../ui/Card';
|
||||
import Form from './Form';
|
||||
import { HOUR } from '../../../helpers/constants';
|
||||
|
||||
class StatsConfig extends Component {
|
||||
handleFormSubmit = ({ enabled, interval, ignored }) => {
|
||||
handleFormSubmit = ({
|
||||
enabled, interval, ignored, customInterval,
|
||||
}) => {
|
||||
const { t, interval: prevInterval } = this.props;
|
||||
const newInterval = customInterval ? customInterval * HOUR : interval;
|
||||
|
||||
const config = {
|
||||
enabled,
|
||||
interval,
|
||||
interval: newInterval,
|
||||
ignored: ignored ? ignored.split('\n') : [],
|
||||
};
|
||||
|
||||
@@ -33,7 +38,13 @@ class StatsConfig extends Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
t, interval, processing, processingReset, ignored, enabled,
|
||||
t,
|
||||
interval,
|
||||
customInterval,
|
||||
processing,
|
||||
processingReset,
|
||||
ignored,
|
||||
enabled,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@@ -46,6 +57,7 @@ class StatsConfig extends Component {
|
||||
<Form
|
||||
initialValues={{
|
||||
interval,
|
||||
customInterval,
|
||||
enabled,
|
||||
ignored: ignored.join('\n'),
|
||||
}}
|
||||
@@ -62,6 +74,7 @@ class StatsConfig extends Component {
|
||||
|
||||
StatsConfig.propTypes = {
|
||||
interval: PropTypes.number.isRequired,
|
||||
customInterval: PropTypes.number,
|
||||
ignored: PropTypes.array.isRequired,
|
||||
enabled: PropTypes.bool.isRequired,
|
||||
processing: PropTypes.bool.isRequired,
|
||||
|
||||
Reference in New Issue
Block a user