Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #108 from danifitz/develop
Browse files Browse the repository at this point in the history
removed the time range inherited from the time picker component in th…
  • Loading branch information
ricegi authored Sep 1, 2020
2 parents b3f6290 + 061c95c commit 8c6fcdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions nerdlets/slo-r-entity/components/slo-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,12 @@ export default class SloForm extends React.Component {

async _updateAlertConfig() {
const { entityDetails, document } = this.state;
const { timeRange } = this.props;

const timeRangeNrql = timeRangeToNrql(timeRange);

if (entityDetails && document.alerts.length < 1) {
const __query = `{
actor {
account(id: ${entityDetails.accountId}) {
nrql(query: "SELECT count(*) FROM SLOR_ALERTS ${timeRangeNrql} FACET policy_name") {
nrql(query: "SELECT count(*) FROM SLOR_ALERTS SINCE 7 days ago FACET policy_name") {
results
}
}
Expand Down
5 changes: 1 addition & 4 deletions nerdlets/slo-r-main/components/define-slo/define-slo-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,12 @@ export default class DefineSLOForm extends Component {

fetchAlerts = async () => {
const { entityDetails } = this.state;
const { timeRange } = this.props;

const timeRangeNrql = timeRangeToNrql(timeRange);

if (entityDetails) {
const __query = `{
actor {
account(id: ${entityDetails.accountId}) {
nrql(query: "SELECT count(*) FROM SLOR_ALERTS ${timeRangeNrql} FACET policy_name") {
nrql(query: "SELECT count(*) FROM SLOR_ALERTS SINCE 7 days ago FACET policy_name") {
results
}
}
Expand Down

0 comments on commit 8c6fcdd

Please sign in to comment.