Skip to content

Commit

Permalink
fix: add changes back
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeveland27 committed Oct 21, 2021
1 parent 1e8568b commit aa5a3b9
Show file tree
Hide file tree
Showing 3 changed files with 16,487 additions and 2,215 deletions.
9 changes: 4 additions & 5 deletions nerdlets/e2m-gui-nerdlet/add-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,13 @@ export default class AddE2MRule extends React.Component {
if (this.state.advancedMode) {
return this.state.userGeneratedNRQL;
}
// Wrap attribute in `'s if it's not '1'
const optionallyEnclosedAttribute =
this.state.selectedAttribute === '1'
? this.state.selectedAttribute
const attribute =
this.state.selectedAttribute === 1 || this.state.selectedAttribute === '1'
? '1'
: `\`${this.state.selectedAttribute}\``;
return `FROM ${this.state.selectedEventType} SELECT ${
this.state.selectedAggregator
}(${optionallyEnclosedAttribute}) AS '${this.state.validatedMetricName}' ${
}(${attribute}) AS '${this.state.validatedMetricName}' ${
this.state.validatedFilterNRQL ? this.state.validatedFilterNRQL : ''
} FACET ${this.state.selectedFacetAttributes
.map(attrObj => `\`${attrObj.key}\``)
Expand Down
Loading

0 comments on commit aa5a3b9

Please sign in to comment.