[logstash/pipeline-workers] show 0 when 0 (#33253)

This commit is contained in:
Jonathan Budzenski 2019-03-18 11:04:18 -05:00 committed by Jonathan Budzenski
parent 3a52f3a863
commit 8b79d02f35
No known key found for this signature in database
GPG key ID: D28BF9418FA0F292

View file

@ -42,8 +42,8 @@ class PipelineEditorUi extends React.Component {
username, username,
} = this.props; } = this.props;
const pipelineWorkers = settings['pipeline.workers'] ? settings['pipeline.workers'] : 1; const pipelineWorkersSet = typeof settings['pipeline.workers'] === 'number';
const pipelineWorkers = pipelineWorkersSet ? settings['pipeline.workers'] : 1;
this.state = { this.state = {
maxBytesNumber: settings['queue.max_bytes.number'], maxBytesNumber: settings['queue.max_bytes.number'],
maxBytesUnit: settings['queue.max_bytes.units'], maxBytesUnit: settings['queue.max_bytes.units'],