Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

feat(anomaly): Sub-Dimension Anomaly Filter #999

Merged
merged 13 commits into from
Jun 22, 2022
Merged

Conversation

Amatullah
Copy link
Member

@Amatullah Amatullah commented Jun 17, 2022

Changes Proposed:

  1. Add Subdim Filters on Anomaly Page
  2. Remove Sub-dimension sub-page from Anomaly

Technical Design Document: Alerts Phase 2 TDD

Files Changed:
chaos_genius/chaos_genius/views/anomaly_data_view.py

Changes:

  1. kpi_anomaly_detection()
  • Send a list of of sub-dimensions and values for that particular KPI using _get_dimensions_values()
  • Return Overall or Sub-dim time series based on the dimension and value selected by the user
  1. _get_dimensions_values()
  • Generate the dictionary of sub-dims and their values
  • Query the db to get the unique series_type column values from anomaly_data_output table
  • Format the returned column into a list.
  • Example:
[
{label: 'region', value: 'region', subdim_value_options: [{label: 'eu-central-1',value: 'eu-central-1'},  {label: 'ap-south-1', value: 'ap-south-1'}] },
{label: 'service', value: 'service', subdim_value_options: [{label: 'EBS',value: 'EBS'}, {label: 'EMR’, value: 'EMR'}, {label: 'EC2’, value: 'EC2'}] } 
]

cc: @ChartistDev @Samyak2

@gitpod-io
Copy link

gitpod-io bot commented Jun 17, 2022

@netlify
Copy link

netlify bot commented Jun 17, 2022

Deploy Preview for frontend-sb canceled.

Name Link
🔨 Latest commit 788f212
🔍 Latest deploy log https://app.netlify.com/sites/frontend-sb/deploys/62b1bf7c552dbf0008246262

@Amatullah Amatullah marked this pull request as draft June 17, 2022 11:15
@Amatullah Amatullah requested a review from Samyak2 June 17, 2022 11:16
@Amatullah Amatullah self-assigned this Jun 17, 2022
@Amatullah Amatullah added 🛠️ backend ❗alerts Alert formatting, scheduling, etc. labels Jun 17, 2022
@Amatullah Amatullah added this to the v0.9.0 milestone Jun 17, 2022
Copy link
Contributor

@Samyak2 Samyak2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but had a few comments and suggestions. Also haven't tested locally yet.

Copy link
Contributor

@Samyak2 Samyak2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A couple of minor suggestions:

Copy link
Contributor

@Samyak2 Samyak2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Amatullah Amatullah marked this pull request as ready for review June 22, 2022 04:50
Copy link
Contributor

@Samyak2 Samyak2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Amatullah Amatullah merged commit 2e15bac into develop Jun 22, 2022
@Amatullah Amatullah deleted the subdim-filter branch June 22, 2022 04:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗alerts Alert formatting, scheduling, etc. 🛠️ backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants