Allow users to select multiple platforms for pack query (#1074)

This commit is contained in:
Kyle Knight
2017-01-24 18:52:48 -05:00
committed by Jason Meller
parent 8749633b85
commit 3ec6b10324
8 changed files with 106 additions and 12 deletions
@@ -11,7 +11,7 @@ import validate from 'components/forms/ConfigurePackQueryForm/validate';
const baseClass = 'configure-pack-query-form';
const fieldNames = ['query_id', 'interval', 'logging_type', 'platform', 'version'];
const platformOptions = [
{ label: 'All', value: '' },
{ label: 'All', value: 'all' },
{ label: 'Windows', value: 'windows' },
{ label: 'Linux', value: 'linux' },
{ label: 'macOS', value: 'darwin' },
@@ -73,6 +73,7 @@ class ConfigurePackQueryForm extends Component {
options={platformOptions}
placeholder="- - -"
label="Platform"
multi
wrapperClassName={`${baseClass}__form-field ${baseClass}__form-field--platform`}
/>
<Dropdown
@@ -44,7 +44,7 @@ describe('ConfigurePackQueryForm - component', () => {
expect(spy).toHaveBeenCalledWith({
interval: 123,
logging_type: 'differential',
platform: '',
platform: 'all',
query_id: 1,
version: '',
});