Skip to content

Commit 700b71a

Browse files
authored
ref(alerts): Move alerts out of settings directory (#27095)
Alerts used to be a part of project settings, but now they have their own folder
1 parent c15ab4f commit 700b71a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+80
-84
lines changed

static/app/components/createAlertButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import {Organization, Project} from 'app/types';
2020
import EventView from 'app/utils/discover/eventView';
2121
import {Aggregation, AGGREGATIONS, explodeFieldString} from 'app/utils/discover/fields';
2222
import withApi from 'app/utils/withApi';
23-
import {getQueryDatasource} from 'app/views/alerts/utils';
2423
import {
2524
errorFieldConfig,
2625
transactionFieldConfig,
27-
} from 'app/views/settings/incidentRules/constants';
26+
} from 'app/views/alerts/incidentRules/constants';
27+
import {getQueryDatasource} from 'app/views/alerts/utils';
2828

2929
/**
3030
* Discover query supports more features than alert rules

static/app/components/externalIssues/abstractExternalIssueForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {ModalRenderProps} from 'app/actionCreators/modal';
66
import AsyncComponent from 'app/components/asyncComponent';
77
import {tct} from 'app/locale';
88
import {Choices, IntegrationIssueConfig, IssueConfigField} from 'app/types';
9+
import {FormField} from 'app/views/alerts/issueRuleEditor/ruleNode';
910
import FieldFromConfig from 'app/views/settings/components/forms/fieldFromConfig';
1011
import Form from 'app/views/settings/components/forms/form';
1112
import {FieldValue} from 'app/views/settings/components/forms/model';
12-
import {FormField} from 'app/views/settings/projectAlerts/issueRuleEditor/ruleNode';
1313

1414
export type ExternalIssueAction = 'create' | 'link';
1515

static/app/routes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ function routes() {
11761176
<Route
11771177
path=":ruleId/"
11781178
name="Edit Alert Rule"
1179-
componentPromise={() => import('app/views/settings/projectAlerts/edit')}
1179+
componentPromise={() => import('app/views/alerts/edit')}
11801180
component={errorHandler(LazyLoad)}
11811181
/>
11821182
</Route>
@@ -1195,7 +1195,7 @@ function routes() {
11951195
<Route
11961196
path=":ruleId/"
11971197
name="Edit Alert Rule"
1198-
componentPromise={() => import('app/views/settings/projectAlerts/edit')}
1198+
componentPromise={() => import('app/views/alerts/edit')}
11991199
component={errorHandler(LazyLoad)}
12001200
/>
12011201
</Route>
@@ -1222,7 +1222,7 @@ function routes() {
12221222
path="new/"
12231223
name="New Alert Rule"
12241224
component={errorHandler(LazyLoad)}
1225-
componentPromise={() => import('app/views/settings/projectAlerts/create')}
1225+
componentPromise={() => import('app/views/alerts/create')}
12261226
/>
12271227
<Route
12281228
path="wizard/"

static/app/views/settings/projectAlerts/create.tsx renamed to static/app/views/alerts/create.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import {trackAnalyticsEvent} from 'app/utils/analytics';
1111
import EventView from 'app/utils/discover/eventView';
1212
import {uniqueId} from 'app/utils/guid';
1313
import BuilderBreadCrumbs from 'app/views/alerts/builder/builderBreadCrumbs';
14+
import IncidentRulesCreate from 'app/views/alerts/incidentRules/create';
15+
import IssueRuleEditor from 'app/views/alerts/issueRuleEditor';
1416
import {
1517
AlertType as WizardAlertType,
1618
AlertWizardAlertNames,
1719
WizardRuleTemplate,
1820
} from 'app/views/alerts/wizard/options';
1921
import {getAlertTypeFromAggregateDataset} from 'app/views/alerts/wizard/utils';
20-
import IncidentRulesCreate from 'app/views/settings/incidentRules/create';
21-
import IssueRuleEditor from 'app/views/settings/projectAlerts/issueRuleEditor';
2222

2323
type RouteParams = {
2424
orgId: string;

static/app/views/alerts/details/body.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import {defined} from 'app/utils';
2222
import Projects from 'app/utils/projects';
2323
import theme from 'app/utils/theme';
2424
import {alertDetailsLink} from 'app/views/alerts/details/index';
25-
import {DATASET_EVENT_TYPE_FILTERS} from 'app/views/settings/incidentRules/constants';
26-
import {makeDefaultCta} from 'app/views/settings/incidentRules/presets';
27-
import {AlertRuleThresholdType} from 'app/views/settings/incidentRules/types';
25+
import {DATASET_EVENT_TYPE_FILTERS} from 'app/views/alerts/incidentRules/constants';
26+
import {makeDefaultCta} from 'app/views/alerts/incidentRules/presets';
27+
import {AlertRuleThresholdType} from 'app/views/alerts/incidentRules/types';
2828

2929
import {
3030
AlertRuleStatus,

static/app/views/alerts/details/chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import LineChart, {LineChartSeries} from 'app/components/charts/lineChart';
66
import {t} from 'app/locale';
77
import space from 'app/styles/space';
88
import theme from 'app/utils/theme';
9-
import {Trigger} from 'app/views/settings/incidentRules/types';
9+
import {Trigger} from 'app/views/alerts/incidentRules/types';
1010

1111
import closedSymbol from './closedSymbol';
1212
import startedSymbol from './startedSymbol';

static/app/views/alerts/details/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import space from 'app/styles/space';
2121
import {use24Hours} from 'app/utils/dates';
2222
import getDynamicText from 'app/utils/getDynamicText';
2323
import Projects from 'app/utils/projects';
24-
import {Dataset} from 'app/views/settings/incidentRules/types';
24+
import {Dataset} from 'app/views/alerts/incidentRules/types';
2525

2626
import Status from '../status';
2727
import {Incident, IncidentStats} from '../types';

static/app/views/settings/projectAlerts/edit.tsx renamed to static/app/views/alerts/edit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {t} from 'app/locale';
88
import space from 'app/styles/space';
99
import {Organization, Project} from 'app/types';
1010
import BuilderBreadCrumbs from 'app/views/alerts/builder/builderBreadCrumbs';
11-
import IncidentRulesDetails from 'app/views/settings/incidentRules/details';
12-
import IssueEditor from 'app/views/settings/projectAlerts/issueRuleEditor';
11+
import IncidentRulesDetails from 'app/views/alerts/incidentRules/details';
12+
import IssueEditor from 'app/views/alerts/issueRuleEditor';
1313

1414
type RouteParams = {
1515
orgId: string;

static/app/views/settings/incidentRules/constants.tsx renamed to static/app/views/alerts/incidentRules/constants.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import EventView from 'app/utils/discover/eventView';
22
import {AggregationKey, LooseFieldKey} from 'app/utils/discover/fields';
33
import {WEB_VITAL_DETAILS} from 'app/utils/performance/vitals/constants';
4-
import {
5-
DATA_SOURCE_TO_SET_AND_EVENT_TYPES,
6-
getQueryDatasource,
7-
} from 'app/views/alerts/utils';
8-
import {AlertType, WizardRuleTemplate} from 'app/views/alerts/wizard/options';
94
import {
105
AlertRuleThresholdType,
116
Dataset,
127
Datasource,
138
EventTypes,
149
Trigger,
1510
UnsavedIncidentRule,
16-
} from 'app/views/settings/incidentRules/types';
11+
} from 'app/views/alerts/incidentRules/types';
12+
import {
13+
DATA_SOURCE_TO_SET_AND_EVENT_TYPES,
14+
getQueryDatasource,
15+
} from 'app/views/alerts/utils';
16+
import {AlertType, WizardRuleTemplate} from 'app/views/alerts/wizard/options';
1717

1818
export const DEFAULT_AGGREGATE = 'count()';
1919
export const DEFAULT_TRANSACTION_AGGREGATE = 'p95(transaction.duration)';

0 commit comments

Comments
 (0)