Skip to content

Commit d060834

Browse files
authored
fix(ui) Fix missing conditions in tag bars (#14063)
The tag distribution bars were not being passed the view query prefix resulting in CSP totals always being incorrect. Fixes SEN-847
1 parent 187a4ff commit d060834

File tree

2 files changed

+10
-5
lines changed
  • src/sentry/static/sentry/app/views/organizationEventsV2
  • tests/js/spec/views/organizationEventsV2

2 files changed

+10
-5
lines changed

src/sentry/static/sentry/app/views/organizationEventsV2/tags.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Tags extends React.Component {
5656
api,
5757
organization.slug,
5858
tag,
59-
location.query
59+
getQuery(view, location)
6060
);
6161

6262
this.setState(state => ({tags: {...state.tags, [tag]: val}}));

tests/js/spec/views/organizationEventsV2/tags.spec.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('Tags', function() {
1818
},
1919
},
2020
{
21-
predicate: (url, options) => {
21+
predicate: (_, options) => {
2222
return options.query.key === 'release';
2323
},
2424
}
@@ -35,8 +35,11 @@ describe('Tags', function() {
3535
},
3636
},
3737
{
38-
predicate: (url, options) => {
39-
return options.query.key === 'environment';
38+
predicate: (_, options) => {
39+
return (
40+
options.query.key === 'environment' &&
41+
options.query.query === 'event.type:csp'
42+
);
4043
},
4144
}
4245
);
@@ -58,7 +61,9 @@ describe('Tags', function() {
5861
const view = {
5962
id: 'test',
6063
name: 'Test',
61-
data: {},
64+
data: {
65+
query: 'event.type:csp',
66+
},
6267
tags: ['release', 'environment'],
6368
};
6469
const wrapper = mount(

0 commit comments

Comments
 (0)