Skip to content

Commit

Permalink
POL-1068 Cloud Cost Anomaly Alerts Link Fix (#1864)
Browse files Browse the repository at this point in the history
* update

* fix
  • Loading branch information
XOmniverse authored Feb 26, 2024
1 parent 8e88c6d commit cedcbcf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions cost/cloud_cost_anomaly_alerts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v3.1

- Fixed bug where incident link would render incorrectly if spaces were present in filter value

## v3.0

- Link to Flexera One Cloud Cost Anomalies page now includes filters
Expand Down
10 changes: 7 additions & 3 deletions cost/cloud_cost_anomaly_alerts/cloud_cost_anomaly_alerts.pt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category "Cost"
severity "high"
default_frequency "daily"
info(
version: "3.0",
version: "3.1",
provider: "Flexera",
service: "Optima",
policy_set: ""
Expand Down Expand Up @@ -394,11 +394,15 @@ script "js_filter_anomalies", type: "javascript" do
filters = ds_filter_dimensions['filters'].concat(ds_filter_dimensions['bc_filters'])
dimensions_groupby_string = _.map(dimensions, function(id) {
return "&groupBy=" + id
value = "&groupBy=" + id
while (value.split(' ')[1] != undefined) { value = value.replace(' ', '%20') }
return value
}).join('')
dimensions_filterby_string = _.map(filters, function(filter) {
return "&filterBy=anomaly." + filter['id'] + "." + filter['value']
value = "&filterBy=anomaly." + filter['id'] + "." + filter['value']
while (value.split(' ')[1] != undefined) { value = value.replace(' ', '%20') }
return value
}).join('')
link = [
Expand Down

0 comments on commit cedcbcf

Please sign in to comment.