Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/dashboard/Push/PushDetails.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/PushUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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]]);
}
Expand Down