Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(environments): Remove environment feature flag from alert rules #7346

Merged
merged 1 commit into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions src/sentry/static/sentry/app/views/ruleEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ const RuleEditor = createReactClass({
},

render() {
const hasEnvironmentsFeature = new Set(this.props.organization.features).has(
'environments'
);
const activeEnvs = EnvironmentStore.getActive() || [];
const environmentChoices = [
['all', t('All Environments')],
Expand Down Expand Up @@ -246,22 +243,18 @@ const RuleEditor = createReactClass({

<hr />

{hasEnvironmentsFeature && (
<React.Fragment>
<h6>{t('In this environment')}:</h6>
<Select2Field
className={this.hasError('environment') ? ' error' : ''}
style={{marginBottom: 0, marginLeft: 5, marginRight: 5}}
name="environment"
value={environment}
required={true}
choices={environmentChoices}
onChange={val => this.handleEnvironmentChange(val)}
/>

<hr />
</React.Fragment>
)}
<h6>{t('In this environment')}:</h6>
<Select2Field
className={this.hasError('environment') ? ' error' : ''}
style={{marginBottom: 0, marginLeft: 5, marginRight: 5}}
name="environment"
value={environment}
required={true}
choices={environmentChoices}
onChange={val => this.handleEnvironmentChange(val)}
/>

<hr />

<h6>{t('Take these actions:')}</h6>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,72 @@ exports[`ProjectAlertRuleDetails Edit alert rule renders 1`] = `
</div>
</RuleNodeList>
<hr />
<h6>
In this environment
:
</h6>
<Select2Field
allowClear={false}
allowEmpty={false}
choices={
Array [
Array [
"all",
"All Environments",
],
]
}
className=""
disabled={false}
escapeMarkup={true}
hideErrorMessage={false}
multiple={false}
name="environment"
onChange={[Function]}
placeholder="--"
required={true}
style={
Object {
"marginBottom": 0,
"marginLeft": 5,
"marginRight": 5,
}
}
>
<div
className="control-group required"
style={
Object {
"marginBottom": 0,
"marginLeft": 5,
"marginRight": 5,
}
}
>
<div
className="controls"
>
<select
className="form-control"
disabled={false}
id="id-environment"
multiple={false}
onChange={[Function]}
placeholder="--"
required={true}
value=""
>
<option
key="all"
value="all"
>
All Environments
</option>
</select>
</div>
</div>
</Select2Field>
<hr />
<h6>
Take these actions:
</h6>
Expand Down Expand Up @@ -819,6 +885,72 @@ exports[`ProjectAlertRuleDetails New alert rule renders 1`] = `
</div>
</RuleNodeList>
<hr />
<h6>
In this environment
:
</h6>
<Select2Field
allowClear={false}
allowEmpty={false}
choices={
Array [
Array [
"all",
"All Environments",
],
]
}
className=""
disabled={false}
escapeMarkup={true}
hideErrorMessage={false}
multiple={false}
name="environment"
onChange={[Function]}
placeholder="--"
required={true}
style={
Object {
"marginBottom": 0,
"marginLeft": 5,
"marginRight": 5,
}
}
>
<div
className="control-group required"
style={
Object {
"marginBottom": 0,
"marginLeft": 5,
"marginRight": 5,
}
}
>
<div
className="controls"
>
<select
className="form-control"
disabled={false}
id="id-environment"
multiple={false}
onChange={[Function]}
placeholder="--"
required={true}
value=""
>
<option
key="all"
value="all"
>
All Environments
</option>
</select>
</div>
</div>
</Select2Field>
<hr />
<h6>
Take these actions:
</h6>
Expand Down