metricRule.js 495 B

123456789101112131415161718192021
  1. import {IncidentTrigger} from './incidentTrigger';
  2. export function MetricRule(params = {}) {
  3. return {
  4. status: 0,
  5. dateCreated: '2019-07-31T23:02:02.731Z',
  6. dataset: 'events',
  7. query: '',
  8. id: '4',
  9. name: 'My Incident Rule',
  10. timeWindow: 60,
  11. aggregation: 0,
  12. aggregate: 'count()',
  13. projects: ['project-slug'],
  14. dateModified: '2019-07-31T23:02:02.731Z',
  15. triggers: [IncidentTrigger()],
  16. resolveThreshold: 36,
  17. thresholdType: 0,
  18. ...params,
  19. };
  20. }