Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} = this.props;
const pipelineWorkersSet = typeof settings['pipeline.workers'] === 'number';
const pipelineWorkers = pipelineWorkersSet ? settings['pipeline.workers'] : 1;
this.state = {
maxBytesNumber: settings['queue.max_bytes.number'],
maxBytesUnit: settings['queue.max_bytes.units'],
pipeline: {
id,
description,
pipeline,
settings: {
'pipeline.batch.delay': settings['pipeline.batch.delay'],
'pipeline.batch.size': settings['pipeline.batch.size'],
'pipeline.workers': pipelineWorkers,
'queue.checkpoint.writes': settings['queue.checkpoint.writes'],
'queue.max_bytes': settings['queue.max_bytes.number'] + settings['queue.max_bytes.units'],
'queue.type': settings['queue.type'],
},
username,
},
pipelineIdErrors: [],
pipelineIdPattern: /^[A-Za-z\_][A-Za-z0-9\-\_]*$/,
showConfirmDeleteModal: false,
showPipelineIdError: false,
};
}
/>
this.handleMaxByteUnitChange(e.target.value)}
options={PIPELINE_EDITOR.UNITS}
value={this.state.maxBytesUnit}
/>
this.handleNumberChange('queue.checkpoint.writes', e.target.value)}
value={this.state.pipeline.settings['queue.checkpoint.writes']}
/>
} = this.props;
const pipelineWorkersSet = typeof settings['pipeline.workers'] === 'number';
const pipelineWorkers = pipelineWorkersSet ? settings['pipeline.workers'] : 1;
this.state = {
maxBytesNumber: settings['queue.max_bytes.number'],
maxBytesUnit: settings['queue.max_bytes.units'],
pipeline: {
id,
description,
pipeline,
settings: {
'pipeline.batch.delay': settings['pipeline.batch.delay'],
'pipeline.batch.size': settings['pipeline.batch.size'],
'pipeline.workers': pipelineWorkers,
'queue.checkpoint.writes': settings['queue.checkpoint.writes'],
'queue.max_bytes': settings['queue.max_bytes.number'] + settings['queue.max_bytes.units'],
'queue.type': settings['queue.type'],
},
username,
},
pipelineIdErrors: [],
pipelineIdPattern: /^[A-Za-z\_][A-Za-z0-9\-\_]*$/,
showConfirmDeleteModal: false,
showPipelineIdError: false,
};
}
/>
this.handleMaxByteUnitChange(e.target.value)}
options={PIPELINE_EDITOR.UNITS}
value={this.state.maxBytesUnit}
/>
this.handleNumberChange('queue.checkpoint.writes', e.target.value)}
value={this.state.pipeline.settings['queue.checkpoint.writes']}
/>
onChange={e => this.handleMaxByteUnitChange(e.target.value)}
options={PIPELINE_EDITOR.UNITS}
value={this.state.maxBytesUnit}
/>
this.handleNumberChange('queue.checkpoint.writes', e.target.value)}
value={this.state.pipeline.settings['queue.checkpoint.writes']}
/>
onChange={e => this.handleMaxByteUnitChange(e.target.value)}
options={PIPELINE_EDITOR.UNITS}
value={this.state.maxBytesUnit}
/>
this.handleNumberChange('queue.checkpoint.writes', e.target.value)}
value={this.state.pipeline.settings['queue.checkpoint.writes']}
/>