diff --git a/src/dashboard/Push/PushDetails.react.js b/src/dashboard/Push/PushDetails.react.js index 7eddc13c14..02cfa26862 100644 --- a/src/dashboard/Push/PushDetails.react.js +++ b/src/dashboard/Push/PushDetails.react.js @@ -552,7 +552,17 @@ export default class PushDetails extends DashboardView { } renderTargetTable() { - return getTargetTable(this.state.pushDetails.get('query'), this.props.schema, tableStyles); + let classes = this.props.schema.data.get('classes'); + let schema = {}; + if(classes){ + let installations = classes.get('_Installation'); + if(typeof(installations) !== 'undefined'){ + installations.forEach((type, col) => { + schema[col] = type; + }); + } + } + return getTargetTable(this.state.pushDetails.get('query'), schema, tableStyles); } renderStatusTable() { diff --git a/src/lib/PushUtils.js b/src/lib/PushUtils.js index 43fefe8060..c0078deef8 100644 --- a/src/lib/PushUtils.js +++ b/src/lib/PushUtils.js @@ -134,7 +134,7 @@ let formatConstraintComponent = (key, operation, value, schema) => { if(!value.constructor === Array) { res = [key, `constraint is malformed (${operation} operator requires an array)`, '']; } else if (!schema[key]) { - ['', `Cannot perform operation on non-existent column ${key}`, '']; + res = ['', `Cannot perform operation on non-existent column ${key}`, '']; } else if (schema[key]['type'] === 'Array'){ let isAll = operation === '$all'; res = [key, @@ -190,6 +190,8 @@ export function formatConstraint(key, constraints, schema) { break; } } + } else if(constraints.constructor === Boolean) { + rows.push([[key, 'is', constraints ? 'true' : 'false']]); } else { rows.push([[key, 'is', constraints]]); }