mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 16:58:46 -03:30
fix SmartInventoryForm chips
This commit is contained in:
@@ -196,7 +196,7 @@ function HostFilterLookup({
|
|||||||
|
|
||||||
function buildChips(filter = {}) {
|
function buildChips(filter = {}) {
|
||||||
const inputGroupChips = Object.keys(filter).reduce((obj, param) => {
|
const inputGroupChips = Object.keys(filter).reduce((obj, param) => {
|
||||||
const parsedKey = param.replace('__icontains', '').replace('or__', '');
|
const parsedKey = param.replace('or__', '');
|
||||||
const chipsArray = [];
|
const chipsArray = [];
|
||||||
|
|
||||||
if (Array.isArray(filter[param])) {
|
if (Array.isArray(filter[param])) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const mockFormValues = {
|
|||||||
description: '',
|
description: '',
|
||||||
organization: { id: 1, name: 'mock organization' },
|
organization: { id: 1, name: 'mock organization' },
|
||||||
host_filter:
|
host_filter:
|
||||||
'name__icontains=mock and name__icontains=foo and groups__name=mock group',
|
'name__icontains=mock and name__icontains=foo and groups__name__icontains=mock group',
|
||||||
instance_groups: [{ id: 123 }],
|
instance_groups: [{ id: 123 }],
|
||||||
variables: '---',
|
variables: '---',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user