Skip to content

Commit

Permalink
(analytics): Backend enhancements for editing event query, patching v…
Browse files Browse the repository at this point in the history
…erdict to event data and subscription for viewing application dashboards (#2985)

* chaos event and verdict query update for stored dashboards

Signed-off-by: ishangupta-ds <[email protected]>

* subscription for viewing dashboards

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* fixes for prometheus schema usage and verdict patch

Signed-off-by: ishangupta-ds <[email protected]>

* fixes

Signed-off-by: ishangupta-ds <[email protected]>

* updated caching strategy

Signed-off-by: ishangupta-ds <[email protected]>

* fixes for agent based dashboard listing and update dashboard vars

Signed-off-by: ishangupta-ds <[email protected]>

* updates to dashboards with data source healthcheck

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* fixing concurrency issue

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* minor fix

Signed-off-by: ishangupta-ds <[email protected]>

* updates for race condition

Signed-off-by: ishangupta-ds <[email protected]>

* made the code modular

Signed-off-by: ishangupta-ds <[email protected]>

* fixes for duplicate events and locks

Signed-off-by: ishangupta-ds <[email protected]>

* codacy fixes

Signed-off-by: ishangupta-ds <[email protected]>

* changes after review

Signed-off-by: ishangupta-ds <[email protected]>
  • Loading branch information
ishangupta-ds authored Jul 12, 2021
1 parent dd6f81c commit e328553
Show file tree
Hide file tree
Showing 13 changed files with 2,178 additions and 366 deletions.
2 changes: 2 additions & 0 deletions litmus-portal/graphql-server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ github.com/litmuschaos/chaos-operator v0.0.0-20210224131102-ca6a465ed348/go.mod
github.com/litmuschaos/chaos-scheduler v0.0.0-20210607090343-9952190ad032 h1:Nza94oOqOsao8eFWC19iFviS8XsxS2eVk7Q0a9WDKBE=
github.com/litmuschaos/chaos-scheduler v0.0.0-20210607090343-9952190ad032/go.mod h1:7EO6kbZKeJGKzkchgQepCxywvqNFNvNHW0G+u9923AY=
github.com/litmuschaos/elves v0.0.0-20201107015738-552d74669e3c/go.mod h1:DsbHGNUq/78NZozWVVI9Q6eBei4I+JjlkkD5aibJ3MQ=
github.com/litmuschaos/litmus v0.0.0-20210702160150-411ccb5d572a h1:1o6+JzP0K2o68iH748VPQBhHr9VC1/IK2fHCoHz3df0=
github.com/litmuschaos/litmus v0.0.0-20210712105501-6cb1456b1ad5 h1:rfHzsGxUlgnLViHyUpa2AdZ4XZRAjBdGL+Wc8XEwyT0=
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA=
github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04=
Expand Down
64 changes: 53 additions & 11 deletions litmus-portal/graphql-server/graph/analytics.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ input resource {

input updateDBInput {
db_id: String!
ds_id: String!
db_name: String!
db_type_name: String!
db_type_id: String!
ds_id: String
db_name: String
db_type_name: String
db_type_id: String
db_information: String
chaos_event_query_template: String!
chaos_verdict_query_template: String!
chaos_event_query_template: String
chaos_verdict_query_template: String
application_metadata_map: [applicationMetadata]
panel_groups: [updatePanelGroupInput]!
end_time: String!
start_time: String!
cluster_id: ID!
refresh_rate: String!
panel_groups: [updatePanelGroupInput]
end_time: String
start_time: String
cluster_id: ID
refresh_rate: String
}

input updatePanelGroupInput {
Expand Down Expand Up @@ -140,6 +140,24 @@ input promQueryInput {
minstep: Int!
}

input queryMapForPanel {
panelID: String!
queryIDs: [String!]!
}

input queryMapForPanelGroup {
panelGroupID: String!
panelQueryMap: [queryMapForPanel!]!
}

input dataVars {
url: String!
start: String!
end: String!
relative_time: Int!
refresh_interval: Int!
}

type metricsPromResponse {
queryid: String!
legends: [String]
Expand All @@ -151,10 +169,17 @@ type metricsTimeStampValue {
value: Float
}

type subData {
date: Float
value: String!
subDataName: String!
}

type annotationsPromResponse {
queryid: String!
legends: [String]
tsvs: [[annotationsTimeStampValue]]
subDataArray: [[subData]]
}

type annotationsTimeStampValue {
Expand All @@ -167,6 +192,21 @@ type promResponse {
annotationsResponse: [annotationsPromResponse]
}

type metricDataForPanel {
panelID: String!
PanelMetricsResponse: [metricsPromResponse]
}

type metricDataForPanelGroup {
panelGroupID: String!
panelGroupMetricsResponse: [metricDataForPanel]
}

type dashboardPromResponse {
dashboardMetricsResponse: [metricDataForPanelGroup]
annotationsResponse: [annotationsPromResponse]
}

type promSeriesResponse {
series: String!
labelValues: [labelValue]
Expand Down Expand Up @@ -198,6 +238,8 @@ type listDashboardResponse {
cluster_name: String
ds_name: String
ds_type: String
ds_url: String
ds_health_status: String
panel_groups: [panelGroupResponse]!
end_time: String!
start_time: String!
Expand Down
Loading

0 comments on commit e328553

Please sign in to comment.