hash
stringlengths 40
40
| date
stringdate 2017-08-30 22:37:25
2025-03-22 03:08:47
| author
stringclasses 173
values | commit_message
stringlengths 15
151
| is_merge
bool 1
class | masked_commit_message
stringlengths 6
126
| type
stringclasses 17
values | git_diff
stringlengths 182
1.51M
⌀ |
|---|---|---|---|---|---|---|---|
056ecb5a4e960f87ee55e5e0b8dd7f77fc3c1192
|
2021-07-24 02:11:57
|
Dan Fuller
|
chore(api): Add query info tags to group search endpoints (#27701)
| false
|
Add query info tags to group search endpoints (#27701)
|
chore
|
diff --git a/src/sentry/api/helpers/group_index.py b/src/sentry/api/helpers/group_index.py
index 1e8939db2007ac..c524f44bfadcb9 100644
--- a/src/sentry/api/helpers/group_index.py
+++ b/src/sentry/api/helpers/group_index.py
@@ -3,6 +3,7 @@
from datetime import timedelta
from uuid import uuid4
+import sentry_sdk
from django.db import IntegrityError, transaction
from django.utils import timezone
from rest_framework import serializers
@@ -93,6 +94,14 @@ def build_query_params_from_request(request, organization, projects, environment
except ValueError:
raise ParseError(detail="Invalid cursor parameter.")
query = request.GET.get("query", "is:unresolved").strip()
+ sentry_sdk.set_tag("search.query", query)
+ sentry_sdk.set_tag("search.sort", query)
+ if projects:
+ sentry_sdk.set_tag("search.projects", len(projects) if len(projects) <= 5 else ">5")
+ if environments:
+ sentry_sdk.set_tag(
+ "search.environments", len(environments) if len(environments) <= 5 else ">5"
+ )
if query:
try:
search_filters = convert_query_values(
|
4e7253b8e63c41c6df7026321dfbd2da991a491a
|
2023-06-02 00:40:48
|
anthony sottile
|
ref: upgrade pyright and use `pyright: ignore` for its specific errors (#50171)
| false
|
upgrade pyright and use `pyright: ignore` for its specific errors (#50171)
|
ref
|
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7076297fae4649..b9805e69ec9293 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -58,8 +58,8 @@ repos:
files: ^src/
types: [ python ]
require_serial: true
- additional_dependencies: [ "[email protected]" ]
- args: [ '--project', 'pyrightconfig-commithook.json' ]
+ additional_dependencies: [ "[email protected]" ]
+ args: [ '--project', 'config/pyrightconfig-commithook.json' ]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
diff --git a/pyrightconfig-commithook.json b/config/pyrightconfig-commithook.json
similarity index 84%
rename from pyrightconfig-commithook.json
rename to config/pyrightconfig-commithook.json
index cac34058c71c34..0297f8a289b5ac 100644
--- a/pyrightconfig-commithook.json
+++ b/config/pyrightconfig-commithook.json
@@ -7,6 +7,7 @@
".volta/**"
],
+ "stubPath": "fixtures/stubs-for-mypy",
"typeCheckingMode": "off",
"reportMissingImports": "none",
"reportUndefinedVariable": "none",
diff --git a/src/sentry/filestore/s3.py b/src/sentry/filestore/s3.py
index 058a6601af2590..6cfca3dfb3eb9c 100644
--- a/src/sentry/filestore/s3.py
+++ b/src/sentry/filestore/s3.py
@@ -415,8 +415,8 @@ def _get_or_create_bucket(self, name):
# For simplicity, we enforce in S3Boto3Storage that any auto-created
# bucket must match the region that the connection is for.
#
- # Also note that Amazon specifically disallows "us-east-1" when passing bucket
- # region names; LocationConstraint *must* be blank to create in US Standard.
+ # Also note that Amazon specifically disallows "us-east-1" when passing bucket region
+ # names; LocationConstraint *must* be blank to create in US Standard.
bucket_params = {"ACL": self.bucket_acl}
region_name = self.connection.meta.client.meta.region_name
if region_name != "us-east-1":
diff --git a/src/sentry/models/commit.py b/src/sentry/models/commit.py
index 33b82bbf953784..2eb1eb82b5d163 100644
--- a/src/sentry/models/commit.py
+++ b/src/sentry/models/commit.py
@@ -23,7 +23,7 @@
class CommitManager(BaseManager):
- def get_for_release(self, release: Release) -> QuerySet[Commit]:
+ def get_for_release(self, release: Release) -> QuerySet[Commit]: # pyright: ignore
return (
self.filter(releasecommit__release=release)
.order_by("-releasecommit__order")
diff --git a/src/sentry/models/integrations/external_issue.py b/src/sentry/models/integrations/external_issue.py
index d4b5edaa49fb2c..198c53fcfc6702 100644
--- a/src/sentry/models/integrations/external_issue.py
+++ b/src/sentry/models/integrations/external_issue.py
@@ -43,7 +43,7 @@ def get_for_integration(
def get_linked_issues(
self, event: Event, integration: RpcIntegration
- ) -> QuerySet[ExternalIssue]:
+ ) -> QuerySet[ExternalIssue]: # pyright: ignore
from sentry.models import GroupLink
return self.filter(
diff --git a/src/sentry/models/integrations/sentry_app_installation.py b/src/sentry/models/integrations/sentry_app_installation.py
index d3686296cce275..b85b8420442b8a 100644
--- a/src/sentry/models/integrations/sentry_app_installation.py
+++ b/src/sentry/models/integrations/sentry_app_installation.py
@@ -44,7 +44,7 @@ def get_installed_for_organization(self, organization_id: int) -> QuerySet:
def get_by_api_token(self, token_id: str) -> QuerySet:
return self.filter(status=SentryAppInstallationStatus.INSTALLED, api_token_id=token_id)
- def get_projects(self, token: ApiToken) -> QuerySet[Project]:
+ def get_projects(self, token: ApiToken) -> QuerySet[Project]: # pyright: ignore
from sentry.models import Project, SentryAppInstallationToken
try:
diff --git a/src/sentry/nodestore/base.py b/src/sentry/nodestore/base.py
index cc9015794ed1b0..7aa137a69883a1 100644
--- a/src/sentry/nodestore/base.py
+++ b/src/sentry/nodestore/base.py
@@ -185,7 +185,7 @@ def get_multi(self, id_list, subkey=None):
}
if subkey is None:
self._set_cache_items(items)
- items.update(cache_items)
+ items.update(cache_items) # pyright: ignore
span.set_tag("result", "from_service")
span.set_tag("found", len(items))
diff --git a/src/sentry/similarity/features.py b/src/sentry/similarity/features.py
index eec63577fc6927..6210ba058093cc 100644
--- a/src/sentry/similarity/features.py
+++ b/src/sentry/similarity/features.py
@@ -138,7 +138,9 @@ def record(self, events):
if features:
items.append((self.aliases[label], features))
- return self.index.record(scope, key, items, timestamp=int(to_timestamp(event.datetime))) # type: ignore
+ return self.index.record(
+ scope, key, items, timestamp=int(to_timestamp(event.datetime)) # pyright: ignore
+ )
def classify(self, events, limit=None, thresholds=None):
if not events:
@@ -182,7 +184,10 @@ def classify(self, events, limit=None, thresholds=None):
return [
(int(key), dict(zip(labels, scores)))
for key, scores in self.index.classify(
- scope, items, limit=limit, timestamp=int(to_timestamp(event.datetime)) # type: ignore
+ scope,
+ items,
+ limit=limit,
+ timestamp=int(to_timestamp(event.datetime)), # pyright: ignore
)
]
diff --git a/src/sentry/tasks/commit_context.py b/src/sentry/tasks/commit_context.py
index c4ad2f0cded069..f483e7936328b7 100644
--- a/src/sentry/tasks/commit_context.py
+++ b/src/sentry/tasks/commit_context.py
@@ -318,7 +318,7 @@ def process_commit_context(
logger.info(
"process_commit_context.max_retries_exceeded",
extra={
- **basic_logging_details,
+ **basic_logging_details, # pyright: ignore
"reason": "max_retries_exceeded",
},
)
|
e2d5a77d5d7e94bc3fc917abd9456f7c1934a15b
|
2022-04-20 02:33:17
|
Jonas
|
feat(flamegraph): use sentry monospace font (#33743)
| false
|
use sentry monospace font (#33743)
|
feat
|
diff --git a/static/app/components/profiling/boundTooltip.tsx b/static/app/components/profiling/boundTooltip.tsx
index 1b76c2e91b3cdf..5c71783cce9181 100644
--- a/static/app/components/profiling/boundTooltip.tsx
+++ b/static/app/components/profiling/boundTooltip.tsx
@@ -1,4 +1,4 @@
-import * as React from 'react';
+import {useLayoutEffect, useMemo, useRef, useState} from 'react';
import styled from '@emotion/styled';
import {mat3, vec2} from 'gl-matrix';
@@ -7,14 +7,14 @@ import {getContext, measureText, Rect} from 'sentry/utils/profiling/gl/utils';
import {useDevicePixelRatio} from 'sentry/utils/useDevicePixelRatio';
const useCachedMeasure = (string: string, font: string): Rect => {
- const cache = React.useRef<Record<string, Rect>>({});
- const ctx = React.useMemo(() => {
+ const cache = useRef<Record<string, Rect>>({});
+ const ctx = useMemo(() => {
const context = getContext(document.createElement('canvas'), '2d');
context.font = font;
return context;
}, []);
- return React.useMemo(() => {
+ return useMemo(() => {
if (cache.current[string]) {
return cache.current[string];
}
@@ -43,7 +43,7 @@ function BoundTooltip({
cursor,
children,
}: BoundTooltipProps): React.ReactElement | null {
- const tooltipRef = React.useRef<HTMLDivElement>(null);
+ const tooltipRef = useRef<HTMLDivElement>(null);
const flamegraphTheme = useFlamegraphTheme();
const tooltipRect = useCachedMeasure(
tooltipRef.current?.textContent ?? '',
@@ -51,7 +51,7 @@ function BoundTooltip({
);
const devicePixelRatio = useDevicePixelRatio();
- const physicalToLogicalSpace = React.useMemo(
+ const physicalToLogicalSpace = useMemo(
() =>
mat3.fromScaling(
mat3.create(),
@@ -60,9 +60,9 @@ function BoundTooltip({
[devicePixelRatio]
);
- const [tooltipBounds, setTooltipBounds] = React.useState<Rect>(Rect.Empty());
+ const [tooltipBounds, setTooltipBounds] = useState<Rect>(Rect.Empty());
- React.useLayoutEffect(() => {
+ useLayoutEffect(() => {
if (!children || bounds.isEmpty() || !tooltipRef.current) {
setTooltipBounds(Rect.Empty());
return;
diff --git a/static/app/utils/profiling/flamegraph/flamegraphTheme.tsx b/static/app/utils/profiling/flamegraph/flamegraphTheme.tsx
index 79817f26c9dd23..cc527dfaf62352 100644
--- a/static/app/utils/profiling/flamegraph/flamegraphTheme.tsx
+++ b/static/app/utils/profiling/flamegraph/flamegraphTheme.tsx
@@ -1,3 +1,4 @@
+import {lightTheme} from '../../theme';
import {FlamegraphFrame} from '../flamegraphFrame';
import {makeColorBucketTheme, makeColorMap, makeStackToColor} from './../colors/utils';
@@ -7,7 +8,7 @@ const MONOSPACE_FONT = `ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI
'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono',
'Courier New', monospace`;
-const FRAME_FONT = `"Source Code Pro", Courier, monospace`;
+const FRAME_FONT = lightTheme.text.familyMono;
// Luma chroma hue settings
export interface LCH {
@@ -118,7 +119,7 @@ export const LightFlamegraphTheme: FlamegraphTheme = {
},
SIZES: {
BAR_HEIGHT: 20,
- BAR_FONT_SIZE: 12,
+ BAR_FONT_SIZE: 11,
BAR_PADDING: 4,
FLAMEGRAPH_DEPTH_OFFSET: 12,
SPANS_DEPTH_OFFSET: 4,
@@ -176,7 +177,7 @@ export const DarkFlamegraphTheme: FlamegraphTheme = {
},
SIZES: {
BAR_HEIGHT: 20,
- BAR_FONT_SIZE: 12,
+ BAR_FONT_SIZE: 11,
BAR_PADDING: 4,
FLAMEGRAPH_DEPTH_OFFSET: 12,
SPANS_DEPTH_OFFSET: 4,
|
3d5ec4e3133344a4a1bbea4271042fbbd2644c1a
|
2022-02-23 06:23:46
|
Pierre Massat
|
feat(profiling): Authenticate Profiling requests to Cloud Run (#31973)
| false
|
Authenticate Profiling requests to Cloud Run (#31973)
|
feat
|
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6bb11d5c411d63..da9d45540bd478 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -179,6 +179,7 @@ build-utils/ @getsentry/owners-js-build
/static/app/types/profiling.d.ts @getsentry/profiling
/static/app/utils/profiling @getsentry/profiling
/tests/js/spec/utils/profiling @getsentry/profiling
+/src/sentry/utils/profiling.py @getsentry/profiling
/src/sentry/api/endpoints/project_profiling_profile.py @getsentry/profiling
/src/sentry/api/endpoints/organization_profiling_profiles.py @getsentry/profiling
/tests/sentry/api/endpoints/test_project_profiling_profile.py @getsentry/profiling
diff --git a/src/sentry/api/endpoints/organization_profiling_profiles.py b/src/sentry/api/endpoints/organization_profiling_profiles.py
index 5733ce273f74e7..2324b71224d4a6 100644
--- a/src/sentry/api/endpoints/organization_profiling_profiles.py
+++ b/src/sentry/api/endpoints/organization_profiling_profiles.py
@@ -1,14 +1,13 @@
from typing import Any
-from django.conf import settings
from rest_framework.request import Request
from rest_framework.response import Response
from sentry import features
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.paginator import GenericOffsetPaginator
-from sentry.http import safe_urlopen
from sentry.models import Organization
+from sentry.utils.profiling import get_from_profiling_service, proxy_profiling_service
PROFILE_FILTERS = [
"android_api_level",
@@ -43,10 +42,8 @@ def get(self, request: Request, organization: Organization) -> Response:
def data_fn(offset: int, limit: int) -> Any:
params["offset"] = offset
params["limit"] = limit
- response = safe_urlopen(
- f"{settings.SENTRY_PROFILING_SERVICE_URL}/organizations/{organization.id}/profiles",
- method="GET",
- params=params,
+ response = get_from_profiling_service(
+ "GET", f"/organizations/{organization.id}/profiles", params=params
)
return response.json().get("profiles", [])
@@ -69,10 +66,6 @@ def get(self, request: Request, organization: Organization) -> Response:
if len(projects) > 0:
params["project"] = [p.id for p in projects]
- response = safe_urlopen(
- f"{settings.SENTRY_PROFILING_SERVICE_URL}/organizations/{organization.id}/filters",
- method="GET",
- params=params,
+ return proxy_profiling_service(
+ "GET", f"/organizations/{organization.id}/filters", params=params
)
-
- return Response(response.json(), status=200)
diff --git a/src/sentry/api/endpoints/project_profiling_profile.py b/src/sentry/api/endpoints/project_profiling_profile.py
index a5e15d4c992972..7da2e0a89c2225 100644
--- a/src/sentry/api/endpoints/project_profiling_profile.py
+++ b/src/sentry/api/endpoints/project_profiling_profile.py
@@ -1,18 +1,13 @@
-from django.conf import settings
from rest_framework.request import Request
from rest_framework.response import Response
from sentry import features
from sentry.api.bases.project import ProjectEndpoint
-from sentry.http import safe_urlopen
+from sentry.utils.profiling import proxy_profiling_service
class ProjectProfilingProfileEndpoint(ProjectEndpoint):
def get(self, request: Request, project, transaction_id: str) -> Response:
if not features.has("organizations:profiling", project.organization, actor=request.user):
return Response(status=404)
- response = safe_urlopen(
- f"{settings.SENTRY_PROFILING_SERVICE_URL}/projects/{project.id}/profiles/{transaction_id}",
- method="GET",
- )
- return Response(response.json(), status=response.status_code)
+ return proxy_profiling_service("GET", f"/projects/{project.id}/profiles/{transaction_id}")
diff --git a/src/sentry/utils/profiling.py b/src/sentry/utils/profiling.py
new file mode 100644
index 00000000000000..154a02fd1023d2
--- /dev/null
+++ b/src/sentry/utils/profiling.py
@@ -0,0 +1,34 @@
+from typing import Optional
+
+import google.auth.transport.requests
+import google.oauth2.id_token
+from django.conf import settings
+from django.http import HttpResponse
+from requests import Response
+
+from sentry.http import safe_urlopen
+
+
+def get_from_profiling_service(method: str, path: str, params: Optional[dict] = None) -> Response:
+ kwargs = {"method": method}
+ if params:
+ kwargs["params"] = params
+ if settings.ENVIRONMENT == "production":
+ id_token = fetch_id_token_for_service(settings.SENTRY_PROFILING_SERVICE_URL)
+ kwargs["headers"] = {"Authorization": f"Bearer {id_token}"}
+ return safe_urlopen(
+ f"{settings.SENTRY_PROFILING_SERVICE_URL}{path}",
+ **kwargs,
+ )
+
+
+def proxy_profiling_service(method: str, path: str, params: Optional[dict] = None) -> HttpResponse:
+ response = get_from_profiling_service(method, path, params=params)
+ return HttpResponse(
+ content=response.content, status=response.status_code, headers=response.headers
+ )
+
+
+def fetch_id_token_for_service(service_url: str) -> str:
+ auth_req = google.auth.transport.requests.Request()
+ return google.oauth2.id_token.fetch_id_token(auth_req, service_url)
|
5e3a2ae5516fe95aa5da4e967d8cbd621dcf3892
|
2022-06-16 03:00:24
|
Evan Purkhiser
|
ref(dx): Update dev-tooling channel name (#35699)
| false
|
Update dev-tooling channel name (#35699)
|
ref
|
diff --git a/.github/workflows/label-pullrequest.yml b/.github/workflows/label-pullrequest.yml
index 5fc54415ceca1a..08b2b64676ef15 100644
--- a/.github/workflows/label-pullrequest.yml
+++ b/.github/workflows/label-pullrequest.yml
@@ -60,5 +60,5 @@ jobs:
can be safely deployed independently.
- Have questions? Please ask in the [`#discuss-dev-tooling`
+ Have questions? Please ask in the [`#discuss-dev-infra`
channel](https://app.slack.com/client/T024ZCV9U/CTJL7358X).
diff --git a/scripts/lib.sh b/scripts/lib.sh
index 64aa08f8c50f4f..68c3e68c3a25fc 100755
--- a/scripts/lib.sh
+++ b/scripts/lib.sh
@@ -262,7 +262,7 @@ prerequisites() {
direnv-help() {
cat >&2 <<EOF
-If you're a Sentry employee and you're stuck or have questions, ask in #discuss-dev-tooling.
+If you're a Sentry employee and you're stuck or have questions, ask in #discuss-dev-infra.
If you're not, please file an issue under https://github.com/getsentry/sentry/issues/new/choose and mention @getsentry/owners-sentry-dev
You can configure the behaviour of direnv by adding the following variables to a .env file:
diff --git a/scripts/pyenv_setup.sh b/scripts/pyenv_setup.sh
index 8b78e8991ea581..d9a81cf7998142 100755
--- a/scripts/pyenv_setup.sh
+++ b/scripts/pyenv_setup.sh
@@ -111,7 +111,7 @@ setup_pyenv() {
eval "$(pyenv init --path)"
python_version=$(python -V | sed s/Python\ //g)
[[ $python_version == "$(cat .python-version)" ]] ||
- (echo "Wrong Python version: $python_version. Please report in #discuss-dev-tooling" && exit 1)
+ (echo "Wrong Python version: $python_version. Please report in #discuss-dev-infra" && exit 1)
}
setup_pyenv
|
3a7de114f7a27118bc6543ac1de81c65fe75122d
|
2024-11-13 01:34:26
|
Tony Xiao
|
feat(explore): Add letter to label each explore chart (#80604)
| false
|
Add letter to label each explore chart (#80604)
|
feat
|
diff --git a/static/app/views/explore/charts/index.tsx b/static/app/views/explore/charts/index.tsx
index e00d08eece37e9..33893865b295e2 100644
--- a/static/app/views/explore/charts/index.tsx
+++ b/static/app/views/explore/charts/index.tsx
@@ -149,7 +149,7 @@ export function ExploreCharts({query}: ExploreChartsProps) {
})
.filter(Boolean);
- const {chartType, yAxes: visualizeYAxes} = visualize;
+ const {chartType, label, yAxes: visualizeYAxes} = visualize;
const chartIcon =
chartType === ChartType.LINE
? 'line'
@@ -184,66 +184,63 @@ export function ExploreCharts({query}: ExploreChartsProps) {
<ChartContainer key={index}>
<ChartPanel>
<ChartHeader>
- <ChartTitle>{formattedYAxes.join(',')}</ChartTitle>
- <ChartSettingsContainer>
+ <ChartLabel>{label}</ChartLabel>
+ <ChartTitle>{formattedYAxes.join(', ')}</ChartTitle>
+ <Tooltip
+ title={t('Type of chart displayed in this visualization (ex. line)')}
+ >
+ <CompactSelect
+ triggerProps={{
+ icon: <IconGraph type={chartIcon} />,
+ borderless: true,
+ showChevron: false,
+ size: 'sm',
+ }}
+ value={chartType}
+ menuTitle="Type"
+ options={exploreChartTypeOptions}
+ onChange={option => handleChartTypeChange(option.value, index)}
+ />
+ </Tooltip>
+ <Tooltip
+ title={t('Time interval displayed in this visualization (ex. 5m)')}
+ >
+ <CompactSelect
+ value={interval}
+ onChange={({value}) => setInterval(value)}
+ triggerProps={{
+ icon: <IconClock />,
+ borderless: true,
+ showChevron: false,
+ size: 'sm',
+ }}
+ menuTitle="Interval"
+ options={intervalOptions}
+ />
+ </Tooltip>
+ <Feature features="organizations:alerts-eap">
<Tooltip
- title={t('Type of chart displayed in this visualization (ex. line)')}
+ title={
+ singleProject
+ ? t('Create an alert for this chart')
+ : t('Cannot create an alert when multiple projects are selected')
+ }
>
- <CompactSelect
+ <DropdownMenu
triggerProps={{
- icon: <IconGraph type={chartIcon} />,
- borderless: true,
- showChevron: false,
+ 'aria-label': t('Create Alert'),
size: 'sm',
- }}
- value={chartType}
- menuTitle="Type"
- options={exploreChartTypeOptions}
- onChange={option => handleChartTypeChange(option.value, index)}
- />
- </Tooltip>
- <Tooltip
- title={t('Time interval displayed in this visualization (ex. 5m)')}
- >
- <CompactSelect
- value={interval}
- onChange={({value}) => setInterval(value)}
- triggerProps={{
- icon: <IconClock />,
borderless: true,
showChevron: false,
- size: 'sm',
+ icon: <IconSubscribed />,
}}
- menuTitle="Interval"
- options={intervalOptions}
+ position="bottom-end"
+ items={alertsUrls ?? []}
+ menuTitle={t('Create an alert for')}
+ isDisabled={!alertsUrls || alertsUrls.length === 0}
/>
</Tooltip>
- <Feature features="organizations:alerts-eap">
- <Tooltip
- title={
- singleProject
- ? t('Create an alert for this chart')
- : t(
- 'Cannot create an alert when multiple projects are selected'
- )
- }
- >
- <DropdownMenu
- triggerProps={{
- 'aria-label': t('Create Alert'),
- size: 'sm',
- borderless: true,
- showChevron: false,
- icon: <IconSubscribed />,
- }}
- position="bottom-end"
- items={alertsUrls ?? []}
- menuTitle={t('Create an alert for')}
- isDisabled={!alertsUrls || alertsUrls.length === 0}
- />
- </Tooltip>
- </Feature>
- </ChartSettingsContainer>
+ </Feature>
</ChartHeader>
<Chart
height={CHART_HEIGHT}
@@ -281,14 +278,23 @@ const ChartContainer = styled('div')`
const ChartHeader = styled('div')`
display: flex;
- align-items: flex-start;
justify-content: space-between;
+ gap: ${space(1)};
`;
const ChartTitle = styled('div')`
${p => p.theme.text.cardTitle}
+ line-height: 32px;
+ flex: 1;
`;
-const ChartSettingsContainer = styled('div')`
- display: flex;
+const ChartLabel = styled('div')`
+ background-color: ${p => p.theme.purple100};
+ border-radius: ${p => p.theme.borderRadius};
+ text-align: center;
+ min-width: 32px;
+ color: ${p => p.theme.purple400};
+ white-space: nowrap;
+ font-weight: ${p => p.theme.fontWeightBold};
+ align-content: center;
`;
diff --git a/static/app/views/explore/hooks/useVisualizes.spec.tsx b/static/app/views/explore/hooks/useVisualizes.spec.tsx
index 75484e4313f860..b6ff6a24d6df12 100644
--- a/static/app/views/explore/hooks/useVisualizes.spec.tsx
+++ b/static/app/views/explore/hooks/useVisualizes.spec.tsx
@@ -15,22 +15,38 @@ describe('useVisualizes', function () {
render(<TestPage />, {disableRouterMocks: true});
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.duration)'],
+ },
]); // default
act(() => setVisualizes([{yAxes: ['p75(span.duration)'], chartType: ChartType.BAR}]));
expect(visualizes).toEqual([
- {yAxes: ['p75(span.duration)'], chartType: ChartType.BAR},
+ {
+ chartType: ChartType.BAR,
+ label: 'A',
+ yAxes: ['p75(span.duration)'],
+ },
]);
act(() => setVisualizes([]));
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.duration)'],
+ },
]); // default
act(() => setVisualizes([{yAxes: ['count(span.duration)']}]));
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.duration)'],
+ },
]); // default
act(() =>
@@ -42,18 +58,38 @@ describe('useVisualizes', function () {
])
);
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)', 'p75(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.duration)', 'p75(span.duration)'],
+ },
]);
act(() =>
setVisualizes([
- {yAxes: ['count(span.duration)', 'p75(span.duration)'], chartType: ChartType.BAR},
- {yAxes: ['count(span.duration)'], chartType: ChartType.AREA},
+ {
+ chartType: ChartType.BAR,
+ label: 'A',
+ yAxes: ['count(span.duration)', 'p75(span.duration)'],
+ },
+ {
+ chartType: ChartType.AREA,
+ label: 'B',
+ yAxes: ['count(span.duration)'],
+ },
])
);
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)', 'p75(span.duration)'], chartType: ChartType.BAR},
- {yAxes: ['count(span.duration)'], chartType: ChartType.AREA},
+ {
+ chartType: ChartType.BAR,
+ label: 'A',
+ yAxes: ['count(span.duration)', 'p75(span.duration)'],
+ },
+ {
+ chartType: ChartType.AREA,
+ label: 'B',
+ yAxes: ['count(span.duration)'],
+ },
]);
});
});
diff --git a/static/app/views/explore/hooks/useVisualizes.tsx b/static/app/views/explore/hooks/useVisualizes.tsx
index 566e8d97a98b1a..b9dcc7e0c82110 100644
--- a/static/app/views/explore/hooks/useVisualizes.tsx
+++ b/static/app/views/explore/hooks/useVisualizes.tsx
@@ -12,11 +12,15 @@ import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import {ChartType} from 'sentry/views/insights/common/components/chart';
-export type Visualize = {
+type BaseVisualize = {
chartType: ChartType;
yAxes: string[];
};
+export type Visualize = BaseVisualize & {
+ label: string;
+};
+
interface Options {
location: Location;
navigate: ReturnType<typeof useNavigate>;
@@ -24,7 +28,7 @@ interface Options {
export const DEFAULT_VISUALIZATION = `${ALLOWED_EXPLORE_VISUALIZE_AGGREGATES[0]}(${ALLOWED_EXPLORE_VISUALIZE_FIELDS[0]})`;
-export function useVisualizes(): [Visualize[], (visualizes: Visualize[]) => void] {
+export function useVisualizes(): [Visualize[], (visualizes: BaseVisualize[]) => void] {
const location = useLocation();
const navigate = useNavigate();
const options = {location, navigate};
@@ -35,25 +39,38 @@ export function useVisualizes(): [Visualize[], (visualizes: Visualize[]) => void
function useVisualizesImpl({
location,
navigate,
-}: Options): [Visualize[], (visualizes: Visualize[]) => void] {
+}: Options): [Visualize[], (visualizes: BaseVisualize[]) => void] {
const visualizes: Visualize[] = useMemo(() => {
const rawVisualizes = decodeList(location.query.visualize);
const result: Visualize[] = rawVisualizes
.map(parseVisualizes)
.filter(defined)
- .filter(parsed => parsed.yAxes.length > 0);
+ .filter(parsed => parsed.yAxes.length > 0)
+ .map((parsed, i) => {
+ return {
+ chartType: parsed.chartType,
+ yAxes: parsed.yAxes,
+ label: String.fromCharCode(65 + i), // starts from 'A'
+ };
+ });
return result.length
? result
- : [{yAxes: [DEFAULT_VISUALIZATION], chartType: ChartType.LINE}];
+ : [{chartType: ChartType.LINE, label: 'A', yAxes: [DEFAULT_VISUALIZATION]}];
}, [location.query.visualize]);
const setVisualizes = useCallback(
- (newVisualizes: Visualize[]) => {
+ (newVisualizes: BaseVisualize[]) => {
const stringified: string[] = [];
for (const visualize of newVisualizes) {
- stringified.push(JSON.stringify(visualize));
+ // ignore the label from visualize because it'll determined later
+ stringified.push(
+ JSON.stringify({
+ chartType: visualize.chartType,
+ yAxes: visualize.yAxes,
+ })
+ );
}
navigate({
@@ -70,7 +87,7 @@ function useVisualizesImpl({
return [visualizes, setVisualizes];
}
-function parseVisualizes(raw: string): Visualize | null {
+function parseVisualizes(raw: string): BaseVisualize | null {
try {
const parsed = JSON.parse(raw);
if (!defined(parsed) || !Array.isArray(parsed.yAxes)) {
diff --git a/static/app/views/explore/toolbar/index.spec.tsx b/static/app/views/explore/toolbar/index.spec.tsx
index 58a72895d42477..02b75746871287 100644
--- a/static/app/views/explore/toolbar/index.spec.tsx
+++ b/static/app/views/explore/toolbar/index.spec.tsx
@@ -108,21 +108,33 @@ describe('ExploreToolbar', function () {
// this is the default
expect(visualizes).toEqual([
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.duration)'],
+ },
]);
// try changing the field
await userEvent.click(within(section).getByRole('button', {name: 'span.duration'}));
await userEvent.click(within(section).getByRole('option', {name: 'span.self_time'}));
expect(visualizes).toEqual([
- {yAxes: ['count(span.self_time)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.self_time)'],
+ },
]);
// try changing the aggregate
await userEvent.click(within(section).getByRole('button', {name: 'count'}));
await userEvent.click(within(section).getByRole('option', {name: 'avg'}));
expect(visualizes).toEqual([
- {yAxes: ['avg(span.self_time)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['avg(span.self_time)'],
+ },
]);
// try adding an overlay
@@ -131,8 +143,9 @@ describe('ExploreToolbar', function () {
await userEvent.click(within(section).getByRole('option', {name: 'span.self_time'}));
expect(visualizes).toEqual([
{
- yAxes: ['avg(span.self_time)', 'count(span.self_time)'],
chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['avg(span.self_time)', 'count(span.self_time)'],
},
]);
@@ -140,23 +153,40 @@ describe('ExploreToolbar', function () {
await userEvent.click(within(section).getByRole('button', {name: 'Add Chart'}));
expect(visualizes).toEqual([
{
+ chartType: ChartType.LINE,
+ label: 'A',
yAxes: ['avg(span.self_time)', 'count(span.self_time)'],
+ },
+ {
chartType: ChartType.LINE,
+ label: 'B',
+ yAxes: ['count(span.duration)'],
},
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
]);
// delete first overlay
await userEvent.click(within(section).getAllByLabelText('Remove Overlay')[0]);
expect(visualizes).toEqual([
- {yAxes: ['count(span.self_time)'], chartType: ChartType.LINE},
- {yAxes: ['count(span.duration)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.self_time)'],
+ },
+ {
+ chartType: ChartType.LINE,
+ label: 'B',
+ yAxes: ['count(span.duration)'],
+ },
]);
// delete second chart
await userEvent.click(within(section).getAllByLabelText('Remove Overlay')[1]);
expect(visualizes).toEqual([
- {yAxes: ['count(span.self_time)'], chartType: ChartType.LINE},
+ {
+ chartType: ChartType.LINE,
+ label: 'A',
+ yAxes: ['count(span.self_time)'],
+ },
]);
// only one left so cant be deleted
diff --git a/static/app/views/explore/toolbar/toolbarVisualize.tsx b/static/app/views/explore/toolbar/toolbarVisualize.tsx
index 49801dccae8888..604aa4f9f8f282 100644
--- a/static/app/views/explore/toolbar/toolbarVisualize.tsx
+++ b/static/app/views/explore/toolbar/toolbarVisualize.tsx
@@ -1,4 +1,5 @@
import {Fragment, useCallback, useMemo} from 'react';
+import styled from '@emotion/styled';
import {Button} from 'sentry/components/button';
import {CompactSelect, type SelectOption} from 'sentry/components/compactSelect';
@@ -28,6 +29,11 @@ import {
ToolbarSection,
} from './styles';
+type ParsedVisualize = {
+ func: ParsedFunction;
+ label: string;
+};
+
interface ToolbarVisualizeProps {}
export function ToolbarVisualize({}: ToolbarVisualizeProps) {
@@ -35,9 +41,17 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
const numberTags = useSpanTags('number');
- const parsedVisualizeGroups: ParsedFunction[][] = useMemo(() => {
+ const parsedVisualizeGroups: ParsedVisualize[][] = useMemo(() => {
return visualizes.map(visualize =>
- visualize.yAxes.map(parseFunction).filter(defined)
+ visualize.yAxes
+ .map(parseFunction)
+ .filter(defined)
+ .map(func => {
+ return {
+ func,
+ label: visualize.label,
+ };
+ })
);
}, [visualizes]);
@@ -95,7 +109,7 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
(group: number, index: number, {value}: SelectOption<string>) => {
const newVisualizes = visualizes.slice();
newVisualizes[group].yAxes[index] =
- `${parsedVisualizeGroups[group][index].name}(${value})`;
+ `${parsedVisualizeGroups[group][index].func.name}(${value})`;
setVisualizes(newVisualizes);
},
[parsedVisualizeGroups, setVisualizes, visualizes]
@@ -105,7 +119,7 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
(group: number, index: number, {value}: SelectOption<string>) => {
const newVisualizes = visualizes.slice();
newVisualizes[group].yAxes[index] =
- `${value}(${parsedVisualizeGroups[group][index].arguments[0]})`;
+ `${value}(${parsedVisualizeGroups[group][index].func.arguments[0]})`;
setVisualizes(newVisualizes);
},
[parsedVisualizeGroups, setVisualizes, visualizes]
@@ -160,15 +174,16 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
<Fragment key={group}>
{parsedVisualizeGroup.map((parsedVisualize, index) => (
<ToolbarRow key={index}>
+ <ChartLabel>{parsedVisualize.label}</ChartLabel>
<CompactSelect
searchable
options={fieldOptions}
- value={parsedVisualize.arguments[0]}
+ value={parsedVisualize.func.arguments[0]}
onChange={newField => setChartField(group, index, newField)}
/>
<CompactSelect
options={aggregateOptions}
- value={parsedVisualize?.name}
+ value={parsedVisualize.func.name}
onChange={newAggregate =>
setChartAggregate(group, index, newAggregate)
}
@@ -202,3 +217,14 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
</ToolbarSection>
);
}
+
+const ChartLabel = styled('div')`
+ background-color: ${p => p.theme.purple100};
+ border-radius: ${p => p.theme.borderRadius};
+ text-align: center;
+ min-width: 32px;
+ color: ${p => p.theme.purple400};
+ white-space: nowrap;
+ font-weight: ${p => p.theme.fontWeightBold};
+ align-content: center;
+`;
|
f713bcc97b120c85d2975daed6e80277631dd2eb
|
2023-02-04 00:57:34
|
Cathy Teng
|
feat(roles): refactor OrganizationMemberTeam model and API (#44067)
| false
|
refactor OrganizationMemberTeam model and API (#44067)
|
feat
|
diff --git a/src/sentry/api/endpoints/organization_member/team_details.py b/src/sentry/api/endpoints/organization_member/team_details.py
index 0102bf48ee5787..40c171284ed38d 100644
--- a/src/sentry/api/endpoints/organization_member/team_details.py
+++ b/src/sentry/api/endpoints/organization_member/team_details.py
@@ -114,8 +114,8 @@ def _can_set_team_role(self, request: Request, team: Team, new_role: TeamRole) -
if not self._can_admin_team(request, team):
return False
- org_role = request.access.get_organization_role()
- if org_role and org_role.can_manage_team_role(new_role):
+ org_roles = request.access.get_organization_roles()
+ if any(org_role.can_manage_team_role(new_role) for org_role in org_roles):
return True
team_role = request.access.get_team_role(team)
diff --git a/src/sentry/models/organizationmember.py b/src/sentry/models/organizationmember.py
index 943c2b3e9cc112..31e72e761960a6 100644
--- a/src/sentry/models/organizationmember.py
+++ b/src/sentry/models/organizationmember.py
@@ -31,6 +31,7 @@
from sentry.models.outbox import OutboxCategory, OutboxScope, RegionOutbox
from sentry.models.team import TeamStatus
from sentry.roles import organization_roles
+from sentry.roles.manager import OrganizationRole
from sentry.signals import member_invited
from sentry.utils.http import absolute_uri
@@ -404,18 +405,18 @@ def get_scopes(self) -> FrozenSet[str]:
scopes.update(self.organization.get_scopes(role_obj))
return frozenset(scopes)
- def get_org_roles_from_teams(self):
+ def get_org_roles_from_teams(self) -> List[str]:
# results in an extra query when calling get_scopes()
return list(
self.teams.all().exclude(org_role=None).values_list("org_role", flat=True).distinct()
)
- def get_all_org_roles(self):
+ def get_all_org_roles(self) -> List[str]:
all_org_roles = self.get_org_roles_from_teams()
all_org_roles.append(self.role)
return all_org_roles
- def get_all_org_roles_sorted(self):
+ def get_all_org_roles_sorted(self) -> List[OrganizationRole]:
return sorted(
[organization_roles.get(role) for role in self.get_all_org_roles()],
key=lambda r: r.priority,
@@ -510,10 +511,7 @@ def get_allowed_org_roles_to_invite(self):
Return a list of org-level roles which that member could invite
Must check if member member has member:admin first before checking
"""
- all_org_roles = self.get_all_org_roles()
- highest_role_priority = sorted(
- [organization_roles.get(role) for role in all_org_roles], key=lambda r: r.priority
- )[-1].priority
+ highest_role_priority = self.get_all_org_roles_sorted()[0].priority
if not features.has("organizations:team-roles", self.organization):
return [r for r in organization_roles.get_all() if r.priority <= highest_role_priority]
diff --git a/src/sentry/models/organizationmemberteam.py b/src/sentry/models/organizationmemberteam.py
index 78ac968e1c0feb..4a1f8edbfff006 100644
--- a/src/sentry/models/organizationmemberteam.py
+++ b/src/sentry/models/organizationmemberteam.py
@@ -51,7 +51,9 @@ def get_team_role(self) -> TeamRole:
If the role field is null, resolve to the minimum team role given by this
member's organization role.
"""
- minimum_role = roles.get_minimum_team_role(self.organizationmember.role)
+ highest_org_role = self.organizationmember.get_all_org_roles_sorted()[0].id
+ minimum_role = roles.get_minimum_team_role(highest_org_role)
+
if self.role and features.has(
"organizations:team-roles", self.organizationmember.organization
):
diff --git a/tests/sentry/api/endpoints/test_organization_details.py b/tests/sentry/api/endpoints/test_organization_details.py
index 33c1cb2f2be917..5e408e35bdbe3a 100644
--- a/tests/sentry/api/endpoints/test_organization_details.py
+++ b/tests/sentry/api/endpoints/test_organization_details.py
@@ -139,7 +139,7 @@ def test_with_projects(self):
options.delete("store.symbolicate-event-lpq-never")
# TODO(dcramer): We need to pare this down. Lots of duplicate queries for membership data.
- expected_queries = 49 if SiloMode.get_current_mode() == SiloMode.MONOLITH else 51
+ expected_queries = 50 if SiloMode.get_current_mode() == SiloMode.MONOLITH else 52
with self.assertNumQueries(expected_queries, using="default"):
response = self.get_success_response(self.organization.slug)
diff --git a/tests/sentry/api/endpoints/test_organization_member_team_details.py b/tests/sentry/api/endpoints/test_organization_member_team_details.py
index c594048059399e..40b56a93910721 100644
--- a/tests/sentry/api/endpoints/test_organization_member_team_details.py
+++ b/tests/sentry/api/endpoints/test_organization_member_team_details.py
@@ -624,3 +624,24 @@ def test_member_cannot_promote_member(self):
team=self.team, organizationmember=other_member
)
assert target_omt.role is None
+
+ @with_feature("organizations:team-roles")
+ def test_member_on_owner_team_can_promote_member(self):
+ owner_team = self.create_team(org_role="owner")
+ member = self.create_member(
+ organization=self.org,
+ user=self.create_user(),
+ role="member",
+ teams=[owner_team],
+ )
+
+ self.login_as(member.user)
+ resp = self.get_response(
+ self.org.slug, self.member_on_team.id, self.team.slug, teamRole="admin"
+ )
+ assert resp.status_code == 200
+
+ updated_omt = OrganizationMemberTeam.objects.get(
+ team=self.team, organizationmember=self.member_on_team
+ )
+ assert updated_omt.role == "admin"
diff --git a/tests/sentry/models/test_organizationmemberteam.py b/tests/sentry/models/test_organizationmemberteam.py
index 823a881a28b317..940369e14d1c74 100644
--- a/tests/sentry/models/test_organizationmemberteam.py
+++ b/tests/sentry/models/test_organizationmemberteam.py
@@ -8,9 +8,9 @@
@region_silo_test(stable=True)
class OrganizationMemberTest(TestCase):
def setUp(self):
- organization = self.create_organization()
- self.team = self.create_team(organization=organization)
- self.member = self.create_member(organization=organization, user=self.create_user())
+ self.organization = self.create_organization()
+ self.team = self.create_team(organization=self.organization)
+ self.member = self.create_member(organization=self.organization, user=self.create_user())
@with_feature("organizations:team-roles")
def test_get_team_role(self):
@@ -27,3 +27,13 @@ def test_get_team_role_derives_minimum_role(self):
for org_role in ("admin", "manager", "owner"):
self.member.role = org_role
assert omt.get_team_role() == team_roles.get("admin")
+
+ @with_feature("organizations:team-roles")
+ def test_get_team_role_derives_minimum_role_from_team_membership(self):
+ manager_team = self.create_team(org_role="manager")
+ member = self.create_member(
+ organization=self.organization, user=self.create_user(), teams=[manager_team]
+ )
+ omt = OrganizationMemberTeam(organizationmember=member, team=manager_team)
+
+ assert omt.get_team_role() == team_roles.get("admin")
|
b228ea4ee0164379a676de4b0608d15f8a292617
|
2022-09-21 04:40:39
|
Evan Purkhiser
|
ref(ui): Remove browser-icons from less (#39085)
| false
|
Remove browser-icons from less (#39085)
|
ref
|
diff --git a/static/app/views/settings/project/projectFilters/projectFiltersSettings.tsx b/static/app/views/settings/project/projectFilters/projectFiltersSettings.tsx
index 2e6267b640c6e2..df5aff66968e1c 100644
--- a/static/app/views/settings/project/projectFilters/projectFiltersSettings.tsx
+++ b/static/app/views/settings/project/projectFilters/projectFiltersSettings.tsx
@@ -1,5 +1,9 @@
import {Component, Fragment} from 'react';
import styled from '@emotion/styled';
+import iconAndroid from 'sentry-logos/logo-android.svg';
+import iconIe from 'sentry-logos/logo-ie.svg';
+import iconOpera from 'sentry-logos/logo-opera.svg';
+import iconSafari from 'sentry-logos/logo-safari.svg';
import ProjectActions from 'sentry/actions/projectActions';
import Access from 'sentry/components/acl/access';
@@ -21,46 +25,47 @@ import Switch from 'sentry/components/switchButton';
import filterGroups, {customFilterFields} from 'sentry/data/forms/inboundFilters';
import {t} from 'sentry/locale';
import HookStore from 'sentry/stores/hookStore';
+import space from 'sentry/styles/space';
import {Project} from 'sentry/types';
const LEGACY_BROWSER_SUBFILTERS = {
ie_pre_9: {
- icon: 'internet-explorer',
+ icon: iconIe,
helpText: 'Version 8 and lower',
title: 'Internet Explorer',
},
ie9: {
- icon: 'internet-explorer',
+ icon: iconIe,
helpText: 'Version 9',
title: 'Internet Explorer',
},
ie10: {
- icon: 'internet-explorer',
+ icon: iconIe,
helpText: 'Version 10',
title: 'Internet Explorer',
},
ie11: {
- icon: 'internet-explorer',
+ icon: iconIe,
helpText: 'Version 11',
title: 'Internet Explorer',
},
safari_pre_6: {
- icon: 'safari',
+ icon: iconSafari,
helpText: 'Version 5 and lower',
title: 'Safari',
},
opera_pre_15: {
- icon: 'opera',
+ icon: iconOpera,
helpText: 'Version 14 and lower',
title: 'Opera',
},
opera_mini_pre_8: {
- icon: 'opera',
+ icon: iconOpera,
helpText: 'Version 8 and lower',
title: 'Opera Mini',
},
android_pre_4: {
- icon: 'android',
+ icon: iconAndroid,
helpText: 'Version 3 and lower',
title: 'Android',
},
@@ -150,25 +155,20 @@ class LegacyBrowserFilterRow extends Component<RowProps, RowState> {
{LEGACY_BROWSER_KEYS.map(key => {
const subfilter = LEGACY_BROWSER_SUBFILTERS[key];
return (
- <FilterGridItemWrapper key={key}>
- <FilterGridItem>
- <FilterItem>
- <FilterGridIcon className={`icon-${subfilter.icon}`} />
- <div>
- <FilterTitle>{subfilter.title}</FilterTitle>
- <FilterDescription>{subfilter.helpText}</FilterDescription>
- </div>
- </FilterItem>
-
- <Switch
- isActive={this.state.subfilters.has(key)}
- isDisabled={disabled}
- css={{flexShrink: 0, marginLeft: 6}}
- toggle={this.handleToggleSubfilters.bind(this, key)}
- size="lg"
- />
- </FilterGridItem>
- </FilterGridItemWrapper>
+ <FilterGridItem key={key}>
+ <FilterGridIcon src={subfilter.icon} />
+ <div>
+ <FilterTitle>{subfilter.title}</FilterTitle>
+ <FilterDescription>{subfilter.helpText}</FilterDescription>
+ </div>
+ <Switch
+ isActive={this.state.subfilters.has(key)}
+ isDisabled={disabled}
+ css={{flexShrink: 0, marginLeft: 6}}
+ toggle={this.handleToggleSubfilters.bind(this, key)}
+ size="lg"
+ />
+ </FilterGridItem>
);
})}
</FilterGrid>
@@ -376,70 +376,54 @@ const NestedForm = styled(Form)<Form['props']>`
`;
const FilterGrid = styled('div')`
- display: flex;
- flex-wrap: wrap;
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: ${space(1.5)};
+ margin-top: ${space(2)};
`;
const FilterGridItem = styled('div')`
- display: flex;
+ display: grid;
+ grid-template-columns: max-content 1fr max-content;
+ gap: ${space(1)};
align-items: center;
background: ${p => p.theme.backgroundSecondary};
- border-radius: 3px;
- flex: 1;
- padding: 12px;
- height: 100%;
+ border-radius: ${p => p.theme.borderRadius};
+ padding: ${space(1.5)};
`;
-// We want this wrapper to maining 30% width
-const FilterGridItemWrapper = styled('div')`
- padding: 12px;
- width: 50%;
-`;
-
-const FilterItem = styled('div')`
- display: flex;
- flex: 1;
- align-items: center;
-`;
-
-const FilterGridIcon = styled('div')`
+const FilterGridIcon = styled('img')`
width: 38px;
height: 38px;
- background-repeat: no-repeat;
- background-position: center;
- background-size: 38px 38px;
- margin-right: 6px;
- flex-shrink: 0;
`;
const FilterTitle = styled('div')`
- font-size: 14px;
+ font-size: ${p => p.theme.fontSizeMedium};
font-weight: bold;
- line-height: 1;
white-space: nowrap;
`;
const FilterDescription = styled('div')`
color: ${p => p.theme.subText};
- font-size: 12px;
- line-height: 1;
+ font-size: ${p => p.theme.fontSizeSmall};
white-space: nowrap;
`;
const BulkFilter = styled('div')`
- text-align: right;
- padding: 0 12px;
+ display: flex;
+ justify-content: flex-end;
+ padding: 0 ${space(1.5)};
`;
const BulkFilterLabel = styled('span')`
font-weight: bold;
- margin-right: 6px;
+ margin-right: ${space(0.75)};
`;
const BulkFilterItem = styled('a')`
border-right: 1px solid #f1f2f3;
- margin-right: 6px;
- padding-right: 6px;
+ margin-right: ${space(0.75)};
+ padding-right: ${space(0.75)};
&:last-child {
border-right: none;
diff --git a/static/less/browser-icons.less b/static/less/browser-icons.less
deleted file mode 100644
index 9470610ac9d804..00000000000000
--- a/static/less/browser-icons.less
+++ /dev/null
@@ -1,25 +0,0 @@
-// Browser icons
-
-.icon-android {
- background-image: url(~sentry-logos/logo-android.svg);
-}
-
-.icon-chrome {
- background-image: url(~sentry-logos/logo-chrome.svg);
-}
-
-.icon-edge {
- background-image: url(~sentry-logos/logo-edge-new.svg);
-}
-
-.icon-internet-explorer {
- background-image: url(~sentry-logos/logo-ie.svg);
-}
-
-.icon-opera {
- background-image: url(~sentry-logos/logo-opera.svg);
-}
-
-.icon-safari {
- background-image: url(~sentry-logos/logo-safari.svg);
-}
diff --git a/static/less/sentry.less b/static/less/sentry.less
index 4c98be3f0822c0..84aae04cf8e5aa 100644
--- a/static/less/sentry.less
+++ b/static/less/sentry.less
@@ -17,7 +17,6 @@
@import url('./fonts.less');
@import url('./misc.less');
@import url('./result-grid.less');
-@import url('./browser-icons.less');
@import url('./dropdowns.less');
// Page specific
|
22863fbeb84f5a9d174dfbb1640e0696d2499248
|
2024-02-27 22:05:00
|
Scott Cooper
|
ref(ui): Add explicit types to withSentryRouter (#65848)
| false
|
Add explicit types to withSentryRouter (#65848)
|
ref
|
diff --git a/static/app/utils/withSentryRouter.tsx b/static/app/utils/withSentryRouter.tsx
index 3069344c6c737f..0d1970099fef94 100644
--- a/static/app/utils/withSentryRouter.tsx
+++ b/static/app/utils/withSentryRouter.tsx
@@ -14,7 +14,7 @@ import {CUSTOMER_DOMAIN, USING_CUSTOMER_DOMAIN} from 'sentry/constants';
*/
function withSentryRouter<P extends WithRouterProps>(
WrappedComponent: React.ComponentType<P>
-) {
+): React.ComponentType<Omit<P, keyof WithRouterProps>> {
function WithSentryRouterWrapper(props: P) {
const {params} = props;
if (USING_CUSTOMER_DOMAIN) {
|
04dcd94a2f4e8e71074b5b795eb7eca6ec36f6ae
|
2024-06-13 02:40:22
|
Kevin Liu
|
fix(insights): remove hardcoded searchsource in sample panel (#72646)
| false
|
remove hardcoded searchsource in sample panel (#72646)
|
fix
|
diff --git a/static/app/views/performance/mobile/components/spanSamplesPanelContainer.tsx b/static/app/views/performance/mobile/components/spanSamplesPanelContainer.tsx
index 0e6d357c8293e0..ee6b367c591948 100644
--- a/static/app/views/performance/mobile/components/spanSamplesPanelContainer.tsx
+++ b/static/app/views/performance/mobile/components/spanSamplesPanelContainer.tsx
@@ -196,7 +196,7 @@ export function SpanSamplesContainer({
<Feature features="performance-sample-panel-search">
<StyledSearchBar
- searchSource="queries-sample-panel"
+ searchSource={`${moduleName}-sample-panel`}
query={searchQuery}
onSearch={handleSearch}
placeholder={t('Search for span attributes')}
|
7d1b3705c9c53ee3c0fc799c7e999e2bc6eb872a
|
2024-01-12 13:20:43
|
Philipp Hofmann
|
feat(sdk-crashes): Add React-Native crash detector (#63009)
| false
|
Add React-Native crash detector (#63009)
|
feat
|
diff --git a/fixtures/sdk_crash_detection/crash_event_react_native.py b/fixtures/sdk_crash_detection/crash_event_react_native.py
new file mode 100644
index 00000000000000..95037b69a70869
--- /dev/null
+++ b/fixtures/sdk_crash_detection/crash_event_react_native.py
@@ -0,0 +1,170 @@
+from typing import Dict, Mapping, MutableMapping, Sequence
+
+
+def get_frames(filename: str) -> Sequence[MutableMapping[str, str]]:
+ frames = [
+ {
+ "function": "dispatchEvent",
+ "filename": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js",
+ "abs_path": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js",
+ },
+ {
+ "function": "Button.props.onPress",
+ "filename": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/src/Screens/HomeScreen.tsx",
+ "abs_path": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/src/Screens/HomeScreen.tsx",
+ },
+ {
+ "function": "community.lib.dosomething",
+ "filename": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/node_modules/react-native-community/Renderer/implementations/ReactFabric-dev.js",
+ "abs_path": "/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/node_modules/react-native-community/Renderer/implementations/ReactFabric-dev.js",
+ },
+ {
+ "function": "nativeCrash",
+ "filename": "/Users/sentry.user/git-repos/sentry-react-native/dist/js/sdk.js",
+ "abs_path": "/Users/sentry.user/git-repos/sentry-react-native/dist/js/sdk.js",
+ },
+ {
+ "function": "ReactNativeClient#nativeCrash",
+ "filename": filename,
+ "abs_path": "/Users/sentry.user/git-repos/sentry-react-native/dist/js/client.js",
+ },
+ ]
+ return frames
+
+
+def get_crash_event(
+ filename="/Users/sentry.user/git-repos/sentry-react-native/dist/js/client.js", **kwargs
+) -> Dict[str, object]:
+ return get_crash_event_with_frames(get_frames(filename=filename), **kwargs)
+
+
+def get_crash_event_with_frames(frames: Sequence[Mapping[str, str]], **kwargs) -> Dict[str, object]:
+ result = {
+ "event_id": "150d5b0b4f3a4797a3cd1345374ac484",
+ "release": "[email protected]+1",
+ "dist": "1",
+ "platform": "javascript",
+ "message": "",
+ "environment": "dev",
+ "exception": {
+ "values": [
+ {
+ "type": "Error",
+ "value": "Uncaught Thrown Error",
+ "stacktrace": {"frames": frames},
+ "mechanism": {"type": "onerror", "handled": False},
+ }
+ ]
+ },
+ "key_id": "3554525",
+ "level": "fatal",
+ "contexts": {
+ "app": {
+ "app_start_time": "2024-01-11T10:30:29.281Z",
+ "app_identifier": "com.samplenewarchitecture",
+ "app_name": "sampleNewArchitecture",
+ "app_version": "1.0",
+ "app_build": "1",
+ "in_foreground": True,
+ "view_names": ["Home"],
+ "permissions": {
+ "ACCESS_NETWORK_STATE": "granted",
+ "ACCESS_WIFI_STATE": "granted",
+ "DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION": "granted",
+ "INTERNET": "granted",
+ "SYSTEM_ALERT_WINDOW": "not_granted",
+ },
+ "type": "app",
+ },
+ "device": {
+ "family": "sdk_gphone64_arm64",
+ "model": "sdk_gphone64_arm64",
+ "model_id": "UPB2.230407.019",
+ "battery_level": 100.0,
+ "orientation": "portrait",
+ "manufacturer": "Google",
+ "brand": "google",
+ "screen_width_pixels": 1080,
+ "screen_height_pixels": 2209,
+ "screen_density": 2.625,
+ "screen_dpi": 420,
+ "online": True,
+ "charging": False,
+ "low_memory": False,
+ "simulator": True,
+ "memory_size": 2074669056,
+ "free_memory": 607039488,
+ "storage_size": 6228115456,
+ "free_storage": 4940427264,
+ "boot_time": "2024-01-11T09:56:37.070Z",
+ "timezone": "Europe/Vienna",
+ "locale": "en_US",
+ "processor_count": 4,
+ "processor_frequency": 0,
+ "archs": ["arm64-v8a"],
+ "battery_temperature": 25,
+ "connection_type": "wifi",
+ "id": "64b13018-2922-4938-92b1-3135861a69c8",
+ "language": "en",
+ "type": "device",
+ },
+ "os": {
+ "name": "Android",
+ "version": "13",
+ "build": "sdk_gphone64_arm64-userdebug UpsideDownCake UPB2.230407.019 10170211 dev-keys",
+ "kernel_version": "6.1.21-android14-3-01811-g9e35a21ec03f-ab9850788",
+ "rooted": False,
+ "type": "os",
+ },
+ },
+ "logger": "",
+ "sdk": {
+ "name": "sentry.javascript.react-native",
+ "version": "5.15.2",
+ "integrations": [
+ "ModulesLoader",
+ "ReactNativeErrorHandlers",
+ "Release",
+ "InboundFilters",
+ "FunctionToString",
+ "Breadcrumbs",
+ "HttpContext",
+ "NativeLinkedErrors",
+ "EventOrigin",
+ "SdkInfo",
+ "ReactNativeInfo",
+ "DebugSymbolicator",
+ "RewriteFrames",
+ "DeviceContext",
+ "HermesProfiling",
+ "ReactNativeTracing",
+ "Screenshot",
+ "ViewHierarchy",
+ "HttpClient",
+ "react-navigation-v5",
+ "ReactNativeUserInteractionTracing",
+ "ReactNativeProfiler",
+ "TouchEventBoundary",
+ ],
+ "packages": [
+ {"name": "sentry.java.android.react-native", "version": "6.34.0"},
+ {"name": "npm:@sentry/react-native", "version": "5.15.2"},
+ ],
+ },
+ "timestamp": 1704969036.875,
+ "type": "error",
+ "user": {
+ "email": "[email protected]",
+ "ip_address": "85.193.160.231",
+ "geo": {
+ "country_code": "AT",
+ "city": "Diersbach",
+ "subdivision": "Upper Austria",
+ "region": "Austria",
+ },
+ },
+ "version": "7",
+ }
+
+ result.update(kwargs)
+ return result
diff --git a/src/sentry/utils/sdk_crashes/configs.py b/src/sentry/utils/sdk_crashes/configs.py
index 05eb6802f17cc2..c8b67af7b9ebe4 100644
--- a/src/sentry/utils/sdk_crashes/configs.py
+++ b/src/sentry/utils/sdk_crashes/configs.py
@@ -21,7 +21,7 @@
# the frames contain the full paths required for detecting system frames in is_system_library_frame.
# Therefore, we require at least sentry-cocoa 8.2.0.
min_sdk_version="8.2.0",
- system_library_paths={"/System/Library/", "/usr/lib/"},
+ system_library_path_patterns={r"/System/Library/*", r"/usr/lib/*"},
sdk_frame_config=SDKFrameConfig(
function_patterns={
r"*sentrycrash*",
@@ -44,13 +44,13 @@
# 4.0.0 was released in June 2022, see https://github.com/getsentry/sentry-react-native/releases/tag/4.0.0.
# We require at least sentry-react-native 4.0.0 to only detect SDK crashes for not too old versions.
min_sdk_version="4.0.0",
- system_library_paths={
- "react-native/Libraries/",
- "react-native-community/",
+ system_library_path_patterns={
+ r"*/react-native/Libraries/*",
+ r"*/react-native-community/*",
},
sdk_frame_config=SDKFrameConfig(
function_patterns=set(),
- filename_patterns={r"**/sentry-react-native/**"},
+ filename_patterns={r"**/sentry-react-native/dist/**"},
path_replacer=KeepAfterPatternMatchPathReplacer(
patterns={r"\/sentry-react-native\/.*", r"\/@sentry.*"},
fallback_path="sentry-react-native",
diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py
index 8e043106b5077b..932b1df75a52b6 100644
--- a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py
+++ b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py
@@ -8,7 +8,10 @@
from sentry.eventstore.models import Event, GroupEvent
from sentry.issues.grouptype import GroupCategory
from sentry.utils.safe import get_path, set_path
-from sentry.utils.sdk_crashes.configs import cocoa_sdk_crash_detector_config
+from sentry.utils.sdk_crashes.configs import (
+ cocoa_sdk_crash_detector_config,
+ react_native_sdk_crash_detector_config,
+)
from sentry.utils.sdk_crashes.event_stripper import strip_event_data
from sentry.utils.sdk_crashes.sdk_crash_detection_config import SDKCrashDetectionConfig, SdkName
from sentry.utils.sdk_crashes.sdk_crash_detector import SDKCrashDetector
@@ -125,6 +128,14 @@ def detect_sdk_crash(
_crash_reporter = SDKCrashReporter()
-_cocoa_sdk_crash_detector = SDKCrashDetector(config=cocoa_sdk_crash_detector_config)
-sdk_crash_detection = SDKCrashDetection(_crash_reporter, {SdkName.Cocoa: _cocoa_sdk_crash_detector})
+_cocoa_sdk_crash_detector = SDKCrashDetector(config=cocoa_sdk_crash_detector_config)
+_react_native_sdk_crash_detector = SDKCrashDetector(config=react_native_sdk_crash_detector_config)
+
+sdk_crash_detection = SDKCrashDetection(
+ _crash_reporter,
+ {
+ SdkName.Cocoa: _cocoa_sdk_crash_detector,
+ SdkName.ReactNative: _react_native_sdk_crash_detector,
+ },
+)
diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py
index a5fa1c1a144bc2..0a43b592729b83 100644
--- a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py
+++ b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py
@@ -24,7 +24,7 @@ class SDKCrashDetectorConfig:
min_sdk_version: str
- system_library_paths: Set[str]
+ system_library_path_patterns: Set[str]
sdk_frame_config: SDKFrameConfig
@@ -134,9 +134,9 @@ def is_sdk_frame(self, frame: Mapping[str, Any]) -> bool:
def is_system_library_frame(self, frame: Mapping[str, Any]) -> bool:
for field in self.fields_containing_paths:
- for system_library_path in self.config.system_library_paths:
+ for pattern in self.config.system_library_path_patterns:
field_with_path = frame.get(field)
- if field_with_path and field_with_path.startswith(system_library_path):
+ if field_with_path and glob_match(field_with_path, pattern, ignorecase=True):
return True
return False
diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py
new file mode 100644
index 00000000000000..72e3a1173b24a8
--- /dev/null
+++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py
@@ -0,0 +1,94 @@
+from functools import wraps
+from unittest.mock import patch
+
+import pytest
+
+from fixtures.sdk_crash_detection.crash_event_react_native import get_crash_event
+from sentry.testutils.pytest.fixtures import django_db_all
+from sentry.utils.safe import get_path, set_path
+from sentry.utils.sdk_crashes.sdk_crash_detection import sdk_crash_detection
+from sentry.utils.sdk_crashes.sdk_crash_detection_config import SDKCrashDetectionConfig, SdkName
+
+sdk_configs = [
+ SDKCrashDetectionConfig(sdk_name=SdkName.ReactNative, project_id=1234, sample_rate=1.0)
+]
+
+
+def decorators(func):
+ @wraps(func)
+ @django_db_all
+ @pytest.mark.snuba
+ @patch("random.random", return_value=0.1)
+ @patch("sentry.utils.sdk_crashes.sdk_crash_detection.sdk_crash_detection.sdk_crash_reporter")
+ def wrapper(*args, **kwargs):
+ return func(*args, **kwargs)
+
+ return wrapper
+
+
+@decorators
+def test_sdk_crash_is_reported(mock_sdk_crash_reporter, mock_random, store_event):
+ event = store_event(data=get_crash_event())
+
+ sdk_crash_detection.detect_sdk_crash(event=event, configs=sdk_configs)
+
+ assert mock_sdk_crash_reporter.report.call_count == 1
+ reported_event_data = mock_sdk_crash_reporter.report.call_args.args[0]
+
+ stripped_frames = get_path(
+ reported_event_data, "exception", "values", -1, "stacktrace", "frames"
+ )
+
+ assert len(stripped_frames) == 4
+ assert stripped_frames[0]["function"] == "dispatchEvent"
+ assert stripped_frames[1]["function"] == "community.lib.dosomething"
+ assert stripped_frames[2]["function"] == "nativeCrash"
+ assert stripped_frames[3]["function"] == "ReactNativeClient#nativeCrash"
+
+
+@decorators
+def test_sdk_crash_sample_app_not_reported(mock_sdk_crash_reporter, mock_random, store_event):
+ event = store_event(
+ data=get_crash_event(
+ filename="/Users/sentry.user/git-repos/sentry-react-native/samples/react-native/src/Screens/HomeScreen.tsx"
+ )
+ )
+
+ sdk_crash_detection.detect_sdk_crash(event=event, configs=sdk_configs)
+
+ assert mock_sdk_crash_reporter.report.call_count == 0
+
+
+@decorators
+def test_sdk_crash_react_natives_not_reported(mock_sdk_crash_reporter, mock_random, store_event):
+ event = store_event(
+ data=get_crash_event(
+ filename="/Users/sentry.user/git-repos/sentry-react-natives/dist/js/client.js"
+ )
+ )
+
+ sdk_crash_detection.detect_sdk_crash(event=event, configs=sdk_configs)
+
+ assert mock_sdk_crash_reporter.report.call_count == 0
+
+
+@decorators
+def test_beta_sdk_version_detected(mock_sdk_crash_reporter, mock_random, store_event):
+ event_data = get_crash_event()
+ set_path(event_data, "sdk", "version", value="4.1.0-beta.0")
+ event = store_event(data=event_data)
+
+ sdk_crash_detection.detect_sdk_crash(event=event, configs=sdk_configs)
+
+ assert mock_sdk_crash_reporter.report.call_count == 1
+
+
+@decorators
+def test_too_low_min_sdk_version_not_detected(mock_sdk_crash_reporter, mock_random, store_event):
+ event_data = get_crash_event()
+ set_path(event_data, "sdk", "version", value="3.9.9")
+ event = store_event(data=event_data)
+
+ sdk_crash_detection.detect_sdk_crash(event=event, configs=sdk_configs)
+
+ assert mock_sdk_crash_reporter.report.call_count == 0
|
0c692d54aaa5aecb5e02d346657d2d1f11ffcf2f
|
2024-05-03 22:05:52
|
Nar Saynorath
|
feat(mobile-ui): Expose frame metrics in avg function (#70233)
| false
|
Expose frame metrics in avg function (#70233)
|
feat
|
diff --git a/src/sentry/search/events/datasets/spans_metrics.py b/src/sentry/search/events/datasets/spans_metrics.py
index dd542feca12256..7a2afd3ff97461 100644
--- a/src/sentry/search/events/datasets/spans_metrics.py
+++ b/src/sentry/search/events/datasets/spans_metrics.py
@@ -155,9 +155,9 @@ def function_converter(self) -> Mapping[str, fields.MetricsFunction]:
"span.self_time",
fields.MetricArg(
"column",
- allowed_columns=constants.SPAN_METRIC_DURATION_COLUMNS.union(
- constants.SPAN_METRIC_BYTES_COLUMNS
- ),
+ allowed_columns=constants.SPAN_METRIC_DURATION_COLUMNS
+ | constants.SPAN_METRIC_BYTES_COLUMNS
+ | constants.SPAN_METRIC_COUNT_COLUMNS,
),
),
],
|
f1ecb98d4e15b7798ca52e0f1f1f3472bb503321
|
2023-05-17 23:07:12
|
Evan Purkhiser
|
ref(js): Improve comments useMembers + useTeams hasMore (#49287)
| false
|
Improve comments useMembers + useTeams hasMore (#49287)
|
ref
|
diff --git a/static/app/utils/useMembers.tsx b/static/app/utils/useMembers.tsx
index 500447534064b8..b76c3468acd92e 100644
--- a/static/app/utils/useMembers.tsx
+++ b/static/app/utils/useMembers.tsx
@@ -22,6 +22,8 @@ type State = {
/**
* Indicates that User results (from API) are paginated and there are more
* Users that are not in the initial response.
+ *
+ * A null value indicates that we don't know if there are more values.
*/
hasMore: null | boolean;
/**
diff --git a/static/app/utils/useTeams.tsx b/static/app/utils/useTeams.tsx
index 100eaf26b44542..a406545399154c 100644
--- a/static/app/utils/useTeams.tsx
+++ b/static/app/utils/useTeams.tsx
@@ -24,6 +24,8 @@ type State = {
/**
* Indicates that Team results (from API) are paginated and there are more
* Teams that are not in the initial response.
+ *
+ * A null value indicates that we don't know if there are more values.
*/
hasMore: null | boolean;
/**
|
1572ecbe726a6baf087309c4c4c358cf52b44472
|
2023-03-31 22:12:06
|
Malachi Willey
|
feat(issue-details): Add 'Copy Link' button to event selector (#46622)
| false
|
Add 'Copy Link' button to event selector (#46622)
|
feat
|
diff --git a/static/app/views/issueDetails/groupEventCarousel.tsx b/static/app/views/issueDetails/groupEventCarousel.tsx
index cc867f437f4baa..a64db1ff0a5d9e 100644
--- a/static/app/views/issueDetails/groupEventCarousel.tsx
+++ b/static/app/views/issueDetails/groupEventCarousel.tsx
@@ -92,6 +92,17 @@ export const GroupEventCarousel = ({
});
};
+ const copyLink = () => {
+ copyToClipboard(
+ window.location.origin + normalizeUrl(`${baseEventsPath}${event.id}/`)
+ );
+ trackAdvancedAnalyticsEvent('issue_details.copy_event_link_clicked', {
+ organization,
+ ...getAnalyticsDataForGroup(group),
+ ...getAnalyticsDataForEvent(event),
+ });
+ };
+
const quickTrace = useContext(QuickTraceContext);
return (
@@ -176,12 +187,16 @@ export const GroupEventCarousel = ({
<Button
size={BUTTON_SIZE}
icon={<IconOpen size={BUTTON_ICON_SIZE} />}
- aria-label="Newest"
onClick={downloadJson}
>
JSON
</Button>
)}
+ {xlargeViewport && (
+ <Button size={BUTTON_SIZE} onClick={copyLink}>
+ Copy Link
+ </Button>
+ )}
<DropdownMenu
position="bottom-end"
triggerProps={{
@@ -191,19 +206,16 @@ export const GroupEventCarousel = ({
size: BUTTON_SIZE,
}}
items={[
+ {
+ key: 'copy-event-id',
+ label: t('Copy Event ID'),
+ onAction: () => copyToClipboard(event.id),
+ },
{
key: 'copy-event-url',
label: t('Copy Event Link'),
- onAction: () => {
- copyToClipboard(
- window.location.origin + normalizeUrl(`${baseEventsPath}${event.id}/`)
- );
- trackAdvancedAnalyticsEvent('issue_details.copy_event_link_clicked', {
- organization,
- ...getAnalyticsDataForGroup(group),
- ...getAnalyticsDataForEvent(event),
- });
- },
+ hidden: xlargeViewport,
+ onAction: copyLink,
},
{
key: 'json',
|
53ee776e06666539a3fc361ca3624273def69880
|
2024-11-13 16:30:50
|
ArthurKnaus
|
feat(dynamic-sampling): Org assist UX (#80651)
| false
|
Org assist UX (#80651)
|
feat
|
diff --git a/static/app/views/settings/dynamicSampling/percentInput.tsx b/static/app/views/settings/dynamicSampling/percentInput.tsx
index 58c3407ccbefe0..85eed527f07e62 100644
--- a/static/app/views/settings/dynamicSampling/percentInput.tsx
+++ b/static/app/views/settings/dynamicSampling/percentInput.tsx
@@ -1,4 +1,5 @@
import type React from 'react';
+import {forwardRef} from 'react';
import {css} from '@emotion/react';
import styled from '@emotion/styled';
@@ -7,20 +8,22 @@ import {space} from 'sentry/styles/space';
interface Props extends React.ComponentProps<typeof InputGroup.Input> {}
-export function PercentInput(props: Props) {
- return (
- <InputGroup
- css={css`
- width: 160px;
- `}
- >
- <InputGroup.Input type="number" min={0} max={100} {...props} />
- <InputGroup.TrailingItems>
- <TrailingPercent>%</TrailingPercent>
- </InputGroup.TrailingItems>
- </InputGroup>
- );
-}
+export const PercentInput = forwardRef<HTMLInputElement, Props>(
+ function PercentInput(props, ref) {
+ return (
+ <InputGroup
+ css={css`
+ width: 160px;
+ `}
+ >
+ <InputGroup.Input ref={ref} type="number" min={0} max={100} {...props} />
+ <InputGroup.TrailingItems>
+ <TrailingPercent>%</TrailingPercent>
+ </InputGroup.TrailingItems>
+ </InputGroup>
+ );
+ }
+);
const TrailingPercent = styled('strong')`
padding: 0 ${space(0.25)};
diff --git a/static/app/views/settings/dynamicSampling/projectSampling.tsx b/static/app/views/settings/dynamicSampling/projectSampling.tsx
index 298a94d467fd98..ae411dc6342e6a 100644
--- a/static/app/views/settings/dynamicSampling/projectSampling.tsx
+++ b/static/app/views/settings/dynamicSampling/projectSampling.tsx
@@ -1,7 +1,11 @@
import {useMemo, useState} from 'react';
import styled from '@emotion/styled';
-import {addLoadingMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
+import {
+ addErrorMessage,
+ addLoadingMessage,
+ addSuccessMessage,
+} from 'sentry/actionCreators/indicator';
import {Button} from 'sentry/components/button';
import LoadingError from 'sentry/components/loadingError';
import Panel from 'sentry/components/panels/panel';
@@ -32,6 +36,7 @@ const UNSAVED_CHANGES_MESSAGE = t(
export function ProjectSampling() {
const hasAccess = useHasDynamicSamplingWriteAccess();
const [period, setPeriod] = useState<ProjectionSamplePeriod>('24h');
+ const [editMode, setEditMode] = useState<'single' | 'bulk'>('single');
const sampleRatesQuery = useGetSamplingProjectRates();
const sampleCountsQuery = useProjectSampleCounts({period});
@@ -56,6 +61,11 @@ export function ProjectSampling() {
enableReInitialize: true,
});
+ const handleReset = () => {
+ formState.reset();
+ setEditMode('single');
+ };
+
const handleSubmit = () => {
const ratesArray = Object.entries(formState.fields.projectRates.value).map(
([id, rate]) => ({
@@ -67,10 +77,11 @@ export function ProjectSampling() {
updateSamplingProjectRates.mutate(ratesArray, {
onSuccess: () => {
formState.save();
+ setEditMode('single');
addSuccessMessage(t('Changes applied'));
},
onError: () => {
- addLoadingMessage(t('Unable to save changes. Please try again.'));
+ addErrorMessage(t('Unable to save changes. Please try again.'));
},
});
};
@@ -115,12 +126,14 @@ export function ProjectSampling() {
<LoadingError onRetry={sampleCountsQuery.refetch} />
) : (
<ProjectsEditTable
+ editMode={editMode}
+ onEditModeChange={setEditMode}
isLoading={sampleRatesQuery.isPending || sampleCountsQuery.isPending}
sampleCounts={sampleCountsQuery.data}
/>
)}
<FormActions>
- <Button disabled={isFormActionDisabled} onClick={formState.reset}>
+ <Button disabled={isFormActionDisabled} onClick={handleReset}>
{t('Reset')}
</Button>
<Button
diff --git a/static/app/views/settings/dynamicSampling/projectsEditTable.tsx b/static/app/views/settings/dynamicSampling/projectsEditTable.tsx
index 8043a962ae72d9..8ff7892b610d1b 100644
--- a/static/app/views/settings/dynamicSampling/projectsEditTable.tsx
+++ b/static/app/views/settings/dynamicSampling/projectsEditTable.tsx
@@ -1,8 +1,10 @@
-import {Fragment, useCallback, useMemo, useRef, useState} from 'react';
+import {Fragment, useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {css} from '@emotion/react';
import styled from '@emotion/styled';
import partition from 'lodash/partition';
+import {Button} from 'sentry/components/button';
+import FieldGroup from 'sentry/components/forms/fieldGroup';
import LoadingIndicator from 'sentry/components/loadingIndicator';
import Panel from 'sentry/components/panels/panel';
import {t} from 'sentry/locale';
@@ -18,20 +20,29 @@ import {scaleSampleRates} from 'sentry/views/settings/dynamicSampling/utils/scal
import type {ProjectSampleCount} from 'sentry/views/settings/dynamicSampling/utils/useProjectSampleCounts';
interface Props {
+ editMode: 'single' | 'bulk';
isLoading: boolean;
+ onEditModeChange: (mode: 'single' | 'bulk') => void;
sampleCounts: ProjectSampleCount[];
}
const {useFormField} = projectSamplingForm;
const EMPTY_ARRAY = [];
-export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Props) {
+export function ProjectsEditTable({
+ isLoading: isLoadingProp,
+ sampleCounts,
+ editMode,
+ onEditModeChange,
+}: Props) {
const {projects, fetching} = useProjects();
const hasAccess = useHasDynamicSamplingWriteAccess();
const {value, initialValue, error, onChange} = useFormField('projectRates');
+ const [isBulkEditEnabled, setIsBulkEditEnabled] = useState(false);
+ const inputRef = useRef<HTMLInputElement>(null);
const [orgRate, setOrgRate] = useState<string>('');
- const [editMode, setEditMode] = useState<'single' | 'bulk'>('single');
+
const projectRateSnapshotRef = useRef<Record<string, string>>({});
const dataByProjectId = useMemo(
@@ -46,15 +57,21 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
[sampleCounts]
);
+ useEffect(() => {
+ if (isBulkEditEnabled) {
+ inputRef.current?.focus();
+ }
+ }, [isBulkEditEnabled]);
+
const handleProjectChange = useCallback(
(projectId: string, newRate: string) => {
onChange(prev => ({
...prev,
[projectId]: newRate,
}));
- setEditMode('single');
+ onEditModeChange('single');
},
- [onChange]
+ [onChange, onEditModeChange]
);
const handleOrgChange = useCallback(
@@ -63,6 +80,7 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
if (editMode === 'single') {
projectRateSnapshotRef.current = value;
}
+ const cappedOrgRate = Math.min(100, Math.max(0, Number(newRate))) ?? 100;
const scalingItems = Object.entries(projectRateSnapshotRef.current)
.map(([projectId, rate]) => ({
@@ -75,7 +93,7 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
const {scaledItems} = scaleSampleRates({
items: scalingItems,
- sampleRate: Number(newRate) / 100,
+ sampleRate: cappedOrgRate / 100,
});
const newProjectValues = scaledItems.reduce((acc, item) => {
@@ -87,9 +105,9 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
});
setOrgRate(newRate);
- setEditMode('bulk');
+ onEditModeChange('bulk');
},
- [dataByProjectId, editMode, onChange, value]
+ [dataByProjectId, editMode, onChange, onEditModeChange, value]
);
const items = useMemo(
@@ -126,6 +144,15 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
return formatNumberWithDynamicDecimalPoints(totalSampledSpans / totalSpans, 2);
}, [editMode, items, orgRate, value]);
+ const initialOrgRate = useMemo(() => {
+ const totalSpans = items.reduce((acc, item) => acc + item.count, 0);
+ const totalSampledSpans = items.reduce(
+ (acc, item) => acc + item.count * Number(initialValue[item.project.id] ?? 100),
+ 0
+ );
+ return formatNumberWithDynamicDecimalPoints(totalSampledSpans / totalSpans, 2);
+ }, [initialValue, items]);
+
const breakdownSampleRates = useMemo(
() =>
Object.entries(value).reduce(
@@ -151,23 +178,55 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
/>
) : (
<Fragment>
- <SamplingBreakdown
- sampleCounts={sampleCounts}
- sampleRates={breakdownSampleRates}
- />
- <Divider />
- <ProjectedOrgRateWrapper>
- {t('Projected Organization Rate')}
- <div>
+ <BreakdownWrapper>
+ <SamplingBreakdown
+ sampleCounts={sampleCounts}
+ sampleRates={breakdownSampleRates}
+ />
+ </BreakdownWrapper>
+ <FieldGroup
+ label={t('Projected Organization Rate')}
+ help={t(
+ "An estimate of the combined sample rate for all projects. Adjusting this will proportionally update each project's rate below."
+ )}
+ flexibleControlStateSize
+ alignRight
+ >
+ <InputWrapper>
<PercentInput
type="number"
- disabled={!hasAccess}
+ ref={inputRef}
+ disabled={!hasAccess || !isBulkEditEnabled}
size="sm"
onChange={handleOrgChange}
value={projectedOrgRate}
/>
- </div>
- </ProjectedOrgRateWrapper>
+ <FlexRow>
+ <PreviousValue>
+ {initialOrgRate !== projectedOrgRate ? (
+ t('previous: %f%%', initialOrgRate)
+ ) : (
+ // Placeholder char to prevent the line from collapsing
+ <Fragment>​</Fragment>
+ )}
+ </PreviousValue>
+ {hasAccess && !isBulkEditEnabled && (
+ <BulkEditButton
+ size="zero"
+ title={t(
+ 'Adjusting your organization rate will automatically scale individual project rates to match.'
+ )}
+ priority="link"
+ onClick={() => {
+ setIsBulkEditEnabled(true);
+ }}
+ >
+ {t('edit')}
+ </BulkEditButton>
+ )}
+ </FlexRow>
+ </InputWrapper>
+ </FieldGroup>
</Fragment>
)}
</BreakdownPanel>
@@ -186,20 +245,33 @@ export function ProjectsEditTable({isLoading: isLoadingProp, sampleCounts}: Prop
const BreakdownPanel = styled(Panel)`
margin-bottom: ${space(3)};
+`;
+
+const BreakdownWrapper = styled('div')`
padding: ${space(2)};
+ border-bottom: 1px solid ${p => p.theme.innerBorder};
+`;
+
+const InputWrapper = styled('div')`
+ display: flex;
+ flex-direction: column;
+ gap: ${space(0.5)};
`;
-const ProjectedOrgRateWrapper = styled('label')`
+const FlexRow = styled('div')`
display: flex;
align-items: center;
justify-content: space-between;
- flex-wrap: wrap;
gap: ${space(1)};
- font-weight: ${p => p.theme.fontWeightNormal};
`;
-const Divider = styled('hr')`
- margin: ${space(2)} -${space(2)};
+const PreviousValue = styled('span')`
+ font-size: ${p => p.theme.fontSizeExtraSmall};
+ color: ${p => p.theme.subText};
+`;
+
+const BulkEditButton = styled(Button)`
+ font-size: ${p => p.theme.fontSizeExtraSmall};
+ padding: 0;
border: none;
- border-top: 1px solid ${p => p.theme.innerBorder};
`;
diff --git a/static/app/views/settings/dynamicSampling/utils/useSamplingProjectRates.tsx b/static/app/views/settings/dynamicSampling/utils/useSamplingProjectRates.tsx
index 9918b951fa95a7..d5135ec227e1d0 100644
--- a/static/app/views/settings/dynamicSampling/utils/useSamplingProjectRates.tsx
+++ b/static/app/views/settings/dynamicSampling/utils/useSamplingProjectRates.tsx
@@ -3,7 +3,6 @@ import type {Organization} from 'sentry/types/organization';
import parseLinkHeader from 'sentry/utils/parseLinkHeader';
import {
type ApiQueryKey,
- setApiQueryData,
useMutation,
useQuery,
useQueryClient,
@@ -81,29 +80,29 @@ export function useUpdateSamplingProjectRates() {
});
},
onSuccess: data => {
- setApiQueryData<SamplingProjectRate[]>(
- queryClient,
- getQueryKey(organization),
- previous => {
- if (!previous) {
- return data;
- }
- const newDataById = data.reduce(
- (acc, item) => {
- acc[item.id] = item;
- return acc;
- },
- {} as Record<number, SamplingProjectRate>
- );
+ const queryKey = getQueryKey(organization);
+ const previous = queryClient.getQueryData<SamplingProjectRate[]>(queryKey);
+ if (!previous) {
+ return;
+ }
+
+ const newDataById = data.reduce(
+ (acc, item) => {
+ acc[item.id] = item;
+ return acc;
+ },
+ {} as Record<number, SamplingProjectRate>
+ );
- return previous.map(item => {
- const newItem = newDataById[item.id];
- if (newItem) {
- return newItem;
- }
- return item;
- });
- }
+ queryClient.setQueryData(
+ queryKey,
+ previous.map(item => {
+ const newItem = newDataById[item.id];
+ if (newItem) {
+ return newItem;
+ }
+ return item;
+ })
);
},
onSettled: () => {
|
5acfe85783d6f232ead6540c473a039e8744043e
|
2017-09-21 00:16:37
|
Jess MacQueen
|
fix(workflow): Increase filename limit for commit changes
| false
|
Increase filename limit for commit changes
|
fix
|
diff --git a/CHANGES b/CHANGES
index b16ffd290b2e64..322b49c7ca2f0a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -24,6 +24,7 @@ Schema Changes
- Dropped ``GroupTagKey.group_id`` foreign key constraint
- Dropped ``EventUser.project_id`` foreign key constraint
- Added ``Email`` model
+- Change ``CommitFileChange.filename`` from varchar to text in PostgreSQL
Version 8.19
------------
diff --git a/src/sentry/south_migrations/0354_auto__chg_field_commitfilechange_filename.py b/src/sentry/south_migrations/0354_auto__chg_field_commitfilechange_filename.py
new file mode 100644
index 00000000000000..c366eb27ed4496
--- /dev/null
+++ b/src/sentry/south_migrations/0354_auto__chg_field_commitfilechange_filename.py
@@ -0,0 +1,913 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+from sentry.utils.db import is_postgres
+
+
+class Migration(SchemaMigration):
+
+ is_dangerous = True
+
+ def forwards(self, orm):
+ # Changing field 'CommitFileChange.filename'
+ if is_postgres():
+ db.execute(
+ "ALTER TABLE sentry_commitfilechange ALTER COLUMN filename SET DATA TYPE text"
+ )
+
+ def backwards(self, orm):
+ # Changing field 'CommitFileChange.filename'
+ if is_postgres():
+ db.alter_column(
+ 'sentry_commitfilechange',
+ 'filename',
+ self.gf('django.db.models.fields.CharField')(
+ max_length=255))
+
+ models = {
+ 'sentry.activity': {
+ 'Meta': {'object_name': 'Activity'},
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {'null': 'True'}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']", 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'type': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'null': 'True'})
+ },
+ 'sentry.apiapplication': {
+ 'Meta': {'object_name': 'ApiApplication'},
+ 'allowed_origins': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'client_id': ('django.db.models.fields.CharField', [], {'default': "'90fc6249e23c4671aab152db147a54f6f58c32fc5c974a559bf9fb27d844b432'", 'unique': 'True', 'max_length': '64'}),
+ 'client_secret': ('sentry.db.models.fields.encrypted.EncryptedTextField', [], {'default': "'66c734b3a97a43c28e9715abc5b18f4cda4d6728606a4d1388657e4e9ebe44be'"}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'homepage_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'default': "'Moving Elk'", 'max_length': '64', 'blank': 'True'}),
+ 'owner': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"}),
+ 'privacy_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}),
+ 'redirect_uris': ('django.db.models.fields.TextField', [], {}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'terms_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'})
+ },
+ 'sentry.apiauthorization': {
+ 'Meta': {'unique_together': "(('user', 'application'),)", 'object_name': 'ApiAuthorization'},
+ 'application': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ApiApplication']", 'null': 'True'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'scope_list': ('sentry.db.models.fields.array.ArrayField', [], {'of': ('django.db.models.fields.TextField', [], {})}),
+ 'scopes': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.apigrant': {
+ 'Meta': {'object_name': 'ApiGrant'},
+ 'application': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ApiApplication']"}),
+ 'code': ('django.db.models.fields.CharField', [], {'default': "'799aa69389a5442b91b27c1efb0f5a51'", 'max_length': '64', 'db_index': 'True'}),
+ 'expires_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 9, 19, 0, 0)', 'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'scope_list': ('sentry.db.models.fields.array.ArrayField', [], {'of': ('django.db.models.fields.TextField', [], {})}),
+ 'scopes': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.apikey': {
+ 'Meta': {'object_name': 'ApiKey'},
+ 'allowed_origins': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
+ 'label': ('django.db.models.fields.CharField', [], {'default': "'Default'", 'max_length': '64', 'blank': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'key_set'", 'to': "orm['sentry.Organization']"}),
+ 'scope_list': ('sentry.db.models.fields.array.ArrayField', [], {'of': ('django.db.models.fields.TextField', [], {})}),
+ 'scopes': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'})
+ },
+ 'sentry.apitoken': {
+ 'Meta': {'object_name': 'ApiToken'},
+ 'application': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ApiApplication']", 'null': 'True'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'expires_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 10, 19, 0, 0)', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'refresh_token': ('django.db.models.fields.CharField', [], {'default': "'19386350c4df440f865820f9bee580e09596d205df944db8b5952cbd4aca4e3b'", 'max_length': '64', 'unique': 'True', 'null': 'True'}),
+ 'scope_list': ('sentry.db.models.fields.array.ArrayField', [], {'of': ('django.db.models.fields.TextField', [], {})}),
+ 'scopes': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "'9d3fb3bdde7348169377f64c04378c76307d4f19b8754092b08fe449426fa0e1'", 'unique': 'True', 'max_length': '64'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.auditlogentry': {
+ 'Meta': {'object_name': 'AuditLogEntry'},
+ 'actor': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'blank': 'True', 'related_name': "'audit_actors'", 'null': 'True', 'to': "orm['sentry.User']"}),
+ 'actor_key': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ApiKey']", 'null': 'True', 'blank': 'True'}),
+ 'actor_label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'event': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ip_address': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'target_object': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'target_user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'blank': 'True', 'related_name': "'audit_targets'", 'null': 'True', 'to': "orm['sentry.User']"})
+ },
+ 'sentry.authenticator': {
+ 'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'Authenticator', 'db_table': "'auth_authenticator'"},
+ 'config': ('sentry.db.models.fields.encrypted.EncryptedPickledObjectField', [], {}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedAutoField', [], {'primary_key': 'True'}),
+ 'last_used_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'type': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.authidentity': {
+ 'Meta': {'unique_together': "(('auth_provider', 'ident'), ('auth_provider', 'user'))", 'object_name': 'AuthIdentity'},
+ 'auth_provider': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.AuthProvider']"}),
+ 'data': ('sentry.db.models.fields.encrypted.EncryptedJsonField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'last_synced': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_verified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.authprovider': {
+ 'Meta': {'object_name': 'AuthProvider'},
+ 'config': ('sentry.db.models.fields.encrypted.EncryptedJsonField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_global_access': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'default_role': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '50'}),
+ 'default_teams': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sentry.Team']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']", 'unique': 'True'}),
+ 'provider': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'sync_time': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'})
+ },
+ 'sentry.broadcast': {
+ 'Meta': {'object_name': 'Broadcast'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'date_expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 9, 26, 0, 0)', 'null': 'True', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'upstream_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'})
+ },
+ 'sentry.broadcastseen': {
+ 'Meta': {'unique_together': "(('broadcast', 'user'),)", 'object_name': 'BroadcastSeen'},
+ 'broadcast': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Broadcast']"}),
+ 'date_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.commit': {
+ 'Meta': {'unique_together': "(('repository_id', 'key'),)", 'object_name': 'Commit', 'index_together': "(('repository_id', 'date_added'),)"},
+ 'author': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.CommitAuthor']", 'null': 'True'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'message': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'repository_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {})
+ },
+ 'sentry.commitauthor': {
+ 'Meta': {'unique_together': "(('organization_id', 'email'), ('organization_id', 'external_id'))", 'object_name': 'CommitAuthor'},
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '164', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'})
+ },
+ 'sentry.commitfilechange': {
+ 'Meta': {'unique_together': "(('commit', 'filename'),)", 'object_name': 'CommitFileChange'},
+ 'commit': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Commit']"}),
+ 'filename': ('django.db.models.fields.CharField', [], {'max_length': '767'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '1'})
+ },
+ 'sentry.counter': {
+ 'Meta': {'object_name': 'Counter', 'db_table': "'sentry_projectcounter'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']", 'unique': 'True'}),
+ 'value': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {})
+ },
+ 'sentry.deploy': {
+ 'Meta': {'object_name': 'Deploy'},
+ 'date_finished': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'date_started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'environment_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
+ 'notified': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
+ },
+ 'sentry.distribution': {
+ 'Meta': {'unique_together': "(('release', 'name'),)", 'object_name': 'Distribution'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"})
+ },
+ 'sentry.dsymapp': {
+ 'Meta': {'unique_together': "(('project', 'platform', 'app_id'),)", 'object_name': 'DSymApp'},
+ 'app_id': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'data': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_synced': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'platform': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'sync_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'})
+ },
+ 'sentry.email': {
+ 'Meta': {'object_name': 'Email'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('sentry.db.models.fields.citext.CIEmailField', [], {'unique': 'True', 'max_length': '75'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'})
+ },
+ 'sentry.environment': {
+ 'Meta': {'unique_together': "(('project_id', 'name'), ('organization_id', 'name'))", 'object_name': 'Environment'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sentry.Project']", 'through': "orm['sentry.EnvironmentProject']", 'symmetrical': 'False'})
+ },
+ 'sentry.environmentproject': {
+ 'Meta': {'unique_together': "(('project', 'environment'),)", 'object_name': 'EnvironmentProject'},
+ 'environment': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Environment']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.event': {
+ 'Meta': {'unique_together': "(('project_id', 'event_id'),)", 'object_name': 'Event', 'db_table': "'sentry_message'", 'index_together': "(('group_id', 'datetime'),)"},
+ 'data': ('sentry.db.models.fields.node.NodeField', [], {'null': 'True', 'blank': 'True'}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'event_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'db_column': "'message_id'"}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'message': ('django.db.models.fields.TextField', [], {}),
+ 'platform': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'time_spent': ('sentry.db.models.fields.bounded.BoundedIntegerField', [], {'null': 'True'})
+ },
+ 'sentry.eventmapping': {
+ 'Meta': {'unique_together': "(('project_id', 'event_id'),)", 'object_name': 'EventMapping'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'event_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {})
+ },
+ 'sentry.eventprocessingissue': {
+ 'Meta': {'unique_together': "(('raw_event', 'processing_issue'),)", 'object_name': 'EventProcessingIssue'},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'processing_issue': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ProcessingIssue']"}),
+ 'raw_event': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.RawEvent']"})
+ },
+ 'sentry.eventtag': {
+ 'Meta': {'unique_together': "(('event_id', 'key_id', 'value_id'),)", 'object_name': 'EventTag', 'index_together': "(('project_id', 'key_id', 'value_id'), ('group_id', 'key_id', 'value_id'))"},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'event_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {}),
+ 'value_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {})
+ },
+ 'sentry.eventuser': {
+ 'Meta': {'unique_together': "(('project_id', 'ident'), ('project_id', 'hash'))", 'object_name': 'EventUser', 'index_together': "(('project_id', 'email'), ('project_id', 'username'), ('project_id', 'ip_address'))"},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True'}),
+ 'hash': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
+ 'ip_address': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'})
+ },
+ 'sentry.featureadoption': {
+ 'Meta': {'unique_together': "(('organization', 'feature_id'),)", 'object_name': 'FeatureAdoption'},
+ 'applicable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'data': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_completed': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'feature_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"})
+ },
+ 'sentry.file': {
+ 'Meta': {'object_name': 'File'},
+ 'blob': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'legacy_blob'", 'null': 'True', 'to': "orm['sentry.FileBlob']"}),
+ 'blobs': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sentry.FileBlob']", 'through': "orm['sentry.FileBlobIndex']", 'symmetrical': 'False'}),
+ 'checksum': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
+ 'headers': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'path': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'size': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '64'})
+ },
+ 'sentry.fileblob': {
+ 'Meta': {'object_name': 'FileBlob'},
+ 'checksum': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'path': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'size': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'})
+ },
+ 'sentry.fileblobindex': {
+ 'Meta': {'unique_together': "(('file', 'blob', 'offset'),)", 'object_name': 'FileBlobIndex'},
+ 'blob': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.FileBlob']"}),
+ 'file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.File']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'offset': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {})
+ },
+ 'sentry.group': {
+ 'Meta': {'unique_together': "(('project', 'short_id'),)", 'object_name': 'Group', 'db_table': "'sentry_groupedmessage'", 'index_together': "(('project', 'first_release'),)"},
+ 'active_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}),
+ 'culprit': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'db_column': "'view'", 'blank': 'True'}),
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {'null': 'True', 'blank': 'True'}),
+ 'first_release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']", 'null': 'True', 'on_delete': 'models.PROTECT'}),
+ 'first_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'level': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '40', 'db_index': 'True', 'blank': 'True'}),
+ 'logger': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64', 'db_index': 'True', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.TextField', [], {}),
+ 'num_comments': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'null': 'True'}),
+ 'platform': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']", 'null': 'True'}),
+ 'resolved_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}),
+ 'score': ('sentry.db.models.fields.bounded.BoundedIntegerField', [], {'default': '0'}),
+ 'short_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'time_spent_count': ('sentry.db.models.fields.bounded.BoundedIntegerField', [], {'default': '0'}),
+ 'time_spent_total': ('sentry.db.models.fields.bounded.BoundedIntegerField', [], {'default': '0'}),
+ 'times_seen': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
+ },
+ 'sentry.groupassignee': {
+ 'Meta': {'object_name': 'GroupAssignee', 'db_table': "'sentry_groupasignee'"},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'assignee_set'", 'unique': 'True', 'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'assignee_set'", 'to': "orm['sentry.Project']"}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'sentry_assignee_set'", 'to': "orm['sentry.User']"})
+ },
+ 'sentry.groupbookmark': {
+ 'Meta': {'unique_together': "(('project', 'user', 'group'),)", 'object_name': 'GroupBookmark'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'bookmark_set'", 'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'bookmark_set'", 'to': "orm['sentry.Project']"}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'sentry_bookmark_set'", 'to': "orm['sentry.User']"})
+ },
+ 'sentry.groupcommitresolution': {
+ 'Meta': {'unique_together': "(('group_id', 'commit_id'),)", 'object_name': 'GroupCommitResolution'},
+ 'commit_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'})
+ },
+ 'sentry.groupemailthread': {
+ 'Meta': {'unique_together': "(('email', 'group'), ('email', 'msgid'))", 'object_name': 'GroupEmailThread'},
+ 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'groupemail_set'", 'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'msgid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'groupemail_set'", 'to': "orm['sentry.Project']"})
+ },
+ 'sentry.grouphash': {
+ 'Meta': {'unique_together': "(('project', 'hash'),)", 'object_name': 'GroupHash'},
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']", 'null': 'True'}),
+ 'group_tombstone_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'hash': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']", 'null': 'True'}),
+ 'state': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'})
+ },
+ 'sentry.groupmeta': {
+ 'Meta': {'unique_together': "(('group', 'key'),)", 'object_name': 'GroupMeta'},
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'value': ('django.db.models.fields.TextField', [], {})
+ },
+ 'sentry.groupredirect': {
+ 'Meta': {'object_name': 'GroupRedirect'},
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'previous_group_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'unique': 'True'})
+ },
+ 'sentry.grouprelease': {
+ 'Meta': {'unique_together': "(('group_id', 'release_id', 'environment'),)", 'object_name': 'GroupRelease'},
+ 'environment': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
+ 'first_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'release_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'})
+ },
+ 'sentry.groupresolution': {
+ 'Meta': {'object_name': 'GroupResolution'},
+ 'actor_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']", 'unique': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'type': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'})
+ },
+ 'sentry.grouprulestatus': {
+ 'Meta': {'unique_together': "(('rule', 'group'),)", 'object_name': 'GroupRuleStatus'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_active': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'rule': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Rule']"}),
+ 'status': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'})
+ },
+ 'sentry.groupseen': {
+ 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'GroupSeen'},
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'db_index': 'False'})
+ },
+ 'sentry.groupsnooze': {
+ 'Meta': {'object_name': 'GroupSnooze'},
+ 'actor_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'count': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']", 'unique': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'state': ('jsonfield.fields.JSONField', [], {'null': 'True'}),
+ 'until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'user_count': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'user_window': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'window': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'})
+ },
+ 'sentry.groupsubscription': {
+ 'Meta': {'unique_together': "(('group', 'user'),)", 'object_name': 'GroupSubscription'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'subscription_set'", 'to': "orm['sentry.Group']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'subscription_set'", 'to': "orm['sentry.Project']"}),
+ 'reason': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.grouptagkey': {
+ 'Meta': {'unique_together': "(('project_id', 'group_id', 'key'),)", 'object_name': 'GroupTagKey'},
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'values_seen': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'})
+ },
+ 'sentry.grouptagvalue': {
+ 'Meta': {'unique_together': "(('group_id', 'key', 'value'),)", 'object_name': 'GroupTagValue', 'db_table': "'sentry_messagefiltervalue'", 'index_together': "(('project_id', 'key', 'value', 'last_seen'),)"},
+ 'first_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'db_index': 'True'}),
+ 'group_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'db_index': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'times_seen': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'sentry.grouptombstone': {
+ 'Meta': {'object_name': 'GroupTombstone'},
+ 'actor_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'culprit': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'level': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '40', 'blank': 'True'}),
+ 'message': ('django.db.models.fields.TextField', [], {}),
+ 'previous_group_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'unique': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.integration': {
+ 'Meta': {'unique_together': "(('provider', 'external_id'),)", 'object_name': 'Integration'},
+ 'config': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'default_auth_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'organizations': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'integrations'", 'symmetrical': 'False', 'through': "orm['sentry.OrganizationIntegration']", 'to': "orm['sentry.Organization']"}),
+ 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'integrations'", 'symmetrical': 'False', 'through': "orm['sentry.ProjectIntegration']", 'to': "orm['sentry.Project']"}),
+ 'provider': ('django.db.models.fields.CharField', [], {'max_length': '64'})
+ },
+ 'sentry.lostpasswordhash': {
+ 'Meta': {'object_name': 'LostPasswordHash'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'hash': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'unique': 'True'})
+ },
+ 'sentry.option': {
+ 'Meta': {'object_name': 'Option'},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
+ 'last_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'value': ('sentry.db.models.fields.encrypted.EncryptedPickledObjectField', [], {})
+ },
+ 'sentry.organization': {
+ 'Meta': {'object_name': 'Organization'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_role': ('django.db.models.fields.CharField', [], {'default': "'member'", 'max_length': '32'}),
+ 'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '1'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'org_memberships'", 'symmetrical': 'False', 'through': "orm['sentry.OrganizationMember']", 'to': "orm['sentry.User']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'})
+ },
+ 'sentry.organizationaccessrequest': {
+ 'Meta': {'unique_together': "(('team', 'member'),)", 'object_name': 'OrganizationAccessRequest'},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'member': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.OrganizationMember']"}),
+ 'team': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Team']"})
+ },
+ 'sentry.organizationavatar': {
+ 'Meta': {'object_name': 'OrganizationAvatar'},
+ 'avatar_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
+ 'file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.File']", 'unique': 'True', 'null': 'True', 'on_delete': 'models.SET_NULL'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'avatar'", 'unique': 'True', 'to': "orm['sentry.Organization']"})
+ },
+ 'sentry.organizationintegration': {
+ 'Meta': {'unique_together': "(('organization', 'integration'),)", 'object_name': 'OrganizationIntegration'},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'integration': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Integration']"}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"})
+ },
+ 'sentry.organizationmember': {
+ 'Meta': {'unique_together': "(('organization', 'user'), ('organization', 'email'))", 'object_name': 'OrganizationMember'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}),
+ 'has_global_access': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'member_set'", 'to': "orm['sentry.Organization']"}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'member'", 'max_length': '32'}),
+ 'teams': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sentry.Team']", 'symmetrical': 'False', 'through': "orm['sentry.OrganizationMemberTeam']", 'blank': 'True'}),
+ 'token': ('django.db.models.fields.CharField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'type': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '50', 'blank': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'blank': 'True', 'related_name': "'sentry_orgmember_set'", 'null': 'True', 'to': "orm['sentry.User']"})
+ },
+ 'sentry.organizationmemberteam': {
+ 'Meta': {'unique_together': "(('team', 'organizationmember'),)", 'object_name': 'OrganizationMemberTeam', 'db_table': "'sentry_organizationmember_teams'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedAutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'organizationmember': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.OrganizationMember']"}),
+ 'team': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Team']"})
+ },
+ 'sentry.organizationonboardingtask': {
+ 'Meta': {'unique_together': "(('organization', 'task'),)", 'object_name': 'OrganizationOnboardingTask'},
+ 'data': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_completed': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'task': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'null': 'True'})
+ },
+ 'sentry.organizationoption': {
+ 'Meta': {'unique_together': "(('organization', 'key'),)", 'object_name': 'OrganizationOption', 'db_table': "'sentry_organizationoptions'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'value': ('sentry.db.models.fields.encrypted.EncryptedPickledObjectField', [], {})
+ },
+ 'sentry.processingissue': {
+ 'Meta': {'unique_together': "(('project', 'checksum', 'type'),)", 'object_name': 'ProcessingIssue'},
+ 'checksum': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_index': 'True'}),
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'sentry.project': {
+ 'Meta': {'unique_together': "(('team', 'slug'), ('organization', 'slug'))", 'object_name': 'Project'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'first_event': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0', 'null': 'True'}),
+ 'forced_color': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'platform': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'team': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Team']"})
+ },
+ 'sentry.projectbookmark': {
+ 'Meta': {'unique_together': "(('project_id', 'user'),)", 'object_name': 'ProjectBookmark'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.projectdsymfile': {
+ 'Meta': {'unique_together': "(('project', 'uuid'),)", 'object_name': 'ProjectDSymFile'},
+ 'cpu_name': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.File']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'object_name': ('django.db.models.fields.TextField', [], {}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']", 'null': 'True'}),
+ 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '36'})
+ },
+ 'sentry.projectintegration': {
+ 'Meta': {'unique_together': "(('project', 'integration'),)", 'object_name': 'ProjectIntegration'},
+ 'config': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'integration': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Integration']"}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.projectkey': {
+ 'Meta': {'object_name': 'ProjectKey'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'key_set'", 'to': "orm['sentry.Project']"}),
+ 'public_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'unique': 'True', 'null': 'True'}),
+ 'rate_limit_count': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'rate_limit_window': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'roles': ('django.db.models.fields.BigIntegerField', [], {'default': '1'}),
+ 'secret_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'unique': 'True', 'null': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'})
+ },
+ 'sentry.projectoption': {
+ 'Meta': {'unique_together': "(('project', 'key'),)", 'object_name': 'ProjectOption', 'db_table': "'sentry_projectoptions'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'value': ('sentry.db.models.fields.encrypted.EncryptedPickledObjectField', [], {})
+ },
+ 'sentry.projectplatform': {
+ 'Meta': {'unique_together': "(('project_id', 'platform'),)", 'object_name': 'ProjectPlatform'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'platform': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {})
+ },
+ 'sentry.rawevent': {
+ 'Meta': {'unique_together': "(('project', 'event_id'),)", 'object_name': 'RawEvent'},
+ 'data': ('sentry.db.models.fields.node.NodeField', [], {'null': 'True', 'blank': 'True'}),
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'event_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.release': {
+ 'Meta': {'unique_together': "(('organization', 'version'),)", 'object_name': 'Release'},
+ 'authors': ('sentry.db.models.fields.array.ArrayField', [], {'of': ('django.db.models.fields.TextField', [], {})}),
+ 'commit_count': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'data': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'date_released': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'date_started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_commit_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'last_deploy_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'new_groups': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'owner': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'null': 'True', 'blank': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'releases'", 'symmetrical': 'False', 'through': "orm['sentry.ReleaseProject']", 'to': "orm['sentry.Project']"}),
+ 'ref': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
+ 'total_deploys': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '64'})
+ },
+ 'sentry.releasecommit': {
+ 'Meta': {'unique_together': "(('release', 'commit'), ('release', 'order'))", 'object_name': 'ReleaseCommit'},
+ 'commit': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Commit']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'order': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"})
+ },
+ 'sentry.releaseenvironment': {
+ 'Meta': {'unique_together': "(('organization_id', 'release_id', 'environment_id'),)", 'object_name': 'ReleaseEnvironment', 'db_table': "'sentry_environmentrelease'"},
+ 'environment_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'first_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'release_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'})
+ },
+ 'sentry.releasefile': {
+ 'Meta': {'unique_together': "(('release', 'ident'),)", 'object_name': 'ReleaseFile'},
+ 'dist': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Distribution']", 'null': 'True'}),
+ 'file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.File']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'name': ('django.db.models.fields.TextField', [], {}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"})
+ },
+ 'sentry.releaseheadcommit': {
+ 'Meta': {'unique_together': "(('repository_id', 'release'),)", 'object_name': 'ReleaseHeadCommit'},
+ 'commit': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Commit']"}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"}),
+ 'repository_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {})
+ },
+ 'sentry.releaseproject': {
+ 'Meta': {'unique_together': "(('project', 'release'),)", 'object_name': 'ReleaseProject', 'db_table': "'sentry_release_project'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'new_groups': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'release': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Release']"})
+ },
+ 'sentry.repository': {
+ 'Meta': {'unique_together': "(('organization_id', 'name'), ('organization_id', 'provider', 'external_id'))", 'object_name': 'Repository'},
+ 'config': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'integration_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'organization_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'provider': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'})
+ },
+ 'sentry.reprocessingreport': {
+ 'Meta': {'unique_together': "(('project', 'event_id'),)", 'object_name': 'ReprocessingReport'},
+ 'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'event_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.rule': {
+ 'Meta': {'object_name': 'Rule'},
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0', 'db_index': 'True'})
+ },
+ 'sentry.savedsearch': {
+ 'Meta': {'unique_together': "(('project', 'name'),)", 'object_name': 'SavedSearch'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'owner': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']", 'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'query': ('django.db.models.fields.TextField', [], {})
+ },
+ 'sentry.savedsearchuserdefault': {
+ 'Meta': {'unique_together': "(('project', 'user'),)", 'object_name': 'SavedSearchUserDefault', 'db_table': "'sentry_savedsearch_userdefault'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"}),
+ 'savedsearch': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.SavedSearch']"}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"})
+ },
+ 'sentry.scheduleddeletion': {
+ 'Meta': {'unique_together': "(('app_label', 'model_name', 'object_id'),)", 'object_name': 'ScheduledDeletion'},
+ 'aborted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'actor_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True'}),
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'data': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'date_scheduled': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 10, 19, 0, 0)'}),
+ 'guid': ('django.db.models.fields.CharField', [], {'default': "'53d0640ab6c94eecb2dc16b19baba337'", 'unique': 'True', 'max_length': '32'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'in_progress': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'model_name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'object_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {})
+ },
+ 'sentry.scheduledjob': {
+ 'Meta': {'object_name': 'ScheduledJob'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'date_scheduled': ('django.db.models.fields.DateTimeField', [], {}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'payload': ('jsonfield.fields.JSONField', [], {'default': '{}'})
+ },
+ 'sentry.tagkey': {
+ 'Meta': {'unique_together': "(('project_id', 'key'),)", 'object_name': 'TagKey', 'db_table': "'sentry_filterkey'"},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'db_index': 'True'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'values_seen': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'})
+ },
+ 'sentry.tagvalue': {
+ 'Meta': {'unique_together': "(('project_id', 'key', 'value'),)", 'object_name': 'TagValue', 'db_table': "'sentry_filtervalue'"},
+ 'data': ('sentry.db.models.fields.gzippeddict.GzippedDictField', [], {'null': 'True', 'blank': 'True'}),
+ 'first_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'db_index': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'db_index': 'True'}),
+ 'project_id': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
+ 'times_seen': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'sentry.team': {
+ 'Meta': {'unique_together': "(('organization', 'slug'),)", 'object_name': 'Team'},
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']"}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
+ 'status': ('sentry.db.models.fields.bounded.BoundedPositiveIntegerField', [], {'default': '0'})
+ },
+ 'sentry.user': {
+ 'Meta': {'object_name': 'User', 'db_table': "'auth_user'"},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedAutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_managed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_password_expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_active': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_password_change': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'db_column': "'first_name'", 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'session_nonce': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
+ },
+ 'sentry.useravatar': {
+ 'Meta': {'object_name': 'UserAvatar'},
+ 'avatar_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
+ 'file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.File']", 'unique': 'True', 'null': 'True', 'on_delete': 'models.SET_NULL'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'ident': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'avatar'", 'unique': 'True', 'to': "orm['sentry.User']"})
+ },
+ 'sentry.useremail': {
+ 'Meta': {'unique_together': "(('user', 'email'),)", 'object_name': 'UserEmail'},
+ 'date_hash_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'related_name': "'emails'", 'to': "orm['sentry.User']"}),
+ 'validation_hash': ('django.db.models.fields.CharField', [], {'default': "u'LVy89USzFtPKNURAdVPmi721HS01xalI'", 'max_length': '32'})
+ },
+ 'sentry.useroption': {
+ 'Meta': {'unique_together': "(('user', 'project', 'key'), ('user', 'organization', 'key'))", 'object_name': 'UserOption'},
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'organization': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Organization']", 'null': 'True'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']", 'null': 'True'}),
+ 'user': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.User']"}),
+ 'value': ('sentry.db.models.fields.encrypted.EncryptedPickledObjectField', [], {})
+ },
+ 'sentry.userreport': {
+ 'Meta': {'unique_together': "(('project', 'event_id'),)", 'object_name': 'UserReport', 'index_together': "(('project', 'event_id'), ('project', 'date_added'))"},
+ 'comments': ('django.db.models.fields.TextField', [], {}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'event_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'event_user_id': ('sentry.db.models.fields.bounded.BoundedBigIntegerField', [], {'null': 'True'}),
+ 'group': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Group']", 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'project': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.Project']"})
+ },
+ 'sentry.versiondsymfile': {
+ 'Meta': {'unique_together': "(('dsym_file', 'version', 'build'),)", 'object_name': 'VersionDSymFile'},
+ 'build': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
+ 'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'dsym_app': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.DSymApp']"}),
+ 'dsym_file': ('sentry.db.models.fields.foreignkey.FlexibleForeignKey', [], {'to': "orm['sentry.ProjectDSymFile']", 'null': 'True'}),
+ 'id': ('sentry.db.models.fields.bounded.BoundedBigAutoField', [], {'primary_key': 'True'}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '32'})
+ }
+ }
+
+ complete_apps = ['sentry']
|
40dda1397ceb11312134d025a2875227889a4f0a
|
2023-10-24 03:07:42
|
Ryan Albrecht
|
feat(replay): Show SDK config in the tags list (#58632)
| false
|
Show SDK config in the tags list (#58632)
|
feat
|
diff --git a/static/app/utils/replays/replayDataUtils.tsx b/static/app/utils/replays/replayDataUtils.tsx
index 7bb433de0f8090..bc1667f728a2a2 100644
--- a/static/app/utils/replays/replayDataUtils.tsx
+++ b/static/app/utils/replays/replayDataUtils.tsx
@@ -35,14 +35,6 @@ export function mapResponseToReplayRecord(apiResponse: any): ReplayRecord {
...user,
};
- // Sort the tags by key
- const tags = Object.keys(unorderedTags)
- .sort()
- .reduce((acc, key) => {
- acc[key] = unorderedTags[key];
- return acc;
- }, {});
-
const startedAt = new Date(apiResponse.started_at);
invariant(isValidDate(startedAt), 'replay.started_at is invalid');
const finishedAt = new Date(apiResponse.finished_at);
@@ -54,7 +46,7 @@ export function mapResponseToReplayRecord(apiResponse: any): ReplayRecord {
...(apiResponse.duration !== undefined
? {duration: duration(apiResponse.duration * 1000)}
: {}),
- tags,
+ tags: unorderedTags,
};
}
diff --git a/static/app/views/replays/detail/tagPanel/index.tsx b/static/app/views/replays/detail/tagPanel/index.tsx
index 8cdcf9b27d10f8..40fbbb4c07eec9 100644
--- a/static/app/views/replays/detail/tagPanel/index.tsx
+++ b/static/app/views/replays/detail/tagPanel/index.tsx
@@ -1,4 +1,4 @@
-import {ReactNode, useCallback} from 'react';
+import {ReactNode, useCallback, useMemo} from 'react';
import styled from '@emotion/styled';
import {LocationDescriptor} from 'history';
@@ -37,26 +37,58 @@ const notTags = [
'user.id',
'user.ip',
];
+const notSearchable = [
+ 'sdk.blockAllMedia',
+ 'sdk.errorSampleRate ',
+ 'sdk.maskAllInputs',
+ 'sdk.maskAllText',
+ 'sdk.networkCaptureBodies',
+ 'sdk.networkDetailHasUrls',
+ 'sdk.networkRequestHasHeaders',
+ 'sdk.networkResponseHasHeaders',
+ 'sdk.sessionSampleRate',
+ 'sdk.useCompression',
+ 'sdk.useCompressionOption',
+];
function TagPanel() {
const organization = useOrganization();
const {replay} = useReplayContext();
const replayRecord = replay?.getReplay();
const tags = replayRecord?.tags;
+ const sdkOptions = replay?.getSDKOptions();
+
+ const tagsWithConfig = useMemo(() => {
+ const unorderedTags = {
+ ...tags,
+ ...Object.fromEntries(
+ Object.entries(sdkOptions ?? {}).map(([key, value]) => ['sdk.' + key, [value]])
+ ),
+ };
+
+ // Sort the tags by key
+ const sortedTags = Object.keys(unorderedTags)
+ .sort()
+ .reduce((acc, key) => {
+ acc[key] = unorderedTags[key];
+ return acc;
+ }, {});
+
+ return sortedTags;
+ }, [tags, sdkOptions]);
- const filterProps = useTagFilters({tags: tags || {}});
+ const filterProps = useTagFilters({tags: tagsWithConfig || {}});
const {items} = filterProps;
const generateUrl = useCallback(
- (name: string, value: ReactNode) =>
- ({
- pathname: normalizeUrl(`/organizations/${organization.slug}/replays/`),
- query: {
- query: notTags.includes(name)
- ? `${name}:"${value}"`
- : `tags["${name}"]:"${value}"`,
- },
- }) as LocationDescriptor,
+ (name: string, value: ReactNode): LocationDescriptor => ({
+ pathname: normalizeUrl(`/organizations/${organization.slug}/replays/`),
+ query: {
+ query: notTags.includes(name)
+ ? `${name}:"${value}"`
+ : `tags["${name}"]:"${value}"`,
+ },
+ }),
[organization.slug]
);
@@ -78,7 +110,7 @@ function TagPanel() {
key={key}
name={key}
values={values}
- generateUrl={generateUrl}
+ generateUrl={notSearchable.includes(key) ? undefined : generateUrl}
/>
))}
</KeyValueTable>
|
c02723f0300ac1dcc04d1a0f26f67b92166565d0
|
2024-12-10 23:11:57
|
Scott Cooper
|
fix(issues): Add tag to open in discover query (#81789)
| false
|
Add tag to open in discover query (#81789)
|
fix
|
diff --git a/static/app/views/issueDetails/groupTags/tagDetailsDrawerContent.spec.tsx b/static/app/views/issueDetails/groupTags/tagDetailsDrawerContent.spec.tsx
index 384db0225c935d..011d5318d810ee 100644
--- a/static/app/views/issueDetails/groupTags/tagDetailsDrawerContent.spec.tsx
+++ b/static/app/views/issueDetails/groupTags/tagDetailsDrawerContent.spec.tsx
@@ -1,4 +1,5 @@
import {GroupFixture} from 'sentry-fixture/group';
+import {OrganizationFixture} from 'sentry-fixture/organization';
import {TagsFixture} from 'sentry-fixture/tags';
import {TagValuesFixture} from 'sentry-fixture/tagvalues';
@@ -127,6 +128,41 @@ describe('TagDetailsDrawerContent', () => {
});
});
+ it('navigates to discover with issue + tag query', async () => {
+ const {router} = init('user');
+ const discoverOrganization = OrganizationFixture({
+ features: ['discover-basic'],
+ });
+
+ MockApiClient.addMockResponse({
+ url: '/organizations/org-slug/issues/1/tags/user/values/',
+ body: TagValuesFixture(),
+ });
+ render(<TagDetailsDrawerContent group={group} />, {
+ router,
+ organization: discoverOrganization,
+ });
+
+ await userEvent.click(
+ await screen.findByRole('button', {name: 'Tag Value Actions Menu'})
+ );
+ await userEvent.click(await screen.findByRole('link', {name: 'Open in Discover'}));
+
+ expect(router.push).toHaveBeenCalledWith({
+ pathname: '/organizations/org-slug/discover/results/',
+ query: {
+ dataset: 'errors',
+ field: ['title', 'release', 'environment', 'user.display', 'timestamp'],
+ interval: '4h',
+ name: 'RequestError: GET /issues/ 404',
+ project: '2',
+ query: 'issue:JAVASCRIPT-6QS user.username:david',
+ statsPeriod: '14d',
+ yAxis: ['count()', 'count_unique(user)'],
+ },
+ });
+ });
+
it('renders an error message if tag values request fails', async () => {
const {router} = init('user');
diff --git a/static/app/views/issueDetails/streamline/hooks/useIssueDetailsDiscoverQuery.tsx b/static/app/views/issueDetails/streamline/hooks/useIssueDetailsDiscoverQuery.tsx
index d66664687e3166..c775710fc448b7 100644
--- a/static/app/views/issueDetails/streamline/hooks/useIssueDetailsDiscoverQuery.tsx
+++ b/static/app/views/issueDetails/streamline/hooks/useIssueDetailsDiscoverQuery.tsx
@@ -27,8 +27,8 @@ export function useIssueDetailsEventView({
const interval = getInterval(pageFilters.datetime, 'issues');
const config = getConfigForIssueType(group, group.project);
- const query = [`issue:${group.shortId}`, searchQuery]
- .filter(s => s.length > 0)
+ const query = [`issue:${group.shortId}`, searchQuery, queryProps?.query]
+ .filter(s => s && s.length > 0)
.join(' ');
const discoverQuery: NewQuery = {
|
729eedf2da2d8b64b4d4d2257dde0e8fd9bdbb8c
|
2023-01-19 04:14:27
|
Dora
|
chore(sidebar): update order (#43403)
| false
|
update order (#43403)
|
chore
|
diff --git a/static/app/components/sidebar/index.tsx b/static/app/components/sidebar/index.tsx
index abf0e69de0b4d0..ab182fd26b7889 100644
--- a/static/app/components/sidebar/index.tsx
+++ b/static/app/components/sidebar/index.tsx
@@ -14,7 +14,6 @@ import {
IconDashboard,
IconIssues,
IconLightning,
- IconList,
IconPlay,
IconProfiling,
IconProject,
@@ -292,16 +291,6 @@ function Sidebar({location, organization}: Props) {
</Feature>
);
- const activity = hasOrganization && (
- <SidebarItem
- {...sidebarItemProps}
- icon={<IconList size="md" />}
- label={t('Activity')}
- to={`/organizations/${organization.slug}/activity/`}
- id="activity"
- />
- );
-
const stats = hasOrganization && (
<SidebarItem
{...sidebarItemProps}
@@ -339,25 +328,29 @@ function Sidebar({location, organization}: Props) {
{hasOrganization && (
<Fragment>
<SidebarSection>
- {projects}
{issues}
+ {projects}
+ </SidebarSection>
+
+ <SidebarSection>
{performance}
{profiling}
- {releases}
{replays}
{monitors}
- {userFeedback}
{alerts}
+ </SidebarSection>
+
+ <SidebarSection>
{discover2}
{dashboards}
+ {releases}
+ {userFeedback}
</SidebarSection>
<SidebarSection>
- {activity}
{stats}
+ {settings}
</SidebarSection>
-
- <SidebarSection>{settings}</SidebarSection>
</Fragment>
)}
</PrimaryItems>
diff --git a/static/app/components/sidebar/sidebarItem.tsx b/static/app/components/sidebar/sidebarItem.tsx
index c0116ac02db735..977bbba5773966 100644
--- a/static/app/components/sidebar/sidebarItem.tsx
+++ b/static/app/components/sidebar/sidebarItem.tsx
@@ -220,8 +220,7 @@ const StyledSidebarItem = styled(Link)`
position: relative;
cursor: pointer;
font-size: 15px;
- line-height: 32px;
- height: 34px;
+ height: 30px;
flex-shrink: 0;
transition: 0.15s color linear;
|
3964ed87221fa8a3b14d6ee587e5ee84c7d86dd3
|
2023-01-31 04:06:12
|
NisanthanNanthakumar
|
fix(analytics): Need to store precise numbers (#43858)
| false
|
Need to store precise numbers (#43858)
|
fix
|
diff --git a/src/sentry/analytics/events/issue_owners_time_durations.py b/src/sentry/analytics/events/issue_owners_time_durations.py
index 11ac795e35823f..77b50c5808cf5f 100644
--- a/src/sentry/analytics/events/issue_owners_time_durations.py
+++ b/src/sentry/analytics/events/issue_owners_time_durations.py
@@ -8,8 +8,8 @@ class IssueOwnersTimeDurationsEvent(analytics.Event):
analytics.Attribute("group_id"),
analytics.Attribute("event_id"),
analytics.Attribute("project_id"),
- analytics.Attribute("baseline_duration", type=int),
- analytics.Attribute("experiment_duration", type=int),
+ analytics.Attribute("baseline_duration"),
+ analytics.Attribute("experiment_duration"),
)
|
2ebf7fd9c2f93debc358866d9d17d7ed637263e1
|
2024-02-26 23:03:28
|
John
|
fix(metrics): Fix indexer telemetry (#65753)
| false
|
Fix indexer telemetry (#65753)
|
fix
|
diff --git a/src/sentry/sentry_metrics/consumers/indexer/batch.py b/src/sentry/sentry_metrics/consumers/indexer/batch.py
index 0f4b33f1f928e1..fbdf95e9a95f3e 100644
--- a/src/sentry/sentry_metrics/consumers/indexer/batch.py
+++ b/src/sentry/sentry_metrics/consumers/indexer/batch.py
@@ -73,7 +73,7 @@ def add_metric(self, num_bytes: int, tags_len: int, value_len: int):
self.total_value_len += value_len
self.max_bytes = max(self.max_bytes, num_bytes)
self.max_tags_len = max(self.max_tags_len, tags_len)
- self.max_value_len = max(self.max_tags_len, tags_len)
+ self.max_value_len = max(self.max_value_len, value_len)
def avg_bytes(self):
return self.total_bytes / self.message_count
|
d333b22c591c2698e265578e7340f0bb181a7ecf
|
2022-07-25 22:35:42
|
Nar Saynorath
|
fix(widget-builder): Query alias not being set in chart (#37012)
| false
|
Query alias not being set in chart (#37012)
|
fix
|
diff --git a/static/app/views/dashboardsV2/widgetCard/genericWidgetQueries.tsx b/static/app/views/dashboardsV2/widgetCard/genericWidgetQueries.tsx
index a32f8f00805797..164b6dda65c5cf 100644
--- a/static/app/views/dashboardsV2/widgetCard/genericWidgetQueries.tsx
+++ b/static/app/views/dashboardsV2/widgetCard/genericWidgetQueries.tsx
@@ -312,9 +312,11 @@ class GenericWidgetQueries<SeriesResponse, TableResponse> extends Component<
);
})
);
+ const rawResultsClone = cloneDeep(this.state.rawResults) ?? [];
const transformedTimeseriesResults: Series[] = [];
responses.forEach(([data], requestIndex) => {
afterFetchSeriesData?.(data);
+ rawResultsClone[requestIndex] = data;
const transformedResult = config.transformSeries!(
data,
widget.queries[requestIndex],
@@ -334,7 +336,10 @@ class GenericWidgetQueries<SeriesResponse, TableResponse> extends Component<
if (this._isMounted && this.state.queryFetchID === queryFetchID) {
onDataFetched?.({timeseriesResults: transformedTimeseriesResults});
- this.setState({timeseriesResults: transformedTimeseriesResults});
+ this.setState({
+ timeseriesResults: transformedTimeseriesResults,
+ rawResults: rawResultsClone,
+ });
}
}
diff --git a/tests/js/spec/views/dashboardsV2/widgetQueries.spec.jsx b/tests/js/spec/views/dashboardsV2/widgetQueries.spec.jsx
index 07b741fe3a0a0d..4dca4597764015 100644
--- a/tests/js/spec/views/dashboardsV2/widgetQueries.spec.jsx
+++ b/tests/js/spec/views/dashboardsV2/widgetQueries.spec.jsx
@@ -696,6 +696,68 @@ describe('Dashboards > WidgetQueries', function () {
);
});
+ it('does not re-query events and sets name in widgets', async function () {
+ const eventsStatsMock = MockApiClient.addMockResponse({
+ url: '/organizations/org-slug/events-stats/',
+ body: TestStubs.EventsStats(),
+ });
+ const lineWidget = {
+ ...singleQueryWidget,
+ displayType: 'line',
+ interval: '5m',
+ };
+ let childProps;
+ const {rerender} = render(
+ <WidgetQueries
+ api={api}
+ widget={lineWidget}
+ organization={initialData.organization}
+ selection={selection}
+ >
+ {props => {
+ childProps = props;
+ return <div data-test-id="child" />;
+ }}
+ </WidgetQueries>
+ );
+
+ expect(eventsStatsMock).toHaveBeenCalledTimes(1);
+ await waitFor(() => expect(childProps.loading).toEqual(false));
+
+ // Simulate a re-render with a new query alias
+ rerender(
+ <WidgetQueries
+ api={api}
+ widget={{
+ ...lineWidget,
+ queries: [
+ {
+ conditions: 'event.type:error',
+ fields: ['count()'],
+ aggregates: ['count()'],
+ columns: [],
+ name: 'this query alias changed',
+ orderby: '',
+ },
+ ],
+ }}
+ organization={initialData.organization}
+ selection={selection}
+ >
+ {props => {
+ childProps = props;
+ return <div data-test-id="child" />;
+ }}
+ </WidgetQueries>
+ );
+
+ // Did not re-query
+ expect(eventsStatsMock).toHaveBeenCalledTimes(1);
+ expect(childProps.timeseriesResults[0].seriesName).toEqual(
+ 'this query alias changed : count()'
+ );
+ });
+
describe('multi-series grouped data', () => {
const [START, END] = [1647399900, 1647399901];
let mockCountData, mockCountUniqueData, mockRawResultData;
|
7417e26fd2d6b94cadbeb928c4a9093e75b9cc4f
|
2024-05-17 00:56:02
|
Tony Xiao
|
chore(profiles): Fix up profiles <> transactions compatibility (#70994)
| false
|
Fix up profiles <> transactions compatibility (#70994)
|
chore
|
diff --git a/static/app/components/events/eventStatisticalDetector/eventFunctionComparisonList.tsx b/static/app/components/events/eventStatisticalDetector/eventFunctionComparisonList.tsx
index 4ac34ca5fd0d2c..1d6c927a4538bb 100644
--- a/static/app/components/events/eventStatisticalDetector/eventFunctionComparisonList.tsx
+++ b/static/app/components/events/eventStatisticalDetector/eventFunctionComparisonList.tsx
@@ -142,10 +142,10 @@ function EventComparisonListInner({
const profilesQuery = useProfileEvents({
datetime,
- fields: ['id', 'transaction', 'profile.duration'],
- query: `id:[${[...beforeProfileIds, ...afterProfileIds].join(', ')}]`,
+ fields: ['profile.id', 'transaction', 'transaction.duration'],
+ query: `profile.id:[${[...beforeProfileIds, ...afterProfileIds].join(', ')}]`,
sort: {
- key: 'profile.duration',
+ key: 'transaction.duration',
order: 'desc',
},
projects: [project.id],
@@ -161,7 +161,7 @@ function EventComparisonListInner({
return (
(profilesQuery.data?.data?.filter(row =>
- profileIds.has(row.id as string)
+ profileIds.has(row['profile.id'] as string)
) as ProfileItem[]) ?? []
);
}, [beforeProfilesQuery, profilesQuery]);
@@ -173,11 +173,13 @@ function EventComparisonListInner({
return (
(profilesQuery.data?.data?.filter(row =>
- profileIds.has(row.id as string)
+ profileIds.has(row['profile.id'] as string)
) as ProfileItem[]) ?? []
);
}, [afterProfilesQuery, profilesQuery]);
+ const durationUnit = profilesQuery.data?.meta?.units?.['transaction.duration'] ?? '';
+
return (
<Wrapper>
<EventDataSection type="profiles-before" title={t('Example Profiles Before')}>
@@ -187,6 +189,7 @@ function EventComparisonListInner({
organization={organization}
profiles={beforeProfiles}
project={project}
+ unit={durationUnit}
/>
</EventDataSection>
<EventDataSection type="profiles-after" title={t('Example Profiles After')}>
@@ -196,6 +199,7 @@ function EventComparisonListInner({
organization={organization}
profiles={afterProfiles}
project={project}
+ unit={durationUnit}
/>
</EventDataSection>
</Wrapper>
@@ -203,10 +207,10 @@ function EventComparisonListInner({
}
interface ProfileItem {
- id: string;
- 'profile.duration': number;
+ 'profile.id': string;
timestamp: string;
transaction: string;
+ 'transaction.duration': number;
}
interface EventListProps {
@@ -215,6 +219,7 @@ interface EventListProps {
organization: Organization;
profiles: ProfileItem[];
project: Project;
+ unit: string;
}
function EventList({
@@ -223,6 +228,7 @@ function EventList({
organization,
profiles,
project,
+ unit,
}: EventListProps) {
return (
<ListContainer>
@@ -240,7 +246,7 @@ function EventList({
const target = generateProfileFlamechartRouteWithQuery({
orgSlug: organization.slug,
projectSlug: project.slug,
- profileId: item.id,
+ profileId: item['profile.id'],
query: {
frameName,
framePackage,
@@ -248,7 +254,7 @@ function EventList({
});
return (
- <Fragment key={item.id}>
+ <Fragment key={item['profile.id']}>
<Container>
<Link
to={target}
@@ -259,12 +265,22 @@ function EventList({
});
}}
>
- {getShortEventId(item.id)}
+ {getShortEventId(item['profile.id'])}
</Link>
</Container>
<Container>{item.transaction}</Container>
<NumberContainer>
- <PerformanceDuration nanoseconds={item['profile.duration']} abbreviation />
+ {unit === 'millisecond' ? (
+ <PerformanceDuration
+ milliseconds={item['transaction.duration']}
+ abbreviation
+ />
+ ) : (
+ <PerformanceDuration
+ nanoseconds={item['transaction.duration']}
+ abbreviation
+ />
+ )}
</NumberContainer>
</Fragment>
);
diff --git a/static/app/components/profiling/transactionProfileIdProvider.tsx b/static/app/components/profiling/transactionProfileIdProvider.tsx
index 8d2bd8360ace33..f2219e317c74f6 100644
--- a/static/app/components/profiling/transactionProfileIdProvider.tsx
+++ b/static/app/components/profiling/transactionProfileIdProvider.tsx
@@ -39,10 +39,6 @@ export function TransactionProfileIdProvider({
};
}, [timestamp]);
- const profileIdColumn = organization.features.includes('profiling-using-transactions')
- ? 'profile.id'
- : 'id';
-
const transactionIdColumn = organization.features.includes(
'profiling-using-transactions'
)
@@ -51,7 +47,7 @@ export function TransactionProfileIdProvider({
const {status, data, error} = useProfileEvents({
projects: projectId ? [projectId] : undefined,
- fields: [profileIdColumn],
+ fields: ['profile.id'],
referrer: 'transactionToProfileProvider',
limit: 1,
sort: {
@@ -73,7 +69,7 @@ export function TransactionProfileIdProvider({
}
}, [status, error]);
- const profileId = (data?.data[0]?.[profileIdColumn] as string | undefined) ?? null;
+ const profileId = (data?.data[0]?.['profile.id'] as string | undefined) ?? null;
return (
<TransactionProfileContext.Provider value={profileId}>
diff --git a/static/app/components/profiling/transactonProfileIdProvider.spec.tsx b/static/app/components/profiling/transactonProfileIdProvider.spec.tsx
index 181b14a8cb82ed..04d99059927c5f 100644
--- a/static/app/components/profiling/transactonProfileIdProvider.spec.tsx
+++ b/static/app/components/profiling/transactonProfileIdProvider.spec.tsx
@@ -73,7 +73,7 @@ describe('TransactionProfileIdProvider', () => {
body: {
data: [
{
- id: MOCK_PROFILE_ID,
+ 'profile.id': MOCK_PROFILE_ID,
},
],
},
diff --git a/static/app/utils/profiling/hooks/useProfilingTransactionQuickSummary.tsx b/static/app/utils/profiling/hooks/useProfilingTransactionQuickSummary.tsx
index 806fc4855b99fe..cf0e52a2f52f79 100644
--- a/static/app/utils/profiling/hooks/useProfilingTransactionQuickSummary.tsx
+++ b/static/app/utils/profiling/hooks/useProfilingTransactionQuickSummary.tsx
@@ -29,8 +29,14 @@ export function useProfilingTransactionQuickSummary(
skipSlowestProfile = false,
} = options;
+ const profilesQueryString = useMemo(() => {
+ const conditions = new MutableSearch('');
+ conditions.setFilterValues('transaction', [transaction]);
+ return conditions.formatString();
+ }, [transaction]);
+
const baseQueryOptions: Omit<UseProfileEventsOptions, 'sort' | 'referrer'> = {
- query: `transaction:"${transaction}"`,
+ query: profilesQueryString,
fields: getProfilesTableFields(project.platform),
enabled: Boolean(transaction),
limit: 1,
@@ -58,7 +64,7 @@ export function useProfilingTransactionQuickSummary(
enabled: !skipLatestProfile,
});
- const query = useMemo(() => {
+ const functionsQueryString = useMemo(() => {
const conditions = new MutableSearch('');
conditions.setFilterValues('transaction', [transaction]);
conditions.setFilterValues('is_application', ['1']);
@@ -72,7 +78,7 @@ export function useProfilingTransactionQuickSummary(
key: 'sum()',
order: 'desc',
},
- query,
+ query: functionsQueryString,
limit: 5,
enabled: !skipFunctions,
});
diff --git a/static/app/views/profiling/content.tsx b/static/app/views/profiling/content.tsx
index 453e25b347e60f..6b2abd02c4c127 100644
--- a/static/app/views/profiling/content.tsx
+++ b/static/app/views/profiling/content.tsx
@@ -31,7 +31,6 @@ import SidebarPanelStore from 'sentry/stores/sidebarPanelStore';
import {space} from 'sentry/styles/space';
import {trackAnalytics} from 'sentry/utils/analytics';
import {browserHistory} from 'sentry/utils/browserHistory';
-import EventView from 'sentry/utils/discover/eventView';
import {useProfileEvents} from 'sentry/utils/profiling/hooks/useProfileEvents';
import {useProfileFilters} from 'sentry/utils/profiling/hooks/useProfileFilters';
import {formatError, formatSort} from 'sentry/utils/profiling/hooks/utils';
@@ -65,7 +64,7 @@ function ProfilingContent({location}: ProfilingContentProps) {
'profiling-using-transactions'
);
- const fields = profilingUsingTransactions ? ALL_FIELDS : BASE_FIELDS;
+ const fields = ALL_FIELDS;
const sort = formatSort<FieldType>(decodeScalar(location.query.sort), fields, {
key: 'count()',
@@ -138,22 +137,6 @@ function ProfilingContent({location}: ProfilingContentProps) {
);
}, [selection.projects, projects]);
- const eventView = useMemo(() => {
- const _eventView = EventView.fromNewQueryWithLocation(
- {
- id: undefined,
- version: 2,
- name: t('Profiling'),
- fields: [],
- query,
- projects: selection.projects,
- },
- location
- );
- _eventView.additionalConditions.setFilterValues('has', ['profile.id']);
- return _eventView;
- }, [location, query, selection.projects]);
-
return (
<SentryDocumentTitle title={t('Profiling')} orgSlug={organization.slug}>
<PageFiltersContainer
@@ -194,9 +177,9 @@ function ProfilingContent({location}: ProfilingContentProps) {
</PageFilterBar>
{profilingUsingTransactions ? (
<SearchBar
- searchSource="profile_summary"
+ searchSource="profile_landing"
organization={organization}
- projectIds={eventView.project}
+ projectIds={selection.projects}
query={query}
onSearch={handleSearch}
maxQueryLength={MAX_QUERY_LENGTH}
@@ -317,7 +300,7 @@ function ProfilingContent({location}: ProfilingContentProps) {
);
}
-const BASE_FIELDS = [
+const ALL_FIELDS = [
'transaction',
'project.id',
'last_seen()',
@@ -328,9 +311,6 @@ const BASE_FIELDS = [
'count()',
] as const;
-// user misery is only available with the profiling-using-transactions feature
-const ALL_FIELDS = [...BASE_FIELDS, 'user_misery()'] as const;
-
type FieldType = (typeof ALL_FIELDS)[number];
const StyledHeaderContent = styled(Layout.HeaderContent)`
diff --git a/static/app/views/profiling/profileSummary/profilesTable.tsx b/static/app/views/profiling/profileSummary/profilesTable.tsx
index 15f087b7365922..530de913486d76 100644
--- a/static/app/views/profiling/profileSummary/profilesTable.tsx
+++ b/static/app/views/profiling/profileSummary/profilesTable.tsx
@@ -11,30 +11,60 @@ import {formatSort} from 'sentry/utils/profiling/hooks/utils';
import {decodeScalar} from 'sentry/utils/queryString';
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
import {useLocation} from 'sentry/utils/useLocation';
+import useOrganization from 'sentry/utils/useOrganization';
-const FIELDS = [
+const ALL_FIELDS = [
'profile.id',
'timestamp',
- 'profile.duration',
+ 'transaction.duration',
'release',
'environment',
- 'os.name',
- 'os.version',
'trace',
'trace.transaction',
+ 'id',
] as const;
-type FieldType = (typeof FIELDS)[number];
+type FieldType = (typeof ALL_FIELDS)[number];
+
+const FIELDS = [
+ 'profile.id',
+ 'timestamp',
+ 'transaction.duration',
+ 'release',
+ 'environment',
+ 'trace',
+ 'trace.transaction',
+] as const;
export function ProfilesTable() {
const location = useLocation();
+ const organization = useOrganization();
+
+ const useTransactions = organization.features.includes('profiling-using-transactions');
+
+ const queryFields = useMemo(() => {
+ const transactionIdColumn = useTransactions
+ ? ('id' as const)
+ : ('trace.transaction' as const);
+
+ return [
+ 'profile.id',
+ 'timestamp',
+ 'transaction.duration',
+ 'release',
+ 'environment',
+ 'trace',
+ transactionIdColumn,
+ ] as const;
+ }, [useTransactions]);
+
const sort = useMemo(() => {
- return formatSort<FieldType>(decodeScalar(location.query.sort), FIELDS, {
+ return formatSort<FieldType>(decodeScalar(location.query.sort), queryFields, {
key: 'timestamp',
order: 'desc',
});
- }, [location.query.sort]);
+ }, [queryFields, location.query.sort]);
const rawQuery = useMemo(() => {
return decodeScalar(location.query.query, '');
@@ -58,7 +88,7 @@ export function ProfilesTable() {
const profiles = useProfileEvents<FieldType>({
cursor: profilesCursor,
- fields: FIELDS,
+ fields: queryFields,
query,
sort,
limit: 20,
@@ -66,15 +96,33 @@ export function ProfilesTable() {
});
const eventsTableProps = useMemo(() => {
- return {columns: FIELDS.slice(), sortableColumns: new Set(FIELDS)};
+ return {columns: FIELDS, sortableColumns: new Set(FIELDS)};
}, []);
+ // Transform the response so that the data is compatible with the renderer
+ // regardless if we're using the transactions or profiles table
+ const data = useMemo(() => {
+ if (!profiles.data) {
+ return null;
+ }
+ const _data = {
+ data: profiles.data.data.map(row => {
+ return {
+ ...row,
+ 'trace.transaction': useTransactions ? row.id : row['trace.transaction'],
+ };
+ }),
+ meta: profiles.data.meta,
+ };
+ return _data;
+ }, [profiles.data, useTransactions]);
+
return (
<ProfileEvents>
<ProfileEventsTableContainer>
<ProfileEventsTable
sort={sort}
- data={profiles.status === 'success' ? profiles.data : null}
+ data={profiles.status === 'success' ? data : null}
error={profiles.status === 'error' ? t('Unable to load profiles') : null}
isLoading={profiles.status === 'loading'}
{...eventsTableProps}
|
51efe17fb8be62288769fd64a30775d91b2dc6a1
|
2020-02-27 04:19:04
|
Colleen O'Rourke
|
feat(integrations): Add logging to ApiClient and Jira (#17289)
| false
|
Add logging to ApiClient and Jira (#17289)
|
feat
|
diff --git a/src/sentry/integrations/client.py b/src/sentry/integrations/client.py
index c1d28d3e89f4bf..c28833c5266a2d 100644
--- a/src/sentry/integrations/client.py
+++ b/src/sentry/integrations/client.py
@@ -3,6 +3,7 @@
import logging
import json
import requests
+import six
from collections import OrderedDict
from time import time
@@ -111,14 +112,6 @@ def json(self):
return self
-def track_response_code(integration, code):
- metrics.incr(
- "integrations.http_response",
- sample_rate=1.0,
- tags={"integration": integration, "status": code},
- )
-
-
class ApiClient(object):
base_url = None
@@ -131,8 +124,26 @@ class ApiClient(object):
# Used in metrics and logging.
integration_name = "undefined"
- def __init__(self, verify_ssl=True):
+ def __init__(self, verify_ssl=True, logging_context=None):
self.verify_ssl = verify_ssl
+ self.logging_context = logging_context
+
+ def track_response_data(self, integration, code, error=None):
+ logger = logging.getLogger("sentry.integrations.client")
+
+ metrics.incr(
+ "integrations.http_response",
+ sample_rate=1.0,
+ tags={"integration": integration, "status": code},
+ )
+
+ extra = {
+ "integration": integration,
+ "status": code,
+ "error": six.text_type(error[:128]) if error else None,
+ }
+ extra.update(getattr(self, "logging_context", None) or {})
+ logger.info("integrations.http_response", extra=extra)
def build_url(self, path):
if path.startswith("/"):
@@ -189,31 +200,24 @@ def _request(
)
resp.raise_for_status()
except ConnectionError as e:
- metrics.incr(
- "integrations.http_response",
- sample_rate=1.0,
- tags={"integration": self.integration_name, "status": "connection_error"},
- )
+ self.track_response_data(self.integration_name, "connection_error", e.message)
raise ApiHostError.from_exception(e)
except Timeout as e:
- metrics.incr(
- "integrations.http_response",
- sample_rate=1.0,
- tags={"integration": self.integration_name, "status": "timeout"},
- )
+ self.track_response_data(self.integration_name, "timeout", e.message)
raise ApiTimeoutError.from_exception(e)
except HTTPError as e:
resp = e.response
if resp is None:
- track_response_code(self.integration_name, "unknown")
+ self.track_response_data(self.integration_name, "unknown", e.message)
self.logger.exception(
"request.error", extra={"integration": self.integration_name, "url": full_url}
)
raise ApiError("Internal Error")
- track_response_code(self.integration_name, resp.status_code)
+ self.track_response_data(self.integration_name, resp.status_code, e.message)
raise ApiError.from_response(resp)
- track_response_code(self.integration_name, resp.status_code)
+ self.track_response_data(self.integration_name, resp.status_code)
+
if resp.status_code == 204:
return {}
diff --git a/src/sentry/integrations/jira/client.py b/src/sentry/integrations/jira/client.py
index 17924d94430c7a..1774e84288708c 100644
--- a/src/sentry/integrations/jira/client.py
+++ b/src/sentry/integrations/jira/client.py
@@ -91,13 +91,13 @@ class JiraApiClient(ApiClient):
integration_name = "jira"
- def __init__(self, base_url, jira_style, verify_ssl):
+ def __init__(self, base_url, jira_style, verify_ssl, logging_context=None):
self.base_url = base_url
# `jira_style` encapsulates differences between jira server & jira cloud.
# We only support one API version for Jira, but server/cloud require different
# authentication mechanisms and caching.
self.jira_style = jira_style
- super(JiraApiClient, self).__init__(verify_ssl)
+ super(JiraApiClient, self).__init__(verify_ssl, logging_context)
def request(self, method, path, data=None, params=None, **kwargs):
"""
diff --git a/src/sentry/integrations/jira/integration.py b/src/sentry/integrations/jira/integration.py
index 49b094bfeb042a..1757aae96df4b6 100644
--- a/src/sentry/integrations/jira/integration.py
+++ b/src/sentry/integrations/jira/integration.py
@@ -2,6 +2,7 @@
import logging
import six
+from operator import attrgetter
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
@@ -283,6 +284,11 @@ def get_client(self):
self.model.metadata["base_url"],
JiraCloud(self.model.metadata["shared_secret"]),
verify_ssl=True,
+ logging_context={
+ "org_id": self.organization_id,
+ "integration_id": attrgetter("org_integration.integration.id")(self),
+ "org_integration_id": attrgetter("org_integration.id")(self),
+ },
)
def get_issue(self, issue_id, **kwargs):
@@ -498,7 +504,6 @@ def get_create_issue_config(self, group, **kwargs):
defaults = self.get_project_defaults(group.project_id)
project_id = params.get("project", defaults.get("project"))
-
client = self.get_client()
try:
jira_projects = client.get_projects_list()
|
6fb970e1777ec4110f0b77c4b73d56b290c3ca8f
|
2024-04-26 22:40:36
|
Jonas
|
fix(trace): minimize onload (#69783)
| false
|
minimize onload (#69783)
|
fix
|
diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
index 158e57f87888f4..3cbe00a713694e 100644
--- a/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
+++ b/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
@@ -134,6 +134,7 @@ export function TraceDrawer(props: TraceDrawerProps) {
props.manager.initializePhysicalSpace(width, height);
props.manager.draw();
}
+
minimized = minimized ?? traceStateRef.current.preferences.drawer.minimized;
if (traceStateRef.current.preferences.layout === 'drawer bottom' && user) {
@@ -172,9 +173,9 @@ export function TraceDrawer(props: TraceDrawerProps) {
}, 1000);
if (traceStateRef.current.preferences.layout === 'drawer bottom') {
- min = minimized ? 27 : drawerHeight;
+ min = minimized ? 27 : size;
} else {
- min = minimized ? 0 : drawerWidth;
+ min = minimized ? 0 : size;
}
if (traceStateRef.current.preferences.layout === 'drawer bottom') {
@@ -253,6 +254,23 @@ export function TraceDrawer(props: TraceDrawerProps) {
onResize(0, 0, true, true);
size.current = drawerOptions.min;
} else {
+ if (drawerOptions.initialSize === 0) {
+ const userPreference =
+ traceStateRef.current.preferences.drawer.sizes[
+ traceStateRef.current.preferences.layout
+ ];
+
+ const {width, height} = props.traceGridRef?.getBoundingClientRect() ?? {
+ width: 0,
+ height: 0,
+ };
+ const containerSize =
+ traceStateRef.current.preferences.layout === 'drawer bottom' ? height : width;
+ const drawer_size = containerSize * userPreference;
+ onResize(drawer_size, drawerOptions.min, true, false);
+ size.current = userPreference;
+ return;
+ }
onResize(drawerOptions.initialSize, drawerOptions.min, true, false);
size.current = drawerOptions.initialSize;
}
@@ -260,6 +278,7 @@ export function TraceDrawer(props: TraceDrawerProps) {
size,
onResize,
trace_dispatch,
+ props.traceGridRef,
props.trace_state.preferences.drawer.minimized,
organization,
drawerOptions,
|
43f863afe6c0fddc5407dd209ba71750acd2d8f6
|
2023-05-17 03:38:42
|
Scott Cooper
|
feat(ui): Stop reporting permission as error (#49255)
| false
|
Stop reporting permission as error (#49255)
|
feat
|
diff --git a/static/app/views/permissionDenied.tsx b/static/app/views/permissionDenied.tsx
index b15ebcb9762598..cbe894d8182cb6 100644
--- a/static/app/views/permissionDenied.tsx
+++ b/static/app/views/permissionDenied.tsx
@@ -6,31 +6,19 @@ import ExternalLink from 'sentry/components/links/externalLink';
import LoadingError from 'sentry/components/loadingError';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {t, tct} from 'sentry/locale';
-import {Organization, Project} from 'sentry/types';
import getRouteStringFromRoutes from 'sentry/utils/getRouteStringFromRoutes';
import {useRoutes} from 'sentry/utils/useRoutes';
-import withOrganization from 'sentry/utils/withOrganization';
-import withProject from 'sentry/utils/withProject';
const ERROR_NAME = 'Permission Denied';
-type Props = {
- organization: Organization;
- project?: Project;
-};
-
-function PermissionDenied(props: Props) {
- const {organization, project} = props;
+function PermissionDenied() {
const routes = useRoutes();
useEffect(() => {
const route = getRouteStringFromRoutes(routes);
- Sentry.withScope(scope => {
- scope.setFingerprint([ERROR_NAME, route]);
- scope.setExtra('route', route);
- scope.setExtra('orgFeatures', (organization && organization.features) || []);
- scope.setExtra('orgAccess', (organization && organization.access) || []);
- scope.setExtra('projectFeatures', (project && project.features) || []);
- Sentry.captureException(new Error(`${ERROR_NAME}${route ? ` : ${route}` : ''}`));
+ Sentry.addBreadcrumb({
+ category: 'auth',
+ message: `${ERROR_NAME}${route ? ` : ${route}` : ''}`,
+ level: 'error',
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
@@ -54,4 +42,4 @@ function PermissionDenied(props: Props) {
);
}
-export default withOrganization(withProject(PermissionDenied));
+export default PermissionDenied;
|
0a46bb8cca5859838461136abe9e5fa1a40aacd4
|
2024-07-22 14:55:16
|
David Wang
|
ref(notifications): Remove unused ParentLabel (#74533)
| false
|
Remove unused ParentLabel (#74533)
|
ref
|
diff --git a/static/app/views/settings/account/notifications/parentLabel.tsx b/static/app/views/settings/account/notifications/parentLabel.tsx
deleted file mode 100644
index 1a7de3405a88a0..00000000000000
--- a/static/app/views/settings/account/notifications/parentLabel.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import styled from '@emotion/styled';
-
-import Avatar from 'sentry/components/avatar';
-import {space} from 'sentry/styles/space';
-import type {OrganizationSummary, Project} from 'sentry/types';
-import {getParentKey} from 'sentry/views/settings/account/notifications/utils';
-
-type Props = {
- notificationType: string;
- parent: OrganizationSummary | Project;
-};
-
-// TODO(mgaeta): Infer parentKey from parent.
-function ParentLabel({notificationType, parent}: Props) {
- return (
- <FieldLabel>
- <Avatar
- {...{
- [getParentKey(notificationType)]: parent,
- }}
- />
- <span>{parent.slug}</span>
- </FieldLabel>
- );
-}
-
-const FieldLabel = styled('div')`
- display: flex;
- gap: ${space(0.5)};
- line-height: 16px;
-`;
-
-export default ParentLabel;
|
484a199caad1367d35b631bfe8464860ac3985c1
|
2024-01-17 23:57:35
|
Seiji Chew
|
feat(staff): Add feature flag to superuser access form (#62884)
| false
|
Add feature flag to superuser access form (#62884)
|
feat
|
diff --git a/static/app/components/superuserAccessForm.tsx b/static/app/components/superuserAccessForm.tsx
index 43058fa7268f3d..e777966536232e 100644
--- a/static/app/components/superuserAccessForm.tsx
+++ b/static/app/components/superuserAccessForm.tsx
@@ -1,4 +1,4 @@
-import {Component} from 'react';
+import React, {Component} from 'react';
import styled from '@emotion/styled';
import trimEnd from 'lodash/trimEnd';
@@ -8,6 +8,7 @@ import {Alert} from 'sentry/components/alert';
import {Button} from 'sentry/components/button';
import Form from 'sentry/components/forms/form';
import Hook from 'sentry/components/hook';
+import LoadingIndicator from 'sentry/components/loadingIndicator';
import {ThemeAndStyleProvider} from 'sentry/components/themeAndStyleProvider';
import U2fContainer from 'sentry/components/u2f/u2fContainer';
import {ErrorCodes} from 'sentry/constants/superuserAccessErrors';
@@ -21,31 +22,53 @@ type OnTapProps = NonNullable<React.ComponentProps<typeof U2fContainer>['onTap']
type Props = {
api: Client;
+ hasStaff: boolean;
};
type State = {
authenticators: Array<Authenticator>;
error: boolean;
errorType: string;
+ isLoading: boolean;
showAccessForms: boolean;
superuserAccessCategory: string;
superuserReason: string;
};
class SuperuserAccessForm extends Component<Props, State> {
- state: State = {
- authenticators: [],
- error: false,
- errorType: '',
- showAccessForms: true,
- superuserAccessCategory: '',
- superuserReason: '',
- };
+ constructor(props) {
+ super(props);
+ this.authUrl = this.props.hasStaff ? '/staff-auth/' : '/auth/';
+ this.state = {
+ authenticators: [],
+ error: false,
+ errorType: '',
+ showAccessForms: true,
+ superuserAccessCategory: '',
+ superuserReason: '',
+ isLoading: true,
+ };
+ }
+
+ async componentDidMount() {
+ const disableU2FForSUForm = ConfigStore.get('disableU2FForSUForm');
- componentDidMount() {
- this.getAuthenticators();
+ // If using staff and on local dev, skip U2F and immediately submit
+ if (this.props.hasStaff && disableU2FForSUForm) {
+ await this.handleSubmit(this.state);
+ return;
+ }
+
+ await this.getAuthenticators();
+ // Set the error state if there are no authenticators and U2F is on
+ if (!this.state.authenticators.length && !disableU2FForSUForm) {
+ this.handleError(ErrorCodes.NO_AUTHENTICATOR);
+ }
+ this.setState({isLoading: false});
}
+ authUrl: string;
+
handleSubmitCOPS = () => {
this.setState({
superuserAccessCategory: 'cops_csm',
@@ -59,7 +82,6 @@ class SuperuserAccessForm extends Component<Props, State> {
const disableU2FForSUForm = ConfigStore.get('disableU2FForSUForm');
const suAccessCategory = superuserAccessCategory || data.superuserAccessCategory;
-
const suReason = superuserReason || data.superuserReason;
if (!authenticators.length && !disableU2FForSUForm) {
@@ -67,15 +89,20 @@ class SuperuserAccessForm extends Component<Props, State> {
return;
}
+ // Set state to setup for U2F tap
if (this.state.showAccessForms && !disableU2FForSUForm) {
this.setState({
showAccessForms: false,
superuserAccessCategory: suAccessCategory,
superuserReason: suReason,
});
+ // If U2F is disabled, authenticate immediately
} else {
try {
- await api.requestPromise('/auth/', {method: 'PUT', data});
+ await api.requestPromise(this.authUrl, {
+ method: 'PUT',
+ data,
+ });
this.handleSuccess();
} catch (err) {
this.handleError(err);
@@ -85,14 +112,17 @@ class SuperuserAccessForm extends Component<Props, State> {
handleU2fTap = async (data: Parameters<OnTapProps>[0]) => {
const {api} = this.props;
- try {
+
+ if (!this.props.hasStaff) {
data.isSuperuserModal = true;
data.superuserAccessCategory = this.state.superuserAccessCategory;
data.superuserReason = this.state.superuserReason;
- await api.requestPromise('/auth/', {method: 'PUT', data});
+ }
+ try {
+ await api.requestPromise(this.authUrl, {method: 'PUT', data});
this.handleSuccess();
} catch (err) {
- this.setState({showAccessForms: true});
+ this.handleError(err);
// u2fInterface relies on this
throw err;
}
@@ -127,6 +157,7 @@ class SuperuserAccessForm extends Component<Props, State> {
error: true,
errorType,
showAccessForms: true,
+ isLoading: false,
});
};
@@ -159,40 +190,60 @@ class SuperuserAccessForm extends Component<Props, State> {
}
render() {
- const {authenticators, error, errorType, showAccessForms} = this.state;
+ const {authenticators, error, errorType, showAccessForms, isLoading} = this.state;
if (errorType === ErrorCodes.INVALID_SSO_SESSION) {
this.handleLogout();
return null;
}
+
return (
<ThemeAndStyleProvider>
- <Form
- submitLabel={t('Continue')}
- onSubmit={this.handleSubmit}
- initialData={{isSuperuserModal: true}}
- extraButton={
- <BackWrapper>
- <Button type="submit" onClick={this.handleSubmitCOPS}>
- {t('COPS/CSM')}
- </Button>
- </BackWrapper>
- }
- resetOnError
- >
- {error && (
- <StyledAlert type="error" showIcon>
- {errorType}
- </StyledAlert>
- )}
- {showAccessForms && <Hook name="component:superuser-access-category" />}
- {!showAccessForms && (
- <U2fContainer
- authenticators={authenticators}
- displayMode="sudo"
- onTap={this.handleU2fTap}
- />
- )}
- </Form>
+ {this.props.hasStaff ? (
+ isLoading ? (
+ <LoadingIndicator />
+ ) : (
+ <React.Fragment>
+ {error && (
+ <StyledAlert type="error" showIcon>
+ {errorType}
+ </StyledAlert>
+ )}
+ <U2fContainer
+ authenticators={authenticators}
+ displayMode="sudo"
+ onTap={this.handleU2fTap}
+ />
+ </React.Fragment>
+ )
+ ) : (
+ <Form
+ submitLabel={t('Continue')}
+ onSubmit={this.handleSubmit}
+ initialData={{isSuperuserModal: true}}
+ extraButton={
+ <BackWrapper>
+ <Button type="submit" onClick={this.handleSubmitCOPS}>
+ {t('COPS/CSM')}
+ </Button>
+ </BackWrapper>
+ }
+ resetOnError
+ >
+ {error && (
+ <StyledAlert type="error" showIcon>
+ {errorType}
+ </StyledAlert>
+ )}
+ {showAccessForms && <Hook name="component:superuser-access-category" />}
+ {!showAccessForms && (
+ <U2fContainer
+ authenticators={authenticators}
+ displayMode="sudo"
+ onTap={this.handleU2fTap}
+ />
+ )}
+ </Form>
+ )}
</ThemeAndStyleProvider>
);
}
|
8ac01f67a2cdf3d1995cdb90bfb80dd934bd642c
|
2024-06-25 04:52:27
|
Josh Ferge
|
fix(similarity): return empty lists from snuba if no results (#73244)
| false
|
return empty lists from snuba if no results (#73244)
|
fix
|
diff --git a/src/sentry/tasks/embeddings_grouping/utils.py b/src/sentry/tasks/embeddings_grouping/utils.py
index e22a6474395ad1..c6a4c72d62ba11 100644
--- a/src/sentry/tasks/embeddings_grouping/utils.py
+++ b/src/sentry/tasks/embeddings_grouping/utils.py
@@ -69,7 +69,7 @@ def filter_snuba_results(snuba_results, groups_to_backfill_with_no_embedding, pr
"group_id_batch": json.dumps(groups_to_backfill_with_no_embedding),
},
)
- return
+ return [], []
filtered_snuba_results: list[GroupEventRow] = [
snuba_result["data"][0] for snuba_result in snuba_results if snuba_result["data"]
]
|
4c4521caa3614e0424f4ae7dfe0e4efa290c58dc
|
2024-05-17 04:43:13
|
Evan Purkhiser
|
feat(ui): Use borderless button for AssigneeSelectorDropdown (#71071)
| false
|
Use borderless button for AssigneeSelectorDropdown (#71071)
|
feat
|
diff --git a/static/app/components/assigneeSelectorDropdown.tsx b/static/app/components/assigneeSelectorDropdown.tsx
index d4d6373ff5586b..9d957aa66171d6 100644
--- a/static/app/components/assigneeSelectorDropdown.tsx
+++ b/static/app/components/assigneeSelectorDropdown.tsx
@@ -6,12 +6,12 @@ import {openInviteMembersModal} from 'sentry/actionCreators/modal';
import ActorAvatar from 'sentry/components/avatar/actorAvatar';
import SuggestedAvatarStack from 'sentry/components/avatar/suggestedAvatarStack';
import {Button} from 'sentry/components/button';
-import {Chevron} from 'sentry/components/chevron';
import {
CompactSelect,
type SelectOption,
type SelectOptionOrSection,
} from 'sentry/components/compactSelect';
+import DropdownButton from 'sentry/components/dropdownButton';
import {TeamBadge} from 'sentry/components/idBadge/teamBadge';
import UserBadge from 'sentry/components/idBadge/userBadge';
import ExternalLink from 'sentry/components/links/externalLink';
@@ -517,10 +517,15 @@ export default function AssigneeSelectorDropdown({
<LoadingIndicator mini style={{height: '24px', margin: 0, marginRight: 11}} />
)}
{!loading && !noDropdown && (
- <DropdownButton data-test-id="assignee-selector" {...props}>
+ <AssigneeDropdownButton
+ borderless
+ size="sm"
+ isOpen={isOpen}
+ data-test-id="assignee-selector"
+ {...props}
+ >
{avatarElement}
- <Chevron direction={isOpen ? 'up' : 'down'} size="small" />
- </DropdownButton>
+ </AssigneeDropdownButton>
)}
{!loading && noDropdown && avatarElement}
</Fragment>
@@ -577,14 +582,9 @@ const AssigneeWrapper = styled('div')`
justify-content: flex-end;
`;
-const DropdownButton = styled('button')`
- appearance: none;
- border: 0;
- background: transparent;
- display: flex;
- align-items: center;
- font-size: 20px;
- gap: ${space(0.5)};
+const AssigneeDropdownButton = styled(DropdownButton)`
+ padding-left: ${space(0.5)};
+ padding-right: ${space(0.5)};
`;
const StyledIconUser = styled(IconUser)`
|
38d64cc53947c35e22010f07f509433e52fb9775
|
2024-03-06 15:51:48
|
ArthurKnaus
|
feat(ddm): Hiding queries (#66398)
| false
|
Hiding queries (#66398)
|
feat
|
diff --git a/static/app/utils/metrics/constants.tsx b/static/app/utils/metrics/constants.tsx
index 45d5844d2bc098..2a7a290166b134 100644
--- a/static/app/utils/metrics/constants.tsx
+++ b/static/app/utils/metrics/constants.tsx
@@ -40,6 +40,7 @@ export const emptyMetricsQueryWidget: MetricQueryWidgetParams = {
groupBy: [],
sort: DEFAULT_SORT_STATE,
displayType: MetricDisplayType.LINE,
+ isHidden: false,
};
export const emptyMetricsFormulaWidget: MetricFormulaWidgetParams = {
@@ -48,4 +49,5 @@ export const emptyMetricsFormulaWidget: MetricFormulaWidgetParams = {
formula: '',
sort: DEFAULT_SORT_STATE,
displayType: MetricDisplayType.LINE,
+ isHidden: false,
};
diff --git a/static/app/utils/metrics/types.tsx b/static/app/utils/metrics/types.tsx
index 962928a3c52fd8..8b0b561739c481 100644
--- a/static/app/utils/metrics/types.tsx
+++ b/static/app/utils/metrics/types.tsx
@@ -35,6 +35,7 @@ export enum MetricQueryType {
export interface BaseWidgetParams {
displayType: MetricDisplayType;
id: number;
+ isHidden: boolean;
type: MetricQueryType;
focusedSeries?: FocusedMetricsSeries[];
sort?: SortState;
diff --git a/static/app/views/ddm/context.tsx b/static/app/views/ddm/context.tsx
index a74218c1d3c68d..615db3a0af07ee 100644
--- a/static/app/views/ddm/context.tsx
+++ b/static/app/views/ddm/context.tsx
@@ -52,6 +52,7 @@ interface DDMContextValue {
>;
setSelectedWidgetIndex: (index: number) => void;
showQuerySymbols: boolean;
+ toggleWidgetVisibility: (index: number) => void;
updateWidget: (
index: number,
data: Partial<Omit<MetricWidgetQueryParams, 'type'>>
@@ -80,6 +81,7 @@ export const DDMContext = createContext<DDMContextValue>({
showQuerySymbols: false,
updateWidget: () => {},
widgets: [],
+ toggleWidgetVisibility: () => {},
});
export function useDDMContext() {
@@ -159,8 +161,13 @@ export function useMetricWidgets() {
const removeWidget = useCallback(
(index: number) => {
setWidgets(currentWidgets => {
- const newWidgets = [...currentWidgets];
+ let newWidgets = [...currentWidgets];
newWidgets.splice(index, 1);
+
+ // Ensure that a visible widget remains
+ if (!newWidgets.find(w => !w.isHidden)) {
+ newWidgets = newWidgets.map(w => ({...w, isHidden: false}));
+ }
return newWidgets;
});
},
@@ -186,6 +193,7 @@ export function useMetricWidgets() {
addWidget,
removeWidget,
duplicateWidget,
+ setWidgets,
};
}
@@ -334,16 +342,32 @@ export function DDMContextProvider({children}: {children: React.ReactNode}) {
(value: boolean) => {
updateQuery({multiChartMode: value ? 1 : 0}, {replace: true});
updateWidget(0, {focusedSeries: undefined});
- setSelectedWidgetIndex(0);
+ const firstVisibleWidgetIndex = widgets.findIndex(w => !w.isHidden);
+ setSelectedWidgetIndex(firstVisibleWidgetIndex);
},
- [updateQuery, updateWidget]
+ [updateQuery, updateWidget, widgets]
);
+ const toggleWidgetVisibility = useCallback(
+ (index: number) => {
+ if (index === selectedWidgetIndex) {
+ const firstVisibleWidgetIndex = widgets.findIndex(w => !w.isHidden);
+ setSelectedWidgetIndex(firstVisibleWidgetIndex);
+ }
+ updateWidget(index, {isHidden: !widgets[index].isHidden});
+ },
+ [selectedWidgetIndex, updateWidget, widgets]
+ );
+
+ const selectedWidget = widgets[selectedWidgetIndex];
+ const isSelectionValid = selectedWidget && !selectedWidget.isHidden;
+
const contextValue = useMemo<DDMContextValue>(
() => ({
addWidget: handleAddWidget,
- selectedWidgetIndex:
- selectedWidgetIndex > widgets.length - 1 ? 0 : selectedWidgetIndex,
+ selectedWidgetIndex: isSelectionValid
+ ? selectedWidgetIndex
+ : widgets.findIndex(w => !w.isHidden),
setSelectedWidgetIndex: handleSetSelectedWidgetIndex,
updateWidget: handleUpdateWidget,
removeWidget,
@@ -360,9 +384,11 @@ export function DDMContextProvider({children}: {children: React.ReactNode}) {
setIsMultiChartMode: handleSetIsMultiChartMode,
metricsSamples,
setMetricsSamples,
+ toggleWidgetVisibility,
}),
[
handleAddWidget,
+ isSelectionValid,
selectedWidgetIndex,
widgets,
handleSetSelectedWidgetIndex,
@@ -377,6 +403,7 @@ export function DDMContextProvider({children}: {children: React.ReactNode}) {
isMultiChartMode,
handleSetIsMultiChartMode,
metricsSamples,
+ toggleWidgetVisibility,
]
);
diff --git a/static/app/views/ddm/pageHeaderActions.tsx b/static/app/views/ddm/pageHeaderActions.tsx
index a99eb74aa5cbb9..2d5298ef72e51a 100644
--- a/static/app/views/ddm/pageHeaderActions.tsx
+++ b/static/app/views/ddm/pageHeaderActions.tsx
@@ -119,6 +119,7 @@ export function PageHeaderActions({showCustomMetricButton, addCustomMetric}: Pro
<QuerySymbol
key="icon"
queryId={widget.id}
+ isHidden={widget.isHidden}
isSelected={index === selectedWidgetIndex}
/>,
]
diff --git a/static/app/views/ddm/queries.tsx b/static/app/views/ddm/queries.tsx
index e31570e41b8265..b891e3ca6a47c5 100644
--- a/static/app/views/ddm/queries.tsx
+++ b/static/app/views/ddm/queries.tsx
@@ -4,6 +4,7 @@ import * as echarts from 'echarts/core';
import {Button} from 'sentry/components/button';
import SwitchButton from 'sentry/components/switchButton';
+import {Tooltip} from 'sentry/components/tooltip';
import {IconAdd} from 'sentry/icons';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
@@ -32,6 +33,7 @@ export function Queries() {
isMultiChartMode,
setIsMultiChartMode,
addWidget,
+ toggleWidgetVisibility,
} = useDDMContext();
const {selection} = usePageFilters();
@@ -62,6 +64,8 @@ export function Queries() {
return [querySymbolSet, formulaSymbolSet];
}, [widgets]);
+ const visibleWidgets = widgets.filter(widget => !widget.isHidden);
+
return (
<Fragment>
<Wrapper showQuerySymbols={showQuerySymbols}>
@@ -71,53 +75,24 @@ export function Queries() {
<Query
widget={widget}
onChange={handleChange}
+ onToggleVisibility={toggleWidgetVisibility}
index={index}
projects={selection.projects}
- symbol={
- showQuerySymbols && (
- <StyledQuerySymbol
- queryId={widget.id}
- isClickable={isMultiChartMode}
- isSelected={index === selectedWidgetIndex}
- onClick={() => setSelectedWidgetIndex(index)}
- role={isMultiChartMode ? 'button' : undefined}
- aria-label={t('Select query')}
- />
- )
- }
- contextMenu={
- <MetricQueryContextMenu
- displayType={widget.displayType}
- widgetIndex={index}
- metricsQuery={{
- mri: widget.mri,
- query: widget.query,
- op: widget.op,
- groupBy: widget.groupBy,
- }}
- />
- }
+ showQuerySymbols={showQuerySymbols}
+ isSelected={index === selectedWidgetIndex}
+ canBeHidden={visibleWidgets.length > 1}
/>
) : (
<Formula
availableVariables={querySymbols}
formulaVariables={formulaSymbols}
onChange={handleChange}
+ onToggleVisibility={toggleWidgetVisibility}
index={index}
widget={widget}
- symbol={
- showQuerySymbols && (
- <StyledQuerySymbol
- queryId={widget.id}
- isClickable={isMultiChartMode}
- isSelected={index === selectedWidgetIndex}
- onClick={() => setSelectedWidgetIndex(index)}
- role={isMultiChartMode ? 'button' : undefined}
- aria-label={t('Select query')}
- />
- )
- }
- contextMenu={<MetricFormulaContextMenu widgetIndex={index} />}
+ showQuerySymbols={showQuerySymbols}
+ isSelected={index === selectedWidgetIndex}
+ canBeHidden={visibleWidgets.length > 1}
/>
)}
</Row>
@@ -151,21 +126,25 @@ export function Queries() {
}
interface QueryProps {
+ canBeHidden: boolean;
index: number;
+ isSelected: boolean;
onChange: (index: number, data: Partial<MetricWidgetQueryParams>) => void;
+ onToggleVisibility: (index: number) => void;
projects: number[];
+ showQuerySymbols: boolean;
widget: MetricQueryWidgetParams;
- contextMenu?: React.ReactNode;
- symbol?: React.ReactNode;
}
-export function Query({
+function Query({
widget,
projects,
onChange,
- contextMenu,
- symbol,
+ onToggleVisibility,
index,
+ isSelected,
+ showQuerySymbols,
+ canBeHidden,
}: QueryProps) {
const metricsQuery = useMemo(
() => ({
@@ -177,6 +156,10 @@ export function Query({
[widget.groupBy, widget.mri, widget.op, widget.query]
);
+ const handleToggle = useCallback(() => {
+ onToggleVisibility(index);
+ }, [index, onToggleVisibility]);
+
const handleChange = useCallback(
(data: Partial<MetricWidgetQueryParams>) => {
onChange(index, data);
@@ -184,9 +167,19 @@ export function Query({
[index, onChange]
);
+ const isToggleDisabled = !canBeHidden && !widget.isHidden;
+
return (
- <QueryWrapper hasSymbol={!!symbol}>
- {symbol}
+ <QueryWrapper hasSymbol={showQuerySymbols}>
+ {showQuerySymbols && (
+ <QueryToggle
+ isHidden={widget.isHidden}
+ disabled={isToggleDisabled}
+ isSelected={isSelected}
+ queryId={widget.id}
+ onChange={handleToggle}
+ />
+ )}
<QueryBuilder
onChange={handleChange}
metricsQuery={metricsQuery}
@@ -194,50 +187,114 @@ export function Query({
isEdit
projects={projects}
/>
- {contextMenu}
+ <MetricQueryContextMenu
+ displayType={widget.displayType}
+ widgetIndex={index}
+ metricsQuery={{
+ mri: widget.mri,
+ query: widget.query,
+ op: widget.op,
+ groupBy: widget.groupBy,
+ }}
+ />
</QueryWrapper>
);
}
interface FormulaProps {
availableVariables: Set<string>;
+ canBeHidden: boolean;
formulaVariables: Set<string>;
index: number;
+ isSelected: boolean;
onChange: (index: number, data: Partial<MetricWidgetQueryParams>) => void;
+ onToggleVisibility: (index: number) => void;
+ showQuerySymbols: boolean;
widget: MetricFormulaWidgetParams;
- contextMenu?: React.ReactNode;
- symbol?: React.ReactNode;
}
-export function Formula({
+function Formula({
availableVariables,
formulaVariables,
index,
widget,
onChange,
- contextMenu,
- symbol,
+ onToggleVisibility,
+ canBeHidden,
+ isSelected,
+ showQuerySymbols,
}: FormulaProps) {
+ const handleToggle = useCallback(() => {
+ onToggleVisibility(index);
+ }, [index, onToggleVisibility]);
+
const handleChange = useCallback(
- (formula: string) => {
- onChange(index, {formula});
+ (data: Partial<MetricFormulaWidgetParams>) => {
+ onChange(index, data);
},
[index, onChange]
);
+
+ const isToggleDisabled = !canBeHidden && !widget.isHidden;
+
return (
- <QueryWrapper hasSymbol={!!symbol}>
- {symbol}
+ <QueryWrapper hasSymbol={showQuerySymbols}>
+ {showQuerySymbols && (
+ <QueryToggle
+ isHidden={widget.isHidden}
+ disabled={isToggleDisabled}
+ isSelected={isSelected}
+ queryId={widget.id}
+ onChange={handleToggle}
+ />
+ )}
<FormulaInput
availableVariables={availableVariables}
formulaVariables={formulaVariables}
value={widget.formula}
- onChange={handleChange}
+ onChange={formula => handleChange({formula})}
/>
- {contextMenu}
+ <MetricFormulaContextMenu widgetIndex={index} />
</QueryWrapper>
);
}
+interface QueryToggleProps {
+ disabled: boolean;
+ isHidden: boolean;
+ isSelected: boolean;
+ onChange: (isHidden: boolean) => void;
+ queryId: number;
+}
+
+function QueryToggle({
+ isHidden,
+ queryId,
+ disabled,
+ onChange,
+ isSelected,
+}: QueryToggleProps) {
+ let tooltipTitle = isHidden ? t('Show query') : t('Hide query');
+ if (disabled) {
+ tooltipTitle = t('At least one query must be visible');
+ }
+
+ return (
+ <Tooltip title={tooltipTitle} delay={500}>
+ <StyledQuerySymbol
+ isHidden={isHidden}
+ queryId={queryId}
+ isClickable={!disabled}
+ aria-disabled={disabled}
+ isSelected={isSelected}
+ onClick={disabled ? undefined : () => onChange(!isHidden)}
+ role="button"
+ aria-label={isHidden ? t('Show query') : t('Hide query')}
+ />
+ </Tooltip>
+ );
+}
+
const QueryWrapper = styled('div')<{hasSymbol: boolean}>`
display: grid;
gap: ${space(1)};
@@ -248,6 +305,7 @@ const QueryWrapper = styled('div')<{hasSymbol: boolean}>`
const StyledQuerySymbol = styled(QuerySymbol)<{isClickable: boolean}>`
margin-top: 10px;
+ cursor: not-allowed;
${p => p.isClickable && `cursor: pointer;`}
`;
diff --git a/static/app/views/ddm/querySymbol.tsx b/static/app/views/ddm/querySymbol.tsx
index b09b5fcc22cecf..b8c4f81d7434ab 100644
--- a/static/app/views/ddm/querySymbol.tsx
+++ b/static/app/views/ddm/querySymbol.tsx
@@ -1,3 +1,4 @@
+import {forwardRef} from 'react';
import styled from '@emotion/styled';
import {space} from 'sentry/styles/space';
@@ -15,7 +16,7 @@ export const getQuerySymbol = (index: number) => {
return result;
};
-const Symbol = styled('div')<{isSelected: boolean}>`
+const Symbol = styled('span')<{isSelected: boolean; isHidden?: boolean}>`
display: flex;
width: 16px;
height: 16px;
@@ -32,24 +33,34 @@ const Symbol = styled('div')<{isSelected: boolean}>`
${p =>
p.isSelected &&
+ !p.isHidden &&
`
background: ${p.theme.purple300};
color: ${p.theme.white};
`}
+
+ ${p =>
+ p.isHidden &&
+ `
+ background: ${p.theme.gray300};
+ color: ${p.theme.white};
+ `}
`;
-export function QuerySymbol({
- queryId,
- isSelected,
- ...props
-}: React.ComponentProps<typeof Symbol> & {isSelected: boolean; queryId: number}) {
- const {showQuerySymbols, isMultiChartMode} = useDDMContext();
- if (!showQuerySymbols || queryId < 0) {
- return null;
- }
- return (
- <Symbol isSelected={isMultiChartMode && isSelected} {...props}>
- <span>{getQuerySymbol(queryId)}</span>
- </Symbol>
- );
+interface QuerySymbolProps extends React.ComponentProps<typeof Symbol> {
+ queryId: number;
}
+
+export const QuerySymbol = forwardRef<HTMLSpanElement, QuerySymbolProps>(
+ function QuerySymbol({queryId, isSelected, ...props}, ref) {
+ const {showQuerySymbols, isMultiChartMode} = useDDMContext();
+ if (!showQuerySymbols || queryId < 0) {
+ return null;
+ }
+ return (
+ <Symbol ref={ref} isSelected={isMultiChartMode && isSelected} {...props}>
+ <span>{getQuerySymbol(queryId)}</span>
+ </Symbol>
+ );
+ }
+);
diff --git a/static/app/views/ddm/scratchpad.tsx b/static/app/views/ddm/scratchpad.tsx
index 6b273b5eb48657..fccbad9255271d 100644
--- a/static/app/views/ddm/scratchpad.tsx
+++ b/static/app/views/ddm/scratchpad.tsx
@@ -42,7 +42,7 @@ function widgetToQuery(
op: widget.op,
groupBy: widget.groupBy,
query: widget.query,
- isQueryOnly: isQueryOnly,
+ isQueryOnly: isQueryOnly || widget.isHidden,
};
}
@@ -172,40 +172,42 @@ export function MetricScratchpad() {
return (
<Wrapper>
{isMultiChartMode ? (
- filteredWidgets.map((widget, index) => (
- <MultiChartWidgetQueries
- formulaDependencies={formulaDependencies}
- widget={widget}
- key={widget.id}
- >
- {queries => (
- <MetricWidget
- queryId={widget.id}
- index={index}
- getChartPalette={getChartPalette}
- onSelect={setSelectedWidgetIndex}
- displayType={widget.displayType}
- focusedSeries={widget.focusedSeries}
- tableSort={widget.sort}
- queries={queries}
- isSelected={selectedWidgetIndex === index}
- hasSiblings={widgets.length > 1}
- onChange={handleChange}
- filters={selection}
- focusAreaProps={focusArea}
- showQuerySymbols={showQuerySymbols}
- onSampleClick={handleSampleClick}
- onSampleClickV2={handleSampleClickV2}
- chartHeight={200}
- highlightedSampleId={
- selectedWidgetIndex === index ? highlightedSampleId : undefined
- }
- metricsSamples={metricsSamples}
- context="ddm"
- />
- )}
- </MultiChartWidgetQueries>
- ))
+ filteredWidgets.map((widget, index) =>
+ widget.isHidden ? null : (
+ <MultiChartWidgetQueries
+ formulaDependencies={formulaDependencies}
+ widget={widget}
+ key={widget.id}
+ >
+ {queries => (
+ <MetricWidget
+ queryId={widget.id}
+ index={index}
+ getChartPalette={getChartPalette}
+ onSelect={setSelectedWidgetIndex}
+ displayType={widget.displayType}
+ focusedSeries={widget.focusedSeries}
+ tableSort={widget.sort}
+ queries={queries}
+ isSelected={selectedWidgetIndex === index}
+ hasSiblings={widgets.length > 1}
+ onChange={handleChange}
+ filters={selection}
+ focusAreaProps={focusArea}
+ showQuerySymbols={showQuerySymbols}
+ onSampleClick={handleSampleClick}
+ onSampleClickV2={handleSampleClickV2}
+ chartHeight={200}
+ highlightedSampleId={
+ selectedWidgetIndex === index ? highlightedSampleId : undefined
+ }
+ metricsSamples={metricsSamples}
+ context="ddm"
+ />
+ )}
+ </MultiChartWidgetQueries>
+ )
+ )
) : (
<MetricWidget
index={0}
@@ -214,7 +216,9 @@ export function MetricScratchpad() {
displayType={firstWidget.displayType}
focusedSeries={firstWidget.focusedSeries}
tableSort={firstWidget.sort}
- queries={filteredWidgets.map(w => widgetToQuery(w))}
+ queries={filteredWidgets
+ .filter(w => !(w.type === MetricQueryType.FORMULA && w.isHidden))
+ .map(w => widgetToQuery(w))}
isSelected
hasSiblings={false}
onChange={handleChange}
diff --git a/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.spec.tsx b/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.spec.tsx
index 79700ff8ad3e4c..7286dfd2714ee0 100644
--- a/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.spec.tsx
+++ b/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.spec.tsx
@@ -1,358 +1,398 @@
import {emptyMetricsQueryWidget} from 'sentry/utils/metrics/constants';
-import {MetricQueryType} from 'sentry/utils/metrics/types';
+import {
+ MetricDisplayType,
+ MetricQueryType,
+ type MetricWidgetQueryParams,
+} from 'sentry/utils/metrics/types';
import {parseMetricWidgetsQueryParam} from 'sentry/views/ddm/utils/parseMetricWidgetsQueryParam';
+function testParsing(input: any, result: MetricWidgetQueryParams[]) {
+ expect(parseMetricWidgetsQueryParam(JSON.stringify(input))).toStrictEqual(result);
+}
+
describe('parseMetricWidgetQueryParam', () => {
const defaultState = [{...emptyMetricsQueryWidget, id: 0}];
it('returns default widget for invalid param', () => {
- expect(parseMetricWidgetsQueryParam(undefined)).toStrictEqual(defaultState);
- expect(parseMetricWidgetsQueryParam('')).toStrictEqual(defaultState);
- expect(parseMetricWidgetsQueryParam('{}')).toStrictEqual(defaultState);
- expect(parseMetricWidgetsQueryParam('true')).toStrictEqual(defaultState);
- expect(parseMetricWidgetsQueryParam('2')).toStrictEqual(defaultState);
- expect(parseMetricWidgetsQueryParam('"test"')).toStrictEqual(defaultState);
+ testParsing(undefined, defaultState);
+ testParsing({}, defaultState);
+ testParsing(true, defaultState);
+ testParsing(2, defaultState);
+ testParsing('', defaultState);
+ testParsing('test', defaultState);
// empty array is not valid
- expect(parseMetricWidgetsQueryParam('[]')).toStrictEqual(defaultState);
+ testParsing([], defaultState);
});
it('returns a single widget', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {order: 'asc'},
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: undefined, order: 'asc'},
- },
- ]);
+ testParsing(
+ [
+ // INPUT
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: 'line',
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {order: 'asc'},
+ isHidden: true,
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: undefined, order: 'asc'},
+ isHidden: true,
+ },
+ ]
+ );
});
it('returns multiple widgets', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: 'avg', order: 'desc'},
- },
- {
- id: 1,
- type: MetricQueryType.QUERY,
- mri: 'd:custom/sentry.event_manager.save@second',
- op: 'avg',
- query: '',
- groupBy: ['event_type'],
- displayType: 'line',
- powerUserMode: false,
- focusedSeries: [{id: 'default', groupBy: {event_type: 'default'}}],
- sort: {name: 'sum', order: 'asc'},
- },
- {
- id: 2,
- type: MetricQueryType.FORMULA,
- formula: 'a + b',
- displayType: 'line',
- sort: {name: 'avg', order: 'desc'},
- focusedSeries: [],
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: 'avg', order: 'desc'},
- },
- {
- id: 1,
- type: MetricQueryType.QUERY,
- mri: 'd:custom/sentry.event_manager.save@second',
- op: 'avg',
- query: '',
- groupBy: ['event_type'],
- displayType: 'line',
- powerUserMode: false,
- focusedSeries: [{id: 'default', groupBy: {event_type: 'default'}}],
- sort: {name: 'sum', order: 'asc'},
- },
- {
- id: 2,
- type: MetricQueryType.FORMULA,
- formula: 'a + b',
- displayType: 'line',
- sort: {name: 'avg', order: 'desc'},
- focusedSeries: [],
- },
- ]);
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: 'line',
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: 'avg', order: 'desc'},
+ isHidden: true,
+ },
+ {
+ id: 1,
+ type: MetricQueryType.QUERY,
+ mri: 'd:custom/sentry.event_manager.save@second',
+ op: 'avg',
+ query: '',
+ groupBy: ['event_type'],
+ displayType: 'line',
+ powerUserMode: false,
+ focusedSeries: [{id: 'default', groupBy: {event_type: 'default'}}],
+ sort: {name: 'sum', order: 'asc'},
+ isHidden: false,
+ },
+ {
+ id: 2,
+ type: MetricQueryType.FORMULA,
+ formula: 'a + b',
+ displayType: 'line',
+ sort: {name: 'avg', order: 'desc'},
+ focusedSeries: [],
+ isHidden: true,
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: 'avg', order: 'desc'},
+ isHidden: true,
+ },
+ {
+ id: 1,
+ type: MetricQueryType.QUERY,
+ mri: 'd:custom/sentry.event_manager.save@second',
+ op: 'avg',
+ query: '',
+ groupBy: ['event_type'],
+ displayType: MetricDisplayType.LINE,
+ powerUserMode: false,
+ focusedSeries: [{id: 'default', groupBy: {event_type: 'default'}}],
+ sort: {name: 'sum', order: 'asc'},
+ isHidden: false,
+ },
+ {
+ id: 2,
+ type: MetricQueryType.FORMULA,
+ formula: 'a + b',
+ displayType: MetricDisplayType.LINE,
+ sort: {name: 'avg', order: 'desc'},
+ focusedSeries: [],
+ isHidden: true,
+ },
+ ]
+ );
});
it('falls back to defaults', () => {
// Missing values
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- mri: 'd:transactions/duration@millisecond',
- },
- {
- type: MetricQueryType.FORMULA,
- formula: 'a * 2',
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'avg',
- query: '',
- groupBy: [],
- displayType: 'line',
- focusedSeries: [],
- powerUserMode: false,
- sort: {name: undefined, order: 'asc'},
- },
- {
- id: 1,
- type: MetricQueryType.FORMULA,
- formula: 'a * 2',
- displayType: 'line',
- focusedSeries: [],
- sort: {name: undefined, order: 'asc'},
- },
- ]);
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ },
+ {
+ type: MetricQueryType.FORMULA,
+ formula: 'a * 2',
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'avg',
+ query: '',
+ groupBy: [],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [],
+ powerUserMode: false,
+ sort: {name: undefined, order: 'asc'},
+ isHidden: false,
+ },
+ {
+ id: 1,
+ type: MetricQueryType.FORMULA,
+ formula: 'a * 2',
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [],
+ sort: {name: undefined, order: 'asc'},
+ isHidden: false,
+ },
+ ]
+ );
// Invalid values
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 'invalid',
- type: 123,
- mri: 'd:transactions/duration@millisecond',
- op: 1,
- query: 12,
- groupBy: true,
- displayType: 'aasfcsdf',
- focusedSeries: {},
- powerUserMode: 1,
- sort: {name: 1, order: 'invalid'},
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'avg',
- query: '',
- groupBy: [],
- displayType: 'line',
- focusedSeries: [],
- powerUserMode: false,
- sort: {name: undefined, order: 'asc'},
- },
- ]);
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 'invalid',
+ type: 123,
+ mri: 'd:transactions/duration@millisecond',
+ op: 1,
+ query: 12,
+ groupBy: true,
+ displayType: 'aasfcsdf',
+ focusedSeries: {},
+ powerUserMode: 1,
+ sort: {name: 1, order: 'invalid'},
+ isHidden: 'foo',
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'avg',
+ query: '',
+ groupBy: [],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [],
+ powerUserMode: false,
+ sort: {name: undefined, order: 'asc'},
+ isHidden: false,
+ },
+ ]
+ );
});
it('ignores invalid widgets', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 0,
- mri: 'd:transactions/duration@millisecond',
- },
- {
- // Missing MRI
- },
- {
- // Mallformed MRI
- mri: 'transactions/duration@millisecond',
- },
- {
- // Duplicate id
- id: 0,
- mri: 'd:transactions/duration@second',
- },
- {
- // Missing formula
- type: MetricQueryType.FORMULA,
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'avg',
- query: '',
- groupBy: [],
- displayType: 'line',
- focusedSeries: [],
- powerUserMode: false,
- sort: {name: undefined, order: 'asc'},
- },
- ]);
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 0,
+ mri: 'd:transactions/duration@millisecond',
+ },
+ {
+ // Missing MRI
+ },
+ {
+ // Mallformed MRI
+ mri: 'transactions/duration@millisecond',
+ },
+ {
+ // Duplicate id
+ id: 0,
+ mri: 'd:transactions/duration@second',
+ },
+ {
+ // Missing formula
+ type: MetricQueryType.FORMULA,
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'avg',
+ query: '',
+ groupBy: [],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [],
+ powerUserMode: false,
+ sort: {name: undefined, order: 'asc'},
+ isHidden: false,
+ },
+ ]
+ );
});
it('returns default widget if there is no valid widget', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- // Missing MRI
- },
- {
- // Missing formula
- type: MetricQueryType.FORMULA,
- },
- ])
- )
- ).toStrictEqual(defaultState);
+ testParsing(
+ // INPUT
+ [
+ {
+ // Missing MRI
+ },
+ {
+ // Missing formula
+ type: MetricQueryType.FORMULA,
+ },
+ ],
+ // RESULT
+ defaultState
+ );
});
it('handles missing array in array params', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: 'dist',
- displayType: 'line',
- focusedSeries: {id: 'default', groupBy: {dist: 'default'}},
- powerUserMode: true,
- sort: {order: 'asc'},
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: 'dist',
+ displayType: 'line',
+ focusedSeries: {id: 'default', groupBy: {dist: 'default'}},
+ powerUserMode: true,
+ sort: {order: 'asc'},
+ isHidden: false,
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: undefined, order: 'asc'},
+ isHidden: false,
+ },
+ ]
+ );
+ });
+
+ it('adds missing ids', () => {
+ function widgetWithId<T extends number | undefined>(id: T) {
+ return {
+ id,
+ type: MetricQueryType.QUERY as const,
+ mri: 'd:transactions/duration@millisecond' as const,
+ op: 'sum' as const,
query: 'test:query',
groupBy: ['dist'],
- displayType: 'line',
+ displayType: MetricDisplayType.LINE,
focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
powerUserMode: true,
- sort: {name: undefined, order: 'asc'},
- },
- ]);
- });
+ sort: {name: 'avg' as const, order: 'desc' as const},
+ isHidden: false,
+ };
+ }
- it('adds missing ids', () => {
- const widgetWithId = (id: number | undefined) => ({
- id,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: 'avg', order: 'desc'},
- });
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- widgetWithId(0),
- widgetWithId(undefined),
- widgetWithId(2),
- {
- // Invalid widget
- },
- widgetWithId(undefined),
- widgetWithId(3),
- ])
- )
- ).toStrictEqual([
- widgetWithId(0),
- widgetWithId(1),
- widgetWithId(2),
- widgetWithId(4),
- widgetWithId(3),
- ]);
+ testParsing(
+ // INPUT
+ [
+ widgetWithId(0),
+ widgetWithId(undefined),
+ widgetWithId(2),
+ {
+ // Invalid widget
+ },
+ widgetWithId(undefined),
+ widgetWithId(3),
+ ],
+ // RESULT
+ [
+ widgetWithId(0),
+ widgetWithId(1),
+ widgetWithId(2),
+ widgetWithId(4),
+ widgetWithId(3),
+ ]
+ );
});
it('resets the id of a single widget to 0', () => {
- expect(
- parseMetricWidgetsQueryParam(
- JSON.stringify([
- {
- id: 5,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: 'avg', order: 'desc'},
- },
- ])
- )
- ).toStrictEqual([
- {
- id: 0,
- type: MetricQueryType.QUERY,
- mri: 'd:transactions/duration@millisecond',
- op: 'sum',
- query: 'test:query',
- groupBy: ['dist'],
- displayType: 'line',
- focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
- powerUserMode: true,
- sort: {name: 'avg', order: 'desc'},
- },
- ]);
+ testParsing(
+ // INPUT
+ [
+ {
+ id: 5,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: 'line',
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: 'avg', order: 'desc'},
+ isHidden: false,
+ },
+ ],
+ // RESULT
+ [
+ {
+ id: 0,
+ type: MetricQueryType.QUERY,
+ mri: 'd:transactions/duration@millisecond',
+ op: 'sum',
+ query: 'test:query',
+ groupBy: ['dist'],
+ displayType: MetricDisplayType.LINE,
+ focusedSeries: [{id: 'default', groupBy: {dist: 'default'}}],
+ powerUserMode: true,
+ sort: {name: 'avg', order: 'desc'},
+ isHidden: false,
+ },
+ ]
+ );
});
});
diff --git a/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.tsx b/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.tsx
index a6db62f6a7829a..5246e600c0c8a7 100644
--- a/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.tsx
+++ b/static/app/views/ddm/utils/parseMetricWidgetsQueryParam.tsx
@@ -214,6 +214,7 @@ export function parseMetricWidgetsQueryParam(
: MetricDisplayType.LINE,
focusedSeries: parseArrayParam(widget, 'focusedSeries', parseFocusedSeries),
sort: parseSortParam(widget, 'sort'),
+ isHidden: parseBooleanParam(widget, 'isHidden') ?? false,
};
switch (type) {
diff --git a/static/app/views/ddm/utils/useStructuralSharing.tsx b/static/app/views/ddm/utils/useStructuralSharing.tsx
index 4f6deb0323b74e..e052fc6d37a52d 100644
--- a/static/app/views/ddm/utils/useStructuralSharing.tsx
+++ b/static/app/views/ddm/utils/useStructuralSharing.tsx
@@ -56,11 +56,11 @@ export function structuralSharing<T>(oldValue: T, newValue: T): T {
return newValue;
}
-export const useStructuralSharing = (value: any) => {
- const previeousValue = useRef<any>(value);
+export function useStructuralSharing<T>(value: T): T {
+ const previousValue = useRef<T>(value);
return useMemo(() => {
- const newValue = structuralSharing(previeousValue.current, value);
- previeousValue.current = newValue;
+ const newValue = structuralSharing(previousValue.current, value);
+ previousValue.current = newValue;
return newValue;
}, [value]);
-};
+}
|
29adfe3a7a34f1fb8551efe665234cfcfdf96b84
|
2019-02-08 04:36:22
|
Dan Fuller
|
fix(api): First `first_seen` being null in `GroupSerializerSnuba` when all environments selected
| false
|
First `first_seen` being null in `GroupSerializerSnuba` when all environments selected
|
fix
|
diff --git a/src/sentry/api/serializers/models/group.py b/src/sentry/api/serializers/models/group.py
index bd490d3f6ba0c5..be852c85e7ff91 100644
--- a/src/sentry/api/serializers/models/group.py
+++ b/src/sentry/api/serializers/models/group.py
@@ -560,7 +560,7 @@ def _get_seen_stats(self, item_list, user):
first_seen = {}
last_seen = {}
times_seen = {}
- if self.environment_ids is None:
+ if not self.environment_ids:
# use issue fields
for item in item_list:
first_seen[item.id] = item.first_seen
diff --git a/tests/snuba/api/serializers/test_group.py b/tests/snuba/api/serializers/test_group.py
index 1b3396ddc6cfb2..740c510de14174 100644
--- a/tests/snuba/api/serializers/test_group.py
+++ b/tests/snuba/api/serializers/test_group.py
@@ -299,7 +299,7 @@ def test_seen_stats(self):
group = self.create_group(first_seen=self.week_ago, times_seen=5)
# should use group columns when no environments arg passed
- result = serialize(group, serializer=GroupSerializerSnuba())
+ result = serialize(group, serializer=GroupSerializerSnuba(environment_ids=[]))
assert result['count'] == '5'
assert result['lastSeen'] == group.last_seen
assert result['firstSeen'] == group.first_seen
|
065a3a423b9512d9d0a0f2befa45acab31b653da
|
2024-05-16 22:11:42
|
Katie Byers
|
ref(grouping): Change hash calculation metric tag value (#70961)
| false
|
Change hash calculation metric tag value (#70961)
|
ref
|
diff --git a/src/sentry/event_manager.py b/src/sentry/event_manager.py
index 7ed50d0086df72..9447037f2f37aa 100644
--- a/src/sentry/event_manager.py
+++ b/src/sentry/event_manager.py
@@ -1496,7 +1496,7 @@ def _save_aggregate(
record_calculation_metric_with_result(
project=project,
has_secondary_hashes=has_secondary_hashes,
- result="new_group",
+ result="no_match",
)
metrics.incr(
@@ -1639,7 +1639,7 @@ def _save_aggregate_new(
group_info = create_group_with_grouphashes(
job, all_grouphashes, group_processing_kwargs
)
- result = "new_group"
+ result = "no_match"
# From here on out, we're just doing housekeeping
diff --git a/tests/sentry/event_manager/grouping/test_assign_to_group.py b/tests/sentry/event_manager/grouping/test_assign_to_group.py
index 32f9952e0b1bb6..383f9b246d2d23 100644
--- a/tests/sentry/event_manager/grouping/test_assign_to_group.py
+++ b/tests/sentry/event_manager/grouping/test_assign_to_group.py
@@ -297,7 +297,7 @@ def test_new_group(
"secondary_grouphash_existed_already": False,
"primary_grouphash_exists_now": True,
"secondary_grouphash_exists_now": True,
- "result_tag_value_for_metrics": "new_group",
+ "result_tag_value_for_metrics": "no_match",
# Moot since no existing group was passed
"event_assigned_to_given_existing_group": None,
}
@@ -309,7 +309,7 @@ def test_new_group(
"new_group_created": True,
"primary_grouphash_existed_already": False,
"primary_grouphash_exists_now": True,
- "result_tag_value_for_metrics": "new_group",
+ "result_tag_value_for_metrics": "no_match",
# The rest are moot since no existing group was passed and no secondary hash was
# calculated.
"event_assigned_to_given_existing_group": None,
@@ -375,7 +375,7 @@ def test_existing_group_no_new_hash(
"event_assigned_to_given_existing_group": False,
"primary_grouphash_existed_already": False,
"primary_grouphash_exists_now": True,
- "result_tag_value_for_metrics": "new_group",
+ "result_tag_value_for_metrics": "no_match",
# The rest are moot since no secondary hash was calculated.
"hashes_different": None,
"secondary_hash_found": None,
|
fed08de151f7db08d1ef275ff513d9457fa59d41
|
2022-07-11 20:45:31
|
Matej Minar
|
feat(sampling): Add ability to activate rule without SDKs updated [TET-211] (#36510)
| false
|
Add ability to activate rule without SDKs updated [TET-211] (#36510)
|
feat
|
diff --git a/static/app/views/settings/project/server-side-sampling/rule.tsx b/static/app/views/settings/project/server-side-sampling/rule.tsx
index b9c5d5d1c896f2..9e75b517106caf 100644
--- a/static/app/views/settings/project/server-side-sampling/rule.tsx
+++ b/static/app/views/settings/project/server-side-sampling/rule.tsx
@@ -55,7 +55,7 @@ export function Rule({
}: Props) {
const isUniform = isUniformRule(rule);
const canDelete = !noPermission && !isUniform;
- const canActivate = !upgradeSdkForProjects.length;
+ const canActivate = true; // TODO(sampling): Enabling this for demo purposes, change this back to `!upgradeSdkForProjects.length;` for LA
const canDrag = !isUniform && !noPermission;
return (
diff --git a/tests/js/spec/views/settings/project/server-side-sampling/index.spec.tsx b/tests/js/spec/views/settings/project/server-side-sampling/index.spec.tsx
index 842b7de22a79cc..decea0d79a2085 100644
--- a/tests/js/spec/views/settings/project/server-side-sampling/index.spec.tsx
+++ b/tests/js/spec/views/settings/project/server-side-sampling/index.spec.tsx
@@ -255,7 +255,8 @@ describe('Server-side Sampling', function () {
).toBeInTheDocument();
});
- it('does not let the user activate a rule if sdk updates exists', async function () {
+ // eslint-disable-next-line jest/no-disabled-tests
+ it.skip('does not let the user activate a rule if sdk updates exists', async function () {
const {organization, router, project} = getMockData({
projects: [
TestStubs.Project({
|
1fd50d2cb3e4ada56f5f3f02dfda6297c2889439
|
2020-04-16 18:18:02
|
Priscila Oliveira
|
fix(style): fixed breadcrumb table info style (#18310)
| false
|
fixed breadcrumb table info style (#18310)
|
fix
|
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/httpRenderer.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/httpRenderer.tsx
index 4154e46ad1b59f..24008f6fe40988 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/httpRenderer.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/httpRenderer.tsx
@@ -25,7 +25,7 @@ const HttpRenderer = ({breadcrumb}: Props) => {
{url}
</ExternalLink>
) : (
- <em>{url}</em>
+ <span>{url}</span>
);
}
|
ba54fd9509e20b5c0b1d750226db9379823b3821
|
2025-02-24 22:43:27
|
Michael Sun
|
fix(issue-views): Fix copy pasting links not working (#85751)
| false
|
Fix copy pasting links not working (#85751)
|
fix
|
diff --git a/static/app/views/issueList/issueViewsHeader.tsx b/static/app/views/issueList/issueViewsHeader.tsx
index 455fd47ded6dc1..776526fd884c3d 100644
--- a/static/app/views/issueList/issueViewsHeader.tsx
+++ b/static/app/views/issueList/issueViewsHeader.tsx
@@ -217,41 +217,40 @@ function IssueViewsIssueListHeaderTabsContent({
environments,
timeFilters,
} = views[0]!;
- if (queryProjects || queryTimeFilters) {
- navigate(
- normalizeUrl({
- ...location,
- query: {
- ...router.location.query,
- viewId: id,
- query: query ?? viewQuery,
- sort: sort ?? querySort,
- project: queryProjects ?? projects,
- environment: queryEnvs ?? environments,
- ...normalizeDateTimeParams(queryTimeFilters ?? timeFilters),
- },
- }),
- {replace: true}
- );
- tabListState?.setSelectedKey(views[0]!.key);
- return;
- }
if (!query && !sort) {
- navigate(
- normalizeUrl({
- ...location,
- query: {
- ...router.location.query,
- viewId: id,
- query: viewQuery,
- sort: querySort,
- project: projects,
- environment: environments,
- ...normalizeDateTimeParams(timeFilters),
- },
- }),
- {replace: true}
- );
+ if (queryProjects || queryTimeFilters) {
+ navigate(
+ normalizeUrl({
+ ...location,
+ query: {
+ ...router.location.query,
+ viewId: id,
+ query: query ?? viewQuery,
+ sort: sort ?? querySort,
+ project: queryProjects ?? projects,
+ environment: queryEnvs ?? environments,
+ ...normalizeDateTimeParams(queryTimeFilters ?? timeFilters),
+ },
+ }),
+ {replace: true}
+ );
+ } else {
+ navigate(
+ normalizeUrl({
+ ...location,
+ query: {
+ ...router.location.query,
+ viewId: id,
+ query: viewQuery,
+ sort: querySort,
+ project: projects,
+ environment: environments,
+ ...normalizeDateTimeParams(timeFilters),
+ },
+ }),
+ {replace: true}
+ );
+ }
tabListState?.setSelectedKey(views[0]!.key);
return;
}
|
275cae3925ae7b05c177782595c0fdc55368b7e1
|
2022-05-07 08:33:44
|
Dublin Anondson
|
feat(replays): Render playback speed options in a dropdown, and add slower options(#34308)
| false
|
Render playback speed options in a dropdown, and add slower options(#34308)
|
feat
|
diff --git a/static/app/components/replays/replayController.tsx b/static/app/components/replays/replayController.tsx
index f4f53afa8aab4d..f9fec19fa9de60 100644
--- a/static/app/components/replays/replayController.tsx
+++ b/static/app/components/replays/replayController.tsx
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
import Button from 'sentry/components/button';
import ButtonBar from 'sentry/components/buttonBar';
+import CompactSelect from 'sentry/components/forms/compactSelect';
import {useReplayContext} from 'sentry/components/replays/replayContext';
import useFullscreen from 'sentry/components/replays/useFullscreen';
import {IconArrow, IconPause, IconPlay, IconRefresh, IconResize} from 'sentry/icons';
@@ -60,27 +61,28 @@ function ReplayCurrentTime() {
function ReplayPlaybackSpeed({speedOptions}: {speedOptions: number[]}) {
const {setSpeed, speed} = useReplayContext();
-
return (
- <ButtonBar active={String(speed)} merged>
- {speedOptions.map(opt => (
- <Button
- key={opt}
- size="xsmall"
- barId={String(opt)}
- onClick={() => setSpeed(opt)}
- title={t('Set playback speed to %s', `${opt}x`)}
- >
- {opt}x
- </Button>
- ))}
- </ButtonBar>
+ <CompactSelect
+ triggerProps={{
+ size: 'xsmall',
+ prefix: t('Speed'),
+ }}
+ value={speed}
+ options={speedOptions.map(speedOption => ({
+ value: speedOption,
+ label: `${speedOption}x`,
+ disabled: speedOption === speed,
+ }))}
+ onChange={opt => {
+ setSpeed(opt.value);
+ }}
+ />
);
}
const ReplayControls = ({
toggleFullscreen = () => {},
- speedOptions = [0.5, 1, 2, 4],
+ speedOptions = [0.1, 0.25, 0.5, 1, 2, 4],
}: Props) => {
const {isFullscreen} = useFullscreen();
const {isSkippingInactive, toggleSkipInactive} = useReplayContext();
|
a857d249a9d85aaccf6fcdef04b4fc596109ec12
|
2022-03-24 11:42:36
|
Evan Purkhiser
|
style(storybook): Disable no-anonymous-default-export rule (#32897)
| false
|
Disable no-anonymous-default-export rule (#32897)
|
style
|
diff --git a/docs-ui/.eslintrc.js b/docs-ui/.eslintrc.js
index 4453ef8881cde9..96ec2ed876f513 100644
--- a/docs-ui/.eslintrc.js
+++ b/docs-ui/.eslintrc.js
@@ -16,4 +16,16 @@ module.exports = {
},
'import/extensions': ['.js', '.jsx'],
},
+ overrides: [
+ {
+ files: ['**/*.stories.js'],
+ rules: {
+ // XXX(epurkhiser): The storybook CSF requires anonymous default
+ // exportsthis, see [0].
+ //
+ // [0]: https://github.com/storybookjs/storybook/issues/12914
+ 'import/no-anonymous-default-export': 'off',
+ },
+ },
+ ],
};
|
f438bc037d1e9a42122de626eae6d40e687c0254
|
2022-07-30 01:16:17
|
Dameli Ushbayeva
|
feat(perf-issues): Update the span tree error message (#37265)
| false
|
Update the span tree error message (#37265)
|
feat
|
diff --git a/static/app/components/events/interfaces/spans/embeddedSpanTree.tsx b/static/app/components/events/interfaces/spans/embeddedSpanTree.tsx
index ad15d1b735d802..48b8cce650b6bb 100644
--- a/static/app/components/events/interfaces/spans/embeddedSpanTree.tsx
+++ b/static/app/components/events/interfaces/spans/embeddedSpanTree.tsx
@@ -52,7 +52,9 @@ export function EmbeddedSpanTree(props: Props) {
}
if (!results.currentEvent) {
- return <LoadingError />;
+ return (
+ <LoadingError message="Error loading the span tree because the root transaction is missing." />
+ );
}
return (
@@ -69,7 +71,9 @@ export function EmbeddedSpanTree(props: Props) {
}
if (!_results.tableData) {
- return <LoadingError />;
+ return (
+ <LoadingError message="Error loading the span tree because the root transaction is missing." />
+ );
}
return (
@@ -103,9 +107,9 @@ export const Wrapper = styled('div')`
border-radius: ${p => p.theme.borderRadius};
margin: 0;
/* Padding aligns with Layout.Body */
- padding: ${space(3)} ${space(2)} ${space(2)};
+ padding: ${space(3)} 0 ${space(2)};
@media (min-width: ${p => p.theme.breakpoints.medium}) {
- padding: ${space(3)} ${space(4)} ${space(3)};
+ padding: ${space(3)} 0 ${space(3)};
}
& h3,
& h3 a {
|
638c2ea98a18d1504b43121e74376caa842a3060
|
2024-04-25 23:42:56
|
Jonas
|
fix(trace): add tab separator (#69671)
| false
|
add tab separator (#69671)
|
fix
|
diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx
index 47f71ac50b3bd4..ae94a638c16a35 100644
--- a/static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx
+++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx
@@ -59,6 +59,9 @@ const Title = styled(FlexBox)`
gap: ${space(1)};
flex: none;
width: 50%;
+ > span {
+ min-width: 30px;
+ }
`;
const TitleText = styled('div')`
@@ -89,6 +92,7 @@ const Table = styled('table')`
const IconTitleWrapper = styled(FlexBox)`
gap: ${space(1)};
+ min-width: 30px;
`;
const IconBorder = styled('div')<{backgroundColor: string; errored?: boolean}>`
diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
index 6a02a2a5858439..6f8ea5cf375bb8 100644
--- a/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
+++ b/static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx
@@ -355,6 +355,7 @@ export function TraceDrawer(props: TraceDrawerProps) {
onClick={onMinimizeClick}
trace_state={props.trace_state}
/>
+ <TabSeparator />
</TabLayoutControlItem>
</TabActions>
<TabsContainer
@@ -663,9 +664,25 @@ const TabActions = styled('ul')`
}
`;
+const TabSeparator = styled('span')`
+ display: inline-block;
+ margin-left: ${space(0.5)};
+ margin-right: ${space(0.5)};
+ height: 16px;
+ width: 1px;
+ background-color: ${p => p.theme.border};
+ position: absolute;
+ top: 50%;
+ right: 0;
+ transform: translateY(-50%);
+`;
+
const TabLayoutControlItem = styled('li')`
display: inline-block;
margin: 0;
+ position: relative;
+ z-index: 10;
+ background-color: ${p => p.theme.backgroundSecondary};
`;
const Tab = styled('li')`
@@ -678,16 +695,16 @@ const Tab = styled('li')`
position: relative;
&.Static + li:not(.Static) {
- margin-left: ${space(2)};
+ margin-left: 10px;
&:after {
display: block;
content: '';
position: absolute;
- left: -14px;
+ left: -10px;
top: 50%;
transform: translateY(-50%);
- height: 72%;
+ height: 16px;
width: 1px;
background-color: ${p => p.theme.border};
}
|
74708bfc23af4bb8563deffb4a9107d2973f6b7a
|
2021-03-04 17:36:14
|
Markus Unterwaditzer
|
feat: Add killswitch for race free group creation, part 2 (#24237)
| false
|
Add killswitch for race free group creation, part 2 (#24237)
|
feat
|
diff --git a/src/sentry/event_manager.py b/src/sentry/event_manager.py
index 21a673baeef77f..31ec6d5ff91e4f 100644
--- a/src/sentry/event_manager.py
+++ b/src/sentry/event_manager.py
@@ -11,7 +11,7 @@
from pytz import UTC
import sentry_sdk
-from sentry import buffer, eventstore, eventtypes, eventstream, features, tsdb
+from sentry import buffer, eventstore, eventtypes, eventstream, features, tsdb, options
from sentry.attachments import MissingAttachmentChunks, attachment_cache
from sentry.constants import (
DataCategory,
@@ -398,7 +398,8 @@ def save(self, project_id, raw=False, assume_normalized=False, start_time=None,
save_aggregate_fn = (
_save_aggregate2
- if features.has("projects:race-free-group-creation", project)
+ if not options.get("store.race-free-group-creation-force-disable")
+ and features.has("projects:race-free-group-creation", project)
else _save_aggregate
)
|
bb78eb725c8d6152e4a96b1c929ff4664f3faa4a
|
2018-02-01 04:02:22
|
Matt Robenolt
|
fix: Don't use absolute_uri within blocktrans
| false
|
Don't use absolute_uri within blocktrans
|
fix
|
diff --git a/src/sentry/templates/sentry/plugins/bases/issue/not_configured.html b/src/sentry/templates/sentry/plugins/bases/issue/not_configured.html
index ca553e500404ff..0ab0e3533e4fe1 100644
--- a/src/sentry/templates/sentry/plugins/bases/issue/not_configured.html
+++ b/src/sentry/templates/sentry/plugins/bases/issue/not_configured.html
@@ -19,7 +19,8 @@ <h3>{{ title }}</h3>
{% endfor %}
</ul>
{% else %}
- <p>{% blocktrans %}You still need to<a href="{% absolute_uri '/{}/{}/settings/plugins/{}/' project.organization.slug project.slug p.slug %}">configure this plugin</a>
+ {% absolute_uri '/{}/{}/settings/plugins/{}/' project.organization.slug project.slug p.slug as link %}
+ <p>{% blocktrans %}You still need to <a href="{{ link }}">configure this plugin</a>
before you can use it.{% endblocktrans %}
</p>
{% endif %}
|
8d54d80f66e7a592c196e19626f31bfcb7665207
|
2023-07-18 22:11:42
|
Malachi Willey
|
feat(helpful-event): Temporarily remove trace.sampled from sort (#53065)
| false
|
Temporarily remove trace.sampled from sort (#53065)
|
feat
|
diff --git a/src/sentry/models/group.py b/src/sentry/models/group.py
index 105a6e8faf6e2e..bda09f8ece1257 100644
--- a/src/sentry/models/group.py
+++ b/src/sentry/models/group.py
@@ -202,7 +202,6 @@ class EventOrdering(Enum):
"-replayId",
"-profile.id",
"num_processing_errors",
- "-trace.sampled",
"-timestamp",
]
|
c2a2c54a1316e9f36f26b63aed3aed0526697d0b
|
2024-11-20 02:29:50
|
Michael Sun
|
chore(rollback): register settings for rollback (#81000)
| false
|
register settings for rollback (#81000)
|
chore
|
diff --git a/src/sentry/features/temporary.py b/src/sentry/features/temporary.py
index 5b25083f3d2bf8..a766669218860a 100644
--- a/src/sentry/features/temporary.py
+++ b/src/sentry/features/temporary.py
@@ -370,6 +370,8 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:reprocessing-v2", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
# Enable Sentry's 2024 Rollback feature
manager.add("organizations:sentry-rollback-2024", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
+ # Enable Sentry's 2024 Rollback toggle within organization settings
+ manager.add("organizations:sentry-rollback-settings", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable resolve in upcoming release
# TODO(steve): Remove when we remove the feature from the UI
manager.add("organizations:resolve-in-upcoming-release", OrganizationFeature, FeatureHandlerStrategy.OPTIONS, api_expose=True)
|
86692a13fb861709f103638e137e4784adb6523a
|
2025-03-12 23:29:54
|
Malachi Willey
|
fix(query-builder): Place focus in correct location after deleting a token with mouse (#86908)
| false
|
Place focus in correct location after deleting a token with mouse (#86908)
|
fix
|
diff --git a/static/app/components/searchQueryBuilder/hooks/useQueryBuilderState.tsx b/static/app/components/searchQueryBuilder/hooks/useQueryBuilderState.tsx
index d8bcbb5f5608d1..5393467e0023ad 100644
--- a/static/app/components/searchQueryBuilder/hooks/useQueryBuilderState.tsx
+++ b/static/app/components/searchQueryBuilder/hooks/useQueryBuilderState.tsx
@@ -115,13 +115,6 @@ export type QueryBuilderActions =
| MultiSelectFilterValueAction
| DeleteLastMultiSelectFilterValueAction;
-function removeQueryToken(query: string, token: TokenResult<Token>): string {
- return removeExcessWhitespaceFromParts(
- query.substring(0, token.location.start.offset),
- query.substring(token.location.end.offset)
- );
-}
-
function removeQueryTokensFromQuery(
query: string,
tokens: Array<TokenResult<Token>>
@@ -318,21 +311,38 @@ function updateFreeText(
function replaceTokensWithText(
state: QueryBuilderState,
- action: ReplaceTokensWithTextAction,
- getFieldDefinition: FieldDefinitionGetter
+ {
+ getFieldDefinition,
+ text,
+ tokens,
+ focusOverride: incomingFocusOverride,
+ }: {
+ getFieldDefinition: FieldDefinitionGetter;
+ text: string;
+ tokens: Array<TokenResult<Token>>;
+ focusOverride?: FocusOverride;
+ }
): QueryBuilderState {
- const newQuery = replaceTokensWithPadding(state.query, action.tokens, action.text);
- const cursorPosition =
- (action.tokens[0]?.location.start.offset ?? 0) + action.text.length; // TODO: Ensure this is sorted
+ const newQuery = replaceTokensWithPadding(state.query, tokens, text);
+
+ if (incomingFocusOverride) {
+ return {
+ ...state,
+ query: newQuery,
+ focusOverride: incomingFocusOverride,
+ };
+ }
+
+ const cursorPosition = (tokens[0]?.location.start.offset ?? 0) + text.length; // TODO: Ensure this is sorted
const newParsedQuery = parseQueryBuilderValue(newQuery, getFieldDefinition);
const focusedToken = newParsedQuery?.find(
(token: any) =>
token.type === Token.FREE_TEXT && token.location.end.offset >= cursorPosition
);
- const focusOverride =
- action.focusOverride ??
- (focusedToken ? {itemKey: makeTokenKey(focusedToken, newParsedQuery)} : null);
+ const focusOverride = focusedToken
+ ? {itemKey: makeTokenKey(focusedToken, newParsedQuery)}
+ : null;
return {
...state,
@@ -499,16 +509,22 @@ export function useQueryBuilderState({
focusOverride: null,
};
case 'DELETE_TOKEN':
- return {
- ...state,
- query: removeQueryToken(state.query, action.token),
- };
+ return replaceTokensWithText(state, {
+ tokens: [action.token],
+ text: '',
+ getFieldDefinition,
+ });
case 'DELETE_TOKENS':
return deleteQueryTokens(state, action);
case 'UPDATE_FREE_TEXT':
return updateFreeText(state, action);
case 'REPLACE_TOKENS_WITH_TEXT':
- return replaceTokensWithText(state, action, getFieldDefinition);
+ return replaceTokensWithText(state, {
+ tokens: action.tokens,
+ text: action.text,
+ focusOverride: action.focusOverride,
+ getFieldDefinition,
+ });
case 'UPDATE_FILTER_KEY':
return {
...state,
diff --git a/static/app/components/searchQueryBuilder/index.spec.tsx b/static/app/components/searchQueryBuilder/index.spec.tsx
index ee968658f08297..26388c9e471c24 100644
--- a/static/app/components/searchQueryBuilder/index.spec.tsx
+++ b/static/app/components/searchQueryBuilder/index.spec.tsx
@@ -612,6 +612,11 @@ describe('SearchQueryBuilder', function () {
screen.queryByRole('row', {name: 'browser.name:firefox'})
).not.toBeInTheDocument();
+ // Focus should be at the beginning of the query
+ expect(
+ screen.getAllByRole('combobox', {name: 'Add a search term'})[0]
+ ).toHaveFocus();
+
// Custom tag token should still be present
expect(screen.getByRole('row', {name: 'custom_tag_name:123'})).toBeInTheDocument();
});
|
077506b75c41e935c21ee3050936c924c7ca2fa1
|
2018-04-07 04:21:48
|
adhiraj
|
feat(onboarding): Log search results for platform picker (#7965)
| false
|
Log search results for platform picker (#7965)
|
feat
|
diff --git a/src/sentry/static/sentry/app/views/onboarding/project/platformpicker.jsx b/src/sentry/static/sentry/app/views/onboarding/project/platformpicker.jsx
index 5a8cc1398b5866..3d9520097af3d8 100644
--- a/src/sentry/static/sentry/app/views/onboarding/project/platformpicker.jsx
+++ b/src/sentry/static/sentry/app/views/onboarding/project/platformpicker.jsx
@@ -1,11 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
+import _ from 'lodash';
import ListLink from '../../../components/listLink';
import {flattenedPlatforms, categoryList} from '../utils';
import PlatformCard from './platformCard';
import {t} from '../../../locale';
+import HookStore from '../../../stores/hookStore';
const allCategories = categoryList.concat({id: 'all', name: t('All')});
@@ -26,58 +28,42 @@ class PlatformPicker extends React.Component {
};
}
- renderPlatformList = () => {
- let {tab} = this.state;
- const currentCategory = categoryList.find(({id}) => id === tab);
-
- const tabSubset = flattenedPlatforms.filter(platform => {
- return tab === 'all' || currentCategory.platforms.includes(platform.id);
- });
+ logSearch = _.debounce(() => {
+ if (this.state.filter) {
+ HookStore.get('analytics:event').forEach(cb =>
+ cb('platformpicker.search', {
+ query: this.state.filter.toLowerCase(),
+ num_results: this.getPlatformList().length,
+ })
+ );
+ }
+ }, 300);
+ getPlatformList = () => {
let subsetMatch = ({id}) => id.includes(this.state.filter.toLowerCase());
-
- let filtered = tabSubset.filter(subsetMatch);
+ let filtered;
if (this.state.filter) {
filtered = flattenedPlatforms.filter(subsetMatch);
+ } else {
+ let {tab} = this.state;
+ const currentCategory = categoryList.find(({id}) => id === tab);
+ const tabSubset = flattenedPlatforms.filter(platform => {
+ return tab === 'all' || currentCategory.platforms.includes(platform.id);
+ });
+ filtered = tabSubset.filter(subsetMatch);
}
if (!this.props.showOther) {
filtered = filtered.filter(({id}) => id !== 'other');
}
- if (!filtered.length) {
- return (
- <p>
- {t(
- "Not finding your platform? There's a rich ecosystem of community supported SDKs as well (including Perl, CFML, Clojure, and ActionScript).\n Try searching for Sentry clients or contacting support."
- )}
- </p>
- );
- }
-
- return (
- <ul className="client-platform-list platform-tiles">
- {filtered.map((platform, idx) => {
- return (
- <PlatformCard
- platform={platform.id}
- className={classnames({
- selected: this.props.platform === platform.id,
- })}
- key={platform.id}
- onClick={() => {
- this.props.setPlatform(platform.id);
- }}
- />
- );
- })}
- </ul>
- );
+ return filtered;
};
render() {
let {filter} = this.state;
+ let filtered = this.getPlatformList();
return (
<div className="platform-picker">
<ul className="nav nav-tabs">
@@ -90,7 +76,7 @@ class PlatformPicker extends React.Component {
className="platform-filter"
label={t('Filter')}
placeholder="Filter"
- onChange={e => this.setState({filter: e.target.value})}
+ onChange={e => this.setState({filter: e.target.value}, this.logSearch)}
/>
</div>
</li>
@@ -110,7 +96,30 @@ class PlatformPicker extends React.Component {
);
})}
</ul>
- {this.renderPlatformList()}
+ {filtered.length ? (
+ <ul className="client-platform-list platform-tiles">
+ {filtered.map((platform, idx) => {
+ return (
+ <PlatformCard
+ platform={platform.id}
+ className={classnames({
+ selected: this.props.platform === platform.id,
+ })}
+ key={platform.id}
+ onClick={() => {
+ this.props.setPlatform(platform.id);
+ }}
+ />
+ );
+ })}
+ </ul>
+ ) : (
+ <p>
+ {t(
+ "Not finding your platform? There's a rich ecosystem of community supported SDKs as well (including Perl, CFML, Clojure, and ActionScript).\n Try searching for Sentry clients or contacting support."
+ )}
+ </p>
+ )}
</div>
);
}
|
5d051abc81c9ee59a5524f3dbb8a2210a0ab439d
|
2024-12-03 21:51:29
|
Dan Fuller
|
fix(crons): Fix slow query for crons incident system (#81380)
| false
|
Fix slow query for crons incident system (#81380)
|
fix
|
diff --git a/migrations_lockfile.txt b/migrations_lockfile.txt
index 72c74fd2e70767..12164df5ebdb2b 100644
--- a/migrations_lockfile.txt
+++ b/migrations_lockfile.txt
@@ -15,7 +15,7 @@ remote_subscriptions: 0003_drop_remote_subscription
replays: 0004_index_together
-sentry: 0798_add_favorite_dashboard_col
+sentry: 0799_cron_incident_index
social_auth: 0002_default_auto_field
diff --git a/src/sentry/migrations/0799_cron_incident_index.py b/src/sentry/migrations/0799_cron_incident_index.py
new file mode 100644
index 00000000000000..73f4d4c8972715
--- /dev/null
+++ b/src/sentry/migrations/0799_cron_incident_index.py
@@ -0,0 +1,34 @@
+# Generated by Django 5.1.1 on 2024-11-27 19:11
+
+from django.db import migrations, models
+
+from sentry.new_migrations.migrations import CheckedMigration
+
+
+class Migration(CheckedMigration):
+ # This flag is used to mark that a migration shouldn't be automatically run in production.
+ # This should only be used for operations where it's safe to run the migration after your
+ # code has deployed. So this should not be used for most operations that alter the schema
+ # of a table.
+ # Here are some things that make sense to mark as post deployment:
+ # - Large data migrations. Typically we want these to be run manually so that they can be
+ # monitored and not block the deploy for a long period of time while they run.
+ # - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to
+ # run this outside deployments so that we don't block them. Note that while adding an index
+ # is a schema change, it's completely safe to run the operation after the code has deployed.
+ # Once deployed, run these manually via: https://develop.sentry.dev/database-migrations/#migration-deployment
+
+ is_post_deployment = True
+
+ dependencies = [
+ ("sentry", "0798_add_favorite_dashboard_col"),
+ ]
+
+ operations = [
+ migrations.AddIndex(
+ model_name="monitorcheckin",
+ index=models.Index(
+ fields=["status", "date_added"], name="sentry_moni_status_dd2d85_idx"
+ ),
+ ),
+ ]
diff --git a/src/sentry/monitors/clock_tasks/mark_unknown.py b/src/sentry/monitors/clock_tasks/mark_unknown.py
index 4fb7356fea23bb..a0061664e2d558 100644
--- a/src/sentry/monitors/clock_tasks/mark_unknown.py
+++ b/src/sentry/monitors/clock_tasks/mark_unknown.py
@@ -25,7 +25,7 @@ def dispatch_mark_unknown(ts: datetime):
Given a clock tick timestamp datetime which was processed where an anomaly
had been detected in the volume of check-ins that have been processed,
determine monitors that are in-progress that can no longer be known to
- complete as data loss has likely occured.
+ complete as data loss has likely occurred.
This will dispatch MarkUnknown messages into monitors-clock-tasks.
"""
@@ -33,9 +33,9 @@ def dispatch_mark_unknown(ts: datetime):
MonitorCheckIn.objects.filter(
status=CheckInStatus.IN_PROGRESS,
date_added__lte=ts,
- ).values(
- "id", "monitor_environment_id"
- )[:CHECKINS_LIMIT]
+ )
+ .values("id", "monitor_environment_id")
+ .order_by("-date_added")[:CHECKINS_LIMIT]
)
metrics.gauge(
diff --git a/src/sentry/monitors/models.py b/src/sentry/monitors/models.py
index 51eb187c4989e6..511b6019b5b3e8 100644
--- a/src/sentry/monitors/models.py
+++ b/src/sentry/monitors/models.py
@@ -563,6 +563,8 @@ class Meta:
models.Index(fields=["monitor_environment", "status", "date_added"]),
# used for timeout task
models.Index(fields=["status", "timeout_at"]),
+ # used for dispatch_mark_unknown
+ models.Index(fields=["status", "date_added"]),
# used for check-in list
models.Index(fields=["trace_id"]),
]
|
2277d2318a80ea54538b80bff51b8c3adbd0fa70
|
2023-07-11 19:25:09
|
edwardgou-sentry
|
fix(starfish): Use location query to determine pagefilter out of bounds (#52526)
| false
|
Use location query to determine pagefilter out of bounds (#52526)
|
fix
|
diff --git a/static/app/views/starfish/components/pageFilterContainer.tsx b/static/app/views/starfish/components/pageFilterContainer.tsx
index d701e54b1983cc..d80bbc9bfbc42f 100644
--- a/static/app/views/starfish/components/pageFilterContainer.tsx
+++ b/static/app/views/starfish/components/pageFilterContainer.tsx
@@ -1,6 +1,7 @@
import {LocationDescriptorObject} from 'history';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
+import {PageFilters} from 'sentry/types';
import {useLocation} from 'sentry/utils/useLocation';
import usePageFilters from 'sentry/utils/usePageFilters';
import useRouter from 'sentry/utils/useRouter';
@@ -14,8 +15,11 @@ function StarfishPageFilterContainer(props: {children: React.ReactNode}) {
const location = useLocation();
const {selection} = usePageFilters();
const datetime = selection.datetime;
+ const {end, start, statsPeriod} = location.query;
- const {endTime, startTime} = getDateFilters(selection);
+ const {endTime, startTime} = getDateFilters({
+ datetime: {end, start, period: statsPeriod},
+ } as PageFilters);
const invalidDateFilters = endTime.diff(startTime, 'days') > MAXIMUM_DATE_RANGE;
if (invalidDateFilters) {
datetime.period = DEFAULT_STATS_PERIOD;
|
a391f4225b03cdefefd0057074abab0bd5cb6442
|
2020-04-07 00:09:18
|
Stephen Cefali
|
feat(ecosystem): adds doc integration to directory (#18103)
| false
|
adds doc integration to directory (#18103)
|
feat
|
diff --git a/src/sentry/static/sentry/app/types/index.tsx b/src/sentry/static/sentry/app/types/index.tsx
index 52f86f488235d2..86e18a4a0dbb9b 100644
--- a/src/sentry/static/sentry/app/types/index.tsx
+++ b/src/sentry/static/sentry/app/types/index.tsx
@@ -423,7 +423,8 @@ export type PluginWithProjectList = PluginNoProject & {
export type AppOrProviderOrPlugin =
| SentryApp
| IntegrationProvider
- | PluginWithProjectList;
+ | PluginWithProjectList
+ | DocumentIntegration;
export type DocumentIntegration = {
slug: string;
diff --git a/src/sentry/static/sentry/app/utils/integrationUtil.tsx b/src/sentry/static/sentry/app/utils/integrationUtil.tsx
index e7338daff22ad2..165c594cd84861 100644
--- a/src/sentry/static/sentry/app/utils/integrationUtil.tsx
+++ b/src/sentry/static/sentry/app/utils/integrationUtil.tsx
@@ -12,6 +12,7 @@ import {
AppOrProviderOrPlugin,
SentryApp,
PluginWithProjectList,
+ DocumentIntegration,
} from 'app/types';
import {Hooks} from 'app/types/hooks';
import HookStore from 'app/stores/hookStore';
@@ -238,6 +239,9 @@ export const getCategoriesForIntegration = (
if (isPlugin(integration)) {
return getCategories(integration.featureDescriptions);
}
+ if (isDocumentIntegration(integration)) {
+ return getCategories(integration.features);
+ }
return getCategories(integration.metadata.features);
};
@@ -252,3 +256,9 @@ export function isPlugin(
): integration is PluginWithProjectList {
return integration.hasOwnProperty('shortName');
}
+
+export function isDocumentIntegration(
+ integration: AppOrProviderOrPlugin
+): integration is DocumentIntegration {
+ return integration.hasOwnProperty('docUrl');
+}
diff --git a/src/sentry/static/sentry/app/views/organizationIntegrations/constants.tsx b/src/sentry/static/sentry/app/views/organizationIntegrations/constants.tsx
index f0e4d1ce2ca1be..78285265e4bcab 100644
--- a/src/sentry/static/sentry/app/views/organizationIntegrations/constants.tsx
+++ b/src/sentry/static/sentry/app/views/organizationIntegrations/constants.tsx
@@ -3,11 +3,13 @@ import {DocumentIntegration} from 'app/types';
export const INSTALLED = 'Installed' as const;
export const NOT_INSTALLED = 'Not Installed' as const;
export const PENDING = 'Pending' as const;
+export const LEARN_MORE = 'Learn More' as const;
export const COLORS = {
[INSTALLED]: 'success',
[NOT_INSTALLED]: 'gray2',
[PENDING]: 'yellowOrange',
+ [LEARN_MORE]: 'gray2',
} as const;
/**
@@ -53,27 +55,135 @@ export const POPULARITY_WEIGHT: {
segment: 2,
'amazon-sqs': 2,
splunk: 2,
+
+ //doc integrations
+ fullstory: 8,
+ datadog: 8,
+ msteams: 8,
+ asayer: 8,
+ rocketchat: 8,
} as const;
export const documentIntegrations: {
[key: string]: DocumentIntegration;
} = {
+ fullstory: {
+ slug: 'fullstory',
+ name: 'FullStory',
+ author: 'Sentry',
+ docUrl: 'https://www.npmjs.com/package/@sentry/fullstory',
+ description:
+ 'The Sentry-FullStory integration seamlessly integrates the Sentry and FullStory platforms. When you look at a browser error in Sentry, you will see a link to the FullStory session replay at that exact moment in time. When you are watching a FullStory replay and your user experiences an error, you will see a link that will take you to that error in Sentry.',
+ features: [
+ {
+ featureGate: 'session-replay',
+ description:
+ 'Links Sentry errors to the FullStory session replay and vice-versa.',
+ },
+ ],
+ resourceLinks: [
+ {
+ title: 'Documentation',
+ url: 'https://www.npmjs.com/package/@sentry/fullstory',
+ },
+ {title: 'View Source', url: 'https://github.com/getsentry/sentry-fullstory'},
+ {
+ title: 'Report Issue',
+ url: 'https://github.com/getsentry/sentry-fullstory/issues',
+ },
+ ],
+ },
datadog: {
slug: 'datadog',
name: 'Datadog',
author: 'Datadog',
- docUrl: 'https://www.datadoghq.com/',
+ docUrl: 'https://docs.datadoghq.com/integrations/sentry/',
description:
- 'Quickly discover relationships between production apps and systems performance. Seeing correlations between Sentry events and metrics from infra services like AWS, Elasticsearch, Docker, and Kafka can save time detecting sources of future spikes.',
+ 'Quickly discover relationships between production apps and systems performance. See correlations between Sentry events and metrics from infra services like AWS, Elasticsearch, Docker, and Kafka can save time detecting sources of future spikes.',
features: [
{
- featureGate: 'data-forwarding',
- description: 'Forward any events you choose from Sentry.',
+ featureGate: 'incident-management',
+ description:
+ 'Manage incidents and outages by sending Sentry notifications to DataDog.',
+ },
+ {
+ featureGate: 'alert-rule',
+ description:
+ 'Configure Sentry rules to trigger notifications based on conditions you set through the Sentry webhook integration.',
},
],
resourceLinks: [
- {title: 'View Source', url: 'https://sentry.io'},
- {title: 'Report Issue', url: 'https://github.com'},
+ {title: 'Documentation', url: 'https://docs.datadoghq.com/integrations/sentry/'},
+ ],
+ },
+ msteams: {
+ slug: 'msteams',
+ name: 'Microst Teams',
+ author: 'Microsoft',
+ docUrl:
+ 'https://appsource.microsoft.com/en-us/product/office/WA104381566?src=office&tab=Overview',
+ description:
+ "Microsoft Teams is a hub for teamwork in Office 365. Keep all your team's chats, meetings, files, and apps together in one place.",
+ features: [
+ {
+ featureGate: 'chat',
+ description: 'Get Sentry notifications in Microsoft Teams.',
+ },
+ {
+ featureGate: 'alert-rule',
+ description:
+ 'Configure Sentry rules to trigger notifications based on conditions you set through the Sentry webhook integration.',
+ },
+ ],
+ resourceLinks: [
+ {
+ title: 'Documentation',
+ url:
+ 'https://appsource.microsoft.com/en-us/product/office/WA104381566?src=office&tab=Overview',
+ },
+ ],
+ },
+ asayer: {
+ slug: 'asayer',
+ name: 'Asayer',
+ author: 'Sentry',
+ docUrl: 'https://docs.asayer.io/integrations/sentry',
+ description:
+ 'Asayer is a session replay tool for developers. Replay each user session alongside your front/backend logs and other data spread across your stack so you can immediately find, reproduce and fix bugs faster.',
+ features: [
+ {
+ featureGate: 'session-replay',
+ description:
+ 'By integrating Sentry with Asayer, you can see the moments that precede and that lead up to each problem. You can sync your Sentry logs alongside your session replay, JS console and network activity to gain complete visibility over every issue that affect your users.',
+ },
+ ],
+ resourceLinks: [
+ {title: 'Documentation', url: 'https://docs.asayer.io/integrations/sentry'},
+ ],
+ },
+ rocketchat: {
+ slug: 'rocketchat',
+ name: 'Rocket.Chat',
+ author: 'Rocket.Chat',
+ docUrl: 'https://rocket.chat/docs/administrator-guides/integrations/sentry/',
+ description:
+ 'Rocket.Chat is a free and open-source team chat collaboration platform that allows users to communicate securely in real-time across devices on the web, desktop or mobile and to customize their interface with a range of plugins, themes, and integrations with other key software.',
+ features: [
+ {
+ featureGate: 'chat',
+ description: 'Get Sentry notifications in Rocket.Chat.',
+ },
+ {
+ featureGate: 'alert-rule',
+ description:
+ 'Configure Sentry rules to trigger notifications based on conditions you set through the Sentry webhook integration.',
+ },
+ ],
+ resourceLinks: [
+ {
+ title: 'Documentation',
+ url: 'https://rocket.chat/docs/administrator-guides/integrations/sentry/',
+ },
],
},
};
diff --git a/src/sentry/static/sentry/app/views/organizationIntegrations/docIntegrationDetailedView.tsx b/src/sentry/static/sentry/app/views/organizationIntegrations/docIntegrationDetailedView.tsx
index 9471130f58a4e9..c18545c1197fd7 100644
--- a/src/sentry/static/sentry/app/views/organizationIntegrations/docIntegrationDetailedView.tsx
+++ b/src/sentry/static/sentry/app/views/organizationIntegrations/docIntegrationDetailedView.tsx
@@ -7,6 +7,7 @@ import {t} from 'app/locale';
import {DocumentIntegration} from 'app/types';
import withOrganization from 'app/utils/withOrganization';
import ExternalLink from 'app/components/links/externalLink';
+import {IconOpen} from 'app/icons/iconOpen';
import AbstractIntegrationDetailedView from './abstractIntegrationDetailedView';
import {documentIntegrations} from './constants';
@@ -25,8 +26,11 @@ class SentryAppDetailedView extends AbstractIntegrationDetailedView<
get integration(): DocumentIntegration {
const {integrationSlug} = this.props.params;
-
- return documentIntegrations[integrationSlug] || {};
+ const documentIntegration = documentIntegrations[integrationSlug];
+ if (!documentIntegration) {
+ throw new Error(`No document integration of slug ${integrationSlug} exists`);
+ }
+ return documentIntegration;
}
get description() {
@@ -68,6 +72,7 @@ class SentryAppDetailedView extends AbstractIntegrationDetailedView<
priority="primary"
style={{marginLeft: space(1)}}
data-test-id="learn-more"
+ icon={<StyledIconOpen size="xs" />}
>
{t('Learn More')}
</LearnMoreButton>
@@ -85,4 +90,11 @@ const LearnMoreButton = styled(Button)`
margin-left: ${space(1)};
`;
+const StyledIconOpen = styled(IconOpen)`
+ transition: 0.1s linear color;
+ margin: 0 ${space(0.5)};
+ position: relative;
+ top: 1px;
+`;
+
export default withOrganization(SentryAppDetailedView);
diff --git a/src/sentry/static/sentry/app/views/organizationIntegrations/integrationListDirectory.tsx b/src/sentry/static/sentry/app/views/organizationIntegrations/integrationListDirectory.tsx
index b040c7dc707c5a..d0e924c563b3a6 100644
--- a/src/sentry/static/sentry/app/views/organizationIntegrations/integrationListDirectory.tsx
+++ b/src/sentry/static/sentry/app/views/organizationIntegrations/integrationListDirectory.tsx
@@ -11,6 +11,7 @@ import {
Integration,
SentryApp,
IntegrationProvider,
+ DocumentIntegration,
SentryAppInstallation,
PluginWithProjectList,
AppOrProviderOrPlugin,
@@ -22,6 +23,7 @@ import {
getCategorySelectActive,
isSentryApp,
isPlugin,
+ isDocumentIntegration,
getCategoriesForIntegration,
} from 'app/utils/integrationUtil';
import {t, tct} from 'app/locale';
@@ -35,7 +37,7 @@ import {createFuzzySearch} from 'app/utils/createFuzzySearch';
import space from 'app/styles/space';
import SelectControl from 'app/components/forms/selectControl';
-import {POPULARITY_WEIGHT} from './constants';
+import {POPULARITY_WEIGHT, documentIntegrations} from './constants';
import IntegrationRow from './integrationRow';
type Props = RouteComponentProps<{orgId: string}, {}> & {
@@ -104,7 +106,8 @@ export class IntegrationListDirectory extends AsyncComponent<
.concat(published)
.concat(orgOwned)
.concat(this.providers)
- .concat(plugins);
+ .concat(plugins)
+ .concat(Object.values(documentIntegrations));
const list = this.sortIntegrations(combined);
@@ -187,24 +190,26 @@ export class IntegrationListDirectory extends AsyncComponent<
return integration.projectList.length > 0 ? 2 : 0;
}
- if (!isSentryApp(integration)) {
- return integrations.find(i => i.provider.key === integration.key) ? 2 : 0;
+ if (isSentryApp(integration)) {
+ const install = this.getAppInstall(integration);
+ if (install) {
+ return install.status === 'pending' ? 1 : 2;
+ }
+ return 0;
}
- const install = this.getAppInstall(integration);
-
- if (install) {
- return install.status === 'pending' ? 1 : 2;
+ if (isDocumentIntegration(integration)) {
+ return 0;
}
- return 0;
+ return integrations.find(i => i.provider.key === integration.key) ? 2 : 0;
}
getPopularityWeight = (integration: AppOrProviderOrPlugin) =>
POPULARITY_WEIGHT[integration.slug] ?? 1;
sortByName = (a: AppOrProviderOrPlugin, b: AppOrProviderOrPlugin) =>
- a.name.localeCompare(b.name);
+ a.slug.localeCompare(b.slug);
sortByPopularity = (a: AppOrProviderOrPlugin, b: AppOrProviderOrPlugin) => {
const weightA = this.getPopularityWeight(a);
@@ -216,10 +221,20 @@ export class IntegrationListDirectory extends AsyncComponent<
this.getInstallValue(b) - this.getInstallValue(a);
sortIntegrations(integrations: AppOrProviderOrPlugin[]) {
- return integrations
- .sort(this.sortByName)
- .sort(this.sortByPopularity)
- .sort(this.sortByInstalled);
+ return integrations.sort((a: AppOrProviderOrPlugin, b: AppOrProviderOrPlugin) => {
+ //sort by whether installed first
+ const diffWeight = this.sortByInstalled(a, b);
+ if (diffWeight !== 0) {
+ return diffWeight;
+ }
+ //then sort by popularity
+ const diffPop = this.sortByPopularity(a, b);
+ if (diffPop !== 0) {
+ return diffPop;
+ }
+ //then sort by name
+ return this.sortByName(a, b);
+ });
}
async componentDidUpdate(_: Props, prevState: State) {
@@ -349,12 +364,32 @@ export class IntegrationListDirectory extends AsyncComponent<
);
};
+ renderDocumentIntegration = (integration: DocumentIntegration) => {
+ const {organization} = this.props;
+ return (
+ <IntegrationRow
+ key={`doc-int-${integration.slug}`}
+ organization={organization}
+ type="documentIntegration"
+ slug={integration.slug}
+ displayName={integration.name}
+ publishStatus="published"
+ configurations={0}
+ categories={getCategoriesForIntegration(integration)}
+ />
+ );
+ };
+
renderIntegration = (integration: AppOrProviderOrPlugin) => {
if (isSentryApp(integration)) {
return this.renderSentryApp(integration);
- } else if (isPlugin(integration)) {
+ }
+ if (isPlugin(integration)) {
return this.renderPlugin(integration);
}
+ if (isDocumentIntegration(integration)) {
+ return this.renderDocumentIntegration(integration);
+ }
return this.renderProvider(integration);
};
diff --git a/src/sentry/static/sentry/app/views/organizationIntegrations/integrationRow.tsx b/src/sentry/static/sentry/app/views/organizationIntegrations/integrationRow.tsx
index 8fb66ab9a46a41..c3019b5aa21ff9 100644
--- a/src/sentry/static/sentry/app/views/organizationIntegrations/integrationRow.tsx
+++ b/src/sentry/static/sentry/app/views/organizationIntegrations/integrationRow.tsx
@@ -12,19 +12,20 @@ import IntegrationStatus from './integrationStatus';
type Props = {
organization: Organization;
- type: 'plugin' | 'firstParty' | 'sentryApp';
+ type: 'plugin' | 'firstParty' | 'sentryApp' | 'documentIntegration';
slug: string;
displayName: string;
- status: IntegrationInstallationStatus;
+ status?: IntegrationInstallationStatus;
publishStatus: 'unpublished' | 'published' | 'internal';
configurations: number;
- categories?: string[];
+ categories: string[];
};
const urlMap = {
plugin: 'plugins',
firstParty: 'integrations',
sentryApp: 'sentry-apps',
+ documentIntegration: 'document-integrations',
};
const IntegrationRow = (props: Props) => {
@@ -48,6 +49,7 @@ const IntegrationRow = (props: Props) => {
if (type === 'sentryApp') {
return publishStatus !== 'published' && <PublishStatus status={publishStatus} />;
}
+ //TODO: Use proper translations
return configurations > 0 ? (
<StyledLink to={`${baseUrl}?tab=configurations`}>{`${configurations} Configuration${
configurations > 1 ? 's' : ''
@@ -55,6 +57,14 @@ const IntegrationRow = (props: Props) => {
) : null;
};
+ const renderStatus = () => {
+ //status should be undefined for document integrations
+ if (status) {
+ return <IntegrationStatus status={status} />;
+ }
+ return <LearnMore to={baseUrl}>{t('Learn More')}</LearnMore>;
+ };
+
return (
<PanelItem p={0} flexDirection="column" data-test-id={slug}>
<FlexContainer>
@@ -62,7 +72,7 @@ const IntegrationRow = (props: Props) => {
<Container>
<IntegrationName to={baseUrl}>{displayName}</IntegrationName>
<IntegrationDetails>
- <IntegrationStatus status={status} />
+ {renderStatus()}
{renderDetails()}
</IntegrationDetails>
</Container>
@@ -117,6 +127,10 @@ const StyledLink = styled(Link)`
}
`;
+const LearnMore = styled(Link)`
+ color: ${p => p.theme.gray2};
+`;
+
type PublishStatusProps = {status: SentryApp['status']; theme?: any};
const PublishStatus = styled(({status, ...props}: PublishStatusProps) => (
@@ -136,9 +150,15 @@ const PublishStatus = styled(({status, ...props}: PublishStatusProps) => (
`;
const CategoryTag = styled(
- ({priority, category, ...p}: {category: string; priority: boolean; theme?: any}) => (
- <div {...p}>{category}</div>
- )
+ ({
+ priority: _priority,
+ category,
+ ...p
+ }: {
+ category: string;
+ priority: boolean;
+ theme?: any;
+ }) => <div {...p}>{category}</div>
)`
display: flex;
flex-direction: row;
diff --git a/tests/js/spec/views/organizationIntegrations/integrationListDirectory.spec.jsx b/tests/js/spec/views/organizationIntegrations/integrationListDirectory.spec.jsx
index c26705b583b9f9..76fefe7c903aef 100644
--- a/tests/js/spec/views/organizationIntegrations/integrationListDirectory.spec.jsx
+++ b/tests/js/spec/views/organizationIntegrations/integrationListDirectory.spec.jsx
@@ -46,13 +46,18 @@ describe('IntegrationListDirectory', function() {
it('shows installed integrations at the top in order of weight', async function() {
expect(wrapper.find('SearchInput').exists()).toBeTruthy();
expect(wrapper.find('PanelBody').exists()).toBeTruthy();
- expect(wrapper.find('IntegrationRow')).toHaveLength(6);
+ expect(wrapper.find('IntegrationRow')).toHaveLength(11);
[
'bitbucket',
'pagerduty',
'my-headband-washer-289499',
'clickup',
+ 'asayer',
+ 'datadog',
+ 'fullstory',
+ 'msteams',
+ 'rocketchat',
'amazon-sqs',
'la-croix-monitor',
].map((name, index) =>
|
36c0ce770fc6265e7f74246ee7599fbb3d14ff7e
|
2023-03-07 00:15:19
|
anthony sottile
|
ref: retrieve session value using getitem instead of get (#45425)
| false
|
retrieve session value using getitem instead of get (#45425)
|
ref
|
diff --git a/src/sentry/auth/helper.py b/src/sentry/auth/helper.py
index cdd6c9cd277847..1bab42c3a4a574 100644
--- a/src/sentry/auth/helper.py
+++ b/src/sentry/auth/helper.py
@@ -450,7 +450,7 @@ def handle_unknown_identity(
# we don't trust all IDP email verification, so users can also confirm via one time email link
is_account_verified = False
if self.request.session.get("confirm_account_verification_key"):
- verification_key = self.request.session.get("confirm_account_verification_key")
+ verification_key = self.request.session["confirm_account_verification_key"]
verification_value = get_verification_value_from_key(verification_key)
if verification_value:
is_account_verified = self.has_verified_account(verification_value)
|
5a9357eafbd04c181668da86782858b579264c00
|
2024-06-13 02:20:02
|
Katie Byers
|
chore(seer grouping): Increase `did_call_seer` metric sample rate (#72652)
| false
|
Increase `did_call_seer` metric sample rate (#72652)
|
chore
|
diff --git a/src/sentry/event_manager.py b/src/sentry/event_manager.py
index 4f755e5beb58b4..9fd5c5e268e587 100644
--- a/src/sentry/event_manager.py
+++ b/src/sentry/event_manager.py
@@ -1522,6 +1522,9 @@ def _save_aggregate(
metrics.incr(
"grouping.similarity.did_call_seer",
+ # TODO: Consider lowering this (in all the spots this metric is
+ # collected) once we roll Seer grouping out more widely
+ sample_rate=1.0,
tags={"call_made": True, "blocker": "none"},
)
@@ -1533,6 +1536,7 @@ def _save_aggregate(
# (also below)? Right now they just fall into the `new_group` bucket.
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "circuit-breaker"},
)
@@ -1540,6 +1544,7 @@ def _save_aggregate(
except Exception as e:
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": True, "blocker": "none"},
)
sentry_sdk.capture_exception(
diff --git a/src/sentry/grouping/ingest/seer.py b/src/sentry/grouping/ingest/seer.py
index b7caa14157b3dd..ca4506a9af761d 100644
--- a/src/sentry/grouping/ingest/seer.py
+++ b/src/sentry/grouping/ingest/seer.py
@@ -74,6 +74,7 @@ def _has_customized_fingerprint(event: Event, primary_hashes: CalculatedHashes)
else:
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "hybrid-fingerprint"},
)
return True
@@ -86,6 +87,7 @@ def _has_customized_fingerprint(event: Event, primary_hashes: CalculatedHashes)
if fingerprint_variant:
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": fingerprint_variant.type},
)
return True
@@ -108,6 +110,7 @@ def _killswitch_enabled(event: Event, project: Project) -> bool:
metrics.incr("grouping.similarity.seer_global_killswitch_enabled")
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "global-killswitch"},
)
return True
@@ -120,6 +123,7 @@ def _killswitch_enabled(event: Event, project: Project) -> bool:
metrics.incr("grouping.similarity.seer_similarity_killswitch_enabled")
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "similarity-killswitch"},
)
return True
@@ -150,6 +154,7 @@ def _ratelimiting_enabled(event: Event, project: Project) -> bool:
)
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "global-rate-limit"},
)
@@ -167,6 +172,7 @@ def _ratelimiting_enabled(event: Event, project: Project) -> bool:
)
metrics.incr(
"grouping.similarity.did_call_seer",
+ sample_rate=1.0,
tags={"call_made": False, "blocker": "project-rate-limit"},
)
|
8403f945cb14e87a84132471b0d87f7baad621f3
|
2021-03-31 03:09:13
|
David Wang
|
feat(alert): Have chart show alert wizard data (#24833)
| false
|
Have chart show alert wizard data (#24833)
|
feat
|
diff --git a/src/sentry/static/sentry/app/views/alerts/wizard/index.tsx b/src/sentry/static/sentry/app/views/alerts/wizard/index.tsx
index 5be6ea88ba2ed2..779d817c860494 100644
--- a/src/sentry/static/sentry/app/views/alerts/wizard/index.tsx
+++ b/src/sentry/static/sentry/app/views/alerts/wizard/index.tsx
@@ -16,6 +16,7 @@ import RadioGroup from 'app/views/settings/components/forms/controls/radioGroup'
import {
AlertType,
+ AlertWizardAlertNames,
AlertWizardDescriptions,
AlertWizardOptions,
AlertWizardRuleTemplates,
@@ -94,7 +95,10 @@ class AlertWizard extends React.Component<Props, State> {
<OptionsWrapper key={categoryHeading}>
<Heading>{categoryHeading}</Heading>
<RadioGroup
- choices={options}
+ choices={options.map(alertType => [
+ alertType,
+ AlertWizardAlertNames[alertType],
+ ])}
onChange={this.handleChangeAlertOption}
value={alertOption}
label="alert-option"
diff --git a/src/sentry/static/sentry/app/views/alerts/wizard/options.tsx b/src/sentry/static/sentry/app/views/alerts/wizard/options.tsx
index 4823d580aee1a4..3ae6f212a4f59b 100644
--- a/src/sentry/static/sentry/app/views/alerts/wizard/options.tsx
+++ b/src/sentry/static/sentry/app/views/alerts/wizard/options.tsx
@@ -9,25 +9,26 @@ export type AlertType =
| 'trans_duration'
| 'lcp';
+export const AlertWizardAlertNames: Record<AlertType, string> = {
+ issues: t('Issues'),
+ num_errors: t('Number of Errors'),
+ users_experiencing_errors: t('Users Experiencing Errors'),
+ throughput: t('Throughput'),
+ trans_duration: t('Transaction Duration'),
+ lcp: t('Longest Contentful Paint'),
+};
+
export const AlertWizardOptions: {
categoryHeading: string;
- options: [AlertType, string][];
+ options: AlertType[];
}[] = [
{
categoryHeading: t('Errors'),
- options: [
- ['issues', t('Issues')],
- ['num_errors', t('Number of Errors')],
- ['users_experiencing_errors', t('Users Experiencing Errors')],
- ],
+ options: ['issues', 'num_errors', 'users_experiencing_errors'],
},
{
categoryHeading: t('Performance'),
- options: [
- ['throughput', t('Throughput')],
- ['trans_duration', t('Transaction Duration')],
- ['lcp', t('Longest Contentful Paint')],
- ],
+ options: ['throughput', 'trans_duration', 'lcp'],
},
];
diff --git a/src/sentry/static/sentry/app/views/alerts/wizard/utils.tsx b/src/sentry/static/sentry/app/views/alerts/wizard/utils.tsx
new file mode 100644
index 00000000000000..5c6a67ef391d7a
--- /dev/null
+++ b/src/sentry/static/sentry/app/views/alerts/wizard/utils.tsx
@@ -0,0 +1,33 @@
+import {Dataset} from 'app/views/settings/incidentRules/types';
+
+import {AlertType, WizardRuleTemplate} from './options';
+
+// A set of unique identifiers to be able to tie aggregate and dataset back to a wizard alert type
+const alertTypeIdentifiers: Record<Dataset, Partial<Record<AlertType, string>>> = {
+ [Dataset.ERRORS]: {
+ num_errors: 'count()',
+ users_experiencing_errors: 'count_unique(tags[sentry:user])',
+ },
+ [Dataset.TRANSACTIONS]: {
+ throughput: 'count()',
+ trans_duration: 'transaction.duration',
+ lcp: 'measurements.lcp',
+ },
+};
+
+/**
+ * Given an aggregate and dataset object, will return the corresponding wizard alert type
+ * e.g. {aggregate: 'count()', dataset: 'events'} will yield 'num_errors'
+ * @param template
+ */
+export function getAlertTypeFromAggregateDataset({
+ aggregate,
+ dataset,
+}: Pick<WizardRuleTemplate, 'aggregate' | 'dataset'>): AlertType {
+ const identifierForDataset = alertTypeIdentifiers[dataset];
+ const matchingAlertTypeEntry = Object.entries(identifierForDataset).find(
+ ([_alertType, identifier]) => identifier && aggregate.includes(identifier)
+ );
+ const alertType = matchingAlertTypeEntry && (matchingAlertTypeEntry[0] as AlertType);
+ return alertType ? alertType : 'num_errors';
+}
diff --git a/src/sentry/static/sentry/app/views/settings/incidentRules/ruleConditionsFormForWizard.tsx b/src/sentry/static/sentry/app/views/settings/incidentRules/ruleConditionsFormForWizard.tsx
index 801592dc8b351c..d411dbed2f3f9e 100644
--- a/src/sentry/static/sentry/app/views/settings/incidentRules/ruleConditionsFormForWizard.tsx
+++ b/src/sentry/static/sentry/app/views/settings/incidentRules/ruleConditionsFormForWizard.tsx
@@ -42,7 +42,7 @@ type Props = {
organization: Organization;
projectSlug: string;
disabled: boolean;
- thresholdChart: React.ReactElement;
+ thresholdChart: (props: {footer: React.ReactNode}) => React.ReactElement;
onFilterSearch: (query: string) => void;
};
@@ -142,7 +142,50 @@ class RuleConditionsFormForWizard extends React.PureComponent<Props, State> {
return (
<React.Fragment>
<Panel>
- <StyledPanelBody>{this.props.thresholdChart}</StyledPanelBody>
+ <StyledPanelBody>
+ {this.props.thresholdChart({
+ footer: (
+ <ChartFooter>
+ <MetricField
+ name="aggregate"
+ help={null}
+ organization={organization}
+ disabled={disabled}
+ style={{
+ ...formElemBaseStyle,
+ }}
+ inline={false}
+ flexibleControlStateSize
+ columnWidth={250}
+ inFieldLabels
+ required
+ />
+ <FormRowText>{t('over a')}</FormRowText>
+ <Tooltip
+ title={t(
+ 'Triggers are evaluated every minute regardless of this value.'
+ )}
+ >
+ <SelectField
+ name="timeWindow"
+ style={{
+ ...formElemBaseStyle,
+ flex: 1,
+ minWidth: 180,
+ }}
+ choices={Object.entries(TIME_WINDOW_MAP)}
+ required
+ isDisabled={disabled}
+ getValue={value => Number(value)}
+ setValue={value => `${value}`}
+ inline={false}
+ flexibleControlStateSize
+ />
+ </Tooltip>
+ </ChartFooter>
+ ),
+ })}
+ </StyledPanelBody>
</Panel>
<StyledListItem>{t('Select events')}</StyledListItem>
<FormRow>
@@ -269,49 +312,12 @@ class RuleConditionsFormForWizard extends React.PureComponent<Props, State> {
)}
</FormField>
</FormRow>
- <FormRow>
- <MetricField
- name="aggregate"
- help={null}
- organization={organization}
- disabled={disabled}
- style={{
- ...formElemBaseStyle,
- }}
- inline={false}
- flexibleControlStateSize
- columnWidth={250}
- inFieldLabels
- required
- />
- <FormRowText>{t('over a')}</FormRowText>
- <Tooltip
- title={t('Triggers are evaluated every minute regardless of this value.')}
- >
- <SelectField
- name="timeWindow"
- style={{
- ...formElemBaseStyle,
- flex: 1,
- minWidth: 180,
- }}
- choices={Object.entries(TIME_WINDOW_MAP)}
- required
- isDisabled={disabled}
- getValue={value => Number(value)}
- setValue={value => `${value}`}
- inline={false}
- flexibleControlStateSize
- />
- </Tooltip>
- </FormRow>
</React.Fragment>
);
}
}
const StyledPanelBody = styled(PanelBody)`
- padding-top: ${space(1)};
ol,
h4 {
margin-bottom: ${space(1)};
@@ -338,6 +344,10 @@ const FormRow = styled('div')`
margin-bottom: ${space(2)};
`;
+const ChartFooter = styled(FormRow)`
+ margin: 0;
+`;
+
const FormRowText = styled('div')`
padding: ${space(0.5)};
/* Match the height of the select controls */
diff --git a/src/sentry/static/sentry/app/views/settings/incidentRules/ruleForm/index.tsx b/src/sentry/static/sentry/app/views/settings/incidentRules/ruleForm/index.tsx
index cfa8137fe9b4cf..36c13bcbc9c674 100644
--- a/src/sentry/static/sentry/app/views/settings/incidentRules/ruleForm/index.tsx
+++ b/src/sentry/static/sentry/app/views/settings/incidentRules/ruleForm/index.tsx
@@ -23,6 +23,8 @@ import space from 'app/styles/space';
import {Organization, Project} from 'app/types';
import {defined} from 'app/utils';
import {trackAnalyticsEvent} from 'app/utils/analytics';
+import {AlertWizardAlertNames} from 'app/views/alerts/wizard/options';
+import {getAlertTypeFromAggregateDataset} from 'app/views/alerts/wizard/utils';
import Form from 'app/views/settings/components/forms/form';
import FormModel from 'app/views/settings/components/forms/model';
import RuleNameOwnerForm from 'app/views/settings/incidentRules/ruleNameOwnerForm';
@@ -38,6 +40,7 @@ import RuleConditionsFormForWizard from '../ruleConditionsFormForWizard';
import {
AlertRuleThresholdType,
Dataset,
+ EventTypes,
IncidentRule,
MetricActionTemplate,
Trigger,
@@ -82,6 +85,7 @@ type State = {
timeWindow: number;
environment: string | null;
uuid?: string;
+ eventTypes?: EventTypes[];
} & AsyncComponent['state'];
const isEmpty = (str: unknown): boolean => str === '' || !defined(str);
@@ -576,24 +580,40 @@ class RuleFormContainer extends AsyncComponent<Props, State> {
thresholdType,
resolveThreshold,
loading,
+ eventTypes,
+ dataset,
} = this.state;
- const eventTypeFilter = getEventTypeFilter(this.state.dataset, this.state.eventTypes);
+ const eventTypeFilter = getEventTypeFilter(this.state.dataset, eventTypes);
const queryWithTypeFilter = `${query} ${eventTypeFilter}`.trim();
- const chart = (
+ const chartProps = {
+ organization,
+ projects: this.state.projects,
+ triggers,
+ query: queryWithTypeFilter,
+ aggregate,
+ timeWindow,
+ environment,
+ resolveThreshold,
+ thresholdType,
+ };
+ const alertType = getAlertTypeFromAggregateDataset({aggregate, dataset});
+ const wizardBuilderChart = ({footer}) => (
<TriggersChart
- organization={organization}
- projects={this.state.projects}
- triggers={triggers}
- query={queryWithTypeFilter}
- aggregate={aggregate}
- timeWindow={timeWindow}
- environment={environment}
- resolveThreshold={resolveThreshold}
- thresholdType={thresholdType}
+ {...chartProps}
+ header={
+ <ChartHeader>
+ <AlertName>{AlertWizardAlertNames[alertType]}</AlertName>
+ <AlertInfo>
+ {aggregate} | event.type:{eventTypes?.join(',')}
+ </AlertInfo>
+ </ChartHeader>
+ }
+ footer={footer}
/>
);
+ const chart = <TriggersChart {...chartProps} />;
const ownerId = rule.owner?.split(':')[1];
const canEdit = ownerId ? userTeamIds.has(ownerId) : true;
@@ -676,7 +696,7 @@ class RuleFormContainer extends AsyncComponent<Props, State> {
projectSlug={params.projectId}
organization={organization}
disabled={!hasAccess || !canEdit}
- thresholdChart={chart}
+ thresholdChart={wizardBuilderChart}
onFilterSearch={this.handleFilterUpdate}
/>
<StyledListItem>
@@ -713,5 +733,22 @@ const StyledListItem = styled(ListItem)`
margin-bottom: ${space(1)};
`;
+const ChartHeader = styled('div')`
+ padding: ${space(3)} ${space(3)} 0 ${space(3)};
+`;
+
+const AlertName = styled('div')`
+ font-size: ${p => p.theme.fontSizeExtraLarge};
+ font-weight: normal;
+ color: ${p => p.theme.textColor};
+`;
+
+const AlertInfo = styled('div')`
+ font-size: ${p => p.theme.fontSizeMedium};
+ font-family: ${p => p.theme.text.familyMono};
+ font-weight: normal;
+ color: ${p => p.theme.subText};
+`;
+
export {RuleFormContainer};
export default RuleFormContainer;
diff --git a/src/sentry/static/sentry/app/views/settings/incidentRules/triggers/chart/index.tsx b/src/sentry/static/sentry/app/views/settings/incidentRules/triggers/chart/index.tsx
index 15679c29cf8a36..132c448a4a6a34 100644
--- a/src/sentry/static/sentry/app/views/settings/incidentRules/triggers/chart/index.tsx
+++ b/src/sentry/static/sentry/app/views/settings/incidentRules/triggers/chart/index.tsx
@@ -38,6 +38,8 @@ type Props = {
triggers: Trigger[];
resolveThreshold: IncidentRule['resolveThreshold'];
thresholdType: IncidentRule['thresholdType'];
+ header?: React.ReactNode;
+ footer?: React.ReactNode;
};
const TIME_PERIOD_MAP: Record<TimePeriod, string> = {
@@ -192,6 +194,8 @@ class TriggersChart extends React.PureComponent<Props, State> {
resolveThreshold,
thresholdType,
environment,
+ header,
+ footer,
} = this.props;
const {statsPeriod, totalEvents} = this.state;
@@ -258,6 +262,7 @@ class TriggersChart extends React.PureComponent<Props, State> {
<ChartPlaceholder />
) : (
<React.Fragment>
+ {header}
<TransparentLoadingMask visible={reloading} />
<ThresholdsChart
period={statsPeriod}
@@ -271,11 +276,17 @@ class TriggersChart extends React.PureComponent<Props, State> {
)}
<ChartControls>
<InlineContainer>
- <SectionHeading>{t('Total Events')}</SectionHeading>
- {totalEvents !== null ? (
- <SectionValue>{totalEvents.toLocaleString()}</SectionValue>
+ {footer ? (
+ footer
) : (
- <SectionValue>—</SectionValue>
+ <React.Fragment>
+ <SectionHeading>{t('Total Events')}</SectionHeading>
+ {totalEvents !== null ? (
+ <SectionValue>{totalEvents.toLocaleString()}</SectionValue>
+ ) : (
+ <SectionValue>—</SectionValue>
+ )}
+ </React.Fragment>
)}
</InlineContainer>
<InlineContainer>
diff --git a/tests/js/spec/views/alerts/wizard/utils.spec.jsx b/tests/js/spec/views/alerts/wizard/utils.spec.jsx
new file mode 100644
index 00000000000000..ce3a1e79a69504
--- /dev/null
+++ b/tests/js/spec/views/alerts/wizard/utils.spec.jsx
@@ -0,0 +1,82 @@
+import {getAlertTypeFromAggregateDataset} from 'app/views/alerts/wizard/utils';
+import {Dataset} from 'app/views/settings/incidentRules/types';
+
+describe('Wizard utils', function () {
+ it('extracts lcp alert', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'p95(measurements.lcp)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('lcp');
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'percentile(measurements.lcp,0.7)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('lcp');
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'avg(measurements.lcp)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('lcp');
+ });
+
+ it('extracts duration alert', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'p95(transaction.duration)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('trans_duration');
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'percentile(transaction.duration,0.3)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('trans_duration');
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'avg(transaction.duration)',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('trans_duration');
+ });
+
+ it('extracts throughput alert', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'count()',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('throughput');
+ });
+
+ it('extracts user error alert', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'count_unique(tags[sentry:user])',
+ dataset: Dataset.ERRORS,
+ })
+ ).toEqual('users_experiencing_errors');
+ });
+
+ it('extracts error count alert', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'count()',
+ dataset: Dataset.ERRORS,
+ })
+ ).toEqual('num_errors');
+ });
+
+ it('defaults to num_errors', function () {
+ expect(
+ getAlertTypeFromAggregateDataset({
+ aggregate: 'count_unique(tags[sentry:user])',
+ dataset: Dataset.TRANSACTIONS,
+ })
+ ).toEqual('num_errors');
+ });
+});
|
59a9c91aa8debddada99de21abbfb886b8ba0785
|
2022-03-30 12:55:16
|
Evan Purkhiser
|
chore(js): Avoid ReactDOM default export (#33095)
| false
|
Avoid ReactDOM default export (#33095)
|
chore
|
diff --git a/static/app/bootstrap/exportGlobals.tsx b/static/app/bootstrap/exportGlobals.tsx
index c120b242293ef8..302801edd72497 100644
--- a/static/app/bootstrap/exportGlobals.tsx
+++ b/static/app/bootstrap/exportGlobals.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode, render} from 'react-dom';
import * as ReactRouter from 'react-router';
import * as Sentry from '@sentry/react';
import moment from 'moment';
@@ -17,10 +17,7 @@ const globals = {
Sentry,
moment,
Router: ReactRouter,
- ReactDOM: {
- findDOMNode: ReactDOM.findDOMNode,
- render: ReactDOM.render,
- },
+ ReactDOM: {findDOMNode, render},
// django templates make use of these globals
SentryApp: {},
diff --git a/static/app/bootstrap/renderDom.tsx b/static/app/bootstrap/renderDom.tsx
index 03a9c096c70b14..93b6261e75b683 100644
--- a/static/app/bootstrap/renderDom.tsx
+++ b/static/app/bootstrap/renderDom.tsx
@@ -1,4 +1,4 @@
-import ReactDOM from 'react-dom';
+import {render} from 'react-dom';
export function renderDom(
Component: React.ComponentType,
@@ -13,5 +13,5 @@ export function renderDom(
return;
}
- ReactDOM.render(<Component {...props} />, rootEl);
+ render(<Component {...props} />, rootEl);
}
diff --git a/static/app/bootstrap/renderPipelineView.tsx b/static/app/bootstrap/renderPipelineView.tsx
index 4b3a526d033885..7e0cd23f75f22e 100644
--- a/static/app/bootstrap/renderPipelineView.tsx
+++ b/static/app/bootstrap/renderPipelineView.tsx
@@ -1,15 +1,15 @@
-import ReactDOM from 'react-dom';
+import {render} from 'react-dom';
import {ROOT_ELEMENT} from 'sentry/constants';
import {PipelineInitialData} from 'sentry/types';
import PipelineView from 'sentry/views/integrationPipeline/pipelineView';
-function render(pipelineName: string, props: PipelineInitialData['props']) {
+function renderDom(pipelineName: string, props: PipelineInitialData['props']) {
const rootEl = document.getElementById(ROOT_ELEMENT);
- ReactDOM.render(<PipelineView pipelineName={pipelineName} {...props} />, rootEl);
+ render(<PipelineView pipelineName={pipelineName} {...props} />, rootEl);
}
export function renderPipelineView() {
const {name, props} = window.__pipelineInitialData;
- render(name, props);
+ renderDom(name, props);
}
diff --git a/static/app/components/clipboard.tsx b/static/app/components/clipboard.tsx
index 56fc768cf0852e..07f220d815cf34 100644
--- a/static/app/components/clipboard.tsx
+++ b/static/app/components/clipboard.tsx
@@ -1,5 +1,5 @@
import {cloneElement, Component, isValidElement} from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
import copy from 'copy-text-to-clipboard';
import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
@@ -39,7 +39,7 @@ class Clipboard extends Component<Props> {
this.element?.removeEventListener('click', this.handleClick);
}
- element?: ReturnType<typeof ReactDOM.findDOMNode>;
+ element?: ReturnType<typeof findDOMNode>;
handleClick = () => {
const {value, hideMessages, successMessage, errorMessage, onSuccess, onError} =
@@ -66,7 +66,7 @@ class Clipboard extends Component<Props> {
}
// eslint-disable-next-line react/no-find-dom-node
- this.element = ReactDOM.findDOMNode(ref);
+ this.element = findDOMNode(ref);
this.element?.addEventListener('click', this.handleClick);
};
diff --git a/static/app/components/clippedBox.tsx b/static/app/components/clippedBox.tsx
index 576150da27c09e..6c73729e2c4322 100644
--- a/static/app/components/clippedBox.tsx
+++ b/static/app/components/clippedBox.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
import styled from '@emotion/styled';
import color from 'color';
@@ -42,7 +42,7 @@ class ClippedBox extends React.PureComponent<Props, State> {
componentDidMount() {
// eslint-disable-next-line react/no-find-dom-node
- const renderedHeight = (ReactDOM.findDOMNode(this) as HTMLElement).offsetHeight;
+ const renderedHeight = (findDOMNode(this) as HTMLElement).offsetHeight;
this.calcHeight(renderedHeight);
}
@@ -61,7 +61,7 @@ class ClippedBox extends React.PureComponent<Props, State> {
if (!this.props.renderedHeight) {
// eslint-disable-next-line react/no-find-dom-node
- const renderedHeight = (ReactDOM.findDOMNode(this) as HTMLElement).offsetHeight;
+ const renderedHeight = (findDOMNode(this) as HTMLElement).offsetHeight;
if (renderedHeight < this.props.clipHeight) {
this.reveal();
diff --git a/static/app/components/contextPickerModal.tsx b/static/app/components/contextPickerModal.tsx
index 05363156db347b..d96b8df6041a9a 100644
--- a/static/app/components/contextPickerModal.tsx
+++ b/static/app/components/contextPickerModal.tsx
@@ -1,5 +1,5 @@
import {Component, Fragment} from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
import {components, StylesConfig} from 'react-select';
import styled from '@emotion/styled';
@@ -167,7 +167,7 @@ class ContextPickerModal extends Component<Props> {
}
// eslint-disable-next-line react/no-find-dom-node
- const el = ReactDOM.findDOMNode(ref) as HTMLElement;
+ const el = findDOMNode(ref) as HTMLElement;
if (el !== null) {
const input = el.querySelector('input');
diff --git a/static/app/components/forms/textCopyInput.tsx b/static/app/components/forms/textCopyInput.tsx
index a5ffa8dc976c83..151eaac3b97bf5 100644
--- a/static/app/components/forms/textCopyInput.tsx
+++ b/static/app/components/forms/textCopyInput.tsx
@@ -1,6 +1,6 @@
import {CSSProperties} from 'react';
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
import styled from '@emotion/styled';
import Button from 'sentry/components/button';
@@ -79,7 +79,7 @@ class TextCopyInput extends React.Component<Props> {
// We use findDOMNode here because `this.textRef` is not a dom node,
// it's a ref to AutoSelectText
- const node = ReactDOM.findDOMNode(this.textRef.current); // eslint-disable-line react/no-find-dom-node
+ const node = findDOMNode(this.textRef.current); // eslint-disable-line react/no-find-dom-node
if (!node || !(node instanceof HTMLElement)) {
return;
}
diff --git a/static/app/components/globalModal/index.tsx b/static/app/components/globalModal/index.tsx
index c1751a57cc28eb..2f778a7014f663 100644
--- a/static/app/components/globalModal/index.tsx
+++ b/static/app/components/globalModal/index.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {browserHistory} from 'react-router';
import {css} from '@emotion/react';
import styled from '@emotion/styled';
@@ -180,7 +180,7 @@ function GlobalModal({visible = false, options = {}, children, onClose}: Props)
const clickClose = (e: React.MouseEvent) =>
containerRef.current === e.target && allowClickClose && closeModal();
- return ReactDOM.createPortal(
+ return createPortal(
<React.Fragment>
<Backdrop
style={backdrop && visible ? {opacity: 0.5, pointerEvents: 'auto'} : {}}
diff --git a/static/app/components/hovercard.tsx b/static/app/components/hovercard.tsx
index 317b35b8d775f2..51ea74b8cc9f27 100644
--- a/static/app/components/hovercard.tsx
+++ b/static/app/components/hovercard.tsx
@@ -1,5 +1,5 @@
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {Manager, Popper, PopperProps, Reference} from 'react-popper';
import styled from '@emotion/styled';
import classNames from 'classnames';
@@ -155,7 +155,7 @@ function Hovercard(props: HovercardProps): React.ReactElement {
</span>
)}
</Reference>
- {ReactDOM.createPortal(
+ {createPortal(
<Popper placement={props.position ?? 'top'} modifiers={popperModifiers}>
{({ref, style, placement, arrowProps, scheduleUpdate}) => {
scheduleUpdateRef.current = scheduleUpdate;
diff --git a/static/app/components/passwordStrength.tsx b/static/app/components/passwordStrength.tsx
index fe9353611041e0..891484b810225e 100644
--- a/static/app/components/passwordStrength.tsx
+++ b/static/app/components/passwordStrength.tsx
@@ -1,5 +1,5 @@
import {Fragment} from 'react';
-import ReactDOM from 'react-dom';
+import {render} from 'react-dom';
import {css} from '@emotion/react';
import styled from '@emotion/styled';
import throttle from 'lodash/throttle';
@@ -110,6 +110,6 @@ export const attachTo = ({input, element}) =>
input.addEventListener(
'input',
throttle(e => {
- ReactDOM.render(<PasswordStrength value={e.target.value} />, element);
+ render(<PasswordStrength value={e.target.value} />, element);
})
);
diff --git a/static/app/components/performance/teamKeyTransaction.tsx b/static/app/components/performance/teamKeyTransaction.tsx
index dfe196fda30f64..74c04bc2a63ecb 100644
--- a/static/app/components/performance/teamKeyTransaction.tsx
+++ b/static/app/components/performance/teamKeyTransaction.tsx
@@ -1,5 +1,5 @@
import {Component, Fragment} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {Manager, Popper, Reference} from 'react-popper';
import styled from '@emotion/styled';
import * as PopperJS from 'popper.js';
@@ -219,7 +219,7 @@ class TeamKeyTransaction extends Component<Props, State> {
},
};
- return ReactDOM.createPortal(
+ return createPortal(
<Popper placement="top" modifiers={modifiers}>
{({ref: popperRef, style, placement}) => (
<DropdownWrapper
diff --git a/static/app/components/sidebar/sidebarPanel.tsx b/static/app/components/sidebar/sidebarPanel.tsx
index a561051d3f1e68..f8214d2340ecc2 100644
--- a/static/app/components/sidebar/sidebarPanel.tsx
+++ b/static/app/components/sidebar/sidebarPanel.tsx
@@ -1,5 +1,5 @@
import {useEffect, useRef} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {css} from '@emotion/react';
import styled from '@emotion/styled';
@@ -92,7 +92,7 @@ function SidebarPanel({
};
}, []);
- return ReactDOM.createPortal(
+ return createPortal(
<PanelContainer
role="dialog"
collapsed={collapsed}
diff --git a/static/app/components/themeAndStyleProvider.tsx b/static/app/components/themeAndStyleProvider.tsx
index f7757c0243c840..4d295976270475 100644
--- a/static/app/components/themeAndStyleProvider.tsx
+++ b/static/app/components/themeAndStyleProvider.tsx
@@ -1,5 +1,5 @@
import {Fragment, useEffect} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {cache} from '@emotion/css'; // eslint-disable-line emotion/no-vanilla
import {CacheProvider, ThemeProvider} from '@emotion/react'; // This is needed to set "speedy" = false (for percy)
@@ -28,7 +28,7 @@ function ThemeAndStyleProvider({children}: Props) {
<ThemeProvider theme={theme}>
<GlobalStyles isDark={config.theme === 'dark'} theme={theme} />
<CacheProvider value={cache}>{children}</CacheProvider>
- {ReactDOM.createPortal(
+ {createPortal(
<Fragment>
<meta name="color-scheme" content={config.theme} />
<meta name="theme-color" content={theme.sidebar.background} />
diff --git a/static/app/plugins/sessionstack/contexts/sessionstack.tsx b/static/app/plugins/sessionstack/contexts/sessionstack.tsx
index 799a328543015b..77bff3a80f6b7b 100644
--- a/static/app/plugins/sessionstack/contexts/sessionstack.tsx
+++ b/static/app/plugins/sessionstack/contexts/sessionstack.tsx
@@ -1,5 +1,5 @@
import {Component} from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
const ASPECT_RATIO = 16 / 9;
@@ -22,7 +22,7 @@ class SessionStackContextType extends Component<Props, State> {
componentDidMount() {
// eslint-disable-next-line react/no-find-dom-node
- const domNode = ReactDOM.findDOMNode(this) as HTMLElement;
+ const domNode = findDOMNode(this) as HTMLElement;
this.parentNode = domNode.parentNode as HTMLElement;
window.addEventListener('resize', () => this.setIframeSize(), false);
this.setIframeSize();
diff --git a/static/app/views/eventsV2/table/cellAction.tsx b/static/app/views/eventsV2/table/cellAction.tsx
index 04e647277aaec9..a08bc54aab1be5 100644
--- a/static/app/views/eventsV2/table/cellAction.tsx
+++ b/static/app/views/eventsV2/table/cellAction.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {Manager, Popper, Reference} from 'react-popper';
import styled from '@emotion/styled';
import color from 'color';
@@ -377,7 +377,7 @@ class CellAction extends React.Component<Props, State> {
let menu: React.ReactPortal | null = null;
if (isOpen) {
- menu = ReactDOM.createPortal(
+ menu = createPortal(
<Popper placement="top" modifiers={modifiers}>
{({ref: popperRef, style, placement, arrowProps}) => (
<Menu
diff --git a/static/app/views/eventsV2/table/columnEditCollection.tsx b/static/app/views/eventsV2/table/columnEditCollection.tsx
index 03d4cd58b9762f..875c4eb9f39513 100644
--- a/static/app/views/eventsV2/table/columnEditCollection.tsx
+++ b/static/app/views/eventsV2/table/columnEditCollection.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import styled from '@emotion/styled';
import {parseArithmetic} from 'sentry/components/arithmeticInput/parser';
@@ -383,7 +383,7 @@ class ColumnEditCollection extends React.Component<Props, State> {
</Ghost>
);
- return ReactDOM.createPortal(ghost, this.portal);
+ return createPortal(ghost, this.portal);
}
renderItem(
diff --git a/static/app/views/performance/transactionSummary/transactionEvents/operationSort.tsx b/static/app/views/performance/transactionSummary/transactionEvents/operationSort.tsx
index de23e270eecda8..3d4282d0aabb71 100644
--- a/static/app/views/performance/transactionSummary/transactionEvents/operationSort.tsx
+++ b/static/app/views/performance/transactionSummary/transactionEvents/operationSort.tsx
@@ -1,5 +1,5 @@
import {Component} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {Manager, Popper, Reference} from 'react-popper';
import {browserHistory} from 'react-router';
import styled from '@emotion/styled';
@@ -140,7 +140,7 @@ class OperationSort extends Component<Props, State> {
},
};
- return ReactDOM.createPortal(
+ return createPortal(
<Popper placement="top" modifiers={modifiers}>
{({ref: popperRef, style, placement}) => (
<DropdownWrapper
diff --git a/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx b/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx
index 6c0fd1ff05e5c0..4c1519b227dd36 100644
--- a/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx
+++ b/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx
@@ -1,5 +1,5 @@
import {Fragment, useRef, useState} from 'react';
-import ReactDOM from 'react-dom';
+import {createPortal} from 'react-dom';
import {Popper} from 'react-popper';
import styled from '@emotion/styled';
import {truncate} from '@sentry/utils';
@@ -416,7 +416,7 @@ const TagsHeatMap = (
return (
<Fragment>
- {ReactDOM.createPortal(<div>{portaledContent}</div>, getPortal())}
+ {createPortal(<div>{portaledContent}</div>, getPortal())}
{getDynamicText({
value: (
<HeatMapChart
diff --git a/static/app/views/settings/project/projectOwnership/selectOwners.tsx b/static/app/views/settings/project/projectOwnership/selectOwners.tsx
index 295c9a730587b2..43577521503226 100644
--- a/static/app/views/settings/project/projectOwnership/selectOwners.tsx
+++ b/static/app/views/settings/project/projectOwnership/selectOwners.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import ReactDOM from 'react-dom';
+import {findDOMNode} from 'react-dom';
import {MultiValueProps} from 'react-select';
import styled from '@emotion/styled';
import debounce from 'lodash/debounce';
@@ -187,7 +187,7 @@ class SelectOwners extends React.Component<Props, State> {
// Close select menu
if (this.selectRef.current) {
// eslint-disable-next-line react/no-find-dom-node
- const node = ReactDOM.findDOMNode(this.selectRef.current);
+ const node = findDOMNode(this.selectRef.current);
const input: HTMLInputElement | null = (node as Element)?.querySelector(
'.Select-input input'
);
|
34a7b1f3c8d9a4b81969dd274e4cee8442f01f65
|
2018-02-22 04:57:58
|
Lyn Nagara
|
fix(environments): Environment store trigger with this.items (#7323)
| false
|
Environment store trigger with this.items (#7323)
|
fix
|
diff --git a/src/sentry/static/sentry/app/stores/environmentStore.jsx b/src/sentry/static/sentry/app/stores/environmentStore.jsx
index dd4c49b7b45c84..6f5ec99866b197 100644
--- a/src/sentry/static/sentry/app/stores/environmentStore.jsx
+++ b/src/sentry/static/sentry/app/stores/environmentStore.jsx
@@ -55,7 +55,7 @@ const EnvironmentStore = Reflux.createStore({
return item.name || DEFAULT_EMPTY_ROUTING_NAME;
},
}));
- this.trigger(this[key]);
+ this.trigger(this.items);
},
getByName(name) {
|
0b11efd53af3bb819ddad280e053e2f1da3af7f6
|
2024-09-25 01:32:05
|
Michelle Zhang
|
fix(routes): ignore route not found route (#78048)
| false
|
ignore route not found route (#78048)
|
fix
|
diff --git a/static/app/views/lastKnownRouteContextProvider.tsx b/static/app/views/lastKnownRouteContextProvider.tsx
index 38fae90648a579..90e67ada821512 100644
--- a/static/app/views/lastKnownRouteContextProvider.tsx
+++ b/static/app/views/lastKnownRouteContextProvider.tsx
@@ -1,7 +1,6 @@
-import {createContext, useContext} from 'react';
+import {createContext, useContext, useEffect, useRef} from 'react';
import getRouteStringFromRoutes from 'sentry/utils/getRouteStringFromRoutes';
-import usePrevious from 'sentry/utils/usePrevious';
import {useRoutes} from 'sentry/utils/useRoutes';
interface Props {
@@ -20,8 +19,18 @@ export function useLastKnownRoute() {
*/
export default function LastKnownRouteContextProvider({children}: Props) {
const route = useRoutes();
- const prevRoute = usePrevious(route);
- const lastKnownRoute = getRouteStringFromRoutes(prevRoute);
+
+ // We could use `usePrevious` here if we didn't need the additional logic to
+ // ensure we don't track the not found route, which isn't useful for issue grouping.
+ const prevRoute = useRef(route);
+ useEffect(() => {
+ // only store the new value if it's not the "not found" route
+ if (getRouteStringFromRoutes(route) !== '/*') {
+ prevRoute.current = route;
+ }
+ }, [route]);
+
+ const lastKnownRoute = getRouteStringFromRoutes(prevRoute.current);
return (
<LastKnownRouteContext.Provider value={lastKnownRoute}>
|
5cd891a15bbf29f520aa13427f5ab72043825660
|
2022-03-30 22:21:33
|
William Mak
|
ref(discover): Show empty values (#33024)
| false
|
Show empty values (#33024)
|
ref
|
diff --git a/static/app/utils/discover/arrayValue.tsx b/static/app/utils/discover/arrayValue.tsx
index 1ccb32360de708..ffbf8a8574be65 100644
--- a/static/app/utils/discover/arrayValue.tsx
+++ b/static/app/utils/discover/arrayValue.tsx
@@ -5,6 +5,8 @@ import {t} from 'sentry/locale';
import overflowEllipsis from 'sentry/styles/overflowEllipsis';
import space from 'sentry/styles/space';
+import {nullableValue} from './fieldRenderers';
+
type Props = {
value: string[];
};
@@ -30,8 +32,10 @@ class ArrayValue extends Component<Props, State> {
{expanded &&
value
.slice(0, value.length - 1)
- .map((item, i) => <ArrayItem key={`${i}:${item}`}>{item}</ArrayItem>)}
- <ArrayItem>{value.slice(-1)[0]}</ArrayItem>
+ .map((item, i) => (
+ <ArrayItem key={`${i}:${item}`}>{nullableValue(item)}</ArrayItem>
+ ))}
+ <ArrayItem>{nullableValue(value.slice(-1)[0])}</ArrayItem>
{value.length > 1 ? (
<ButtonContainer>
<button onClick={this.handleToggle}>
diff --git a/static/app/utils/discover/fieldRenderers.tsx b/static/app/utils/discover/fieldRenderers.tsx
index 2dd7463b635be2..1dcf88dd76031d 100644
--- a/static/app/utils/discover/fieldRenderers.tsx
+++ b/static/app/utils/discover/fieldRenderers.tsx
@@ -89,7 +89,19 @@ export type FieldTypes = keyof FieldFormatters;
const EmptyValueContainer = styled('span')`
color: ${p => p.theme.gray300};
`;
-const emptyValue = <EmptyValueContainer>{t('n/a')}</EmptyValueContainer>;
+const emptyValue = <EmptyValueContainer>{t('(no value)')}</EmptyValueContainer>;
+const emptyStringValue = <EmptyValueContainer>{t('(empty string)')}</EmptyValueContainer>;
+
+export function nullableValue(value: string | null): string | React.ReactElement {
+ switch (value) {
+ case null:
+ return emptyValue;
+ case '':
+ return emptyStringValue;
+ default:
+ return value;
+ }
+}
/**
* A mapping of field types to their rendering function.
@@ -173,7 +185,7 @@ export const FIELD_FORMATTERS: FieldFormatters = {
</Container>
);
}
- return <Container>{value}</Container>;
+ return <Container>{nullableValue(value)}</Container>;
},
},
array: {
diff --git a/tests/js/spec/utils/discover/arrayValue.spec.jsx b/tests/js/spec/utils/discover/arrayValue.spec.jsx
index b41d32cfdb190c..54addd139bb99a 100644
--- a/tests/js/spec/utils/discover/arrayValue.spec.jsx
+++ b/tests/js/spec/utils/discover/arrayValue.spec.jsx
@@ -15,7 +15,7 @@ describe('Discover > ArrayValue', function () {
});
it('renders all elements when expanded', function () {
- render(<ArrayValue value={['one', 'two', 'three']} />);
+ render(<ArrayValue value={['one', 'two', 'three', '', null]} />);
// Should have a button
let button = screen.getByRole('button');
@@ -29,6 +29,8 @@ describe('Discover > ArrayValue', function () {
expect(screen.getByText('one')).toBeInTheDocument();
expect(screen.getByText('two')).toBeInTheDocument();
expect(screen.getByText('three')).toBeInTheDocument();
+ expect(screen.getByText('(no value)')).toBeInTheDocument();
+ expect(screen.getByText('(empty string)')).toBeInTheDocument();
});
it('hides toggle on 1 element', function () {
diff --git a/tests/js/spec/utils/discover/fieldRenderer.spec.jsx b/tests/js/spec/utils/discover/fieldRenderer.spec.jsx
index 5902f8f8980a20..8e9cee3bc77b71 100644
--- a/tests/js/spec/utils/discover/fieldRenderer.spec.jsx
+++ b/tests/js/spec/utils/discover/fieldRenderer.spec.jsx
@@ -72,6 +72,15 @@ describe('getFieldRenderer', function () {
expect(text.text()).toEqual(data.url);
});
+ it('can render empty string fields', function () {
+ const renderer = getFieldRenderer('url', {url: 'string'});
+ data.url = '';
+ const wrapper = mountWithTheme(renderer(data, {location, organization}));
+ const value = wrapper.find('EmptyValueContainer');
+ expect(value).toHaveLength(1);
+ expect(value.text()).toEqual('(empty string)');
+ });
+
it('can render boolean fields', function () {
const renderer = getFieldRenderer('boolValue', {boolValue: 'boolean'});
const wrapper = mountWithTheme(renderer(data, {location, organization}));
@@ -104,7 +113,7 @@ describe('getFieldRenderer', function () {
const value = wrapper.find('FieldDateTime');
expect(value).toHaveLength(0);
- expect(wrapper.text()).toEqual('n/a');
+ expect(wrapper.text()).toEqual('(no value)');
});
it('can render timestamp.to_day', function () {
@@ -165,11 +174,11 @@ describe('getFieldRenderer', function () {
// Default events won't have error.handled and will return an empty list.
wrapper = mountWithTheme(renderer({'error.handled': []}, {location, organization}));
- expect(wrapper.text()).toEqual('n/a');
+ expect(wrapper.text()).toEqual('(no value)');
// Transactions will have null for error.handled as the 'tag' won't be set.
wrapper = mountWithTheme(renderer({'error.handled': null}, {location, organization}));
- expect(wrapper.text()).toEqual('n/a');
+ expect(wrapper.text()).toEqual('(no value)');
});
it('can render user fields with aliased user', function () {
@@ -196,7 +205,7 @@ describe('getFieldRenderer', function () {
const value = wrapper.find('EmptyValueContainer');
expect(value).toHaveLength(1);
- expect(value.text()).toEqual('n/a');
+ expect(value.text()).toEqual('(no value)');
});
it('can render null release fields', function () {
@@ -207,7 +216,7 @@ describe('getFieldRenderer', function () {
const value = wrapper.find('EmptyValueContainer');
expect(value).toHaveLength(1);
- expect(value.text()).toEqual('n/a');
+ expect(value.text()).toEqual('(no value)');
});
it('can render project as an avatar', function () {
diff --git a/tests/js/spec/views/performance/transactionEvents.spec.tsx b/tests/js/spec/views/performance/transactionEvents.spec.tsx
index b68d5627f2a557..4b87de0a8d3717 100644
--- a/tests/js/spec/views/performance/transactionEvents.spec.tsx
+++ b/tests/js/spec/views/performance/transactionEvents.spec.tsx
@@ -227,7 +227,7 @@ describe('Performance > TransactionSummary', function () {
expect(keyAt(1)).toEqual('user.display');
expect(valueAt(1, 'span')).toEqual('[email protected]');
expect(keyAt(2)).toEqual('span_ops_breakdown.relative');
- expect(valueAt(2, 'span')).toEqual('n/a');
+ expect(valueAt(2, 'span')).toEqual('(no value)');
expect(keyAt(3)).toEqual('transaction.duration');
expect(valueAt(3, 'span')).toEqual('400.00ms');
expect(keyAt(4)).toEqual('trace');
@@ -264,7 +264,7 @@ describe('Performance > TransactionSummary', function () {
expect(keyAt(1)).toEqual('user.display');
expect(valueAt(1, 'span')).toEqual('[email protected]');
expect(keyAt(2)).toEqual('span_ops_breakdown.relative');
- expect(valueAt(2, 'span')).toEqual('n/a');
+ expect(valueAt(2, 'span')).toEqual('(no value)');
expect(keyAt(3)).toEqual('measurements.lcp');
expect(valueAt(3)).toEqual('200');
expect(keyAt(4)).toEqual('transaction.duration');
|
dde9c7f627e4e11e286446b20157994fc1a48012
|
2022-11-07 20:07:29
|
William Mak
|
fix(metric-layer): Allow tag filtering (#41035)
| false
|
Allow tag filtering (#41035)
|
fix
|
diff --git a/src/sentry/snuba/metrics/mqb_query_transformer.py b/src/sentry/snuba/metrics/mqb_query_transformer.py
index 44f4d0a4a1e5fa..18793c017b4325 100644
--- a/src/sentry/snuba/metrics/mqb_query_transformer.py
+++ b/src/sentry/snuba/metrics/mqb_query_transformer.py
@@ -4,7 +4,12 @@
from snuba_sdk.query import Query
from sentry.api.utils import InvalidParams
-from sentry.snuba.metrics import FIELD_ALIAS_MAPPINGS, OPERATIONS, DerivedMetricException
+from sentry.snuba.metrics import (
+ FIELD_ALIAS_MAPPINGS,
+ FILTERABLE_TAGS,
+ OPERATIONS,
+ DerivedMetricException,
+)
from sentry.snuba.metrics.fields.base import DERIVED_OPS, metric_object_factory
from sentry.snuba.metrics.query import (
MetricConditionField,
@@ -186,7 +191,7 @@ def _get_mq_dict_params_from_where(query_where):
mq_dict["start"] = condition.rhs
elif condition.op == Op.LT:
mq_dict["end"] = condition.rhs
- elif condition.lhs.name in ["tags[environment]", "tags[transaction]"]:
+ elif condition.lhs.name in FILTERABLE_TAGS:
where.append(condition)
else:
raise MQBQueryTransformationException(f"Unsupported column for where {condition}")
diff --git a/src/sentry/snuba/metrics/utils.py b/src/sentry/snuba/metrics/utils.py
index 63f46d32383644..0fb765f1ffbd5d 100644
--- a/src/sentry/snuba/metrics/utils.py
+++ b/src/sentry/snuba/metrics/utils.py
@@ -12,6 +12,7 @@
"AVAILABLE_GENERIC_OPERATIONS",
"OPERATIONS_TO_ENTITY",
"METRIC_TYPE_TO_ENTITY",
+ "FILTERABLE_TAGS",
"FIELD_ALIAS_MAPPINGS",
"Tag",
"TagValue",
@@ -197,6 +198,14 @@ def generate_operation_regex():
NON_RESOLVABLE_TAG_VALUES = (
{"team_key_transaction"} | set(FIELD_ALIAS_MAPPINGS.keys()) | set(FIELD_ALIAS_MAPPINGS.values())
)
+FILTERABLE_TAGS = {
+ "tags[environment]",
+ "tags[transaction]",
+ "tags[transaction.op]",
+ "tags[transaction.status]",
+ "tags[browser.name]",
+ "tags[os.name]",
+}
class Tag(TypedDict):
|
527f50be6aab43c285a0f0f49371beee6ad9e861
|
2024-08-15 22:57:40
|
Malachi Willey
|
feat(query-builder): Display full-width menu when there is an empty query (#76226)
| false
|
Display full-width menu when there is an empty query (#76226)
|
feat
|
diff --git a/static/app/components/compactSelect/listBox/index.tsx b/static/app/components/compactSelect/listBox/index.tsx
index d43aebbe6325d5..28f50419ace928 100644
--- a/static/app/components/compactSelect/listBox/index.tsx
+++ b/static/app/components/compactSelect/listBox/index.tsx
@@ -69,6 +69,10 @@ interface ListBoxProps
* Used to determine whether to render the list box items or not
*/
overlayIsOpen?: boolean;
+ /**
+ * When false, hides option details.
+ */
+ showDetails?: boolean;
/**
* When false, hides section headers in the list box.
*/
@@ -109,6 +113,7 @@ const ListBox = forwardRef<HTMLUListElement, ListBoxProps>(function ListBox(
hasSearch,
overlayIsOpen,
showSectionHeaders = true,
+ showDetails = true,
...props
}: ListBoxProps,
forwarderdRef
@@ -168,6 +173,7 @@ const ListBox = forwardRef<HTMLUListElement, ListBoxProps>(function ListBox(
onToggle={onSectionToggle}
size={size}
showSectionHeaders={showSectionHeaders}
+ showDetails={showDetails}
/>
);
}
@@ -178,6 +184,7 @@ const ListBox = forwardRef<HTMLUListElement, ListBoxProps>(function ListBox(
item={item}
listState={listState}
size={size}
+ showDetails={showDetails}
/>
);
})}
diff --git a/static/app/components/compactSelect/listBox/option.tsx b/static/app/components/compactSelect/listBox/option.tsx
index 917ce68db96097..e8e1378a416871 100644
--- a/static/app/components/compactSelect/listBox/option.tsx
+++ b/static/app/components/compactSelect/listBox/option.tsx
@@ -15,13 +15,19 @@ interface ListBoxOptionProps extends AriaOptionProps {
item: Node<any>;
listState: ListState<any>;
size: FormSize;
+ showDetails?: boolean;
}
/**
* A <li /> element with accessibile behaviors & attributes.
* https://react-spectrum.adobe.com/react-aria/useListBox.html
*/
-export function ListBoxOption({item, listState, size}: ListBoxOptionProps) {
+export function ListBoxOption({
+ item,
+ listState,
+ size,
+ showDetails = true,
+}: ListBoxOptionProps) {
const ref = useRef<HTMLLIElement>(null);
const {
label,
@@ -89,7 +95,7 @@ export function ListBoxOption({item, listState, size}: ListBoxOptionProps) {
ref={ref}
size={size}
label={label}
- details={details}
+ details={showDetails ? details : null}
disabled={isDisabled}
isPressed={isPressed}
isSelected={isSelected}
diff --git a/static/app/components/compactSelect/listBox/section.tsx b/static/app/components/compactSelect/listBox/section.tsx
index 470e5569fd980e..a3e3a1c7c68bf5 100644
--- a/static/app/components/compactSelect/listBox/section.tsx
+++ b/static/app/components/compactSelect/listBox/section.tsx
@@ -26,6 +26,7 @@ interface ListBoxSectionProps extends AriaListBoxSectionProps {
showSectionHeaders: boolean;
size: FormSize;
onToggle?: (section: SelectSection<SelectKey>, type: 'select' | 'unselect') => void;
+ showDetails?: boolean;
}
/**
@@ -39,6 +40,7 @@ export function ListBoxSection({
size,
hiddenOptions,
showSectionHeaders,
+ showDetails = true,
}: ListBoxSectionProps) {
const {itemProps, headingProps, groupProps} = useListBoxSection({
heading: item.rendered,
@@ -77,6 +79,7 @@ export function ListBoxSection({
item={child}
listState={listState}
size={size}
+ showDetails={showDetails}
/>
))}
</SectionGroup>
diff --git a/static/app/components/searchQueryBuilder/tokens/combobox.tsx b/static/app/components/searchQueryBuilder/tokens/combobox.tsx
index 744281163b4dd6..8b61469e307078 100644
--- a/static/app/components/searchQueryBuilder/tokens/combobox.tsx
+++ b/static/app/components/searchQueryBuilder/tokens/combobox.tsx
@@ -107,14 +107,21 @@ type SearchQueryBuilderComboboxProps<T extends SelectOptionOrSectionWithKey<stri
tabIndex?: number;
};
-export type CustomComboboxMenu<T> = (props: {
+type OverlayProps = ReturnType<typeof useOverlay>['overlayProps'];
+
+export type CustomComboboxMenuProps<T> = {
hiddenOptions: Set<SelectKey>;
isOpen: boolean;
listBoxProps: AriaListBoxOptions<T>;
listBoxRef: React.RefObject<HTMLUListElement>;
+ overlayProps: OverlayProps;
popoverRef: React.RefObject<HTMLDivElement>;
state: ComboBoxState<T>;
-}) => React.ReactNode;
+};
+
+export type CustomComboboxMenu<T> = (
+ props: CustomComboboxMenuProps<T>
+) => React.ReactNode;
const DESCRIPTION_POPPER_OPTIONS = {
placement: 'top-start' as const,
@@ -244,12 +251,14 @@ function OverlayContent<T extends SelectOptionOrSectionWithKey<string>>({
popoverRef,
state,
totalOptions,
+ overlayProps,
}: {
filterValue: string;
hiddenOptions: Set<SelectKey>;
isOpen: boolean;
listBoxProps: AriaListBoxOptions<any>;
listBoxRef: React.RefObject<HTMLUListElement>;
+ overlayProps: OverlayProps;
popoverRef: React.RefObject<HTMLDivElement>;
state: ComboBoxState<any>;
totalOptions: number;
@@ -264,29 +273,32 @@ function OverlayContent<T extends SelectOptionOrSectionWithKey<string>>({
hiddenOptions,
listBoxProps,
state,
+ overlayProps,
});
}
return (
- <ListBoxOverlay ref={popoverRef}>
- {isLoading && hiddenOptions.size >= totalOptions ? (
- <LoadingWrapper>
- <LoadingIndicator mini />
- </LoadingWrapper>
- ) : (
- <ListBox
- {...listBoxProps}
- ref={listBoxRef}
- listState={state}
- hasSearch={!!filterValue}
- hiddenOptions={hiddenOptions}
- keyDownHandler={() => true}
- overlayIsOpen={isOpen}
- showSectionHeaders={!filterValue}
- size="sm"
- />
- )}
- </ListBoxOverlay>
+ <StyledPositionWrapper {...overlayProps} visible={isOpen}>
+ <ListBoxOverlay ref={popoverRef}>
+ {isLoading && hiddenOptions.size >= totalOptions ? (
+ <LoadingWrapper>
+ <LoadingIndicator mini />
+ </LoadingWrapper>
+ ) : (
+ <ListBox
+ {...listBoxProps}
+ ref={listBoxRef}
+ listState={state}
+ hasSearch={!!filterValue}
+ hiddenOptions={hiddenOptions}
+ keyDownHandler={() => true}
+ overlayIsOpen={isOpen}
+ showSectionHeaders={!filterValue}
+ size="sm"
+ />
+ )}
+ </ListBoxOverlay>
+ </StyledPositionWrapper>
);
}
@@ -532,20 +544,19 @@ function SearchQueryBuilderComboboxInner<T extends SelectOptionOrSectionWithKey<
<DescriptionOverlay>{description}</DescriptionOverlay>
</StyledPositionWrapper>
) : null}
- <StyledPositionWrapper {...overlayProps} visible={isOpen}>
- <OverlayContent
- customMenu={customMenu}
- filterValue={filterValue}
- hiddenOptions={hiddenOptions}
- isLoading={isLoading}
- isOpen={isOpen}
- listBoxProps={listBoxProps}
- listBoxRef={listBoxRef}
- popoverRef={popoverRef}
- state={state}
- totalOptions={totalOptions}
- />
- </StyledPositionWrapper>
+ <OverlayContent
+ customMenu={customMenu}
+ filterValue={filterValue}
+ hiddenOptions={hiddenOptions}
+ isLoading={isLoading}
+ isOpen={isOpen}
+ listBoxProps={listBoxProps}
+ listBoxRef={listBoxRef}
+ popoverRef={popoverRef}
+ state={state}
+ totalOptions={totalOptions}
+ overlayProps={overlayProps}
+ />
</Wrapper>
);
}
diff --git a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/index.tsx b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/index.tsx
index f795f1a36adae2..9c19fe2373d6db 100644
--- a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/index.tsx
+++ b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/index.tsx
@@ -1,6 +1,8 @@
import {Fragment, type ReactNode, useEffect, useMemo, useRef} from 'react';
+import {createPortal} from 'react-dom';
+import {css} from '@emotion/react';
import styled from '@emotion/styled';
-import {type AriaListBoxOptions, useOption} from '@react-aria/listbox';
+import {useOption} from '@react-aria/listbox';
import type {ComboBoxState} from '@react-stately/combobox';
import type {Key} from '@react-types/shared';
@@ -13,6 +15,8 @@ import type {
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {Overlay} from 'sentry/components/overlay';
import {useSearchQueryBuilder} from 'sentry/components/searchQueryBuilder/context';
+import type {CustomComboboxMenuProps} from 'sentry/components/searchQueryBuilder/tokens/combobox';
+import {KeyDescription} from 'sentry/components/searchQueryBuilder/tokens/filterKeyListBox/keyDescription';
import {createRecentFilterOptionKey} from 'sentry/components/searchQueryBuilder/tokens/filterKeyListBox/utils';
import {IconMegaphone} from 'sentry/icons';
import {t} from 'sentry/locale';
@@ -20,18 +24,26 @@ import {space} from 'sentry/styles/space';
import {useFeedbackForm} from 'sentry/utils/useFeedbackForm';
import usePrevious from 'sentry/utils/usePrevious';
-type FilterKeyListBoxProps<T> = {
- hiddenOptions: Set<SelectKey>;
- isOpen: boolean;
- listBoxProps: AriaListBoxOptions<T>;
- listBoxRef: React.RefObject<HTMLUListElement>;
- popoverRef: React.RefObject<HTMLDivElement>;
+interface FilterKeyListBoxProps<T> extends CustomComboboxMenuProps<T> {
recentFilters: string[];
sections: Array<T>;
selectedSection: Key | null;
setSelectedSection: (section: Key | null) => void;
- state: ComboBoxState<T>;
-};
+}
+
+interface FilterKeyMenuContentProps<T>
+ extends Pick<
+ FilterKeyListBoxProps<T>,
+ | 'hiddenOptions'
+ | 'listBoxProps'
+ | 'listBoxRef'
+ | 'recentFilters'
+ | 'state'
+ | 'selectedSection'
+ | 'setSelectedSection'
+ > {
+ fullWidth: boolean;
+}
function ListBoxSectionButton({
onClick,
@@ -146,6 +158,78 @@ function useHighlightFirstOptionOnSectionChange({
}, [displayedListItems, previousSection, selectedSection, state.selectionManager]);
}
+function FilterKeyMenuContent<T extends SelectOptionOrSectionWithKey<string>>({
+ recentFilters,
+ selectedSection,
+ setSelectedSection,
+ state,
+ listBoxProps,
+ hiddenOptions,
+ listBoxRef,
+ fullWidth,
+}: FilterKeyMenuContentProps<T>) {
+ const {filterKeys, filterKeySections} = useSearchQueryBuilder();
+ const focusedItem = state.collection.getItem(state.selectionManager.focusedKey)?.props
+ ?.value as string | undefined;
+ const focusedKey = focusedItem ? filterKeys[focusedItem] : null;
+ const showRecentFilters = recentFilters.length > 0;
+
+ return (
+ <Fragment>
+ {showRecentFilters ? (
+ <RecentFiltersPane>
+ {recentFilters.map(filter => (
+ <RecentSearchFilterOption key={filter} filter={filter} state={state} />
+ ))}
+ </RecentFiltersPane>
+ ) : null}
+ <SectionedListBoxTabPane>
+ <ListBoxSectionButton
+ selected={selectedSection === null}
+ onClick={() => {
+ setSelectedSection(null);
+ state.selectionManager.setFocusedKey(null);
+ }}
+ >
+ {t('All')}
+ </ListBoxSectionButton>
+ {filterKeySections.map(section => (
+ <ListBoxSectionButton
+ key={section.value}
+ selected={selectedSection === section.value}
+ onClick={() => {
+ setSelectedSection(section.value);
+ state.selectionManager.setFocusedKey(null);
+ }}
+ >
+ {section.label}
+ </ListBoxSectionButton>
+ ))}
+ </SectionedListBoxTabPane>
+ <SectionedListBoxPane>
+ <ListBox
+ {...listBoxProps}
+ ref={listBoxRef}
+ listState={state}
+ hasSearch={false}
+ hiddenOptions={hiddenOptions}
+ keyDownHandler={() => true}
+ overlayIsOpen
+ showSectionHeaders={!selectedSection}
+ size="sm"
+ showDetails={!fullWidth}
+ />
+ </SectionedListBoxPane>
+ {fullWidth ? (
+ <DetailsPane>
+ {focusedKey ? <KeyDescription size="md" tag={focusedKey} /> : null}
+ </DetailsPane>
+ ) : null}
+ <FeedbackFooter />
+ </Fragment>
+ );
+}
+
export function FilterKeyListBox<T extends SelectOptionOrSectionWithKey<string>>({
hiddenOptions,
isOpen,
@@ -157,8 +241,9 @@ export function FilterKeyListBox<T extends SelectOptionOrSectionWithKey<string>>
sections,
selectedSection,
setSelectedSection,
+ overlayProps,
}: FilterKeyListBoxProps<T>) {
- const {filterKeySections, filterKeyMenuWidth} = useSearchQueryBuilder();
+ const {filterKeyMenuWidth, wrapperRef, query} = useSearchQueryBuilder();
// Add recent filters to hiddenOptions so they don't show up the ListBox component.
// We render recent filters manually in the RecentFiltersPane component.
@@ -176,67 +261,100 @@ export function FilterKeyListBox<T extends SelectOptionOrSectionWithKey<string>>
sections,
});
- return (
- <SectionedOverlay ref={popoverRef} width={filterKeyMenuWidth}>
- {isOpen ? (
- <Fragment>
- <RecentFiltersPane visible={recentFilters.length > 0}>
- {recentFilters.map(filter => (
- <RecentSearchFilterOption key={filter} filter={filter} state={state} />
- ))}
- </RecentFiltersPane>
- <SectionedListBoxTabPane>
- <ListBoxSectionButton
- selected={selectedSection === null}
- onClick={() => {
- setSelectedSection(null);
- state.selectionManager.setFocusedKey(null);
- }}
- >
- {t('All')}
- </ListBoxSectionButton>
- {filterKeySections.map(section => (
- <ListBoxSectionButton
- key={section.value}
- selected={selectedSection === section.value}
- onClick={() => {
- setSelectedSection(section.value);
- state.selectionManager.setFocusedKey(null);
- }}
- >
- {section.label}
- </ListBoxSectionButton>
- ))}
- </SectionedListBoxTabPane>
- <SectionedListBoxPane>
- <ListBox
- {...listBoxProps}
- ref={listBoxRef}
- listState={state}
- hasSearch={false}
+ const fullWidth = !query;
+
+ // Remove bottom border radius of top-level component while the full-width menu is open
+ useEffect(() => {
+ const wrapper = wrapperRef.current;
+ if (!wrapper || !fullWidth || !isOpen) {
+ return () => {};
+ }
+
+ wrapper.style.borderBottomLeftRadius = '0';
+ wrapper.style.borderBottomRightRadius = '0';
+
+ return () => {
+ wrapper.style.borderBottomLeftRadius = '';
+ wrapper.style.borderBottomRightRadius = '';
+ };
+ }, [fullWidth, isOpen, wrapperRef]);
+
+ if (fullWidth) {
+ if (!wrapperRef.current) {
+ return null;
+ }
+ return createPortal(
+ <StyledPositionWrapper
+ {...overlayProps}
+ visible={isOpen}
+ style={{position: 'absolute', width: '100%', left: 0, top: 38, right: 0}}
+ >
+ <SectionedOverlay ref={popoverRef} fullWidth>
+ {isOpen ? (
+ <FilterKeyMenuContent
+ fullWidth={fullWidth}
hiddenOptions={hiddenOptionsWithRecentsAdded}
- keyDownHandler={() => true}
- overlayIsOpen={isOpen}
- showSectionHeaders={!selectedSection}
- size="sm"
+ listBoxProps={listBoxProps}
+ listBoxRef={listBoxRef}
+ recentFilters={recentFilters}
+ selectedSection={selectedSection}
+ setSelectedSection={setSelectedSection}
+ state={state}
/>
- </SectionedListBoxPane>
- <FeedbackFooter />
- </Fragment>
- ) : null}
- </SectionedOverlay>
+ ) : null}
+ </SectionedOverlay>
+ </StyledPositionWrapper>,
+ wrapperRef.current
+ );
+ }
+
+ return (
+ <StyledPositionWrapper {...overlayProps} visible={isOpen}>
+ <SectionedOverlay ref={popoverRef} width={filterKeyMenuWidth}>
+ {isOpen ? (
+ <FilterKeyMenuContent
+ fullWidth={fullWidth}
+ hiddenOptions={hiddenOptionsWithRecentsAdded}
+ listBoxProps={listBoxProps}
+ listBoxRef={listBoxRef}
+ recentFilters={recentFilters}
+ selectedSection={selectedSection}
+ setSelectedSection={setSelectedSection}
+ state={state}
+ />
+ ) : null}
+ </SectionedOverlay>
+ </StyledPositionWrapper>
);
}
-const SectionedOverlay = styled(Overlay)<{width: number}>`
+const SectionedOverlay = styled(Overlay)<{fullWidth?: boolean; width?: number}>`
display: grid;
grid-template-rows: auto auto 1fr auto;
+ grid-template-columns: ${p => (p.fullWidth ? '50% 50%' : '1fr')};
+ grid-template-areas:
+ 'recentFilters recentFilters'
+ 'tabs tabs'
+ 'list list'
+ 'footer footer';
+ ${p =>
+ p.fullWidth &&
+ css`
+ grid-template-areas:
+ 'recentFilters recentFilters'
+ 'tabs tabs'
+ 'list details'
+ 'footer footer';
+ `}
overflow: hidden;
height: 400px;
- width: ${p => p.width}px;
+ width: ${p => (p.fullWidth ? '100%' : `${p.width}px`)};
+ ${p =>
+ p.fullWidth && `border-radius: 0 0 ${p.theme.borderRadius} ${p.theme.borderRadius}`};
`;
const SectionedOverlayFooter = styled('div')`
+ grid-area: footer;
display: flex;
align-items: center;
justify-content: flex-end;
@@ -244,8 +362,9 @@ const SectionedOverlayFooter = styled('div')`
border-top: 1px solid ${p => p.theme.innerBorder};
`;
-const RecentFiltersPane = styled('ul')<{visible: boolean}>`
- display: ${p => (p.visible ? 'flex' : 'none')};
+const RecentFiltersPane = styled('ul')`
+ grid-area: recentFilters;
+ display: flex;
flex-wrap: wrap;
background: ${p => p.theme.backgroundSecondary};
padding: ${space(1)};
@@ -255,15 +374,23 @@ const RecentFiltersPane = styled('ul')<{visible: boolean}>`
`;
const SectionedListBoxPane = styled('div')`
+ grid-area: list;
overflow-y: auto;
- border-top: 1px solid ${p => p.theme.innerBorder};
+`;
+
+const DetailsPane = styled('div')`
+ grid-area: details;
+ overflow-y: auto;
+ border-left: 1px solid ${p => p.theme.innerBorder};
`;
const SectionedListBoxTabPane = styled('div')`
+ grid-area: tabs;
padding: ${space(0.5)};
display: flex;
flex-wrap: wrap;
gap: ${space(0.25)};
+ border-bottom: 1px solid ${p => p.theme.innerBorder};
`;
const RecentFilterPill = styled('li')`
@@ -316,3 +443,8 @@ const SectionButton = styled(Button)`
font-weight: ${p => p.theme.fontWeightBold};
}
`;
+
+const StyledPositionWrapper = styled('div')<{visible?: boolean}>`
+ display: ${p => (p.visible ? 'block' : 'none')};
+ z-index: ${p => p.theme.zIndex.tooltip};
+`;
diff --git a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/keyDescription.tsx b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/keyDescription.tsx
index f425a159951a80..ced440b7ed0e69 100644
--- a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/keyDescription.tsx
+++ b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/keyDescription.tsx
@@ -8,7 +8,12 @@ import type {Tag} from 'sentry/types/group';
import {FieldKind, FieldValueType} from 'sentry/utils/fields';
import {toTitleCase} from 'sentry/utils/string/toTitleCase';
-export function KeyDescription({tag}: {tag: Tag}) {
+type KeyDescriptionProps = {
+ tag: Tag;
+ size?: 'sm' | 'md';
+};
+
+export function KeyDescription({size = 'sm', tag}: KeyDescriptionProps) {
const {getFieldDefinition} = useSearchQueryBuilder();
const fieldDefinition = getFieldDefinition(tag.key);
@@ -18,7 +23,7 @@ export function KeyDescription({tag}: {tag: Tag}) {
(tag.kind === FieldKind.TAG ? t('A tag sent with one or more events') : null);
return (
- <DescriptionWrapper>
+ <DescriptionWrapper size={size}>
<DescriptionKeyLabel>
{getKeyLabel(tag, fieldDefinition, {includeAggregateArgs: true})}
</DescriptionKeyLabel>
@@ -34,10 +39,11 @@ export function KeyDescription({tag}: {tag: Tag}) {
);
}
-const DescriptionWrapper = styled('div')`
- padding: ${space(0.75)} ${space(1)};
- max-width: 220px;
- font-size: ${p => p.theme.fontSizeSmall};
+const DescriptionWrapper = styled('div')<Pick<KeyDescriptionProps, 'size'>>`
+ padding: ${p =>
+ p.size === 'sm' ? `${space(0.75)} ${space(1)}` : `${space(1.5)} ${space(2)}`};
+ max-width: ${p => (p.size === 'sm' ? '220px' : 'none')};
+ font-size: ${p => (p.size === 'sm' ? p.theme.fontSizeSmall : p.theme.fontSizeMedium)};
p {
margin: 0;
|
78f1af205591e593af78e4539a85cf3a796cc810
|
2025-01-15 12:31:59
|
Markus Hintersteiner
|
feat(insights): Minor UI improvements (#83380)
| false
|
Minor UI improvements (#83380)
|
feat
|
diff --git a/static/app/views/insights/mobile/screens/components/screensOverview.tsx b/static/app/views/insights/mobile/screens/components/screensOverview.tsx
index 608eb25a098273..f89bbe40e74025 100644
--- a/static/app/views/insights/mobile/screens/components/screensOverview.tsx
+++ b/static/app/views/insights/mobile/screens/components/screensOverview.tsx
@@ -115,6 +115,7 @@ export function ScreensOverview() {
const secondaryDataset = isSpanPrimary ? transactionMetricsDataset : spanMetricsDataset;
const secondaryFields = isSpanPrimary ? transactionMetricsFields : spanMetricsFields;
+ const hasVisibleScreens = visibleScreens.length > 0;
const {
data: primaryData,
@@ -139,7 +140,7 @@ export function ScreensOverview() {
selection,
location,
undefined,
- visibleScreens.length > 0,
+ hasVisibleScreens,
visibleScreens
);
@@ -192,8 +193,7 @@ export function ScreensOverview() {
return primaryData;
}, [primaryData, secondaryData]);
- const loading = primaryLoading || secondaryLoading;
-
+ const loading = primaryLoading || (hasVisibleScreens && secondaryLoading);
return (
<Container>
<SearchBar
diff --git a/static/app/views/insights/mobile/screens/utils.ts b/static/app/views/insights/mobile/screens/utils.ts
index 3cc29dcd288f2f..2727a3e6353558 100644
--- a/static/app/views/insights/mobile/screens/utils.ts
+++ b/static/app/views/insights/mobile/screens/utils.ts
@@ -4,6 +4,9 @@ import getDuration from 'sentry/utils/duration/getDuration';
import {VitalState} from 'sentry/views/performance/vitalDetail/utils';
const formatMetricValue = (metric: MetricValue): string => {
+ if (metric.value == null) {
+ return '-';
+ }
if (typeof metric.value === 'number' && metric.type === 'duration' && metric.unit) {
const seconds =
(metric.value * ((metric.unit && DURATION_UNITS[metric.unit]) ?? 1)) / 1000;
diff --git a/static/app/views/insights/pages/mobile/mobilePageHeader.tsx b/static/app/views/insights/pages/mobile/mobilePageHeader.tsx
index 164e86de3d155b..6f5e908f33b397 100644
--- a/static/app/views/insights/pages/mobile/mobilePageHeader.tsx
+++ b/static/app/views/insights/pages/mobile/mobilePageHeader.tsx
@@ -39,7 +39,7 @@ export function MobileHeader({
const hasMobileUi = isModuleEnabled(ModuleName.MOBILE_UI, organization);
const modules = hasMobileScreens
- ? [ModuleName.MOBILE_SCREENS]
+ ? [ModuleName.MOBILE_SCREENS, ModuleName.HTTP]
: [
ModuleName.APP_START,
ModuleName.SCREEN_LOAD,
|
807d201d6ccab0f325269a9326821655758dc54b
|
2022-07-18 23:04:37
|
William Mak
|
fix(mep): Environment Filter (#36763)
| false
|
Environment Filter (#36763)
|
fix
|
diff --git a/src/sentry/search/events/builder.py b/src/sentry/search/events/builder.py
index 5cfc0f55fa0290..95053fbef2eb58 100644
--- a/src/sentry/search/events/builder.py
+++ b/src/sentry/search/events/builder.py
@@ -1887,6 +1887,31 @@ def _default_filter_converter(self, search_filter: SearchFilter) -> Optional[Whe
return Condition(lhs, Op(search_filter.operator), value)
+ def _environment_filter_converter(self, search_filter: SearchFilter) -> Optional[WhereType]:
+ """All of this is copied from the parent class except for the addition of `resolve_value`
+
+ Going to live with the duplicated code since this will go away anyways once we move to the metric layer
+ """
+ # conditions added to env_conditions can be OR'ed
+ env_conditions = []
+ value = search_filter.value.value
+ values_set = set(value if isinstance(value, (list, tuple)) else [value])
+ # sorted for consistency
+ values = sorted(
+ self.config.resolve_value(f"{value}") if value else 0 for value in values_set
+ )
+ environment = self.column("environment")
+ if len(values) == 1:
+ operator = Op.EQ if search_filter.operator in EQUALITY_OPERATORS else Op.NEQ
+ env_conditions.append(Condition(environment, operator, values.pop()))
+ elif values:
+ operator = Op.IN if search_filter.operator in EQUALITY_OPERATORS else Op.NOT_IN
+ env_conditions.append(Condition(environment, operator, values))
+ if len(env_conditions) > 1:
+ return Or(conditions=env_conditions)
+ else:
+ return env_conditions[0]
+
def get_snql_query(self) -> Request:
self.validate_having_clause()
self.validate_orderby_clause()
diff --git a/src/sentry/search/events/datasets/metrics.py b/src/sentry/search/events/datasets/metrics.py
index 3e87626db3ebae..c1a6b45f71424d 100644
--- a/src/sentry/search/events/datasets/metrics.py
+++ b/src/sentry/search/events/datasets/metrics.py
@@ -28,7 +28,8 @@ def search_filter_converter(
constants.PROJECT_NAME_ALIAS: self._project_slug_filter_converter,
constants.EVENT_TYPE_ALIAS: self._event_type_converter,
constants.TEAM_KEY_TRANSACTION_ALIAS: self._key_transaction_filter_converter,
- "transaction.duration": self._duration_filter_converter,
+ "transaction.duration": self._duration_filter_converter, # Only for dry_run
+ "environment": self.builder._environment_filter_converter,
}
@property
diff --git a/tests/snuba/api/endpoints/test_organization_events_v2.py b/tests/snuba/api/endpoints/test_organization_events_v2.py
index b5fe3423c1d4a2..f23271413441db 100644
--- a/tests/snuba/api/endpoints/test_organization_events_v2.py
+++ b/tests/snuba/api/endpoints/test_organization_events_v2.py
@@ -11800,3 +11800,79 @@ def test_custom_measurements_simple(self):
assert data[0]["transaction"] == "foo_transaction"
assert data[0]["p50(measurements.something_custom)"] == 1
assert meta["isMetricsData"]
+
+ def test_environment_param(self):
+ self.create_environment(self.project, name="staging")
+ self.store_metric(
+ 1,
+ tags={"transaction": "foo_transaction", "environment": "staging"},
+ timestamp=self.min_ago,
+ )
+ self.store_metric(
+ 100,
+ tags={"transaction": "foo_transaction"},
+ timestamp=self.min_ago,
+ )
+
+ query = {
+ "project": [self.project.id],
+ "environment": "staging",
+ "orderby": "p50(transaction.duration)",
+ "field": [
+ "transaction",
+ "environment",
+ "p50(transaction.duration)",
+ ],
+ "statsPeriod": "24h",
+ "dataset": "metricsEnhanced",
+ "per_page": 50,
+ }
+
+ response = self.do_request(query)
+ assert response.status_code == 200, response.content
+ assert len(response.data["data"]) == 1
+ data = response.data["data"]
+ meta = response.data["meta"]
+
+ assert data[0]["transaction"] == "foo_transaction"
+ assert data[0]["environment"] == "staging"
+ assert data[0]["p50(transaction.duration)"] == 1
+ assert meta["isMetricsData"]
+
+ def test_environment_query(self):
+ self.create_environment(self.project, name="staging")
+ self.store_metric(
+ 1,
+ tags={"transaction": "foo_transaction", "environment": "staging"},
+ timestamp=self.min_ago,
+ )
+ self.store_metric(
+ 100,
+ tags={"transaction": "foo_transaction"},
+ timestamp=self.min_ago,
+ )
+
+ query = {
+ "project": [self.project.id],
+ "orderby": "p50(transaction.duration)",
+ "field": [
+ "transaction",
+ "environment",
+ "p50(transaction.duration)",
+ ],
+ "query": "!has:environment",
+ "statsPeriod": "24h",
+ "dataset": "metricsEnhanced",
+ "per_page": 50,
+ }
+
+ response = self.do_request(query)
+ assert response.status_code == 200, response.content
+ assert len(response.data["data"]) == 1
+ data = response.data["data"]
+ meta = response.data["meta"]
+
+ assert data[0]["transaction"] == "foo_transaction"
+ assert data[0]["environment"] is None
+ assert data[0]["p50(transaction.duration)"] == 100
+ assert meta["isMetricsData"]
|
89bc3831374493c7eefa6beecca63d042f93e890
|
2021-07-09 15:59:37
|
Markus Unterwaditzer
|
fix: Show tree_label for correct exception in chain (#27229)
| false
|
Show tree_label for correct exception in chain (#27229)
|
fix
|
diff --git a/src/sentry/grouping/component.py b/src/sentry/grouping/component.py
index 01911bbdc7c931..5a7a43b3f2c976 100644
--- a/src/sentry/grouping/component.py
+++ b/src/sentry/grouping/component.py
@@ -24,7 +24,7 @@ def _calculate_contributes(values):
return False
-def _calculate_tree_label(values):
+def calculate_tree_label(values):
for value in values or ():
if isinstance(value, GroupingComponent) and value.contributes and value.tree_label:
return value.tree_label
@@ -132,7 +132,7 @@ def update(
if contributes is None:
contributes = _calculate_contributes(values)
if tree_label is None:
- tree_label = _calculate_tree_label(values)
+ tree_label = calculate_tree_label(values)
self.values = values
if contributes is not None:
if contributes_to_similarity is None:
diff --git a/src/sentry/grouping/strategies/newstyle.py b/src/sentry/grouping/strategies/newstyle.py
index 5c80bff9936818..a5e31d34afefcb 100644
--- a/src/sentry/grouping/strategies/newstyle.py
+++ b/src/sentry/grouping/strategies/newstyle.py
@@ -1,7 +1,7 @@
import re
from typing import Any, Dict, List
-from sentry.grouping.component import GroupingComponent
+from sentry.grouping.component import GroupingComponent, calculate_tree_label
from sentry.grouping.strategies.base import call_with_variants, strategy
from sentry.grouping.strategies.hierarchical import get_stacktrace_hierarchy
from sentry.grouping.strategies.message import trim_message_for_grouping
@@ -640,7 +640,11 @@ def chained_exception(chained_exception, context, **meta):
rv = {}
for name, component_list in by_name.items():
- rv[name] = GroupingComponent(id="chained-exception", values=component_list)
+ rv[name] = GroupingComponent(
+ id="chained-exception",
+ values=component_list,
+ tree_label=calculate_tree_label(reversed(component_list)),
+ )
return rv
diff --git a/tests/sentry/grouping/snapshots/test_variants/test_event_hash_variant/mobile@2021_02_12/java_chained.pysnap b/tests/sentry/grouping/snapshots/test_variants/test_event_hash_variant/mobile@2021_02_12/java_chained.pysnap
index 6d40f7187194d5..0e7d735c3073ab 100644
--- a/tests/sentry/grouping/snapshots/test_variants/test_event_hash_variant/mobile@2021_02_12/java_chained.pysnap
+++ b/tests/sentry/grouping/snapshots/test_variants/test_event_hash_variant/mobile@2021_02_12/java_chained.pysnap
@@ -1,11 +1,11 @@
---
-created: '2021-06-30T16:44:02.387657Z'
+created: '2021-07-08T11:25:50.125928Z'
creator: sentry
source: tests/sentry/grouping/test_variants.py
---
app-depth-1:
hash: "e37a6991567f96367fac9ba5c34f1d68"
- tree_label: "bind0"
+ tree_label: "main"
component:
app-depth-1*
chained-exception*
@@ -51,7 +51,7 @@ app-depth-1:
--------------------------------------------------------------------------
app-depth-2:
hash: "4342cbc52b434588d500b518441bb830"
- tree_label: "bind0 | bind"
+ tree_label: "run | main"
component:
app-depth-2*
chained-exception*
@@ -118,7 +118,7 @@ app-depth-2:
--------------------------------------------------------------------------
app-depth-3:
hash: "797355840aa68b9aeb7416a2267456dd"
- tree_label: "bind0 | bind | bind"
+ tree_label: "run | run | main"
component:
app-depth-3*
chained-exception*
@@ -206,7 +206,7 @@ app-depth-3:
--------------------------------------------------------------------------
app-depth-4:
hash: "b5cb31481ea65dffcf2f5ba853a8ae37"
- tree_label: "bind0 | bind | bind | bind"
+ tree_label: "run | run | run | main"
component:
app-depth-4*
chained-exception*
@@ -315,7 +315,7 @@ app-depth-4:
--------------------------------------------------------------------------
app-depth-5:
hash: "b4abb2ff030b1ad52cbcc34a0be98d77"
- tree_label: "bind0 | bind | bind | bind | bind"
+ tree_label: "refreshContext | run | run | run | main"
component:
app-depth-5*
chained-exception*
@@ -445,7 +445,7 @@ app-depth-5:
--------------------------------------------------------------------------
app-depth-max:
hash: "8924849495809d42431719c2b9ab65c8"
- tree_label: "bind0 | bind | bind | bind | bind | bind | start | start | startInternal | start | addConnector | addPreviouslyRemovedConnectors | start | startEmbeddedServletContainer | finishRefresh | refresh | refresh | refresh | refreshContext | run | run | run | main"
+ tree_label: "start | addConnector | addPreviouslyRemovedConnectors | start | startEmbeddedServletContainer | finishRefresh | refresh | refresh | refresh | refreshContext | run | run | run | main"
component:
app-depth-max*
chained-exception*
@@ -841,7 +841,7 @@ default:
--------------------------------------------------------------------------
system:
hash: "8924849495809d42431719c2b9ab65c8"
- tree_label: "bind0 | bind | bind | bind | bind | bind | start | start | startInternal | start | addConnector | addPreviouslyRemovedConnectors | start | startEmbeddedServletContainer | finishRefresh | refresh | refresh | refresh | refreshContext | run | run | run | main"
+ tree_label: "start | addConnector | addPreviouslyRemovedConnectors | start | startEmbeddedServletContainer | finishRefresh | refresh | refresh | refresh | refreshContext | run | run | run | main"
component:
system*
chained-exception*
|
5e1fd8f0191c140e838575ff212d5ea7d75fa2aa
|
2018-03-06 02:45:38
|
Jess MacQueen
|
feat(ui): Add support for label search to dropdown autocomplete
| false
|
Add support for label search to dropdown autocomplete
|
feat
|
diff --git a/src/sentry/static/sentry/app/components/dropdownAutoComplete.jsx b/src/sentry/static/sentry/app/components/dropdownAutoComplete.jsx
index e14d38aa1fc0de..b3c0e517ec5708 100644
--- a/src/sentry/static/sentry/app/components/dropdownAutoComplete.jsx
+++ b/src/sentry/static/sentry/app/components/dropdownAutoComplete.jsx
@@ -59,7 +59,10 @@ class DropdownAutoComplete extends React.Component {
filterItems = (items, inputValue) =>
items.filter(item => {
- return item.value.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
+ return (
+ item.value.toLowerCase().indexOf(inputValue.toLowerCase()) > -1 ||
+ item.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1
+ );
});
filterGroupedItems = (groups, inputValue) =>
|
ea69f60380647b4bc7b66207077809fa6df391c1
|
2023-03-29 20:35:42
|
Matej Minar
|
feat(ai): Add loading indicator (#46501)
| false
|
Add loading indicator (#46501)
|
feat
|
diff --git a/static/app/views/issueDetails/openAIFixSuggestion/aiLoaderMessage.tsx b/static/app/views/issueDetails/openAIFixSuggestion/aiLoaderMessage.tsx
new file mode 100644
index 00000000000000..c978d6c3133f33
--- /dev/null
+++ b/static/app/views/issueDetails/openAIFixSuggestion/aiLoaderMessage.tsx
@@ -0,0 +1,46 @@
+import {useEffect, useState} from 'react';
+import shuffle from 'lodash/shuffle';
+
+import {t} from 'sentry/locale';
+
+const LOADING_MESSAGES = [
+ t('Heating up them GPUs'),
+ t('Engineering a prompt'),
+ t('Demonstrating value'),
+ t('Moving the needle'),
+ t('Preventing prompt injection attacks'),
+ t('Remove traces of depression from answers'),
+ t('Reticulating splines or whatever'),
+ t('Loading marketing material'),
+ t('Wiping node_modules'),
+ t('Installing dependencies'),
+ t('Searching StackOverflow'),
+ t('Googling for solutions'),
+ t('Runing spell checker'),
+ t('Searching for the perfect emoji'),
+ t('Adding trace amounts of human touch'),
+ t("Don't be like Sydney, don't be like Sydney"),
+ t('Initiating quantum leap'),
+ t('Charging flux capacitors'),
+ t('Summoning a demon'),
+];
+
+export function AiLoaderMessage() {
+ const [messages] = useState(() => shuffle(LOADING_MESSAGES));
+ const [messageIndex, setMessageIndex] = useState(0);
+
+ useEffect(() => {
+ const id = setInterval(() => {
+ if (messageIndex < messages.length - 1) {
+ setMessageIndex(messageIndex + 1);
+ }
+ }, Math.random() * 700 + 800);
+ return () => clearInterval(id);
+ });
+
+ return (
+ <div>
+ <strong>{messages[messageIndex]}…</strong>
+ </div>
+ );
+}
diff --git a/static/app/views/issueDetails/openAIFixSuggestion/openAIFixSuggestionPanel.tsx b/static/app/views/issueDetails/openAIFixSuggestion/openAIFixSuggestionPanel.tsx
index 5fa19694339de8..1359e83d47ee04 100644
--- a/static/app/views/issueDetails/openAIFixSuggestion/openAIFixSuggestionPanel.tsx
+++ b/static/app/views/issueDetails/openAIFixSuggestion/openAIFixSuggestionPanel.tsx
@@ -6,7 +6,6 @@ import {Button} from 'sentry/components/button';
import FeatureBadge from 'sentry/components/featureBadge';
import {feedbackClient} from 'sentry/components/featureFeedback/feedbackModal';
import LoadingError from 'sentry/components/loadingError';
-import LoadingIndicator from 'sentry/components/loadingIndicator';
import {Panel, PanelBody, PanelFooter, PanelHeader} from 'sentry/components/panels';
import {IconHappy, IconMeh, IconSad} from 'sentry/icons';
import {IconChevron} from 'sentry/icons/iconChevron';
@@ -17,6 +16,7 @@ import marked from 'sentry/utils/marked';
import {useQuery} from 'sentry/utils/queryClient';
import useOrganization from 'sentry/utils/useOrganization';
import useRouter from 'sentry/utils/useRouter';
+import {AiLoaderMessage} from 'sentry/views/issueDetails/openAIFixSuggestion/aiLoaderMessage';
import {useCustomerPolicies} from 'sentry/views/issueDetails/openAIFixSuggestion/useCustomerPolicies';
import {useOpenAISuggestionLocalStorage} from 'sentry/views/issueDetails/openAIFixSuggestion/useOpenAISuggestionLocalStorage';
import {experimentalFeatureTooltipDesc} from 'sentry/views/issueDetails/openAIFixSuggestion/utils';
@@ -115,7 +115,10 @@ export function OpenAIFixSuggestionPanel({eventID, projectSlug}: Props) {
<Fragment>
<PanelBody withPadding>
{dataIsLoading ? (
- <LoadingIndicator />
+ <AiLoaderWrapper>
+ <div className="ai-loader" />
+ <AiLoaderMessage />
+ </AiLoaderWrapper>
) : dataIsError ? (
<LoadingErrorWithoutMarginBottom onRetry={dataRefetch} />
) : (
@@ -178,7 +181,7 @@ export function OpenAIFixSuggestionPanel({eventID, projectSlug}: Props) {
const FixSuggestionPanel = styled(Panel)`
margin-top: ${space(1.5)};
- margin-bottom: 0;
+ margin-bottom: ${space(1.5)};
overflow: hidden;
`;
@@ -207,3 +210,8 @@ const LoadingErrorWithoutMarginBottom = styled(LoadingError)`
const FeatureBadgeNotUppercase = styled(FeatureBadge)`
text-transform: capitalize;
`;
+
+const AiLoaderWrapper = styled('div')`
+ text-align: center;
+ padding-bottom: ${space(4)};
+`;
diff --git a/static/images/spot/ai-loader.gif b/static/images/spot/ai-loader.gif
new file mode 100644
index 00000000000000..1466ce41673e59
Binary files /dev/null and b/static/images/spot/ai-loader.gif differ
diff --git a/static/less/group-detail.less b/static/less/group-detail.less
index 70194eb3f3c8d5..d4c0ab82da43f3 100644
--- a/static/less/group-detail.less
+++ b/static/less/group-detail.less
@@ -193,6 +193,13 @@
}
}
+.ai-loader {
+ height: 300px;
+ background: center / contain no-repeat url(../images/spot/ai-loader.gif);
+ margin-top: -20px;
+ margin-bottom: -45px;
+}
+
/**
* Traceback
* ============================================================================
|
d5fd8d61ac6d882e07afcf275cc15bd1eb9f3a3d
|
2022-03-11 22:30:55
|
Jan Michael Auer
|
fix(devserver): Honor the SENTRY_USE_RELAY setting (#32525)
| false
|
Honor the SENTRY_USE_RELAY setting (#32525)
|
fix
|
diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py
index 07c156bf941575..441a22d8f41c27 100644
--- a/src/sentry/conf/server.py
+++ b/src/sentry/conf/server.py
@@ -1671,7 +1671,7 @@ def create_partitioned_queues(name):
# Controls whether devserver spins up Relay, Kafka, and several ingest worker jobs to direct store traffic
# through the Relay ingestion pipeline. Without, ingestion is completely disabled. Use `bin/load-mocks` to
-# generate fake data for local testing. You can also manually enable relay with the `--relay` flag to `devserver`.
+# generate fake data for local testing. You can also manually enable relay with the `--ingest` flag to `devserver`.
# XXX: This is disabled by default as typical development workflows do not require end-to-end services running
# and disabling optional services reduces resource consumption and complexity
SENTRY_USE_RELAY = False
diff --git a/src/sentry/runner/commands/devserver.py b/src/sentry/runner/commands/devserver.py
index b6a2413004401d..6bf86fb5017776 100644
--- a/src/sentry/runner/commands/devserver.py
+++ b/src/sentry/runner/commands/devserver.py
@@ -57,7 +57,7 @@ def _get_daemon(name, *args, **kwargs):
"--watchers/--no-watchers", default=True, help="Watch static files and recompile on changes."
)
@click.option("--workers/--no-workers", default=False, help="Run asynchronous workers.")
[email protected]("--ingest/--no-ingest", help="Run ingest services (including Relay).")
[email protected]("--ingest/--no-ingest", default=None, help="Run ingest services (including Relay).")
@click.option(
"--prefix/--no-prefix", default=True, help="Show the service name prefix and timestamp"
)
@@ -210,6 +210,9 @@ def devserver(
}
)
+ if ingest in (True, False):
+ settings.SENTRY_USE_RELAY = ingest
+
if workers:
if settings.CELERY_ALWAYS_EAGER:
raise click.ClickException(
@@ -245,10 +248,8 @@ def devserver(
)
daemons += [_get_daemon("metrics")]
- if ingest is True or (settings.SENTRY_USE_RELAY and ingest is not False):
+ if settings.SENTRY_USE_RELAY:
daemons += [_get_daemon("ingest")]
- else:
- settings.SENTRY_USE_RELAY = False
if needs_https and has_https:
https_port = str(parsed_url.port)
|
e1a2c76be9294f9a80f7eb06d805740c4fa4ef6c
|
2021-03-16 03:01:22
|
William Mak
|
feat(trace-view): Support array responses too (#24452)
| false
|
Support array responses too (#24452)
|
feat
|
diff --git a/src/sentry/static/sentry/app/utils/performance/quickTrace/traceFullQuery.tsx b/src/sentry/static/sentry/app/utils/performance/quickTrace/traceFullQuery.tsx
index c887474e8f0530..0f12e52df53f41 100644
--- a/src/sentry/static/sentry/app/utils/performance/quickTrace/traceFullQuery.tsx
+++ b/src/sentry/static/sentry/app/utils/performance/quickTrace/traceFullQuery.tsx
@@ -51,7 +51,9 @@ function TraceFullQuery({traceId, start, end, children, ...props}: QueryProps) {
// the client returns a empty string when the response
// is 204. And we want the empty string, undefined and
// null to be converted to null.
- trace: tableData || null,
+ // TODO(wmak): replace once the backend starts returning arrays
+ // `(tableData || null)?.[0] ?? null,`
+ trace: (tableData || null)?.[0] ?? (tableData || null),
type: 'full',
...rest,
})
|
63320302ed8faf688c0c7c93eea6fe1bdae69a7c
|
2022-01-26 00:00:56
|
Kelly Carino
|
fix(ui): Handle project selection when logger clicked (#31307)
| false
|
Handle project selection when logger clicked (#31307)
|
fix
|
diff --git a/static/app/components/eventOrGroupExtraDetails.tsx b/static/app/components/eventOrGroupExtraDetails.tsx
index 77ba06d7993639..bb1e3769845fa5 100644
--- a/static/app/components/eventOrGroupExtraDetails.tsx
+++ b/static/app/components/eventOrGroupExtraDetails.tsx
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
import EventAnnotation from 'sentry/components/events/eventAnnotation';
+import GlobalSelectionLink from 'sentry/components/globalSelectionLink';
import InboxReason from 'sentry/components/group/inboxBadges/inboxReason';
import InboxShortId from 'sentry/components/group/inboxBadges/shortId';
import TimesTag from 'sentry/components/group/inboxBadges/timesTag';
@@ -89,7 +90,7 @@ function EventOrGroupExtraDetails({
)}
{logger && (
<LoggerAnnotation>
- <Link
+ <GlobalSelectionLink
to={{
pathname: issuesPath,
query: {
@@ -98,7 +99,7 @@ function EventOrGroupExtraDetails({
}}
>
{logger}
- </Link>
+ </GlobalSelectionLink>
</LoggerAnnotation>
)}
{annotations?.map((annotation, key) => (
|
c857d9158c4c26878a13bb2e75fd0b108c17719d
|
2023-11-07 13:55:52
|
Joris Bayer
|
fix(txnames): Prevent recursion error (#59421)
| false
|
Prevent recursion error (#59421)
|
fix
|
diff --git a/src/sentry/ingest/transaction_clusterer/tree.py b/src/sentry/ingest/transaction_clusterer/tree.py
index 91afb903af193c..c79f2067b26d04 100644
--- a/src/sentry/ingest/transaction_clusterer/tree.py
+++ b/src/sentry/ingest/transaction_clusterer/tree.py
@@ -68,6 +68,10 @@ class Merged:
#: Separator by which we build the tree
SEP = "/"
+#: Maximum tree depth. URLs with more than 200 segments do not seem useful,
+#: and we occasionally run into `RecursionError`s.
+MAX_DEPTH = 200
+
logger = logging.getLogger(__name__)
@@ -80,7 +84,7 @@ def __init__(self, *, merge_threshold: int) -> None:
def add_input(self, strings: Iterable[str]) -> None:
for string in strings:
- parts = string.split(SEP)
+ parts = string.split(SEP, maxsplit=MAX_DEPTH)
node = self._tree
for part in parts:
node = node.setdefault(part, Node())
diff --git a/tests/sentry/ingest/test_transaction_clusterer.py b/tests/sentry/ingest/test_transaction_clusterer.py
index 469ae8fcb524d9..d972cdaa349206 100644
--- a/tests/sentry/ingest/test_transaction_clusterer.py
+++ b/tests/sentry/ingest/test_transaction_clusterer.py
@@ -63,6 +63,17 @@ def test_single_leaf():
assert clusterer.get_rules() == ["/a/*/**"]
+def test_deep_tree():
+ clusterer = TreeClusterer(merge_threshold=1)
+ transaction_names = [
+ 1001 * "/.",
+ ]
+ clusterer.add_input(transaction_names)
+
+ # Does not throw an exception:
+ clusterer.get_rules()
+
+
@mock.patch("sentry.ingest.transaction_clusterer.datasource.redis.MAX_SET_SIZE", 5)
def test_collection():
org = Organization(pk=666)
|
65c1ea2f138358dc1cc49707442f05ceb0d6f720
|
2023-07-05 21:55:22
|
Jonas
|
ref(tests): use MockApiClient instead of Client (#52272)
| false
|
use MockApiClient instead of Client (#52272)
|
ref
|
diff --git a/static/app/__mocks__/api.tsx b/static/app/__mocks__/api.tsx
index 7c84f6015b0680..88bd92bed80a68 100644
--- a/static/app/__mocks__/api.tsx
+++ b/static/app/__mocks__/api.tsx
@@ -32,7 +32,7 @@ interface MatchCallable {
}
type AsyncDelay = undefined | number;
-type ResponseType = ApiNamespace.ResponseMeta & {
+interface ResponseType extends ApiNamespace.ResponseMeta {
body: any;
callCount: 0;
headers: Record<string, string>;
@@ -49,7 +49,7 @@ type ResponseType = ApiNamespace.ResponseMeta & {
* This will override `MockApiClient.asyncDelay` for this request.
*/
asyncDelay?: AsyncDelay;
-};
+}
type MockResponse = [resp: ResponseType, mock: jest.Mock];
@@ -171,7 +171,9 @@ class Client implements ApiNamespace.Client {
* In the real client, this clears in-flight responses. It's NOT
* clearMockResponses. You probably don't want to call this from a test.
*/
- clear() {}
+ clear() {
+ Object.values(this.activeRequests).forEach(r => r.cancel());
+ }
wrapCallback<T extends any[]>(
_id: string,
diff --git a/static/app/actionCreators/events.spec.tsx b/static/app/actionCreators/events.spec.tsx
index d115a6276f8740..c9b72894930587 100644
--- a/static/app/actionCreators/events.spec.tsx
+++ b/static/app/actionCreators/events.spec.tsx
@@ -1,8 +1,7 @@
import {doEventsRequest} from 'sentry/actionCreators/events';
-import {Client} from 'sentry/api';
describe('Events ActionCreator', function () {
- const api = new Client();
+ const api = new MockApiClient();
const organization = TestStubs.Organization();
const project = TestStubs.Project();
const opts = {
diff --git a/static/app/actionCreators/group.spec.tsx b/static/app/actionCreators/group.spec.tsx
index da95c8de601584..e554c6faa97573 100644
--- a/static/app/actionCreators/group.spec.tsx
+++ b/static/app/actionCreators/group.spec.tsx
@@ -1,14 +1,7 @@
import {bulkUpdate, mergeGroups, paramsToQueryArgs} from 'sentry/actionCreators/group';
-import {Client} from 'sentry/api';
import GroupStore from 'sentry/stores/groupStore';
describe('group', () => {
- let api: Client;
-
- beforeEach(function () {
- api = new MockApiClient();
- });
-
describe('paramsToQueryArgs()', function () {
it('should convert itemIds properties to id array', function () {
expect(
@@ -92,7 +85,7 @@ describe('group', () => {
});
bulkUpdate(
- api,
+ new MockApiClient(),
{
orgId: '1337',
projectId: '1337',
@@ -117,7 +110,7 @@ describe('group', () => {
});
bulkUpdate(
- api,
+ new MockApiClient(),
{
orgId: '1337',
projectId: '1337',
@@ -142,7 +135,7 @@ describe('group', () => {
});
bulkUpdate(
- api,
+ new MockApiClient(),
{
orgId: '1337',
project: [99],
@@ -174,7 +167,7 @@ describe('group', () => {
});
mergeGroups(
- api,
+ new MockApiClient(),
{
orgId: '1337',
projectId: '1337',
@@ -198,7 +191,7 @@ describe('group', () => {
});
mergeGroups(
- api,
+ new MockApiClient(),
{
orgId: '1337',
projectId: '1337',
diff --git a/static/app/actionCreators/projects.spec.tsx b/static/app/actionCreators/projects.spec.tsx
index 2c1d5b90be8f4d..400476d2340b53 100644
--- a/static/app/actionCreators/projects.spec.tsx
+++ b/static/app/actionCreators/projects.spec.tsx
@@ -1,10 +1,9 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {_debouncedLoadStats} from 'sentry/actionCreators/projects';
-import {Client} from 'sentry/api';
describe('Projects ActionCreators', function () {
- const api = new Client();
+ const api = new MockApiClient();
const {organization, project} = initializeOrg();
it('loadStatsForProject', function () {
diff --git a/static/app/api.spec.tsx b/static/app/api.spec.tsx
index 0e9aa8cedb3b87..ad2dbcf0b77b86 100644
--- a/static/app/api.spec.tsx
+++ b/static/app/api.spec.tsx
@@ -1,4 +1,4 @@
-import {Client, Request} from 'sentry/api';
+import {Request} from 'sentry/api';
import {PROJECT_MOVED} from 'sentry/constants/apiErrorCodes';
jest.unmock('sentry/api');
@@ -7,7 +7,7 @@ describe('api', function () {
let api;
beforeEach(function () {
- api = new Client();
+ api = new MockApiClient();
});
describe('Client', function () {
diff --git a/static/app/components/assigneeSelector.spec.jsx b/static/app/components/assigneeSelector.spec.jsx
index 68894c956c8320..4848867d162d4f 100644
--- a/static/app/components/assigneeSelector.spec.jsx
+++ b/static/app/components/assigneeSelector.spec.jsx
@@ -1,7 +1,6 @@
import {act, render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
import {openInviteMembersModal} from 'sentry/actionCreators/modal';
-import {Client} from 'sentry/api';
import AssigneeSelectorComponent from 'sentry/components/assigneeSelector';
import {putSessionUserFirst} from 'sentry/components/assigneeSelectorDropdown';
import ConfigStore from 'sentry/stores/configStore';
@@ -88,7 +87,7 @@ describe('AssigneeSelector', () => {
jest.spyOn(ProjectsStore, 'getAll').mockImplementation(() => [PROJECT_1]);
jest.spyOn(GroupStore, 'get').mockImplementation(() => GROUP_1);
- assignMock = Client.addMockResponse({
+ assignMock = MockApiClient.addMockResponse({
method: 'PUT',
url: `/issues/${GROUP_1.id}/`,
body: {
@@ -97,7 +96,7 @@ describe('AssigneeSelector', () => {
},
});
- assignGroup2Mock = Client.addMockResponse({
+ assignGroup2Mock = MockApiClient.addMockResponse({
method: 'PUT',
url: `/issues/${GROUP_2.id}/`,
body: {
@@ -118,7 +117,7 @@ describe('AssigneeSelector', () => {
};
afterEach(() => {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
describe('render with props', () => {
@@ -218,8 +217,8 @@ describe('AssigneeSelector', () => {
});
it('successfully assigns teams', async () => {
- Client.clearMockResponses();
- assignMock = Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ assignMock = MockApiClient.addMockResponse({
method: 'PUT',
url: `/issues/${GROUP_1.id}/`,
body: {
@@ -329,7 +328,7 @@ describe('AssigneeSelector', () => {
render(<AssigneeSelectorComponent id={GROUP_2.id} />);
act(() => MemberListStore.loadInitialData([USER_1, USER_2, USER_3, USER_4]));
- assignMock = Client.addMockResponse({
+ assignMock = MockApiClient.addMockResponse({
method: 'PUT',
url: `/issues/${GROUP_2.id}/`,
statusCode: 400,
diff --git a/static/app/components/discover/transactionsList.spec.jsx b/static/app/components/discover/transactionsList.spec.jsx
index 7480b29b9fd1fc..37f09bd436f951 100644
--- a/static/app/components/discover/transactionsList.spec.jsx
+++ b/static/app/components/discover/transactionsList.spec.jsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import TransactionsList from 'sentry/components/discover/transactionsList';
import {t} from 'sentry/locale';
import EventView from 'sentry/utils/discover/eventView';
@@ -35,7 +34,6 @@ describe('TransactionsList', function () {
};
beforeEach(function () {
- api = new Client();
location = {
pathname: '/',
query: {},
diff --git a/static/app/components/events/interfaces/spans/spanTreeModel.spec.tsx b/static/app/components/events/interfaces/spans/spanTreeModel.spec.tsx
index 69b71daad860ae..7871c44f28393b 100644
--- a/static/app/components/events/interfaces/spans/spanTreeModel.spec.tsx
+++ b/static/app/components/events/interfaces/spans/spanTreeModel.spec.tsx
@@ -1,6 +1,5 @@
import {waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import SpanTreeModel from 'sentry/components/events/interfaces/spans/spanTreeModel';
import {EnhancedProcessedSpanType} from 'sentry/components/events/interfaces/spans/types';
import {
@@ -13,7 +12,7 @@ import {assert} from 'sentry/types/utils';
import {generateEventSlug} from 'sentry/utils/discover/urls';
describe('SpanTreeModel', () => {
- const api: Client = new Client();
+ const api = new MockApiClient();
const event = {
id: '2b658a829a21496b87fd1f14a61abf65',
diff --git a/static/app/components/group/sentryAppExternalIssueForm.spec.jsx b/static/app/components/group/sentryAppExternalIssueForm.spec.jsx
index 2bf77c1d19cc69..6645438c85028b 100644
--- a/static/app/components/group/sentryAppExternalIssueForm.spec.jsx
+++ b/static/app/components/group/sentryAppExternalIssueForm.spec.jsx
@@ -2,7 +2,6 @@ import selectEvent from 'react-select-event';
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import SentryAppExternalIssueForm from 'sentry/components/group/sentryAppExternalIssueForm';
import {addQueryParamsToExistingUrl} from 'sentry/utils/queryString';
@@ -39,7 +38,7 @@ describe('SentryAppExternalIssueForm', () => {
appName={sentryApp.name}
config={component.schema.create}
action="create"
- api={new Client()}
+ api={new MockApiClient()}
/>
);
@@ -89,7 +88,7 @@ describe('SentryAppExternalIssueForm', () => {
appName={sentryApp.name}
config={component.schema.create}
action="create"
- api={new Client()}
+ api={new MockApiClient()}
/>
);
expect(screen.getByRole('textbox', {name: 'Title'})).toHaveValue(`${group.title}`);
@@ -112,7 +111,7 @@ describe('SentryAppExternalIssueForm', () => {
appName={sentryApp.name}
config={component.schema.link}
action="link"
- api={new Client()}
+ api={new MockApiClient()}
/>
);
@@ -173,7 +172,7 @@ describe('SentryAppExternalIssueForm Async Field', () => {
appName={sentryApp.name}
config={component.schema.create}
action="create"
- api={new Client()}
+ api={new MockApiClient()}
/>
);
@@ -238,7 +237,7 @@ describe('SentryAppExternalIssueForm Dependent fields', () => {
appName={sentryApp.name}
config={component.schema.create}
action="create"
- api={new Client()}
+ api={new MockApiClient()}
/>
);
diff --git a/static/app/components/modals/dashboardWidgetQuerySelectorModal.spec.tsx b/static/app/components/modals/dashboardWidgetQuerySelectorModal.spec.tsx
index 6f28213c52c969..f572664e5b2e83 100644
--- a/static/app/components/modals/dashboardWidgetQuerySelectorModal.spec.tsx
+++ b/static/app/components/modals/dashboardWidgetQuerySelectorModal.spec.tsx
@@ -1,14 +1,13 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import DashboardWidgetQuerySelectorModal from 'sentry/components/modals/dashboardWidgetQuerySelectorModal';
import {t} from 'sentry/locale';
import {DisplayType} from 'sentry/views/dashboards/types';
const stubEl: any = (props: any) => <div>{props.children}</div>;
-const api: Client = new Client();
+const api = new MockApiClient();
function renderModal({initialData, widget}) {
return render(
diff --git a/static/app/components/modals/sudoModal.spec.jsx b/static/app/components/modals/sudoModal.spec.jsx
index 7fab63e5720a76..206908f7cd03d6 100644
--- a/static/app/components/modals/sudoModal.spec.jsx
+++ b/static/app/components/modals/sudoModal.spec.jsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import ConfigStore from 'sentry/stores/configStore';
import App from 'sentry/views/app';
@@ -18,22 +17,22 @@ describe('Sudo Modal', function () {
},
};
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: '/internal/health/',
body: {
problems: [],
},
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/assistant/',
body: [],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/',
body: [TestStubs.Organization()],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/',
method: 'DELETE',
statusCode: 401,
@@ -44,7 +43,7 @@ describe('Sudo Modal', function () {
},
},
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/authenticators/',
body: [],
});
@@ -67,7 +66,6 @@ describe('Sudo Modal', function () {
</App>
);
- const api = new Client();
const successCb = jest.fn();
const errorCb = jest.fn();
@@ -75,7 +73,7 @@ describe('Sudo Modal', function () {
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
// Should return w/ `sudoRequired`
- api.request('/organizations/org-slug/', {
+ new MockApiClient().request('/organizations/org-slug/', {
method: 'DELETE',
success: successCb,
error: errorCb,
@@ -89,13 +87,13 @@ describe('Sudo Modal', function () {
expect(errorCb).not.toHaveBeenCalled();
// Clear mocks and allow DELETE
- Client.clearMockResponses();
- const orgDeleteMock = Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ const orgDeleteMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/',
method: 'DELETE',
statusCode: 200,
});
- const sudoMock = Client.addMockResponse({
+ const sudoMock = MockApiClient.addMockResponse({
url: '/auth/',
method: 'PUT',
statusCode: 200,
@@ -145,13 +143,11 @@ describe('Sudo Modal', function () {
</App>
);
- const api = new Client();
-
// No Modal
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
// Should return w/ `sudoRequired` and trigger the the modal to open
- api.requestPromise('/organizations/org-slug/', {method: 'DELETE'});
+ new MockApiClient().request('/organizations/org-slug/', {method: 'DELETE'});
// Should have Modal + input
expect(await screen.findByRole('dialog')).toBeInTheDocument();
diff --git a/static/app/components/repositoryRow.spec.tsx b/static/app/components/repositoryRow.spec.tsx
index 0bf77928b8d758..b052b1fe0c2c0f 100644
--- a/static/app/components/repositoryRow.spec.tsx
+++ b/static/app/components/repositoryRow.spec.tsx
@@ -5,7 +5,6 @@ import {
userEvent,
} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import RepositoryRow from 'sentry/components/repositoryRow';
describe('RepositoryRow', function () {
@@ -28,7 +27,7 @@ describe('RepositoryRow', function () {
},
status: 'pending_deletion',
});
- const api = new Client();
+ const api = new MockApiClient();
describe('rendering with access', function () {
const organization = TestStubs.Organization({
diff --git a/static/app/utils/discover/discoverQuery.spec.jsx b/static/app/utils/discover/discoverQuery.spec.jsx
index 6b6511d7f8c274..b6dae80838840d 100644
--- a/static/app/utils/discover/discoverQuery.spec.jsx
+++ b/static/app/utils/discover/discoverQuery.spec.jsx
@@ -1,13 +1,11 @@
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import DiscoverQuery from 'sentry/utils/discover/discoverQuery';
import EventView from 'sentry/utils/discover/eventView';
describe('DiscoverQuery', function () {
- let location, api, eventView;
+ let location, eventView;
beforeEach(() => {
- api = new Client();
location = {
pathname: '/events',
query: {},
@@ -33,7 +31,7 @@ describe('DiscoverQuery', function () {
render(
<DiscoverQuery
orgSlug="test-org"
- api={api}
+ api={new MockApiClient()}
location={location}
eventView={eventView}
>
@@ -63,7 +61,7 @@ describe('DiscoverQuery', function () {
render(
<DiscoverQuery
orgSlug="test-org"
- api={api}
+ api={new MockApiClient()}
location={location}
eventView={eventView}
limit={3}
@@ -105,7 +103,7 @@ describe('DiscoverQuery', function () {
render(
<DiscoverQuery
orgSlug="test-org"
- api={api}
+ api={new MockApiClient()}
location={location}
eventView={eventView}
setError={e => (errorValue = e)}
@@ -140,7 +138,7 @@ describe('DiscoverQuery', function () {
render(
<DiscoverQuery
orgSlug="test-org"
- api={api}
+ api={new MockApiClient()}
location={location}
eventView={eventView}
setError={e => (errorValue = e)}
diff --git a/static/app/utils/performance/quickTrace/quickTraceQuery.spec.jsx b/static/app/utils/performance/quickTrace/quickTraceQuery.spec.jsx
index b64129efb5b8f4..d48b3582d64763 100644
--- a/static/app/utils/performance/quickTrace/quickTraceQuery.spec.jsx
+++ b/static/app/utils/performance/quickTrace/quickTraceQuery.spec.jsx
@@ -2,7 +2,6 @@ import {Fragment} from 'react';
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import QuickTraceQuery from 'sentry/utils/performance/quickTrace/quickTraceQuery';
const traceId = 'abcdef1234567890';
@@ -28,9 +27,8 @@ function renderQuickTrace({isLoading, error, trace, type}) {
}
describe('TraceLiteQuery', function () {
- let api, location, event, traceLiteMock, traceFullMock, traceMetaMock;
+ let location, event, traceLiteMock, traceFullMock, traceMetaMock;
beforeEach(function () {
- api = new Client();
location = {
pathname: '/',
query: {},
@@ -67,7 +65,7 @@ describe('TraceLiteQuery', function () {
render(
<QuickTraceQuery
event={event}
- api={api}
+ api={new MockApiClient()}
location={location}
orgSlug="test-org"
statsPeriod="24h"
@@ -85,7 +83,7 @@ describe('TraceLiteQuery', function () {
<QuickTraceQuery
withMeta={false}
event={event}
- api={api}
+ api={new MockApiClient()}
location={location}
orgSlug="test-org"
statsPeriod="24h"
@@ -104,7 +102,7 @@ describe('TraceLiteQuery', function () {
<QuickTraceQuery
withMeta={false}
event={event}
- api={api}
+ api={new MockApiClient()}
location={location}
orgSlug="test-org"
statsPeriod="24h"
@@ -140,7 +138,7 @@ describe('TraceLiteQuery', function () {
<QuickTraceQuery
withMeta={false}
event={event}
- api={api}
+ api={new MockApiClient()}
location={location}
orgSlug="test-org"
statsPeriod="24h"
diff --git a/static/app/utils/performance/quickTrace/traceFullQuery.spec.jsx b/static/app/utils/performance/quickTrace/traceFullQuery.spec.jsx
index b49c1398c3d368..175dab757683d9 100644
--- a/static/app/utils/performance/quickTrace/traceFullQuery.spec.jsx
+++ b/static/app/utils/performance/quickTrace/traceFullQuery.spec.jsx
@@ -2,7 +2,6 @@ import {Fragment} from 'react';
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import {
TraceFullDetailedQuery,
TraceFullQuery,
@@ -28,9 +27,8 @@ function renderTraceFull({isLoading, error, type}) {
}
describe('TraceFullQuery', function () {
- let api, location;
+ let location;
beforeEach(function () {
- api = new Client();
location = {
pathname: '/',
query: {},
@@ -44,7 +42,7 @@ describe('TraceFullQuery', function () {
});
render(
<TraceFullQuery
- api={api}
+ api={new MockApiClient()}
traceId={traceId}
eventId={eventId}
location={location}
@@ -67,7 +65,7 @@ describe('TraceFullQuery', function () {
});
render(
<TraceFullDetailedQuery
- api={api}
+ api={new MockApiClient()}
traceId={traceId}
eventId={eventId}
location={location}
diff --git a/static/app/utils/useApi.spec.tsx b/static/app/utils/useApi.spec.tsx
index 9de3a5978f50c6..51778827f0074f 100644
--- a/static/app/utils/useApi.spec.tsx
+++ b/static/app/utils/useApi.spec.tsx
@@ -1,13 +1,12 @@
import {reactHooks} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import useApi from 'sentry/utils/useApi';
describe('useApi', function () {
it('provides an api client', function () {
const {result} = reactHooks.renderHook(useApi);
- expect(result.current).toBeInstanceOf(Client);
+ expect(result.current).toBeInstanceOf(MockApiClient);
});
it('cancels pending API requests when unmounted', function () {
@@ -31,7 +30,7 @@ describe('useApi', function () {
});
it('uses pass through API when provided', function () {
- const myClient = new Client();
+ const myClient = new MockApiClient();
const {unmount} = reactHooks.renderHook(useApi, {initialProps: {api: myClient}});
jest.spyOn(myClient, 'clear');
diff --git a/static/app/utils/withApi.spec.tsx b/static/app/utils/withApi.spec.tsx
index a8729616fc26ae..a5d2ddc2a0bc4b 100644
--- a/static/app/utils/withApi.spec.tsx
+++ b/static/app/utils/withApi.spec.tsx
@@ -1,6 +1,6 @@
import {render} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
+import type {Client} from 'sentry/api';
import withApi from 'sentry/utils/withApi';
describe('withApi', function () {
diff --git a/static/app/views/alerts/rules/metric/triggers/chart/index.spec.tsx b/static/app/views/alerts/rules/metric/triggers/chart/index.spec.tsx
index 549337de14e798..fb123769f8d096 100644
--- a/static/app/views/alerts/rules/metric/triggers/chart/index.spec.tsx
+++ b/static/app/views/alerts/rules/metric/triggers/chart/index.spec.tsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import TriggersChart from 'sentry/views/alerts/rules/metric/triggers/chart';
import {
AlertRuleComparisonType,
@@ -20,7 +19,7 @@ describe('Incident Rules Create', () => {
body: {count: 5},
});
- const api = new Client();
+ const api = new MockApiClient();
it('renders a metric', async () => {
const {organization, project, router} = initializeOrg();
diff --git a/static/app/views/dashboards/widgetCard/index.spec.tsx b/static/app/views/dashboards/widgetCard/index.spec.tsx
index dfb00713c10da1..5773bd144d737a 100644
--- a/static/app/views/dashboards/widgetCard/index.spec.tsx
+++ b/static/app/views/dashboards/widgetCard/index.spec.tsx
@@ -8,7 +8,6 @@ import {
} from 'sentry-test/reactTestingLibrary';
import * as modal from 'sentry/actionCreators/modal';
-import {Client} from 'sentry/api';
import * as LineChart from 'sentry/components/charts/lineChart';
import SimpleTableChart from 'sentry/components/charts/simpleTableChart';
import {MINUTE, SECOND} from 'sentry/utils/formatters';
@@ -71,7 +70,7 @@ describe('Dashboards > WidgetCard', function () {
},
};
- const api = new Client();
+ const api = new MockApiClient();
let eventsMock;
beforeEach(function () {
diff --git a/static/app/views/dashboards/widgetCard/issueWidgetCard.spec.tsx b/static/app/views/dashboards/widgetCard/issueWidgetCard.spec.tsx
index 67b810f1a792fa..2464fdf0f78765 100644
--- a/static/app/views/dashboards/widgetCard/issueWidgetCard.spec.tsx
+++ b/static/app/views/dashboards/widgetCard/issueWidgetCard.spec.tsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import MemberListStore from 'sentry/stores/memberListStore';
import {DisplayType, Widget, WidgetType} from 'sentry/views/dashboards/types';
import WidgetCard from 'sentry/views/dashboards/widgetCard';
@@ -42,7 +41,7 @@ describe('Dashboards > IssueWidgetCard', function () {
},
};
- const api = new Client();
+ const api = new MockApiClient();
beforeEach(function () {
MockApiClient.addMockResponse({
diff --git a/static/app/views/dashboards/widgetCard/releaseWidgetQueries.spec.tsx b/static/app/views/dashboards/widgetCard/releaseWidgetQueries.spec.tsx
index 9d2929f700208e..ebc4120d1db50d 100644
--- a/static/app/views/dashboards/widgetCard/releaseWidgetQueries.spec.tsx
+++ b/static/app/views/dashboards/widgetCard/releaseWidgetQueries.spec.tsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import {
DashboardFilterKeys,
DisplayType,
@@ -65,7 +64,7 @@ describe('Dashboards > ReleaseWidgetQueries', function () {
},
};
- const api = new Client();
+ const api = new MockApiClient();
afterEach(function () {
MockApiClient.clearMockResponses();
diff --git a/static/app/views/dashboards/widgetCard/widgetQueries.spec.jsx b/static/app/views/dashboards/widgetCard/widgetQueries.spec.jsx
index 028532f9cc842a..dff02078684c68 100644
--- a/static/app/views/dashboards/widgetCard/widgetQueries.spec.jsx
+++ b/static/app/views/dashboards/widgetCard/widgetQueries.spec.jsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import {MEPSettingProvider} from 'sentry/utils/performance/contexts/metricsEnhancedSetting';
import {DashboardFilterKeys} from 'sentry/views/dashboards/types';
import {DashboardsMEPContext} from 'sentry/views/dashboards/widgetCard/dashboardsMEPContext';
@@ -79,8 +78,6 @@ describe('Dashboards > WidgetQueries', function () {
},
};
- const api = new Client();
-
afterEach(function () {
MockApiClient.clearMockResponses();
});
@@ -98,7 +95,7 @@ describe('Dashboards > WidgetQueries', function () {
});
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={multipleQueryWidget}
organization={initialData.organization}
selection={selection}
@@ -120,7 +117,7 @@ describe('Dashboards > WidgetQueries', function () {
});
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={singleQueryWidget}
organization={initialData.organization}
selection={selection}
@@ -148,7 +145,7 @@ describe('Dashboards > WidgetQueries', function () {
});
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={tableWidget}
organization={initialData.organization}
selection={selection}
@@ -185,7 +182,7 @@ describe('Dashboards > WidgetQueries', function () {
let error = '';
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={multipleQueryWidget}
organization={initialData.organization}
selection={selection}
@@ -220,7 +217,7 @@ describe('Dashboards > WidgetQueries', function () {
};
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={widget}
organization={initialData.organization}
selection={longSelection}
@@ -254,7 +251,7 @@ describe('Dashboards > WidgetQueries', function () {
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={widget}
organization={initialData.organization}
selection={selection}
@@ -286,7 +283,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps = undefined;
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={tableWidget}
organization={initialData.organization}
selection={selection}
@@ -363,7 +360,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps = undefined;
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={widget}
organization={initialData.organization}
selection={selection}
@@ -397,7 +394,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps = undefined;
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={{
title: 'SDK',
interval: '5m',
@@ -456,7 +453,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps = undefined;
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={{
title: 'SDK',
interval: '5m',
@@ -546,7 +543,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps = undefined;
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={widget}
organization={initialData.organization}
selection={selection}
@@ -580,7 +577,7 @@ describe('Dashboards > WidgetQueries', function () {
};
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={barWidget}
organization={initialData.organization}
selection={selection}
@@ -643,7 +640,7 @@ describe('Dashboards > WidgetQueries', function () {
const child = jest.fn(() => <div data-test-id="child" />);
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={barWidget}
organization={initialData.organization}
selection={selection}
@@ -677,7 +674,7 @@ describe('Dashboards > WidgetQueries', function () {
};
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={areaWidget}
organization={initialData.organization}
selection={{
@@ -713,7 +710,7 @@ describe('Dashboards > WidgetQueries', function () {
let childProps;
const {rerender} = renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={lineWidget}
organization={initialData.organization}
selection={selection}
@@ -732,7 +729,7 @@ describe('Dashboards > WidgetQueries', function () {
rerender(
<MEPSettingProvider forceTransactions={false}>
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={{
...lineWidget,
queries: [
@@ -900,7 +897,7 @@ describe('Dashboards > WidgetQueries', function () {
}}
>
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={singleQueryWidget}
organization={{
...organization,
@@ -946,7 +943,7 @@ describe('Dashboards > WidgetQueries', function () {
}}
>
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={{...singleQueryWidget, displayType: 'table'}}
organization={{
...organization,
@@ -997,7 +994,7 @@ describe('Dashboards > WidgetQueries', function () {
};
renderWithProviders(
<WidgetQueries
- api={api}
+ api={new MockApiClient()}
widget={areaWidget}
organization={testData.organization}
selection={selection}
diff --git a/static/app/views/discover/tags.spec.jsx b/static/app/views/discover/tags.spec.jsx
index 97bcb153000ccb..eb7775dbd3f4bb 100644
--- a/static/app/views/discover/tags.spec.jsx
+++ b/static/app/views/discover/tags.spec.jsx
@@ -6,7 +6,6 @@ import {
waitForElementToBeRemoved,
} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import EventView from 'sentry/utils/discover/eventView';
import {Tags} from 'sentry/views/discover/tags';
@@ -17,7 +16,7 @@ describe('Tags', function () {
const org = TestStubs.Organization();
beforeEach(function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/events-facets/`,
body: [
{
@@ -46,12 +45,10 @@ describe('Tags', function () {
});
afterEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
it('renders', async function () {
- const api = new Client();
-
const view = new EventView({
fields: [],
sorts: [],
@@ -61,7 +58,7 @@ describe('Tags', function () {
render(
<Tags
eventView={view}
- api={api}
+ api={new MockApiClient()}
totalValues={30}
organization={org}
selection={{projects: [], environments: [], datetime: {}}}
@@ -81,8 +78,6 @@ describe('Tags', function () {
});
it('creates URLs with generateUrl', async function () {
- const api = new Client();
-
const view = new EventView({
fields: [],
sorts: [],
@@ -99,7 +94,7 @@ describe('Tags', function () {
render(
<Tags
eventView={view}
- api={api}
+ api={new MockApiClient()}
organization={org}
totalValues={30}
selection={{projects: [], environments: [], datetime: {}}}
@@ -126,8 +121,6 @@ describe('Tags', function () {
});
it('renders tag keys', async function () {
- const api = new Client();
-
const view = new EventView({
fields: [],
sorts: [],
@@ -137,7 +130,7 @@ describe('Tags', function () {
render(
<Tags
eventView={view}
- api={api}
+ api={new MockApiClient()}
totalValues={30}
organization={org}
selection={{projects: [], environments: [], datetime: {}}}
@@ -157,8 +150,6 @@ describe('Tags', function () {
});
it('excludes top tag values on current page query', async function () {
- const api = new Client();
-
const initialData = initializeOrg({
organization: org,
router: {
@@ -175,7 +166,7 @@ describe('Tags', function () {
render(
<Tags
eventView={view}
- api={api}
+ api={new MockApiClient()}
totalValues={30}
organization={org}
selection={{projects: [], environments: [], datetime: {}}}
@@ -203,13 +194,13 @@ describe('Tags', function () {
});
it('has a Show More button when there are more tags', async () => {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/events-facets/`,
match: [MockApiClient.matchQuery({cursor: undefined})],
headers: {
Link:
- '<http://localhost/api/0/organizations/org-slug/events-facets/?cursor=0:0:1>; rel="previous"; results="false"; cursor="0:0:1",' +
- '<http://localhost/api/0/organizations/org-slug/events-facets/?cursor=0:10:0>; rel="next"; results="true"; cursor="0:10:0"',
+ '<http://localhost/api/0new /organizations()/org-slug/events-facets/?cursor=0:0:1>; rel="previous"; results="false"; cursor="0:0:1",' +
+ '<http://localhost/api/0new /organizations()/org-slug/events-facets/?cursor=0:10:0>; rel="next"; results="true"; cursor="0:10:0"',
},
body: [
{
@@ -219,19 +210,17 @@ describe('Tags', function () {
],
});
- const mockRequest = Client.addMockResponse({
+ const mockRequest = MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/events-facets/`,
match: [MockApiClient.matchQuery({cursor: '0:10:0'})],
body: [],
headers: {
Link:
- '<http://localhost/api/0/organizations/org-slug/events-facets/?cursor=0:0:1>; rel="previous"; results="false"; cursor="0:10:1",' +
- '<http://localhost/api/0/organizations/org-slug/events-facets/?cursor=0:20:0>; rel="next"; results="false"; cursor="0:20:0"',
+ '<http://localhost/api/0new /organizations()/org-slug/events-facets/?cursor=0:0:1>; rel="previous"; results="false"; cursor="0:10:1",' +
+ '<http://localhost/api/0new /organizations()/org-slug/events-facets/?cursor=0:20:0>; rel="next"; results="false"; cursor="0:20:0"',
},
});
- const api = new Client();
-
const view = new EventView({
fields: [],
sorts: [],
@@ -241,7 +230,7 @@ describe('Tags', function () {
render(
<Tags
eventView={view}
- api={api}
+ api={new MockApiClient()}
totalValues={30}
organization={org}
selection={{projects: [], environments: [], datetime: {}}}
diff --git a/static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.spec.jsx b/static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.spec.jsx
index a682472f72bf33..2ccc7ce55858e9 100644
--- a/static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.spec.jsx
+++ b/static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.spec.jsx
@@ -3,7 +3,6 @@ import {browserHistory} from 'react-router';
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import ProjectsStore from 'sentry/stores/projectsStore';
import EventView from 'sentry/utils/discover/eventView';
import {MEPSettingProvider} from 'sentry/utils/performance/contexts/metricsEnhancedSetting';
@@ -39,8 +38,6 @@ function initialize(projects, query, additionalFeatures = []) {
ProjectsStore.loadInitialData(initialData.organization.projects);
const eventView = EventView.fromLocation(initialData.router.location);
- const api = new Client();
-
const spanOperationBreakdownFilter = SpanOperationBreakdownFilter.NONE;
const transactionName = 'example-transaction';
@@ -50,7 +47,7 @@ function initialize(projects, query, additionalFeatures = []) {
transactionName,
location: initialData.router.location,
eventView,
- api,
+ api: MockApiClient,
};
}
diff --git a/static/app/views/settings/account/accountAuthorizations.spec.jsx b/static/app/views/settings/account/accountAuthorizations.spec.jsx
index e46d21bbc108a4..de1cd1eae08ec7 100644
--- a/static/app/views/settings/account/accountAuthorizations.spec.jsx
+++ b/static/app/views/settings/account/accountAuthorizations.spec.jsx
@@ -1,15 +1,14 @@
import {render} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import AccountAuthorizations from 'sentry/views/settings/account/accountAuthorizations';
describe('AccountAuthorizations', function () {
beforeEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
it('renders empty', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/api-authorizations/',
method: 'GET',
body: [],
diff --git a/static/app/views/settings/account/accountEmails.spec.jsx b/static/app/views/settings/account/accountEmails.spec.jsx
index 309644f6937ad5..37a9e244edfd3a 100644
--- a/static/app/views/settings/account/accountEmails.spec.jsx
+++ b/static/app/views/settings/account/accountEmails.spec.jsx
@@ -1,6 +1,5 @@
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import AccountEmails from 'sentry/views/settings/account/accountEmails';
jest.mock('scroll-to-element', () => {});
@@ -9,8 +8,8 @@ const ENDPOINT = '/users/me/emails/';
describe('AccountEmails', function () {
beforeEach(function () {
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: TestStubs.AccountEmails(),
});
@@ -23,7 +22,7 @@ describe('AccountEmails', function () {
});
it('can remove an email', async function () {
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'DELETE',
statusCode: 200,
@@ -46,7 +45,7 @@ describe('AccountEmails', function () {
});
it('can change a secondary email to primary an email', async function () {
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'PUT',
statusCode: 200,
@@ -69,7 +68,7 @@ describe('AccountEmails', function () {
});
it('can resend verification email', async function () {
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: `${ENDPOINT}confirm/`,
method: 'POST',
statusCode: 200,
@@ -94,7 +93,7 @@ describe('AccountEmails', function () {
});
it('can add a secondary email', async function () {
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'POST',
statusCode: 200,
diff --git a/static/app/views/settings/account/accountIdentities.spec.jsx b/static/app/views/settings/account/accountIdentities.spec.jsx
index bdc9ceee9dec5f..c950f504f132ef 100644
--- a/static/app/views/settings/account/accountIdentities.spec.jsx
+++ b/static/app/views/settings/account/accountIdentities.spec.jsx
@@ -5,18 +5,17 @@ import {
userEvent,
} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import AccountIdentities from 'sentry/views/settings/account/accountIdentities';
const ENDPOINT = '/users/me/user-identities/';
describe('AccountIdentities', function () {
beforeEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
it('renders empty', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'GET',
body: [],
@@ -27,7 +26,7 @@ describe('AccountIdentities', function () {
});
it('renders list', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'GET',
body: [
@@ -49,7 +48,7 @@ describe('AccountIdentities', function () {
});
it('disconnects identity', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
method: 'GET',
body: [
@@ -73,7 +72,7 @@ describe('AccountIdentities', function () {
method: 'DELETE',
};
- const mock = Client.addMockResponse(disconnectRequest);
+ const mock = MockApiClient.addMockResponse(disconnectRequest);
expect(mock).not.toHaveBeenCalled();
diff --git a/static/app/views/settings/account/accountSecurity/accountSecurityEnroll.spec.jsx b/static/app/views/settings/account/accountSecurity/accountSecurityEnroll.spec.jsx
index dd41fe3bea8d7e..280f47b3130819 100644
--- a/static/app/views/settings/account/accountSecurity/accountSecurityEnroll.spec.jsx
+++ b/static/app/views/settings/account/accountSecurity/accountSecurityEnroll.spec.jsx
@@ -1,13 +1,12 @@
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import AccountSecurityEnroll from 'sentry/views/settings/account/accountSecurity/accountSecurityEnroll';
const ENDPOINT = '/users/me/authenticators/';
describe('AccountSecurityEnroll', function () {
describe('Totp', function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
const authenticator = TestStubs.Authenticators().Totp({
isEnrolled: false,
qrcode: 'otpauth://totp/test%40sentry.io?issuer=Sentry&secret=secret',
@@ -31,7 +30,7 @@ describe('AccountSecurityEnroll', function () {
]);
beforeAll(function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `${ENDPOINT}${authenticator.authId}/enroll/`,
body: authenticator,
});
@@ -52,7 +51,7 @@ describe('AccountSecurityEnroll', function () {
});
it('can enroll', async function () {
- const enrollMock = Client.addMockResponse({
+ const enrollMock = MockApiClient.addMockResponse({
url: `${ENDPOINT}${authenticator.authId}/enroll/`,
method: 'POST',
});
@@ -74,7 +73,7 @@ describe('AccountSecurityEnroll', function () {
});
it('can redirect with already enrolled error', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `${ENDPOINT}${authenticator.authId}/enroll/`,
body: {details: 'Already enrolled'},
statusCode: 400,
diff --git a/static/app/views/settings/account/accountSecurity/index.spec.jsx b/static/app/views/settings/account/accountSecurity/index.spec.jsx
index a8eef1659d4e51..5ac75ac6569b55 100644
--- a/static/app/views/settings/account/accountSecurity/index.spec.jsx
+++ b/static/app/views/settings/account/accountSecurity/index.spec.jsx
@@ -6,7 +6,6 @@ import {
waitFor,
} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import ModalStore from 'sentry/stores/modalStore';
import AccountSecurity from 'sentry/views/settings/account/accountSecurity';
import AccountSecurityWrapper from 'sentry/views/settings/account/accountSecurity/accountSecurityWrapper';
@@ -20,12 +19,12 @@ describe('AccountSecurity', function () {
beforeEach(function () {
jest.spyOn(window.location, 'assign').mockImplementation(() => {});
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: ORG_ENDPOINT,
body: TestStubs.Organizations(),
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ACCOUNT_EMAILS_ENDPOINT,
body: TestStubs.AccountEmails(),
});
@@ -45,7 +44,7 @@ describe('AccountSecurity', function () {
}
it('renders empty', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [],
});
@@ -56,7 +55,7 @@ describe('AccountSecurity', function () {
});
it('renders a primary interface that is enrolled', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Totp({configureButton: 'Info'})],
});
@@ -73,7 +72,7 @@ describe('AccountSecurity', function () {
});
it('can delete enrolled authenticator', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Totp({
@@ -83,7 +82,7 @@ describe('AccountSecurity', function () {
],
});
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `${ENDPOINT}15/`,
method: 'DELETE',
});
@@ -97,7 +96,7 @@ describe('AccountSecurity', function () {
).toBeInTheDocument();
// next authenticators request should have totp disabled
- const authenticatorsMock = Client.addMockResponse({
+ const authenticatorsMock = MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Totp({
@@ -123,7 +122,7 @@ describe('AccountSecurity', function () {
});
it('can remove one of multiple 2fa methods when org requires 2fa', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Totp({
@@ -133,11 +132,11 @@ describe('AccountSecurity', function () {
TestStubs.Authenticators().U2f(),
],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ORG_ENDPOINT,
body: TestStubs.Organizations({require2FA: true}),
});
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `${ENDPOINT}15/`,
method: 'DELETE',
});
@@ -159,7 +158,7 @@ describe('AccountSecurity', function () {
});
it('can not remove last 2fa method when org requires 2fa', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Totp({
@@ -168,11 +167,11 @@ describe('AccountSecurity', function () {
}),
],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ORG_ENDPOINT,
body: TestStubs.Organizations({require2FA: true}),
});
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `${ENDPOINT}15/`,
method: 'DELETE',
});
@@ -196,11 +195,11 @@ describe('AccountSecurity', function () {
});
it('cannot enroll without verified email', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Totp({isEnrolled: false})],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ACCOUNT_EMAILS_ENDPOINT,
body: [
{
@@ -225,7 +224,7 @@ describe('AccountSecurity', function () {
});
it('renders a backup interface that is not enrolled', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Recovery({isEnrolled: false})],
});
@@ -240,7 +239,7 @@ describe('AccountSecurity', function () {
});
it('renders a primary interface that is not enrolled', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Totp({isEnrolled: false})],
});
@@ -255,7 +254,7 @@ describe('AccountSecurity', function () {
});
it('does not render primary interface that disallows new enrollments', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Totp({disallowNewEnrollment: false}),
@@ -272,7 +271,7 @@ describe('AccountSecurity', function () {
});
it('renders primary interface if new enrollments are disallowed, but we are enrolled', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [
TestStubs.Authenticators().Sms({isEnrolled: true, disallowNewEnrollment: true}),
@@ -286,7 +285,7 @@ describe('AccountSecurity', function () {
});
it('renders a backup interface that is enrolled', function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Recovery({isEnrolled: true})],
});
@@ -298,13 +297,13 @@ describe('AccountSecurity', function () {
});
it('can change password', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Recovery({isEnrolled: false})],
});
const url = '/users/me/password/';
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url,
method: 'PUT',
});
@@ -340,12 +339,12 @@ describe('AccountSecurity', function () {
});
it('requires current password to be entered', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Recovery({isEnrolled: false})],
});
const url = '/users/me/password/';
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url,
method: 'PUT',
});
@@ -367,11 +366,11 @@ describe('AccountSecurity', function () {
});
it('can expire all sessions', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: ENDPOINT,
body: [TestStubs.Authenticators().Recovery({isEnrolled: false})],
});
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: AUTH_ENDPOINT,
body: {all: true},
method: 'DELETE',
diff --git a/static/app/views/settings/organizationDeveloperSettings/index.spec.jsx b/static/app/views/settings/organizationDeveloperSettings/index.spec.jsx
index 18a7c9667c8e2c..8f85ca5ebf225a 100644
--- a/static/app/views/settings/organizationDeveloperSettings/index.spec.jsx
+++ b/static/app/views/settings/organizationDeveloperSettings/index.spec.jsx
@@ -7,7 +7,6 @@ import {
within,
} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import OrganizationDeveloperSettings from 'sentry/views/settings/organizationDeveloperSettings/index';
describe('Organization Developer Settings', function () {
@@ -24,12 +23,12 @@ describe('Organization Developer Settings', function () {
});
beforeEach(() => {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
describe('when no Apps exist', () => {
it('displays empty state', async () => {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/sentry-apps/`,
body: [],
});
@@ -45,7 +44,7 @@ describe('Organization Developer Settings', function () {
describe('with unpublished apps', () => {
beforeEach(() => {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/sentry-apps/`,
body: [sentryApp],
});
@@ -71,7 +70,7 @@ describe('Organization Developer Settings', function () {
});
it('allows for deletion', async () => {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
method: 'DELETE',
body: [],
@@ -101,7 +100,7 @@ describe('Organization Developer Settings', function () {
});
it('can make a request to publish an integration', async () => {
- const mock = Client.addMockResponse({
+ const mock = MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/publish-request/`,
method: 'POST',
});
@@ -162,7 +161,7 @@ describe('Organization Developer Settings', function () {
describe('with published apps', () => {
beforeEach(() => {
const publishedSentryApp = TestStubs.SentryApp({status: 'published'});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/sentry-apps/`,
body: [publishedSentryApp],
});
@@ -204,7 +203,7 @@ describe('Organization Developer Settings', function () {
beforeEach(() => {
const internalIntegration = TestStubs.SentryApp({status: 'internal'});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${org.slug}/sentry-apps/`,
body: [internalIntegration],
});
@@ -225,7 +224,7 @@ describe('Organization Developer Settings', function () {
describe('without Owner permissions', () => {
const newOrg = TestStubs.Organization({access: ['org:read']});
beforeEach(() => {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/organizations/${newOrg.slug}/sentry-apps/`,
body: [sentryApp],
});
diff --git a/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.spec.jsx b/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.spec.jsx
index 5273a2afd91638..e9ad6fcfef0f5c 100644
--- a/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.spec.jsx
+++ b/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.spec.jsx
@@ -2,7 +2,6 @@ import selectEvent from 'react-select-event';
import {render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import SentryApplicationDetails from 'sentry/views/settings/organizationDeveloperSettings/sentryApplicationDetails';
describe('Sentry Application Details', function () {
@@ -15,7 +14,7 @@ describe('Sentry Application Details', function () {
const maskedValue = '*'.repeat(64);
beforeEach(() => {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
org = TestStubs.Organization({features: ['sentry-app-logo-upload']});
});
@@ -29,7 +28,7 @@ describe('Sentry Application Details', function () {
}
beforeEach(() => {
- createAppRequest = Client.addMockResponse({
+ createAppRequest = MockApiClient.addMockResponse({
url: '/sentry-apps/',
method: 'POST',
body: [],
@@ -163,12 +162,12 @@ describe('Sentry Application Details', function () {
sentryApp = TestStubs.SentryApp();
sentryApp.events = ['issue'];
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [],
});
@@ -220,12 +219,12 @@ describe('Sentry Application Details', function () {
token = TestStubs.SentryAppToken();
sentryApp.events = ['issue'];
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [token],
});
@@ -282,12 +281,12 @@ describe('Sentry Application Details', function () {
token = TestStubs.SentryAppToken({token: maskedValue, refreshToken: maskedValue});
sentryApp.events = ['issue'];
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [token],
});
@@ -321,19 +320,19 @@ describe('Sentry Application Details', function () {
token = TestStubs.SentryAppToken();
sentryApp.events = ['issue'];
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [token],
});
});
it('adding token to list', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
method: 'POST',
body: [
@@ -353,7 +352,7 @@ describe('Sentry Application Details', function () {
});
it('removing token from list', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/${token.token}/`,
method: 'DELETE',
body: {},
@@ -385,18 +384,18 @@ describe('Sentry Application Details', function () {
sentryApp.events = ['issue'];
sentryApp.scopes = ['project:read', 'event:read'];
- editAppRequest = Client.addMockResponse({
+ editAppRequest = MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
method: 'PUT',
body: [],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [],
});
@@ -467,7 +466,7 @@ describe('Sentry Application Details', function () {
beforeEach(() => {
sentryApp = TestStubs.SentryApp();
- editAppRequest = Client.addMockResponse({
+ editAppRequest = MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
method: 'PUT',
statusCode: 400,
@@ -479,12 +478,12 @@ describe('Sentry Application Details', function () {
},
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/`,
body: sentryApp,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/sentry-apps/${sentryApp.slug}/api-tokens/`,
body: [],
});
diff --git a/static/app/views/settings/organizationIntegrations/integrationListDirectory.spec.jsx b/static/app/views/settings/organizationIntegrations/integrationListDirectory.spec.jsx
index 0eee6a811be83d..7d738498a97df6 100644
--- a/static/app/views/settings/organizationIntegrations/integrationListDirectory.spec.jsx
+++ b/static/app/views/settings/organizationIntegrations/integrationListDirectory.spec.jsx
@@ -1,16 +1,15 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import IntegrationListDirectory from 'sentry/views/settings/organizationIntegrations/integrationListDirectory';
const mockResponse = mocks => {
- mocks.forEach(([url, body]) => Client.addMockResponse({url, body}));
+ mocks.forEach(([url, body]) => MockApiClient.addMockResponse({url, body}));
};
describe('IntegrationListDirectory', function () {
beforeEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
const {organization: org, routerContext} = initializeOrg();
diff --git a/static/app/views/settings/organizationMembers/organizationMembersList.spec.jsx b/static/app/views/settings/organizationMembers/organizationMembersList.spec.jsx
index 9c329437f56e15..518112657d191e 100644
--- a/static/app/views/settings/organizationMembers/organizationMembersList.spec.jsx
+++ b/static/app/views/settings/organizationMembers/organizationMembersList.spec.jsx
@@ -11,7 +11,6 @@ import {
} from 'sentry-test/reactTestingLibrary';
import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
-import {Client} from 'sentry/api';
import ConfigStore from 'sentry/stores/configStore';
import OrganizationsStore from 'sentry/stores/organizationsStore';
import {trackAnalytics} from 'sentry/utils/analytics';
@@ -88,13 +87,13 @@ describe('OrganizationMembersList', function () {
});
beforeEach(function () {
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/members/me/',
method: 'GET',
body: {roles},
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/members/',
method: 'GET',
body: [...TestStubs.Members(), member],
@@ -103,7 +102,7 @@ describe('OrganizationMembersList', function () {
url: `/organizations/org-slug/members/${member.id}/`,
body: member,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/access-requests/',
method: 'GET',
body: [
@@ -124,7 +123,7 @@ describe('OrganizationMembersList', function () {
},
],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/auth-provider/',
method: 'GET',
body: {
@@ -132,12 +131,12 @@ describe('OrganizationMembersList', function () {
require_link: true,
},
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/teams/',
method: 'GET',
body: [TestStubs.Team(), ownerTeam],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/invite-requests/',
method: 'GET',
body: [],
@@ -192,7 +191,7 @@ describe('OrganizationMembersList', function () {
});
it('can leave org', async function () {
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `/organizations/org-slug/members/${members[1].id}/`,
method: 'DELETE',
});
@@ -214,7 +213,7 @@ describe('OrganizationMembersList', function () {
});
it('can redirect to remaining org after leaving', async function () {
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `/organizations/org-slug/members/${members[1].id}/`,
method: 'DELETE',
});
@@ -246,7 +245,7 @@ describe('OrganizationMembersList', function () {
});
it('displays error message when failing to leave org', async function () {
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `/organizations/org-slug/members/${members[1].id}/`,
method: 'DELETE',
statusCode: 500,
diff --git a/static/app/views/settings/organizationProjects/index.spec.jsx b/static/app/views/settings/organizationProjects/index.spec.jsx
index 0ea1c32f99eee2..d81041597c7c78 100644
--- a/static/app/views/settings/organizationProjects/index.spec.jsx
+++ b/static/app/views/settings/organizationProjects/index.spec.jsx
@@ -1,6 +1,5 @@
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import OrganizationProjectsContainer from 'sentry/views/settings/organizationProjects';
describe('OrganizationProjects', function () {
@@ -15,24 +14,24 @@ describe('OrganizationProjects', function () {
project = TestStubs.Project();
org = TestStubs.Organization();
- projectsGetMock = Client.addMockResponse({
+ projectsGetMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/projects/',
body: [project],
});
- statsGetMock = Client.addMockResponse({
+ statsGetMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/stats/',
body: [[[], 1]],
});
- projectsPutMock = Client.addMockResponse({
+ projectsPutMock = MockApiClient.addMockResponse({
method: 'PUT',
url: '/projects/org-slug/project-slug/',
});
});
afterEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
it('should render the projects in the store', async function () {
diff --git a/static/app/views/settings/organizationRepositories/index.spec.jsx b/static/app/views/settings/organizationRepositories/index.spec.jsx
index 05320b88e2541f..65cd42ce99b9bf 100644
--- a/static/app/views/settings/organizationRepositories/index.spec.jsx
+++ b/static/app/views/settings/organizationRepositories/index.spec.jsx
@@ -1,6 +1,5 @@
import {render} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import OrganizationRepositoriesContainer from 'sentry/views/settings/organizationRepositories';
describe('OrganizationRepositoriesContainer', function () {
@@ -8,16 +7,16 @@ describe('OrganizationRepositoriesContainer', function () {
const organization = TestStubs.Organization();
beforeEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
describe('without any providers', function () {
beforeEach(function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/repos/',
body: [],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: '/organizations/org-slug/config/repos/',
body: {providers: []},
});
diff --git a/static/app/views/settings/organizationTeams/teamDetails.spec.jsx b/static/app/views/settings/organizationTeams/teamDetails.spec.jsx
index 6af9e5fe2603e1..4e053aaa32fcac 100644
--- a/static/app/views/settings/organizationTeams/teamDetails.spec.jsx
+++ b/static/app/views/settings/organizationTeams/teamDetails.spec.jsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import TeamStore from 'sentry/stores/teamStore';
import TeamDetails from 'sentry/views/settings/organizationTeams/teamDetails';
@@ -15,14 +14,14 @@ describe('TeamMembers', () => {
beforeEach(() => {
TeamStore.init();
TeamStore.loadInitialData([team, teamHasAccess]);
- joinMock = Client.addMockResponse({
+ joinMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/me/teams/${team.slug}/`,
method: 'POST',
});
});
afterEach(() => {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
TeamStore.reset();
});
diff --git a/static/app/views/settings/organizationTeams/teamMembers.spec.jsx b/static/app/views/settings/organizationTeams/teamMembers.spec.jsx
index f0f2284d133b4b..8d0fce2dc68e94 100644
--- a/static/app/views/settings/organizationTeams/teamMembers.spec.jsx
+++ b/static/app/views/settings/organizationTeams/teamMembers.spec.jsx
@@ -5,7 +5,6 @@ import {
openInviteMembersModal,
openTeamAccessRequestModal,
} from 'sentry/actionCreators/modal';
-import {Client} from 'sentry/api';
import TeamMembers from 'sentry/views/settings/organizationTeams/teamMembers';
jest.mock('sentry/actionCreators/modal', () => ({
@@ -27,29 +26,29 @@ describe('TeamMembers', function () {
});
beforeEach(function () {
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/`,
method: 'GET',
body: [member],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team.slug}/members/`,
method: 'GET',
body: members,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team.slug}/`,
method: 'GET',
body: team,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${managerTeam.slug}/`,
method: 'GET',
body: managerTeam,
});
- createMock = Client.addMockResponse({
+ createMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/${member.id}/teams/${team.slug}/`,
method: 'POST',
});
@@ -255,7 +254,7 @@ describe('TeamMembers', function () {
});
it('can remove member from team', async function () {
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/${members[0].id}/teams/${team.slug}/`,
method: 'DELETE',
});
@@ -280,13 +279,13 @@ describe('TeamMembers', function () {
id: '123',
email: '[email protected]',
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team.slug}/members/`,
method: 'GET',
body: [...members, me],
});
- const deleteMock = Client.addMockResponse({
+ const deleteMock = MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/${me.id}/teams/${team.slug}/`,
method: 'DELETE',
});
@@ -320,7 +319,7 @@ describe('TeamMembers', function () {
email: '[email protected]',
role: 'owner',
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team.slug}/members/`,
method: 'GET',
body: [...members, me],
@@ -346,7 +345,7 @@ describe('TeamMembers', function () {
email: '[email protected]',
orgRole: 'manager',
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team.slug}/members/`,
method: 'GET',
body: [...members, manager],
@@ -368,7 +367,7 @@ describe('TeamMembers', function () {
});
it('adding member to manager team makes them team admin', async function () {
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${managerTeam.slug}/members/`,
method: 'GET',
body: [],
@@ -409,18 +408,18 @@ describe('TeamMembers', function () {
},
});
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/`,
method: 'GET',
body: [...members, me],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team2.slug}/members/`,
method: 'GET',
body: members,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team2.slug}/`,
method: 'GET',
body: team2,
@@ -449,18 +448,18 @@ describe('TeamMembers', function () {
role: 'member',
});
- Client.clearMockResponses();
- Client.addMockResponse({
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/members/`,
method: 'GET',
body: [...members, me],
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team2.slug}/members/`,
method: 'GET',
body: members,
});
- Client.addMockResponse({
+ MockApiClient.addMockResponse({
url: `/teams/${organization.slug}/${team2.slug}/`,
method: 'GET',
body: team2,
diff --git a/static/app/views/settings/organizationTeams/teamProjects.spec.jsx b/static/app/views/settings/organizationTeams/teamProjects.spec.jsx
index ac96997d99cad9..3b62eb38034dd4 100644
--- a/static/app/views/settings/organizationTeams/teamProjects.spec.jsx
+++ b/static/app/views/settings/organizationTeams/teamProjects.spec.jsx
@@ -1,7 +1,6 @@
import {initializeOrg} from 'sentry-test/initializeOrg';
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
-import {Client} from 'sentry/api';
import {TeamProjects as OrganizationTeamProjects} from 'sentry/views/settings/organizationTeams/teamProjects';
describe('OrganizationTeamProjects', function () {
@@ -30,25 +29,25 @@ describe('OrganizationTeamProjects', function () {
beforeEach(function () {
team = TestStubs.Team({slug: 'team-slug'});
- getMock = Client.addMockResponse({
+ getMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/projects/',
body: [project, project2],
});
- putMock = Client.addMockResponse({
+ putMock = MockApiClient.addMockResponse({
method: 'PUT',
url: '/projects/org-slug/project-slug/',
body: project,
});
- postMock = Client.addMockResponse({
+ postMock = MockApiClient.addMockResponse({
method: 'POST',
url: `/projects/org-slug/${project2.slug}/teams/${team.slug}/`,
body: {...project2, teams: [team]},
status: 201,
});
- deleteMock = Client.addMockResponse({
+ deleteMock = MockApiClient.addMockResponse({
method: 'DELETE',
url: `/projects/org-slug/${project2.slug}/teams/${team.slug}/`,
body: {...project2, teams: []},
@@ -57,7 +56,7 @@ describe('OrganizationTeamProjects', function () {
});
afterEach(function () {
- Client.clearMockResponses();
+ MockApiClient.clearMockResponses();
});
it('fetches linked and unlinked projects', function () {
|
d433a0c2d9462fb6992e45078535aa0293319089
|
2023-01-28 00:05:02
|
anthony sottile
|
ref: delete unused sentry.logging.{bind,unbind} (#43794)
| false
|
delete unused sentry.logging.{bind,unbind} (#43794)
|
ref
|
diff --git a/src/sentry/logging/__init__.py b/src/sentry/logging/__init__.py
index 5e65a0714a01bf..cc34ea1dcffc6c 100644
--- a/src/sentry/logging/__init__.py
+++ b/src/sentry/logging/__init__.py
@@ -1,21 +1,3 @@
-from structlog import get_logger
-
-
class LoggingFormat:
HUMAN = "human"
MACHINE = "machine"
-
-
-def bind(name, **kwargs):
- """
- Syntactic sugar for binding arbitrary kv pairs to a given logger instantiated from
- logging.getLogger instead of structlog.get_logger.
- """
- return get_logger(name=name).bind(**kwargs)
-
-
-def unbind(name, *keys):
- try:
- get_logger(name=name).unbind(*keys)
- except KeyError:
- pass
|
7cda433dcfe1939439cb9ee21b6cea0b878e73ca
|
2022-09-23 12:56:16
|
Evan Purkhiser
|
ref(js): Remove unused isMobile (#39183)
| false
|
Remove unused isMobile (#39183)
|
ref
|
diff --git a/static/app/utils/isMobile.ts b/static/app/utils/isMobile.ts
deleted file mode 100644
index 00d4be35466c0b..00000000000000
--- a/static/app/utils/isMobile.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Checks if the user agent is a mobile device. On browsers that does not support `navigator.userAgentData`,
- * fallback to checking the viewport width.
- */
-export default function isMobile(): boolean {
- if ((navigator as any).userAgentData) {
- return (navigator as any).userAgentData.mobile;
- }
- return window.innerWidth < 800;
-}
|
919e265bb18bd690fb047f917e64e2b00e53f2f3
|
2022-09-26 18:14:37
|
Ahmed Etefy
|
fix(metrics): Remove generic_metrics_counters support (#39280)
| false
|
Remove generic_metrics_counters support (#39280)
|
fix
|
diff --git a/src/sentry/search/events/constants.py b/src/sentry/search/events/constants.py
index 86c221bbb0769a..a234058fcd8937 100644
--- a/src/sentry/search/events/constants.py
+++ b/src/sentry/search/events/constants.py
@@ -293,5 +293,4 @@ class ThresholdDict(TypedDict):
"user_misery",
"count_unique",
],
- "generic_counter": [],
}
diff --git a/src/sentry/snuba/dataset.py b/src/sentry/snuba/dataset.py
index aa3ec851bdd66d..7ad141a53f44e1 100644
--- a/src/sentry/snuba/dataset.py
+++ b/src/sentry/snuba/dataset.py
@@ -26,4 +26,3 @@ class EntityKey(Enum):
MetricsDistributions = "metrics_distributions"
GenericMetricsDistributions = "generic_metrics_distributions"
GenericMetricsSets = "generic_metrics_sets"
- GenericMetricsCounters = "generic_metrics_counters"
diff --git a/src/sentry/snuba/entity_subscription.py b/src/sentry/snuba/entity_subscription.py
index 590995c9c1102d..18f92f948e77a7 100644
--- a/src/sentry/snuba/entity_subscription.py
+++ b/src/sentry/snuba/entity_subscription.py
@@ -52,7 +52,6 @@
EntityKey.Events: "timestamp",
EntityKey.Sessions: "started",
EntityKey.Transactions: "finish_ts",
- EntityKey.GenericMetricsCounters: "timestamp",
EntityKey.GenericMetricsDistributions: "timestamp",
EntityKey.GenericMetricsSets: "timestamp",
EntityKey.MetricsCounters: "timestamp",
diff --git a/src/sentry/snuba/metrics/fields/base.py b/src/sentry/snuba/metrics/fields/base.py
index 50ac563693334e..a876b7d6d32595 100644
--- a/src/sentry/snuba/metrics/fields/base.py
+++ b/src/sentry/snuba/metrics/fields/base.py
@@ -67,7 +67,6 @@
DEFAULT_AGGREGATES,
GENERIC_OP_TO_SNUBA_FUNCTION,
GRANULARITY,
- METRIC_TYPE_TO_ENTITY,
OP_TO_SNUBA_FUNCTION,
TS_COL_QUERY,
UNIT_TO_TYPE,
@@ -159,7 +158,6 @@ def _get_known_entity_of_metric_mri(metric_mri: str) -> Optional[EntityKey]:
TransactionMRI(metric_mri)
entity_prefix = metric_mri.split(":")[0]
return {
- "c": EntityKey.GenericMetricsCounters,
"d": EntityKey.GenericMetricsDistributions,
"s": EntityKey.GenericMetricsSets,
}[entity_prefix]
@@ -183,19 +181,19 @@ def _get_entity_of_metric_mri(
if metric_id is None:
raise InvalidParams
+ entity_keys_set: frozenset[EntityKey]
if use_case_id == UseCaseKey.PERFORMANCE:
- metric_types = (
- "generic_counter",
- "generic_set",
- "generic_distribution",
+ entity_keys_set = frozenset(
+ {EntityKey.GenericMetricsSets, EntityKey.GenericMetricsDistributions}
)
elif use_case_id == UseCaseKey.RELEASE_HEALTH:
- metric_types = ("counter", "set", "distribution")
+ entity_keys_set = frozenset(
+ {EntityKey.MetricsCounters, EntityKey.MetricsSets, EntityKey.MetricsDistributions}
+ )
else:
raise InvalidParams
- for metric_type in metric_types:
- entity_key = METRIC_TYPE_TO_ENTITY[metric_type]
+ for entity_key in entity_keys_set:
data = run_metrics_query(
entity_key=entity_key,
select=[Column("metric_id")],
diff --git a/src/sentry/snuba/metrics/utils.py b/src/sentry/snuba/metrics/utils.py
index 2fea5354c3201d..541f5b6a30bae7 100644
--- a/src/sentry/snuba/metrics/utils.py
+++ b/src/sentry/snuba/metrics/utils.py
@@ -170,7 +170,6 @@ def generate_operation_regex():
"counter": EntityKey.MetricsCounters,
"set": EntityKey.MetricsSets,
"distribution": EntityKey.MetricsDistributions,
- "generic_counter": EntityKey.GenericMetricsCounters,
"generic_set": EntityKey.GenericMetricsSets,
"generic_distribution": EntityKey.GenericMetricsDistributions,
}
|
e54d385a6727188d8e36b70add0cb88a1b496f37
|
2023-02-18 02:34:56
|
Armen Zambrano G
|
chore(derived_code_mappings): Ignore another error (#44793)
| false
|
Ignore another error (#44793)
|
chore
|
diff --git a/src/sentry/integrations/github/client.py b/src/sentry/integrations/github/client.py
index 7ca8d95ac21345..53d927377950db 100644
--- a/src/sentry/integrations/github/client.py
+++ b/src/sentry/integrations/github/client.py
@@ -215,6 +215,12 @@ def process_error(error: ApiError, extra: Dict[str, str]) -> None:
logger.warning(f"The app does not have access to the repo. {msg}", extra=extra)
elif txt == "Repository access blocked":
logger.warning(f"Github has blocked the repository. {msg}", extra=extra)
+ elif txt == "Server Error":
+ logger.warning(f"Github failed to respond. {msg}.", extra=extra)
+ elif txt == "Bad credentials":
+ logger.warning(f"No permission granted for this repo. {msg}.", extra=extra)
+ elif txt.startswith("Unable to reach host:"):
+ logger.warning(f"Unable to reach host at the moment. {msg}.", extra=extra)
elif txt.startswith("Due to U.S. trade controls law restrictions, this GitHub"):
logger.warning("Github has blocked this org. We will not continue.", extra=extra)
# Raising the error will be handled at the task level
|
99ce1e9e6577b5fe0adf81aef988f2054a802f15
|
2025-01-03 03:21:23
|
Evan Purkhiser
|
ref(browserHistory): Remove from transactionEvents (#82630)
| false
|
Remove from transactionEvents (#82630)
|
ref
|
diff --git a/static/app/views/performance/transactionSummary/transactionEvents/index.tsx b/static/app/views/performance/transactionSummary/transactionEvents/index.tsx
index c2a177e33c0883..0101e2c1dc3210 100644
--- a/static/app/views/performance/transactionSummary/transactionEvents/index.tsx
+++ b/static/app/views/performance/transactionSummary/transactionEvents/index.tsx
@@ -6,7 +6,6 @@ import {t} from 'sentry/locale';
import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
import {trackAnalytics} from 'sentry/utils/analytics';
-import {browserHistory} from 'sentry/utils/browserHistory';
import DiscoverQuery from 'sentry/utils/discover/discoverQuery';
import EventView from 'sentry/utils/discover/eventView';
import {
@@ -18,6 +17,7 @@ import {WebVital} from 'sentry/utils/fields';
import {removeHistogramQueryStrings} from 'sentry/utils/performance/histogram';
import {decodeScalar} from 'sentry/utils/queryString';
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
+import {useNavigate} from 'sentry/utils/useNavigate';
import withOrganization from 'sentry/utils/withOrganization';
import withProjects from 'sentry/utils/withProjects';
@@ -75,6 +75,7 @@ function EventsContentWrapper(props: ChildProps) {
projectId,
projects,
} = props;
+ const navigate = useNavigate();
const eventsDisplayFilterName = decodeEventsDisplayFilterFromLocation(location);
const spanOperationBreakdownFilter = decodeFilterFromLocation(location);
const webVital = getWebVital(location);
@@ -126,7 +127,7 @@ function EventsContentWrapper(props: ChildProps) {
if (newFilter === SpanOperationBreakdownFilter.NONE) {
delete nextQuery.breakdown;
}
- browserHistory.push({
+ navigate({
pathname: location.pathname,
query: nextQuery,
});
@@ -150,7 +151,7 @@ function EventsContentWrapper(props: ChildProps) {
delete nextQuery.showTransaction;
}
- browserHistory.push({
+ navigate({
pathname: location.pathname,
query: nextQuery,
});
|
7f6a65b4c8edf1021ced7f2ab84a2f8ed5fb2202
|
2025-03-15 22:34:53
|
getsentry-bot
|
release: 25.3.0
| false
|
25.3.0
|
release
|
diff --git a/CHANGES b/CHANGES
index e2f27f4885b885..a1635a5558d17a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,58 @@
+25.3.0
+------
+
+### Automate Code Mappings & In-App Stack Trace Rules for Java projects (ongoing)
+
+Currently, we ask developers to set up their Java code mappings manually (because the SDK cannot determine it):
+https://docs.sentry.io/platforms/java/source-context/#setting-up-code-mappings
+
+Unfortunately, many stack traces do not contain in-app frames, thus, many Sentry features are not available (e.g. SCM linking, suspect commit).
+
+This tracks using the code mappings derivation system to automatically add the code mappings and stack trace rules to mark in-app frames as such.
+
+This will automatically enable the following Sentry features :
+- Suspect Commits
+- GitHub pull request comments
+- Auto-assignments (if Codeowners imported)
+- Stack trace linking
+- Code coverage (if the customer also has an account)
+
+This will only be available to customers with the GitHub integration installed.
+
+You can read more about the system here:
+https://blog.sentry.io/code-mappings-and-why-they-matter/
+
+By: @armenzg (#86283, #86327, #86280, #86196, #86188, #86189, #86109, #86026, #85981, #85976, #85931, #85742)
+
+### Various fixes & improvements
+
+- Revert "chore(sentry apps): add SLO context manager for send alert event (issue alerts) (#86356)" (fa6491f2) by @getsentry-bot
+- fix(autofix): Fix running autofix after all issue summaries (#87134) by @jennmueng
+- fix(data-consent): Fix non touch customers seeing msa prompt (#87133) by @jennmueng
+- fix(eap-spans): count_op should use `score.total` (#87132) by @DominikB2014
+- chore(sentry apps): Add context manager for comment webhook SLOs (#86739) by @Christinarlong
+- feat(devenv): Skip `devenv sync` call when we have FE changes and env var is set (#87112) by @wedamija
+- feat(insights): make score easier to query (#87129) by @DominikB2014
+- chore(issue-details): Fix a few things about issue guide (#87122) by @leeandher
+- feat(issue-views): Improve drag handle and safari interactions (#87119) by @MichaelSun48
+- :recycle: ref(aci): remove alert rule from metric alert chart building logic (#87103) by @iamrajjoshi
+- fix(jira): Add a 'key_id' block list for JIRA installed webhook endpoint (#87086) by @Christinarlong
+- fix(event_manager): Resolve TypeError while recording first insight span (#87123) by @jan-auer
+- chore(sentry apps): add SLO context manager for send alert event (issue alerts) (#86356) by @Christinarlong
+- ref(feedback): add evidence test coverage and send alerts if source is none (#87121) by @aliu39
+- feat(releases): Change "version" to "release" in table (#87088) by @billyvg
+- feat(releases): Change release bubbles series color to match bubbles (#87109) by @billyvg
+- test(react19): Wait for text in billingPlans.spec.tex (#87120) by @scttcper
+- ref(tsc): convert projectPlugins details to FC (#87035) by @michellewzhang
+- chore(issues): Opt more modules into stronger typing (#87117) by @mrduncan
+- feat(ui): Move checkInTimeline underscan to the left (#87096) by @evanpurkhiser
+- fix(aci): ANY_SHORT_CIRCUIT early exit (#87114) by @cathteng
+- test(react19): Adjust widgetViewerModal for react 19 (#87110) by @scttcper
+- chore(uptime): Commit test helpers for getsentry (#87115) by @wedamija
+- feat(insights): add most related issues to backend (#87033) by @DominikB2014
+
+_Plus 1390 more_
+
25.2.0
------
diff --git a/setup.cfg b/setup.cfg
index 9ba3b6d7a97649..37eb5b3a3800c7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = sentry
-version = 25.3.0.dev0
+version = 25.3.0
description = A realtime logging and aggregation server.
long_description = file: README.md
long_description_content_type = text/markdown
diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py
index 527d5631c9714b..ce26caad39ba07 100644
--- a/src/sentry/conf/server.py
+++ b/src/sentry/conf/server.py
@@ -2574,7 +2574,7 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
SENTRY_SELF_HOSTED_ERRORS_ONLY = False
# only referenced in getsentry to provide the stable beacon version
# updated with scripts/bump-version.sh
-SELF_HOSTED_STABLE_VERSION = "25.2.0"
+SELF_HOSTED_STABLE_VERSION = "25.3.0"
# Whether we should look at X-Forwarded-For header or not
# when checking REMOTE_ADDR ip addresses
|
2ba40dbbde19fb975bd34713070eae47538d140b
|
2022-10-11 21:54:40
|
Matt Quinn
|
fix(perf-issues): fix None in render-blocking asset detector method chain (#39875)
| false
|
fix None in render-blocking asset detector method chain (#39875)
|
fix
|
diff --git a/src/sentry/utils/performance_issues/performance_detection.py b/src/sentry/utils/performance_issues/performance_detection.py
index 5cfd195832b45a..90ce1ec85da9a3 100644
--- a/src/sentry/utils/performance_issues/performance_detection.py
+++ b/src/sentry/utils/performance_issues/performance_detection.py
@@ -724,7 +724,8 @@ def init(self):
# Only concern ourselves with transactions where the FCP is within the
# range we care about.
- fcp_hash = self.event().get("measurements", {}).get("fcp", {})
+ measurements = self.event().get("measurements") or {}
+ fcp_hash = measurements.get("fcp") or {}
fcp_value = fcp_hash.get("value")
if fcp_value and ("unit" not in fcp_hash or fcp_hash["unit"] == "millisecond"):
fcp = timedelta(milliseconds=fcp_value)
diff --git a/tests/sentry/utils/performance_issues/test_performance_detection.py b/tests/sentry/utils/performance_issues/test_performance_detection.py
index 01605c7b3f3492..0b1ea190531c57 100644
--- a/tests/sentry/utils/performance_issues/test_performance_detection.py
+++ b/tests/sentry/utils/performance_issues/test_performance_detection.py
@@ -564,6 +564,14 @@ def test_calls_detect_render_blocking_asset(self):
create_span("resource.script", duration=1000.0),
],
}
+ no_measurements_event = {
+ "event_id": "a" * 16,
+ "project": PROJECT_ID,
+ "measurements": None,
+ "spans": [
+ create_span("resource.script", duration=1000.0),
+ ],
+ }
short_render_blocking_asset_event = {
"event_id": "a" * 16,
"project": PROJECT_ID,
@@ -589,6 +597,9 @@ def test_calls_detect_render_blocking_asset(self):
_detect_performance_problems(no_fcp_event, sdk_span_mock)
assert sdk_span_mock.containing_transaction.set_tag.call_count == 0
+ _detect_performance_problems(no_measurements_event, sdk_span_mock)
+ assert sdk_span_mock.containing_transaction.set_tag.call_count == 0
+
_detect_performance_problems(render_blocking_asset_event, sdk_span_mock)
assert sdk_span_mock.containing_transaction.set_tag.call_count == 4
sdk_span_mock.containing_transaction.set_tag.assert_has_calls(
|
177733e2b17eb119d0821c2e849dc558d7d60a7b
|
2021-12-01 23:39:37
|
Scott Cooper
|
fix(echarts): Emphasis project card chart types (#30314)
| false
|
Emphasis project card chart types (#30314)
|
fix
|
diff --git a/static/app/views/projectsDashboard/chart.tsx b/static/app/views/projectsDashboard/chart.tsx
index 9444eb061eea3f..d7e4ec68c8f2e2 100644
--- a/static/app/views/projectsDashboard/chart.tsx
+++ b/static/app/views/projectsDashboard/chart.tsx
@@ -39,11 +39,13 @@ const Chart = ({firstEvent, stats, transactionStats}: Props) => {
itemStyle: {
color: theme.gray200,
opacity: 0.8,
- emphasis: {
+ },
+ emphasis: {
+ itemStyle: {
color: theme.gray200,
opacity: 1.0,
},
- } as any,
+ },
});
}
@@ -59,11 +61,13 @@ const Chart = ({firstEvent, stats, transactionStats}: Props) => {
itemStyle: {
color: theme.purple300,
opacity: 0.6,
- emphasis: {
+ },
+ emphasis: {
+ itemStyle: {
color: theme.purple300,
opacity: 0.8,
},
- } as any,
+ },
});
}
const grid = hasTransactions
|
095854f8ee44938f08b609df9bc2787d0b19f5cc
|
2022-06-03 14:56:58
|
dependabot[bot]
|
build(deps): bump css-minimizer-webpack-plugin from 3.4.1 to 4.0.0 (#35281)
| false
|
bump css-minimizer-webpack-plugin from 3.4.1 to 4.0.0 (#35281)
|
build
|
diff --git a/package.json b/package.json
index 3a31a395765fa9..c537a78e199128 100644
--- a/package.json
+++ b/package.json
@@ -74,7 +74,7 @@
"crypto-browserify": "^3.12.0",
"crypto-js": "4.0.0",
"css-loader": "^5.2.6",
- "css-minimizer-webpack-plugin": "^3.4.1",
+ "css-minimizer-webpack-plugin": "^4.0.0",
"diff": "5.0.0",
"dompurify": "^2.3.8",
"downsample": "1.4.0",
diff --git a/yarn.lock b/yarn.lock
index 8832e39d035920..ef9278dc2237b9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3986,10 +3986,10 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
-"@trysound/[email protected]":
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.1.1.tgz#3348564048e7a2d7398c935d466c0414ebb6a669"
- integrity sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==
+"@trysound/[email protected]":
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
+ integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==
"@tsconfig/node10@^1.0.7":
version "1.0.8"
@@ -5106,11 +5106,6 @@ algoliasearch@^4.3.1:
"@algolia/requester-node-http" "4.5.1"
"@algolia/transporter" "4.5.1"
-alphanum-sort@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
- integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
-
ansi-align@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb"
@@ -5879,7 +5874,7 @@ [email protected]:
escalade "^3.0.2"
node-releases "^1.1.61"
-browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.19.1, browserslist@^4.20.2:
+browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.19.1, browserslist@^4.20.2, browserslist@^4.20.3:
version "4.20.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf"
integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==
@@ -6319,7 +6314,7 @@ color@^4.2.3:
color-convert "^2.0.1"
color-string "^1.9.0"
-colord@^2.0.1, colord@^2.6, colord@^2.9.2:
+colord@^2.9.1, colord@^2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.2.tgz#25e2bacbbaa65991422c07ea209e2089428effb1"
integrity sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==
@@ -6361,7 +6356,7 @@ commander@^6.2.0, commander@^6.2.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
-commander@^7.0.0, commander@^7.1.0:
+commander@^7.0.0, commander@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
@@ -6669,17 +6664,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc"
integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==
-css-color-names@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67"
- integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==
-
-css-declaration-sorter@^6.0.3:
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.3.tgz#9dfd8ea0df4cc7846827876fafb52314890c21a9"
- integrity sha512-52P95mvW1SMzuRZegvpluT6yEv0FqQusydKQPZsNN5Q7hh8EwQvN8E2nwuJ16BBvNN6LcoIZXu/Bk58DAhrrxw==
- dependencies:
- timsort "^0.3.0"
+css-declaration-sorter@^6.2.2:
+ version "6.2.2"
+ resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz#bfd2f6f50002d6a3ae779a87d3a0c5d5b10e0f02"
+ integrity sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg==
css-functions-list@^3.0.1:
version "3.0.1"
@@ -6702,29 +6690,18 @@ css-loader@^3.6.0, css-loader@^5.0.1, css-loader@^5.2.6:
schema-utils "^3.0.0"
semver "^7.3.5"
-css-minimizer-webpack-plugin@^3.4.1:
- version "3.4.1"
- resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz#ab78f781ced9181992fe7b6e4f3422e76429878f"
- integrity sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==
+css-minimizer-webpack-plugin@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.0.0.tgz#e11800388c19c2b7442c39cc78ac8ae3675c9605"
+ integrity sha512-7ZXXRzRHvofv3Uac5Y+RkWRNo0ZMlcg8e9/OtrqUYmwDWJo+qs67GvdeFrXLsFb7czKNwjQhPkM0avlIYl+1nA==
dependencies:
- cssnano "^5.0.6"
- jest-worker "^27.0.2"
- postcss "^8.3.5"
+ cssnano "^5.1.8"
+ jest-worker "^27.5.1"
+ postcss "^8.4.13"
schema-utils "^4.0.0"
serialize-javascript "^6.0.0"
source-map "^0.6.1"
-css-select@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8"
- integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA==
- dependencies:
- boolbase "^1.0.0"
- css-what "^4.0.0"
- domhandler "^4.0.0"
- domutils "^2.4.3"
- nth-check "^2.0.0"
-
css-select@^4.0.0, css-select@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067"
@@ -6736,7 +6713,7 @@ css-select@^4.0.0, css-select@^4.1.3:
domutils "^2.6.0"
nth-check "^2.0.0"
-css-tree@^1.1.2:
+css-tree@^1.1.2, css-tree@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
@@ -6744,11 +6721,6 @@ css-tree@^1.1.2:
mdn-data "2.0.14"
source-map "^0.6.1"
-css-what@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233"
- integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A==
-
css-what@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.0.tgz#f0bf4f8bac07582722346ab243f6a35b512cfc47"
@@ -6778,53 +6750,52 @@ cssfontparser@^1.2.1:
resolved "https://registry.yarnpkg.com/cssfontparser/-/cssfontparser-1.2.1.tgz#f4022fc8f9700c68029d542084afbaf425a3f3e3"
integrity sha1-9AIvyPlwDGgCnVQghK+69CWj8+M=
-cssnano-preset-default@^5.1.4:
- version "5.1.4"
- resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz#359943bf00c5c8e05489f12dd25f3006f2c1cbd2"
- integrity sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ==
- dependencies:
- css-declaration-sorter "^6.0.3"
- cssnano-utils "^2.0.1"
- postcss-calc "^8.0.0"
- postcss-colormin "^5.2.0"
- postcss-convert-values "^5.0.1"
- postcss-discard-comments "^5.0.1"
- postcss-discard-duplicates "^5.0.1"
- postcss-discard-empty "^5.0.1"
- postcss-discard-overridden "^5.0.1"
- postcss-merge-longhand "^5.0.2"
- postcss-merge-rules "^5.0.2"
- postcss-minify-font-values "^5.0.1"
- postcss-minify-gradients "^5.0.2"
- postcss-minify-params "^5.0.1"
- postcss-minify-selectors "^5.1.0"
- postcss-normalize-charset "^5.0.1"
- postcss-normalize-display-values "^5.0.1"
- postcss-normalize-positions "^5.0.1"
- postcss-normalize-repeat-style "^5.0.1"
- postcss-normalize-string "^5.0.1"
- postcss-normalize-timing-functions "^5.0.1"
- postcss-normalize-unicode "^5.0.1"
- postcss-normalize-url "^5.0.2"
- postcss-normalize-whitespace "^5.0.1"
- postcss-ordered-values "^5.0.2"
- postcss-reduce-initial "^5.0.1"
- postcss-reduce-transforms "^5.0.1"
- postcss-svgo "^5.0.2"
- postcss-unique-selectors "^5.0.1"
-
-cssnano-utils@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2"
- integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==
+cssnano-preset-default@^5.2.10:
+ version "5.2.10"
+ resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.10.tgz#6dfffe6cc3b13f3bb356a42c49a334a98700ef45"
+ integrity sha512-H8TJRhTjBKVOPltp9vr9El9I+IfYsOMhmXdK0LwdvwJcxYX9oWkY7ctacWusgPWAgQq1vt/WO8v+uqpfLnM7QA==
+ dependencies:
+ css-declaration-sorter "^6.2.2"
+ cssnano-utils "^3.1.0"
+ postcss-calc "^8.2.3"
+ postcss-colormin "^5.3.0"
+ postcss-convert-values "^5.1.2"
+ postcss-discard-comments "^5.1.2"
+ postcss-discard-duplicates "^5.1.0"
+ postcss-discard-empty "^5.1.1"
+ postcss-discard-overridden "^5.1.0"
+ postcss-merge-longhand "^5.1.5"
+ postcss-merge-rules "^5.1.2"
+ postcss-minify-font-values "^5.1.0"
+ postcss-minify-gradients "^5.1.1"
+ postcss-minify-params "^5.1.3"
+ postcss-minify-selectors "^5.2.1"
+ postcss-normalize-charset "^5.1.0"
+ postcss-normalize-display-values "^5.1.0"
+ postcss-normalize-positions "^5.1.0"
+ postcss-normalize-repeat-style "^5.1.0"
+ postcss-normalize-string "^5.1.0"
+ postcss-normalize-timing-functions "^5.1.0"
+ postcss-normalize-unicode "^5.1.0"
+ postcss-normalize-url "^5.1.0"
+ postcss-normalize-whitespace "^5.1.1"
+ postcss-ordered-values "^5.1.1"
+ postcss-reduce-initial "^5.1.0"
+ postcss-reduce-transforms "^5.1.0"
+ postcss-svgo "^5.1.0"
+ postcss-unique-selectors "^5.1.1"
+
+cssnano-utils@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861"
+ integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==
-cssnano@^5.0.2, cssnano@^5.0.6:
- version "5.0.8"
- resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.8.tgz#39ad166256980fcc64faa08c9bb18bb5789ecfa9"
- integrity sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg==
+cssnano@^5.0.2, cssnano@^5.1.8:
+ version "5.1.10"
+ resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.10.tgz#fc6ddd9a4d7d238f320634326ed814cf0abf6e1c"
+ integrity sha512-ACpnRgDg4m6CZD/+8SgnLcGCgy6DDGdkMbOawwdvVxNietTNLe/MtWcenp6qT0PRt5wzhGl6/cjMWCdhKXC9QA==
dependencies:
- cssnano-preset-default "^5.1.4"
- is-resolvable "^1.1.0"
+ cssnano-preset-default "^5.2.10"
lilconfig "^2.0.3"
yaml "^1.10.2"
@@ -7205,7 +7176,7 @@ dompurify@^2.2.7, dompurify@^2.3.8:
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.8.tgz#224fe9ae57d7ebd9a1ae1ac18c1c1ca3f532226f"
integrity sha512-eVhaWoVibIzqdGYjwsBWodIQIaXFSB+cKDf4cfxLMsK0xiud6SE+/WCVx/Xw/UwQsa4cS3T2eITcdtmTg2UKcw==
-domutils@^2.0.0, domutils@^2.4.3, domutils@^2.5.2, domutils@^2.6.0:
+domutils@^2.0.0, domutils@^2.5.2, domutils@^2.6.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442"
integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==
@@ -9374,7 +9345,7 @@ ipaddr.js@^2.0.1:
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0"
integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==
-is-absolute-url@^3.0.0, is-absolute-url@^3.0.3:
+is-absolute-url@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698"
integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==
@@ -9681,11 +9652,6 @@ is-regexp@^2.0.0:
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-2.1.0.tgz#cd734a56864e23b956bf4e7c66c396a4c0b22c2d"
integrity sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==
-is-resolvable@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
- integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
-
[email protected]:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c"
@@ -10345,7 +10311,7 @@ jest-worker@^26.6.2:
merge-stream "^2.0.0"
supports-color "^7.0.0"
-jest-worker@^27.0.2:
+jest-worker@^27.0.2, jest-worker@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0"
integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==
@@ -12116,50 +12082,51 @@ posix-character-classes@^0.1.0:
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
-postcss-calc@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a"
- integrity sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==
+postcss-calc@^8.2.3:
+ version "8.2.4"
+ resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.2.4.tgz#77b9c29bfcbe8a07ff6693dc87050828889739a5"
+ integrity sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==
dependencies:
- postcss-selector-parser "^6.0.2"
- postcss-value-parser "^4.0.2"
+ postcss-selector-parser "^6.0.9"
+ postcss-value-parser "^4.2.0"
-postcss-colormin@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.2.0.tgz#2b620b88c0ff19683f3349f4cf9e24ebdafb2c88"
- integrity sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==
+postcss-colormin@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.3.0.tgz#3cee9e5ca62b2c27e84fce63affc0cfb5901956a"
+ integrity sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==
dependencies:
browserslist "^4.16.6"
caniuse-api "^3.0.0"
- colord "^2.0.1"
- postcss-value-parser "^4.1.0"
+ colord "^2.9.1"
+ postcss-value-parser "^4.2.0"
-postcss-convert-values@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz#4ec19d6016534e30e3102fdf414e753398645232"
- integrity sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==
+postcss-convert-values@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz#31586df4e184c2e8890e8b34a0b9355313f503ab"
+ integrity sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==
dependencies:
- postcss-value-parser "^4.1.0"
+ browserslist "^4.20.3"
+ postcss-value-parser "^4.2.0"
-postcss-discard-comments@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz#9eae4b747cf760d31f2447c27f0619d5718901fe"
- integrity sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==
+postcss-discard-comments@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz#8df5e81d2925af2780075840c1526f0660e53696"
+ integrity sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==
-postcss-discard-duplicates@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz#68f7cc6458fe6bab2e46c9f55ae52869f680e66d"
- integrity sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==
+postcss-discard-duplicates@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz#9eb4fe8456706a4eebd6d3b7b777d07bad03e848"
+ integrity sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==
-postcss-discard-empty@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz#ee136c39e27d5d2ed4da0ee5ed02bc8a9f8bf6d8"
- integrity sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==
+postcss-discard-empty@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz#e57762343ff7f503fe53fca553d18d7f0c369c6c"
+ integrity sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==
-postcss-discard-overridden@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz#454b41f707300b98109a75005ca4ab0ff2743ac6"
- integrity sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==
+postcss-discard-overridden@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz#7e8c5b53325747e9d90131bb88635282fb4a276e"
+ integrity sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==
postcss-flexbugs-fixes@^4.2.1:
version "4.2.1"
@@ -12191,59 +12158,54 @@ postcss-media-query-parser@^0.2.3:
resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244"
integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=
-postcss-merge-longhand@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz#277ada51d9a7958e8ef8cf263103c9384b322a41"
- integrity sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw==
+postcss-merge-longhand@^5.1.5:
+ version "5.1.5"
+ resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.5.tgz#b0e03bee3b964336f5f33c4fc8eacae608e91c05"
+ integrity sha512-NOG1grw9wIO+60arKa2YYsrbgvP6tp+jqc7+ZD5/MalIw234ooH2C6KlR6FEn4yle7GqZoBxSK1mLBE9KPur6w==
dependencies:
- css-color-names "^1.0.1"
- postcss-value-parser "^4.1.0"
- stylehacks "^5.0.1"
+ postcss-value-parser "^4.2.0"
+ stylehacks "^5.1.0"
-postcss-merge-rules@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz#d6e4d65018badbdb7dcc789c4f39b941305d410a"
- integrity sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==
+postcss-merge-rules@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz#7049a14d4211045412116d79b751def4484473a5"
+ integrity sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==
dependencies:
browserslist "^4.16.6"
caniuse-api "^3.0.0"
- cssnano-utils "^2.0.1"
+ cssnano-utils "^3.1.0"
postcss-selector-parser "^6.0.5"
- vendors "^1.0.3"
-postcss-minify-font-values@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz#a90cefbfdaa075bd3dbaa1b33588bb4dc268addf"
- integrity sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==
+postcss-minify-font-values@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz#f1df0014a726083d260d3bd85d7385fb89d1f01b"
+ integrity sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==
dependencies:
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-minify-gradients@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz#7c175c108f06a5629925d698b3c4cf7bd3864ee5"
- integrity sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ==
+postcss-minify-gradients@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz#f1fe1b4f498134a5068240c2f25d46fcd236ba2c"
+ integrity sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==
dependencies:
- colord "^2.6"
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ colord "^2.9.1"
+ cssnano-utils "^3.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-minify-params@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz#371153ba164b9d8562842fdcd929c98abd9e5b6c"
- integrity sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==
+postcss-minify-params@^5.1.3:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz#ac41a6465be2db735099bbd1798d85079a6dc1f9"
+ integrity sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==
dependencies:
- alphanum-sort "^1.0.2"
- browserslist "^4.16.0"
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
- uniqs "^2.0.0"
+ browserslist "^4.16.6"
+ cssnano-utils "^3.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-minify-selectors@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz#4385c845d3979ff160291774523ffa54eafd5a54"
- integrity sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==
+postcss-minify-selectors@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz#d4e7e6b46147b8117ea9325a915a801d5fe656c6"
+ integrity sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==
dependencies:
- alphanum-sort "^1.0.2"
postcss-selector-parser "^6.0.5"
postcss-modules-extract-imports@^3.0.0:
@@ -12274,96 +12236,91 @@ postcss-modules-values@^4.0.0:
dependencies:
icss-utils "^5.0.0"
-postcss-normalize-charset@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz#121559d1bebc55ac8d24af37f67bd4da9efd91d0"
- integrity sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==
+postcss-normalize-charset@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz#9302de0b29094b52c259e9b2cf8dc0879879f0ed"
+ integrity sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==
-postcss-normalize-display-values@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz#62650b965981a955dffee83363453db82f6ad1fd"
- integrity sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==
+postcss-normalize-display-values@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz#72abbae58081960e9edd7200fcf21ab8325c3da8"
+ integrity sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==
dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-positions@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz#868f6af1795fdfa86fbbe960dceb47e5f9492fe5"
- integrity sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==
+postcss-normalize-positions@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz#902a7cb97cf0b9e8b1b654d4a43d451e48966458"
+ integrity sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==
dependencies:
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-repeat-style@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz#cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5"
- integrity sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==
+postcss-normalize-repeat-style@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz#f6d6fd5a54f51a741cc84a37f7459e60ef7a6398"
+ integrity sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==
dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-string@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz#d9eafaa4df78c7a3b973ae346ef0e47c554985b0"
- integrity sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==
+postcss-normalize-string@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz#411961169e07308c82c1f8c55f3e8a337757e228"
+ integrity sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==
dependencies:
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-timing-functions@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz#8ee41103b9130429c6cbba736932b75c5e2cb08c"
- integrity sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==
+postcss-normalize-timing-functions@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz#d5614410f8f0b2388e9f240aa6011ba6f52dafbb"
+ integrity sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==
dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-unicode@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz#82d672d648a411814aa5bf3ae565379ccd9f5e37"
- integrity sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==
+postcss-normalize-unicode@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz#3d23aede35e160089a285e27bf715de11dc9db75"
+ integrity sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==
dependencies:
- browserslist "^4.16.0"
- postcss-value-parser "^4.1.0"
+ browserslist "^4.16.6"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-url@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz#ddcdfb7cede1270740cf3e4dfc6008bd96abc763"
- integrity sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==
+postcss-normalize-url@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz#ed9d88ca82e21abef99f743457d3729a042adcdc"
+ integrity sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==
dependencies:
- is-absolute-url "^3.0.3"
normalize-url "^6.0.1"
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-normalize-whitespace@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz#b0b40b5bcac83585ff07ead2daf2dcfbeeef8e9a"
- integrity sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==
+postcss-normalize-whitespace@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz#08a1a0d1ffa17a7cc6efe1e6c9da969cc4493cfa"
+ integrity sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==
dependencies:
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-ordered-values@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044"
- integrity sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==
+postcss-ordered-values@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.1.1.tgz#0b41b610ba02906a3341e92cab01ff8ebc598adb"
+ integrity sha512-7lxgXF0NaoMIgyihL/2boNAEZKiW0+HkMhdKMTD93CjW8TdCy2hSdj8lsAo+uwm7EDG16Da2Jdmtqpedl0cMfw==
dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ cssnano-utils "^3.1.0"
+ postcss-value-parser "^4.2.0"
-postcss-reduce-initial@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz#9d6369865b0f6f6f6b165a0ef5dc1a4856c7e946"
- integrity sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==
+postcss-reduce-initial@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz#fc31659ea6e85c492fb2a7b545370c215822c5d6"
+ integrity sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==
dependencies:
- browserslist "^4.16.0"
+ browserslist "^4.16.6"
caniuse-api "^3.0.0"
-postcss-reduce-transforms@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz#93c12f6a159474aa711d5269923e2383cedcf640"
- integrity sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==
+postcss-reduce-transforms@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz#333b70e7758b802f3dd0ddfe98bb1ccfef96b6e9"
+ integrity sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==
dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
+ postcss-value-parser "^4.2.0"
postcss-resolve-nested-selector@^0.1.1:
version "0.1.1"
@@ -12375,7 +12332,7 @@ postcss-safe-parser@^6.0.0:
resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1"
integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==
-postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5:
+postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9:
version "6.0.10"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d"
integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
@@ -12383,29 +12340,27 @@ postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selecto
cssesc "^3.0.0"
util-deprecate "^1.0.2"
-postcss-svgo@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.2.tgz#bc73c4ea4c5a80fbd4b45e29042c34ceffb9257f"
- integrity sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A==
+postcss-svgo@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.1.0.tgz#0a317400ced789f233a28826e77523f15857d80d"
+ integrity sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==
dependencies:
- postcss-value-parser "^4.1.0"
- svgo "^2.3.0"
+ postcss-value-parser "^4.2.0"
+ svgo "^2.7.0"
[email protected]:
version "0.36.2"
resolved "https://registry.yarnpkg.com/postcss-syntax/-/postcss-syntax-0.36.2.tgz#f08578c7d95834574e5593a82dfbfa8afae3b51c"
integrity sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==
-postcss-unique-selectors@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz#3be5c1d7363352eff838bd62b0b07a0abad43bfc"
- integrity sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==
+postcss-unique-selectors@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz#a9f273d1eacd09e9aa6088f4b0507b18b1b541b6"
+ integrity sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==
dependencies:
- alphanum-sort "^1.0.2"
postcss-selector-parser "^6.0.5"
- uniqs "^2.0.0"
-postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
+postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
@@ -12419,7 +12374,7 @@ postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.36:
source-map "^0.6.1"
supports-color "^6.1.0"
-postcss@^8.2.1, postcss@^8.2.15, postcss@^8.3.5, postcss@^8.4.13:
+postcss@^8.2.1, postcss@^8.2.15, postcss@^8.4.13:
version "8.4.14"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
@@ -14380,12 +14335,12 @@ [email protected]:
hey-listen "^1.0.8"
tslib "^2.1.0"
-stylehacks@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.1.tgz#323ec554198520986806388c7fdaebc38d2c06fb"
- integrity sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==
+stylehacks@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.1.0.tgz#a40066490ca0caca04e96c6b02153ddc39913520"
+ integrity sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==
dependencies:
- browserslist "^4.16.0"
+ browserslist "^4.16.6"
postcss-selector-parser "^6.0.4"
stylelint-config-prettier@^9.0.3:
@@ -14504,17 +14459,17 @@ svg-tags@^1.0.0:
resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764"
integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=
-svgo@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.0.tgz#6b3af81d0cbd1e19c83f5f63cec2cb98c70b5373"
- integrity sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q==
+svgo@^2.7.0:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24"
+ integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==
dependencies:
- "@trysound/sax" "0.1.1"
- chalk "^4.1.0"
- commander "^7.1.0"
- css-select "^3.1.2"
- css-tree "^1.1.2"
+ "@trysound/sax" "0.2.0"
+ commander "^7.2.0"
+ css-select "^4.1.3"
+ css-tree "^1.1.3"
csso "^4.2.0"
+ picocolors "^1.0.0"
stable "^0.1.8"
symbol-tree@^3.2.4:
@@ -14665,11 +14620,6 @@ thunky@^1.0.2:
resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d"
integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==
-timsort@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
- integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
-
tiny-emitter@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
@@ -15021,11 +14971,6 @@ union-value@^1.0.0:
is-extendable "^0.1.1"
set-value "^2.0.1"
-uniqs@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
- integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI=
-
[email protected], unist-builder@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436"
@@ -15219,11 +15164,6 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
-vendors@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e"
- integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==
-
vfile-location@^3.0.0, vfile-location@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c"
|
7d5ae45d86fcfd95a8984f62959cf8c32b4af921
|
2024-03-13 00:26:24
|
William Mak
|
fix(trace): Handle 0 prefixed span ids (#66725)
| false
|
Handle 0 prefixed span ids (#66725)
|
fix
|
diff --git a/src/sentry/api/endpoints/organization_events_trace.py b/src/sentry/api/endpoints/organization_events_trace.py
index 54b2438998c856..9a74c802427e02 100644
--- a/src/sentry/api/endpoints/organization_events_trace.py
+++ b/src/sentry/api/endpoints/organization_events_trace.py
@@ -210,19 +210,16 @@ def load_performance_issues(self, light: bool, snuba_params: ParamsType) -> None
for problem in self.event["issue_occurrences"]:
offender_span_ids = problem.evidence_data.get("offender_span_ids", [])
if event_span.get("span_id") in offender_span_ids:
- try:
- start_timestamp = float(event_span.get("precise.start_ts"))
- if start is None:
- start = start_timestamp
- else:
- start = min(start, start_timestamp)
- end_timestamp = float(event_span.get("precise.finish_ts"))
- if end is None:
- end = end_timestamp
- else:
- end = max(end, end_timestamp)
- except ValueError:
- pass
+ start_timestamp = float(event_span.get("precise.start_ts"))
+ if start is None:
+ start = start_timestamp
+ else:
+ start = min(start, start_timestamp)
+ end_timestamp = float(event_span.get("precise.finish_ts"))
+ if end is None:
+ end = end_timestamp
+ else:
+ end = max(end, end_timestamp)
suspect_spans.append(event_span.get("span_id"))
else:
if self.nodestore_event is not None or self.span_serialized:
@@ -548,6 +545,12 @@ def build_span_query(trace_id, spans_params, query_spans):
return parents_query
+def pad_span_id(span):
+ """Snuba might return the span id without leading 0s since they're stored as UInt64
+ which means a span like 0011 gets converted to an int, then back so we'll get `11` instead"""
+ return span.rjust(16, "0")
+
+
def augment_transactions_with_spans(
transactions: Sequence[SnubaTransaction],
errors: Sequence[SnubaError],
@@ -561,8 +564,13 @@ def augment_transactions_with_spans(
problem_project_map = {}
issue_occurrences = []
occurrence_spans = set()
- error_spans = {e["trace.span"] for e in errors if e["trace.span"]}
- projects = {e["project.id"] for e in errors if e["trace.span"]}
+ error_spans = set()
+ projects = set()
+ for error in errors:
+ if "trace.span" in error:
+ error["trace.span"] = pad_span_id(error["trace.span"])
+ error_spans.add(error["trace.span"])
+ projects.add(error["project.id"])
ts_params = find_timestamp_params(transactions)
if ts_params["min"]:
params["start"] = ts_params["min"] - timedelta(hours=1)
@@ -584,19 +592,10 @@ def augment_transactions_with_spans(
if transaction["occurrence_id"] is not None:
problem_project_map[project].append(transaction["occurrence_id"])
- # Need to strip the leading "0"s to match our query to the spans table
- # This is cause spans are stored as UInt64, so a span like 0011
- # converted to an int then converted to a hex will become 11
- # so when we query snuba we need to remove the 00s ourselves as well
if not transaction["trace.parent_span"]:
continue
- transaction["trace.parent_span.stripped"] = (
- str(hex(int(transaction["trace.parent_span"], 16))).lstrip("0x")
- if transaction["trace.parent_span"].startswith("00")
- else transaction["trace.parent_span"]
- )
# parent span ids of the segment spans
- trace_parent_spans.add(transaction["trace.parent_span.stripped"])
+ trace_parent_spans.add(transaction["trace.parent_span"])
with sentry_sdk.start_span(op="augment.transactions", description="get perf issue span ids"):
for project, occurrences in problem_project_map.items():
@@ -652,18 +651,19 @@ def augment_transactions_with_spans(
referrer=Referrer.API_TRACE_VIEW_GET_PARENTS.value
)
+ parent_map = {}
if "data" in parents_results:
- parent_map = {parent["span_id"]: parent for parent in parents_results["data"]}
- else:
- parent_map = {}
+ for parent in parents_results["data"]:
+ parent["span_id"] = pad_span_id(parent["span_id"])
+ parent_map[parent["span_id"]] = parent
with sentry_sdk.start_span(op="augment.transactions", description="linking transactions"):
for transaction in transactions:
# For a given transaction, if parent span id exists in the tranaction (so this is
# not a root span), see if the indexed spans data can tell us what the parent
# transaction id is.
- if "trace.parent_span.stripped" in transaction:
- parent = parent_map.get(transaction["trace.parent_span.stripped"])
+ if "trace.parent_span" in transaction:
+ parent = parent_map.get(transaction["trace.parent_span"])
if parent is not None:
transaction["trace.parent_transaction"] = parent["transaction.id"]
with sentry_sdk.start_span(op="augment.transactions", description="linking perf issues"):
diff --git a/tests/snuba/api/endpoints/test_organization_events_trace.py b/tests/snuba/api/endpoints/test_organization_events_trace.py
index e73b0a021cf2ae..26f9da43c3dd19 100644
--- a/tests/snuba/api/endpoints/test_organization_events_trace.py
+++ b/tests/snuba/api/endpoints/test_organization_events_trace.py
@@ -60,11 +60,13 @@ def create_event(
if tags is not None:
data["tags"] = tags
if file_io_performance_issue:
- span = data["spans"][0]
- if "data" not in span:
- span["data"] = {}
- span["op"] = "file.write"
- span["data"].update({"duration": 1, "blocked_main_thread": True})
+ new_span = data["spans"][0].copy()
+ if "data" not in new_span:
+ new_span["data"] = {}
+ new_span["op"] = "file.write"
+ new_span["data"].update({"duration": 1, "blocked_main_thread": True})
+ new_span["span_id"] = "0012" * 4
+ data["spans"].append(new_span)
with self.feature(self.FEATURES):
with mock.patch.object(
PerformanceFileIOMainThreadGroupType,
@@ -172,7 +174,11 @@ def load_trace(self):
)
# First Generation
- self.gen1_span_ids = [uuid4().hex[:16] for _ in range(3)]
+ # TODO: temporary, this is until we deprecate using this endpoint without useSpans
+ if isinstance(self, OrganizationEventsTraceEndpointTestUsingSpans):
+ self.gen1_span_ids = ["0014" * 4, *(uuid4().hex[:16] for _ in range(2))]
+ else:
+ self.gen1_span_ids = [uuid4().hex[:16] for _ in range(3)]
self.gen1_project = self.create_project(organization=self.organization)
self.gen1_events = [
self.create_event(
@@ -811,8 +817,8 @@ def assert_trace_data(self, root, gen2_no_children=True):
assert root["transaction.duration"] == 3000
assert len(root["children"]) == 3
assert len(root["performance_issues"]) == 1
- # The perf issue is put on the first span
- perf_issue_span = self.root_event.data["spans"][0]
+ # The perf issue is added as the last span
+ perf_issue_span = self.root_event.data["spans"][-1]
assert root["performance_issues"][0]["suspect_spans"][0] == perf_issue_span["span_id"]
assert root["performance_issues"][0]["start"] == perf_issue_span["start_timestamp"]
assert root["performance_issues"][0]["end"] == perf_issue_span["timestamp"]
@@ -1611,20 +1617,6 @@ def test_indexed_spans_only_query_required_projects(self, mock_query_builder):
assert response.status_code == 200, response.content
- def test_simple(self):
- self.load_trace()
- with self.feature(self.FEATURES):
- response = self.client_get(
- data={"project": -1},
- )
- assert response.status_code == 200, response.content
- trace_transaction = response.data["transactions"][0]
- self.assert_trace_data(trace_transaction)
- # We shouldn't have detailed fields here
- assert "transaction.status" not in trace_transaction
- assert "tags" not in trace_transaction
- assert "measurements" not in trace_transaction
-
@region_silo_test
class OrganizationEventsTraceMetaEndpointTest(OrganizationEventsTraceEndpointBase):
|
6017866d07ac12404573fd72f97295b8d59d0281
|
2023-11-22 17:55:12
|
Jonas
|
fix(profiling): normalize and use same fn frame everywhere (#60273)
| false
|
normalize and use same fn frame everywhere (#60273)
|
fix
|
diff --git a/static/app/views/profiling/landing/slowestFunctionsWidget.tsx b/static/app/views/profiling/landing/slowestFunctionsWidget.tsx
index 7237b897a9b794..62fc82addcd9e8 100644
--- a/static/app/views/profiling/landing/slowestFunctionsWidget.tsx
+++ b/static/app/views/profiling/landing/slowestFunctionsWidget.tsx
@@ -18,6 +18,7 @@ import {IconChevron, IconWarning} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import {trackAnalytics} from 'sentry/utils/analytics';
+import {Frame} from 'sentry/utils/profiling/frame';
import {EventsResultsDataRow} from 'sentry/utils/profiling/hooks/types';
import {useProfileFunctions} from 'sentry/utils/profiling/hooks/useProfileFunctions';
import {generateProfileFlamechartRouteWithQuery} from 'sentry/utils/profiling/routes';
@@ -190,6 +191,19 @@ function SlowestFunctionEntry({
const score = Math.ceil((((func['sum()'] as number) ?? 0) / totalDuration) * BARS);
const palette = new Array(BARS).fill([CHART_PALETTE[0][0]]);
+ const frame = useMemo(() => {
+ return new Frame(
+ {
+ key: 0,
+ name: func.function as string,
+ package: func.package as string,
+ },
+ project?.platform && /node|javascript/.test(project.platform)
+ ? project.platform
+ : undefined
+ );
+ }, [func, project]);
+
const userQuery = useMemo(() => {
const conditions = new MutableSearch(query);
@@ -222,7 +236,7 @@ function SlowestFunctionEntry({
</Tooltip>
)}
<FunctionName>
- <Tooltip title={func.package}>{func.function}</Tooltip>
+ <Tooltip title={frame.package}>{frame.name}</Tooltip>
</FunctionName>
<Tooltip
title={tct('Appeared [count] times for a total time spent of [totalSelfTime]', {
@@ -279,8 +293,8 @@ function SlowestFunctionEntry({
projectSlug: project.slug,
profileId: examples[0],
query: {
- frameName: func.function as string,
- framePackage: func.package as string,
+ frameName: frame.name,
+ framePackage: frame.package,
},
});
transactionCol = (
diff --git a/static/app/views/profiling/profileSummary/slowestProfileFunctions.tsx b/static/app/views/profiling/profileSummary/slowestProfileFunctions.tsx
index 61cebdcd505b45..195de0d4fc2edc 100644
--- a/static/app/views/profiling/profileSummary/slowestProfileFunctions.tsx
+++ b/static/app/views/profiling/profileSummary/slowestProfileFunctions.tsx
@@ -11,7 +11,10 @@ import PerformanceDuration from 'sentry/components/performanceDuration';
import {TextTruncateOverflow} from 'sentry/components/profiling/textTruncateOverflow';
import {t, tn} from 'sentry/locale';
import {space} from 'sentry/styles/space';
+import {Organization, Project} from 'sentry/types';
import {trackAnalytics} from 'sentry/utils/analytics';
+import {Frame} from 'sentry/utils/profiling/frame';
+import {EventsResultsDataRow} from 'sentry/utils/profiling/hooks/types';
import {useCurrentProjectFromRouteParam} from 'sentry/utils/profiling/hooks/useCurrentProjectFromRouteParam';
import {useProfileFunctions} from 'sentry/utils/profiling/hooks/useProfileFunctions';
import {formatSort} from 'sentry/utils/profiling/hooks/utils';
@@ -131,48 +134,13 @@ export function SlowestProfileFunctions(props: SlowestProfileFunctionsProps) {
) : (
functions.map((fn, i) => {
return (
- <SlowestFunctionRow key={i}>
- <SlowestFunctionMainRow>
- <div>
- <Link
- onClick={onSlowestFunctionClick}
- to={generateProfileFlamechartRouteWithQuery({
- orgSlug: organization.slug,
- projectSlug: project?.slug ?? '',
- profileId: (fn['examples()']?.[0] as string) ?? '',
- query: {
- // specify the frame to focus, the flamegraph will switch
- // to the appropriate thread when these are specified
- frameName: fn.function as string,
- framePackage: fn.package as string,
- },
- })}
- >
- <TextTruncateOverflow>{fn.function}</TextTruncateOverflow>
- </Link>
- </div>
- <div>
- <PerformanceDuration
- nanoseconds={fn['sum()'] as number}
- abbreviation
- />
- </div>
- </SlowestFunctionMainRow>
- <SlowestFunctionMetricsRow>
- <div>
- <TextTruncateOverflow>{fn.package}</TextTruncateOverflow>
- </div>
- <div>
- <Count value={fn['count()'] as number} />{' '}
- {tn('time', 'times', fn['count()'])}
- {', '}
- <PerformanceDuration
- nanoseconds={fn['p75()'] as number}
- abbreviation
- />
- </div>
- </SlowestFunctionMetricsRow>
- </SlowestFunctionRow>
+ <SlowestFunctionEntry
+ key={i}
+ func={fn}
+ organization={organization}
+ project={project}
+ onSlowestFunctionClick={onSlowestFunctionClick}
+ />
);
})
)}
@@ -181,6 +149,66 @@ export function SlowestProfileFunctions(props: SlowestProfileFunctionsProps) {
);
}
+interface SlowestFunctionEntryProps {
+ func: EventsResultsDataRow<'function' | 'package' | 'count()' | 'p75()' | 'sum()'>;
+ onSlowestFunctionClick: () => void;
+ organization: Organization;
+ project: Project | null;
+}
+function SlowestFunctionEntry(props: SlowestFunctionEntryProps) {
+ const frame = useMemo(() => {
+ return new Frame(
+ {
+ key: 0,
+ name: props.func.function as string,
+ package: props.func.package as string,
+ },
+ props.project?.platform && /node|javascript/.test(props.project.platform)
+ ? props.project.platform
+ : undefined
+ );
+ }, [props.func, props.project]);
+
+ return (
+ <SlowestFunctionRow>
+ <SlowestFunctionMainRow>
+ <div>
+ <Link
+ onClick={props.onSlowestFunctionClick}
+ to={generateProfileFlamechartRouteWithQuery({
+ orgSlug: props.organization.slug,
+ projectSlug: props.project?.slug ?? '',
+ profileId: (props.func['examples()']?.[0] as string) ?? '',
+ query: {
+ // specify the frame to focus, the flamegraph will switch
+ // to the appropriate thread when these are specified
+ frameName: frame.name as string,
+ framePackage: frame.package as string,
+ },
+ })}
+ >
+ <TextTruncateOverflow>{frame.name}</TextTruncateOverflow>
+ </Link>
+ </div>
+ <div>
+ <PerformanceDuration nanoseconds={props.func['sum()'] as number} abbreviation />
+ </div>
+ </SlowestFunctionMainRow>
+ <SlowestFunctionMetricsRow>
+ <div>
+ <TextTruncateOverflow>{frame.package}</TextTruncateOverflow>
+ </div>
+ <div>
+ <Count value={props.func['count()'] as number} />{' '}
+ {tn('time', 'times', props.func['count()'])}
+ {', '}
+ <PerformanceDuration nanoseconds={props.func['p75()'] as number} abbreviation />
+ </div>
+ </SlowestFunctionMetricsRow>
+ </SlowestFunctionRow>
+ );
+}
+
const SlowestFunctionsList = styled('div')`
flex-basis: 100%;
overflow: auto;
|
514351f0392192919daaa221ee03ac750edb7699
|
2018-03-10 03:59:07
|
ted kaemming
|
ref: Improve compatibility of paginator APIs (#7554)
| false
|
Improve compatibility of paginator APIs (#7554)
|
ref
|
diff --git a/src/sentry/api/paginator.py b/src/sentry/api/paginator.py
index 7ebd955a17b583..07b7e811c0c220 100644
--- a/src/sentry/api/paginator.py
+++ b/src/sentry/api/paginator.py
@@ -21,11 +21,12 @@
quote_name = connections['default'].ops.quote_name
+MAX_LIMIT = 100
MAX_HITS_LIMIT = 1000
class BasePaginator(object):
- def __init__(self, queryset, order_by=None, max_limit=100):
+ def __init__(self, queryset, order_by=None, max_limit=MAX_LIMIT):
if order_by:
if order_by.startswith('-'):
self.key, self.desc = order_by[1:], True
@@ -253,7 +254,7 @@ def reverse_bisect_left(a, x, lo=0, hi=None):
class SequencePaginator(object):
- def __init__(self, data, reverse=False):
+ def __init__(self, data, reverse=False, max_limit=MAX_LIMIT):
self.scores, self.values = map(
list,
zip(*sorted(data, reverse=reverse)),
@@ -263,8 +264,11 @@ def __init__(self, data, reverse=False):
reverse_bisect_left if reverse else bisect.bisect_left,
self.scores,
)
+ self.max_limit = max_limit
+
+ def get_result(self, limit, cursor=None, count_hits=False):
+ limit = min(limit, self.max_limit)
- def get_result(self, limit, cursor=None):
if cursor is None:
cursor = Cursor(0, 0, False)
@@ -312,6 +316,6 @@ def get_result(self, limit, cursor=None):
self.values[lo:hi],
prev=prev_cursor,
next=next_cursor,
- hits=min(len(self.scores), MAX_HITS_LIMIT),
- max_hits=MAX_HITS_LIMIT,
+ hits=min(len(self.scores), MAX_HITS_LIMIT) if count_hits else None,
+ max_hits=MAX_HITS_LIMIT if count_hits else None,
)
diff --git a/tests/sentry/api/test_paginator.py b/tests/sentry/api/test_paginator.py
index 3bcd5af1b5933c..421880de3e461f 100644
--- a/tests/sentry/api/test_paginator.py
+++ b/tests/sentry/api/test_paginator.py
@@ -400,4 +400,4 @@ def test_descending_repeated_scores(self):
def test_hits(self):
n = 10
paginator = SequencePaginator([(i, i) for i in range(n)])
- assert paginator.get_result(5).hits == n
+ assert paginator.get_result(5, count_hits=True).hits == n
|
14c258e6b531011dc9867d515f49ce976fa0c655
|
2024-08-01 22:30:32
|
Alex Zaslavsky
|
feat(relocation): Allow excluding a `regionChoice` (#75451)
| false
|
Allow excluding a `regionChoice` (#75451)
|
feat
|
diff --git a/static/app/utils/regions/index.tsx b/static/app/utils/regions/index.tsx
index 56841a3c87c2b1..c6ba0c37eaa425 100644
--- a/static/app/utils/regions/index.tsx
+++ b/static/app/utils/regions/index.tsx
@@ -56,16 +56,21 @@ export function getRegions(): Region[] {
return ConfigStore.get('regions') ?? [];
}
-export function getRegionChoices(): [string, string][] {
+export function getRegionChoices(exclude: RegionData[] = []): [string, string][] {
const regions = getRegions();
+ const excludedRegionNames = exclude.map(region => region.name);
- return regions.map(region => {
- const {url} = region;
- return [
- url,
- `${getRegionFlagIndicator(region) || ''} ${getRegionDisplayName(region)}`,
- ];
- });
+ return regions
+ .filter(region => {
+ return !excludedRegionNames.includes(region.name);
+ })
+ .map(region => {
+ const {url} = region;
+ return [
+ url,
+ `${getRegionFlagIndicator(region) || ''} ${getRegionDisplayName(region)}`,
+ ];
+ });
}
export function shouldDisplayRegions(): boolean {
|
4a293473eabbd6abd32727781d4314fc27907da6
|
2022-09-28 15:50:39
|
Ahmed Etefy
|
fix(metrics): Make calls to snql func more explicit (#39337)
| false
|
Make calls to snql func more explicit (#39337)
|
fix
|
diff --git a/src/sentry/snuba/metrics/fields/base.py b/src/sentry/snuba/metrics/fields/base.py
index a876b7d6d32595..1b9e7e2837b431 100644
--- a/src/sentry/snuba/metrics/fields/base.py
+++ b/src/sentry/snuba/metrics/fields/base.py
@@ -1065,7 +1065,7 @@ def run_post_query_function(
metric_mri=SessionMRI.ALL.value,
metrics=[SessionMRI.SESSION.value],
unit="sessions",
- snql=lambda *_, org_id, metric_ids, alias=None: all_sessions(
+ snql=lambda org_id, metric_ids, alias=None: all_sessions(
org_id, metric_ids, alias=alias
),
),
@@ -1073,15 +1073,13 @@ def run_post_query_function(
metric_mri=SessionMRI.ALL_USER.value,
metrics=[SessionMRI.USER.value],
unit="users",
- snql=lambda *_, org_id, metric_ids, alias=None: all_users(
- org_id, metric_ids, alias=alias
- ),
+ snql=lambda org_id, metric_ids, alias=None: all_users(org_id, metric_ids, alias=alias),
),
SingularEntityDerivedMetric(
metric_mri=SessionMRI.ABNORMAL.value,
metrics=[SessionMRI.SESSION.value],
unit="sessions",
- snql=lambda *_, org_id, metric_ids, alias=None: abnormal_sessions(
+ snql=lambda org_id, metric_ids, alias=None: abnormal_sessions(
org_id, metric_ids, alias=alias
),
),
@@ -1089,7 +1087,7 @@ def run_post_query_function(
metric_mri=SessionMRI.ABNORMAL_USER.value,
metrics=[SessionMRI.USER.value],
unit="users",
- snql=lambda *_, org_id, metric_ids, alias=None: abnormal_users(
+ snql=lambda org_id, metric_ids, alias=None: abnormal_users(
org_id, metric_ids, alias=alias
),
),
@@ -1097,7 +1095,7 @@ def run_post_query_function(
metric_mri=SessionMRI.CRASHED.value,
metrics=[SessionMRI.SESSION.value],
unit="sessions",
- snql=lambda *_, org_id, metric_ids, alias=None: crashed_sessions(
+ snql=lambda org_id, metric_ids, alias=None: crashed_sessions(
org_id, metric_ids, alias=alias
),
),
@@ -1105,7 +1103,7 @@ def run_post_query_function(
metric_mri=SessionMRI.CRASHED_USER.value,
metrics=[SessionMRI.USER.value],
unit="users",
- snql=lambda *_, org_id, metric_ids, alias=None: crashed_users(
+ snql=lambda org_id, metric_ids, alias=None: crashed_users(
org_id, metric_ids, alias=alias
),
),
@@ -1113,7 +1111,9 @@ def run_post_query_function(
metric_mri=SessionMRI.CRASH_RATE.value,
metrics=[SessionMRI.CRASHED.value, SessionMRI.ALL.value],
unit="percentage",
- snql=lambda *args, org_id, metric_ids, alias=None: division_float(*args, alias=alias),
+ snql=lambda crashed_count, all_count, org_id, metric_ids, alias=None: division_float(
+ crashed_count, all_count, alias=alias
+ ),
),
SingularEntityDerivedMetric(
metric_mri=SessionMRI.CRASH_USER_RATE.value,
@@ -1122,25 +1122,31 @@ def run_post_query_function(
SessionMRI.ALL_USER.value,
],
unit="percentage",
- snql=lambda *args, org_id, metric_ids, alias=None: division_float(*args, alias=alias),
+ snql=lambda crashed_user_count, all_user_count, org_id, metric_ids, alias=None: division_float(
+ crashed_user_count, all_user_count, alias=alias
+ ),
),
SingularEntityDerivedMetric(
metric_mri=SessionMRI.CRASH_FREE_RATE.value,
metrics=[SessionMRI.CRASH_RATE.value],
unit="percentage",
- snql=lambda *args, org_id, metric_ids, alias=None: complement(*args, alias=alias),
+ snql=lambda crash_rate_value, org_id, metric_ids, alias=None: complement(
+ crash_rate_value, alias=alias
+ ),
),
SingularEntityDerivedMetric(
metric_mri=SessionMRI.CRASH_FREE_USER_RATE.value,
metrics=[SessionMRI.CRASH_USER_RATE.value],
unit="percentage",
- snql=lambda *args, org_id, metric_ids, alias=None: complement(*args, alias=alias),
+ snql=lambda crash_user_rate_value, org_id, metric_ids, alias=None: complement(
+ crash_user_rate_value, alias=alias
+ ),
),
SingularEntityDerivedMetric(
metric_mri=SessionMRI.ERRORED_PREAGGREGATED.value,
metrics=[SessionMRI.SESSION.value],
unit="sessions",
- snql=lambda *_, org_id, metric_ids, alias=None: errored_preaggr_sessions(
+ snql=lambda org_id, metric_ids, alias=None: errored_preaggr_sessions(
org_id, metric_ids, alias=alias
),
is_private=True,
@@ -1149,7 +1155,7 @@ def run_post_query_function(
metric_mri=SessionMRI.ERRORED_SET.value,
metrics=[SessionMRI.ERROR.value],
unit="sessions",
- snql=lambda *_, org_id, metric_ids, alias=None: uniq_aggregation_on_metric(
+ snql=lambda org_id, metric_ids, alias=None: uniq_aggregation_on_metric(
metric_ids, alias=alias
),
is_private=True,
@@ -1161,7 +1167,9 @@ def run_post_query_function(
SessionMRI.ABNORMAL.value,
],
unit="sessions",
- snql=lambda *args, org_id, metric_ids, alias=None: addition(*args, alias=alias),
+ snql=lambda crashed_count, abnormal_count, org_id, metric_ids, alias=None: addition(
+ crashed_count, abnormal_count, alias=alias
+ ),
is_private=True,
),
CompositeEntityDerivedMetric(
@@ -1189,7 +1197,7 @@ def run_post_query_function(
metric_mri=SessionMRI.ERRORED_USER_ALL.value,
metrics=[SessionMRI.USER.value],
unit="users",
- snql=lambda *_, org_id, metric_ids, alias=None: errored_all_users(
+ snql=lambda org_id, metric_ids, alias=None: errored_all_users(
org_id, metric_ids, alias=alias
),
is_private=True,
@@ -1201,7 +1209,9 @@ def run_post_query_function(
SessionMRI.ABNORMAL_USER.value,
],
unit="users",
- snql=lambda *args, org_id, metric_ids, alias=None: addition(*args, alias=alias),
+ snql=lambda crashed_user_count, abnormal_user_count, org_id, metric_ids, alias=None: addition(
+ crashed_user_count, abnormal_user_count, alias=alias
+ ),
is_private=True,
),
SingularEntityDerivedMetric(
@@ -1211,7 +1221,9 @@ def run_post_query_function(
SessionMRI.CRASHED_AND_ABNORMAL_USER.value,
],
unit="users",
- snql=lambda *args, org_id, metric_ids, alias=None: subtraction(*args, alias=alias),
+ snql=lambda errored_user_all_count, crashed_and_abnormal_user_count, org_id, metric_ids, alias=None: subtraction(
+ errored_user_all_count, crashed_and_abnormal_user_count, alias=alias
+ ),
post_query_func=lambda *args: max(0, *args),
),
CompositeEntityDerivedMetric(
@@ -1230,14 +1242,16 @@ def run_post_query_function(
SessionMRI.ERRORED_USER_ALL.value,
],
unit="users",
- snql=lambda *args, org_id, metric_ids, alias=None: subtraction(*args, alias=alias),
+ snql=lambda all_user_count, errored_user_all_count, org_id, metric_ids, alias=None: subtraction(
+ all_user_count, errored_user_all_count, alias=alias
+ ),
post_query_func=lambda *args: max(0, *args),
),
SingularEntityDerivedMetric(
metric_mri=TransactionMRI.ALL.value,
metrics=[TransactionMRI.DURATION.value],
unit="transactions",
- snql=lambda *_, org_id, metric_ids, alias=None: all_transactions(
+ snql=lambda org_id, metric_ids, alias=None: all_transactions(
org_id, metric_ids=metric_ids, alias=alias
),
is_private=True,
@@ -1246,7 +1260,7 @@ def run_post_query_function(
metric_mri=TransactionMRI.FAILURE_COUNT.value,
metrics=[TransactionMRI.DURATION.value],
unit="transactions",
- snql=lambda *_, org_id, metric_ids, alias=None: failure_count_transaction(
+ snql=lambda org_id, metric_ids, alias=None: failure_count_transaction(
org_id, metric_ids=metric_ids, alias=alias
),
is_private=True,
@@ -1266,7 +1280,7 @@ def run_post_query_function(
metric_mri=TransactionMRI.SATISFIED.value,
metrics=[TransactionMRI.DURATION.value],
unit="transactions",
- snql=lambda *_, org_id, metric_ids, alias=None: satisfaction_count_transaction(
+ snql=lambda org_id, metric_ids, alias=None: satisfaction_count_transaction(
org_id=org_id, metric_ids=metric_ids, alias=alias
),
is_private=True,
@@ -1275,7 +1289,7 @@ def run_post_query_function(
metric_mri=TransactionMRI.TOLERATED.value,
metrics=[TransactionMRI.DURATION.value],
unit="transactions",
- snql=lambda *_, org_id, metric_ids, alias=None: tolerated_count_transaction(
+ snql=lambda org_id, metric_ids, alias=None: tolerated_count_transaction(
org_id=org_id, metric_ids=metric_ids, alias=alias
),
is_private=True,
@@ -1298,7 +1312,7 @@ def run_post_query_function(
TransactionMRI.USER.value,
],
unit="users",
- snql=lambda *_, org_id, metric_ids, alias=None: miserable_users(
+ snql=lambda org_id, metric_ids, alias=None: miserable_users(
org_id=org_id, metric_ids=metric_ids, alias=alias
),
),
@@ -1306,7 +1320,7 @@ def run_post_query_function(
metric_mri=TransactionMRI.ALL_USER.value,
metrics=[TransactionMRI.USER.value],
unit="percentage",
- snql=lambda *_, org_id, metric_ids, alias=None: uniq_aggregation_on_metric(
+ snql=lambda org_id, metric_ids, alias=None: uniq_aggregation_on_metric(
metric_ids, alias=alias
),
is_private=True,
|
46e6377e49c1aace7ad034ae14f86707048f13bf
|
2024-03-21 23:40:17
|
Michelle Zhang
|
feat(feedback): add spam detection to project settings (#66740)
| false
|
add spam detection to project settings (#66740)
|
feat
|
diff --git a/static/app/data/forms/userFeedbackProcessing.tsx b/static/app/data/forms/userFeedbackProcessing.tsx
new file mode 100644
index 00000000000000..0ef5d11f9ee8ba
--- /dev/null
+++ b/static/app/data/forms/userFeedbackProcessing.tsx
@@ -0,0 +1,22 @@
+import type {JsonFormObject} from 'sentry/components/forms/types';
+
+export const route = '/settings/:orgId/projects/:projectId/user-feedback-processing/';
+
+const formGroups: JsonFormObject[] = [
+ {
+ title: 'Settings',
+ fields: [
+ {
+ name: 'sentry:feedback_ai_spam_detection',
+ type: 'boolean',
+
+ // additional data/props that is related to rendering of form field rather than data
+ label: 'Enable Spam Detection',
+ help: 'Toggles whether or not to enable auto spam detection in User Feedback.',
+ getData: data => ({options: data}),
+ },
+ ],
+ },
+];
+
+export default formGroups;
diff --git a/static/app/routes.tsx b/static/app/routes.tsx
index de85d602c16576..dd749bab061d7e 100644
--- a/static/app/routes.tsx
+++ b/static/app/routes.tsx
@@ -564,6 +564,13 @@ function buildRoutes() {
name={t('Replays')}
component={make(() => import('sentry/views/settings/project/projectReplays'))}
/>
+ <Route
+ path="user-feedback-processing/"
+ name={t('User Feedback')}
+ component={make(
+ () => import('sentry/views/settings/project/projectUserFeedbackProcessing')
+ )}
+ />
<Route path="source-maps/" name={t('Source Maps')}>
<IndexRoute
diff --git a/static/app/views/settings/project/navigationConfiguration.tsx b/static/app/views/settings/project/navigationConfiguration.tsx
index ea3658211ac508..2271666d2dd955 100644
--- a/static/app/views/settings/project/navigationConfiguration.tsx
+++ b/static/app/views/settings/project/navigationConfiguration.tsx
@@ -124,6 +124,11 @@ export default function getConfiguration({
title: t('Replays'),
show: () => !!organization?.features?.includes('session-replay-ui'),
},
+ {
+ path: `${pathPrefix}/user-feedback-processing/`,
+ title: t('User Feedback'),
+ show: () => !!organization?.features?.includes('user-feedback-ui'),
+ },
],
},
{
diff --git a/static/app/views/settings/project/projectUserFeedbackProcessing.spec.tsx b/static/app/views/settings/project/projectUserFeedbackProcessing.spec.tsx
new file mode 100644
index 00000000000000..dc84b5fc24c254
--- /dev/null
+++ b/static/app/views/settings/project/projectUserFeedbackProcessing.spec.tsx
@@ -0,0 +1,55 @@
+import {ProjectFixture} from 'sentry-fixture/project';
+
+import {initializeOrg} from 'sentry-test/initializeOrg';
+import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
+
+import ProjectUserFeedbackProcessing from 'sentry/views/settings/project/projectUserFeedbackProcessing';
+
+describe('ProjectUserFeedbackProcessing', function () {
+ const {routerProps, organization, project, routerContext} = initializeOrg();
+ const url = `/projects/${organization.slug}/${project.slug}/`;
+
+ beforeEach(function () {
+ MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
+ url,
+ method: 'GET',
+ body: ProjectFixture(),
+ });
+ MockApiClient.addMockResponse({
+ url: `${url}keys/`,
+ method: 'GET',
+ body: [],
+ });
+ });
+
+ it('can toggle spam detection', async function () {
+ render(
+ <ProjectUserFeedbackProcessing
+ {...routerProps}
+ organization={organization}
+ project={project}
+ />,
+ {
+ context: routerContext,
+ }
+ );
+
+ const mock = MockApiClient.addMockResponse({
+ url,
+ method: 'PUT',
+ });
+
+ await userEvent.click(screen.getByRole('checkbox', {name: 'Enable Spam Detection'}));
+
+ expect(mock).toHaveBeenCalledWith(
+ url,
+ expect.objectContaining({
+ method: 'PUT',
+ data: {
+ options: {'sentry:feedback_ai_spam_detection': true},
+ },
+ })
+ );
+ });
+});
diff --git a/static/app/views/settings/project/projectUserFeedbackProcessing.tsx b/static/app/views/settings/project/projectUserFeedbackProcessing.tsx
new file mode 100644
index 00000000000000..8f0c2d83b32ac4
--- /dev/null
+++ b/static/app/views/settings/project/projectUserFeedbackProcessing.tsx
@@ -0,0 +1,52 @@
+import type {RouteComponentProps} from 'react-router';
+
+import Access from 'sentry/components/acl/access';
+import {Button} from 'sentry/components/button';
+import Form from 'sentry/components/forms/form';
+import JsonForm from 'sentry/components/forms/jsonForm';
+import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
+import formGroups from 'sentry/data/forms/userFeedbackProcessing';
+import {t} from 'sentry/locale';
+import type {Organization, Project} from 'sentry/types';
+import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';
+import PermissionAlert from 'sentry/views/settings/project/permissionAlert';
+
+type RouteParams = {
+ projectId: string;
+};
+type Props = RouteComponentProps<RouteParams, {}> & {
+ organization: Organization;
+ project: Project;
+};
+
+function ProjectUserFeedbackProcessingSettings({
+ project,
+ organization,
+ params: {projectId},
+}: Props) {
+ return (
+ <SentryDocumentTitle title={t('User Feedback')} projectSlug={project.slug}>
+ <SettingsPageHeader
+ title={t('User Feedback')}
+ action={
+ <Button external href="https://docs.sentry.io/product/user-feedback/">
+ {t('Read the docs')}
+ </Button>
+ }
+ />
+ <PermissionAlert project={project} />
+ <Form
+ saveOnBlur
+ apiMethod="PUT"
+ apiEndpoint={`/projects/${organization.slug}/${projectId}/`}
+ initialData={project.options}
+ >
+ <Access access={['project:write']} project={project}>
+ {({hasAccess}) => <JsonForm disabled={!hasAccess} forms={formGroups} />}
+ </Access>
+ </Form>
+ </SentryDocumentTitle>
+ );
+}
+
+export default ProjectUserFeedbackProcessingSettings;
|
6b3d0fb43e95ee5ca2ee51d9e1962387dc554942
|
2019-11-22 23:47:47
|
Evan Purkhiser
|
chore(plugins): Move jira/sessionstack plugin UI to app (#15766)
| false
|
Move jira/sessionstack plugin UI to app (#15766)
|
chore
|
diff --git a/src/sentry/static/sentry/app/plugins/index.jsx b/src/sentry/static/sentry/app/plugins/index.jsx
index aff0a950122a43..bab2f4273baa08 100644
--- a/src/sentry/static/sentry/app/plugins/index.jsx
+++ b/src/sentry/static/sentry/app/plugins/index.jsx
@@ -3,9 +3,22 @@ import BasePlugin from 'app/plugins/basePlugin';
import BaseContext from 'app/plugins/baseContext';
import DefaultIssuePlugin from 'app/plugins/defaultIssuePlugin';
+import SessionStackPlugin from './sessionstack';
+import SessionStackContextType from './sessionstack/contexts/sessionstack';
+import Jira from './jira';
+
const contexts = {};
const registry = new Registry();
+// Register legacy plguins
+
+// Sessionstack
+registry.add('sessionstack', SessionStackPlugin);
+contexts.sessionstack = SessionStackContextType;
+
+// Jira
+registry.add('jira', Jira);
+
export {BasePlugin, registry, DefaultIssuePlugin};
export default {
diff --git a/src/sentry/static/sentry/app/plugins/jira/components/issueActions.jsx b/src/sentry/static/sentry/app/plugins/jira/components/issueActions.jsx
new file mode 100644
index 00000000000000..a7066810ba23c3
--- /dev/null
+++ b/src/sentry/static/sentry/app/plugins/jira/components/issueActions.jsx
@@ -0,0 +1,117 @@
+import React from 'react';
+
+import {Form, FormState} from 'app/components/forms';
+import DefaultIssuePlugin from 'app/plugins/defaultIssuePlugin';
+
+class IssueActions extends DefaultIssuePlugin.DefaultIssueActions {
+ changeField(action, name, value) {
+ const key = action + 'FormData';
+ const formData = {
+ ...this.state[key],
+ [name]: value,
+ };
+ const state = {
+ [key]: formData,
+ };
+ if (name === 'issuetype') {
+ state.state = FormState.LOADING;
+ this.setState(
+ state,
+ this.onLoad.bind(this, () => {
+ this.api.request(
+ this.getPluginCreateEndpoint() + '?issuetype=' + encodeURIComponent(value),
+ {
+ success: data => {
+ // Try not to change things the user might have edited
+ // unless they're no longer valid
+ const oldData = this.state.createFormData;
+ const createFormData = {};
+ data.forEach(field => {
+ let val;
+ if (
+ field.choices &&
+ !field.choices.find(c => c[0] === oldData[field.name])
+ ) {
+ val = field.default;
+ } else {
+ val = oldData[field.name] || field.default;
+ }
+ createFormData[field.name] = val;
+ });
+ this.setState(
+ {
+ createFieldList: data,
+ error: null,
+ loading: false,
+ createFormData,
+ },
+ this.onLoadSuccess
+ );
+ },
+ error: this.errorHandler,
+ }
+ );
+ })
+ );
+ return;
+ }
+ this.setState(state);
+ }
+
+ renderForm() {
+ let form;
+
+ // For create form, split into required and optional fields
+ if (this.props.actionType === 'create') {
+ if (this.state.createFieldList) {
+ const renderField = field => {
+ if (field.has_autocomplete) {
+ field = Object.assign(
+ {
+ url:
+ '/api/0/issues/' +
+ this.getGroup().id +
+ '/plugins/' +
+ this.props.plugin.slug +
+ '/autocomplete',
+ },
+ field
+ );
+ }
+ return (
+ <div key={field.name}>
+ {this.renderField({
+ config: field,
+ formData: this.state.createFormData,
+ onChange: this.changeField.bind(this, 'create', field.name),
+ })}
+ </div>
+ );
+ };
+ const isRequired = f => {
+ return f.required !== null ? f.required : true;
+ };
+
+ const fields = this.state.createFieldList;
+ const requiredFields = fields.filter(f => isRequired(f)).map(f => renderField(f));
+ const optionalFields = fields
+ .filter(f => !isRequired(f))
+ .map(f => renderField(f));
+ form = (
+ <Form onSubmit={this.createIssue} submitLabel="Create Issue" footerClass="">
+ <h5>Required Fields</h5>
+ {requiredFields}
+ {optionalFields.length ? <h5>Optional Fields</h5> : null}
+ {optionalFields}
+ </Form>
+ );
+ }
+ } else {
+ form = super.renderForm();
+ }
+
+ return form;
+ }
+}
+
+export default IssueActions;
diff --git a/src/sentry_plugins/jira/static/jira/components/settings.jsx b/src/sentry/static/sentry/app/plugins/jira/components/settings.jsx
similarity index 59%
rename from src/sentry_plugins/jira/static/jira/components/settings.jsx
rename to src/sentry/static/sentry/app/plugins/jira/components/settings.jsx
index eb67f8eece7a29..25989a2517145e 100644
--- a/src/sentry_plugins/jira/static/jira/components/settings.jsx
+++ b/src/sentry/static/sentry/app/plugins/jira/components/settings.jsx
@@ -1,28 +1,29 @@
import React from 'react';
-import _ from 'lodash';
-import {Form, FormState, LoadingIndicator, plugins} from 'sentry';
+import isEqual from 'lodash/isEqual';
+import {Form, FormState} from 'app/components/forms';
+import BasePlugin from 'app/plugins/basePlugin';
+import LoadingIndicator from 'app/components/loadingIndicator';
-class Settings extends plugins.BasePlugin.DefaultSettings {
+class Settings extends BasePlugin.DefaultSettings {
constructor(props) {
super(props);
this.PAGE_FIELD_LIST = {
'0': ['instance_url', 'username', 'password'],
'1': ['default_project'],
- '2': ['ignored_fields','default_priority', 'default_issue_type', 'auto_create']
- }
+ '2': ['ignored_fields', 'default_priority', 'default_issue_type', 'auto_create'],
+ };
this.back = this.back.bind(this);
this.startEditing = this.startEditing.bind(this);
this.isLastPage = this.isLastPage.bind(this);
Object.assign(this.state, {
- page: 0
+ page: 0,
});
}
- isConfigured(state) {
- state = state || this.state;
+ isConfigured() {
return !!(this.state.formData && this.state.formData.default_project);
}
@@ -35,23 +36,26 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
// except for setting edit state
this.api.request(this.getPluginEndpoint(), {
success: data => {
- let formData = {};
- let initialData = {};
- data.config.forEach((field) => {
+ const formData = {};
+ const initialData = {};
+ data.config.forEach(field => {
formData[field.name] = field.value || field.defaultValue;
initialData[field.name] = field.value;
});
- this.setState({
- fieldList: data.config,
- formData: formData,
- initialData: initialData,
- // start off in edit mode if there isn't a project set
- editing: !(formData && formData.default_project),
- // call this here to prevent FormState.READY from being
- // set before fieldList is
- }, this.onLoadSuccess);
+ this.setState(
+ {
+ fieldList: data.config,
+ formData,
+ initialData,
+ // start off in edit mode if there isn't a project set
+ editing: !(formData && formData.default_project),
+ // call this here to prevent FormState.READY from being
+ // set before fieldList is
+ },
+ this.onLoadSuccess
+ );
},
- error: this.onLoadError
+ error: this.onLoadError,
});
}
@@ -60,36 +64,36 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
}
onSubmit() {
- if (_.isEqual(this.state.initialData, this.state.formData)) {
+ if (isEqual(this.state.initialData, this.state.formData)) {
if (this.isLastPage()) {
- this.setState({editing: false, page: 0})
+ this.setState({editing: false, page: 0});
} else {
this.setState({page: this.state.page + 1});
}
this.onSaveSuccess(this.onSaveComplete);
return;
}
- let formData = Object.assign({}, this.state.formData);
+ const body = Object.assign({}, this.state.data);
// if the project has changed, it's likely these values aren't valid anymore
- if (formData.default_project !== this.state.initialData.default_project) {
- formData.default_issue_type = null;
- formData.default_priority = null;
+ if (body.default_project !== this.state.initialData.default_project) {
+ body.default_issue_type = null;
+ body.default_priority = null;
}
this.api.request(this.getPluginEndpoint(), {
- data: formData,
+ data: body,
method: 'PUT',
success: this.onSaveSuccess.bind(this, data => {
- let formData = {};
- let initialData = {};
- data.config.forEach((field) => {
+ const formData = {};
+ const initialData = {};
+ data.config.forEach(field => {
formData[field.name] = field.value || field.defaultValue;
initialData[field.name] = field.value;
});
- let state = {
- formData: formData,
- initialData: initialData,
+ const state = {
+ formData,
+ initialData,
errors: {},
- fieldList: data.config
+ fieldList: data.config,
};
if (this.isLastPage()) {
state.editing = false;
@@ -104,7 +108,7 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
errors: (error.responseJSON || {}).errors || {},
});
}),
- complete: this.onSaveComplete
+ complete: this.onSaveComplete,
});
}
@@ -114,7 +118,7 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
return;
}
this.setState({
- page: this.state.page - 1
+ page: this.state.page - 1,
});
}
@@ -126,12 +130,13 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
if (this.state.state === FormState.ERROR && !this.state.fieldList) {
return (
<div className="alert alert-error m-b-1">
- An unknown error occurred. Need help with this? <a href="https://sentry.io/support/">Contact support</a>
+ An unknown error occurred. Need help with this?{' '}
+ <a href="https://sentry.io/support/">Contact support</a>
</div>
);
}
- let isSaving = this.state.state === FormState.SAVING;
+ const isSaving = this.state.state === FormState.SAVING;
let fields;
let onSubmit;
@@ -150,26 +155,35 @@ class Settings extends plugins.BasePlugin.DefaultSettings {
submitLabel = 'Edit';
}
return (
- <Form onSubmit={onSubmit}
- submitDisabled={isSaving}
- submitLabel={submitLabel}
- extraButton={this.state.page === 0 ? null :
- <a href="#"
- className={'btn btn-default pull-left' + (isSaving ? ' disabled' : '')}
- onClick={this.back}>Back</a>}>
- {this.state.errors.__all__ &&
+ <Form
+ onSubmit={onSubmit}
+ submitDisabled={isSaving}
+ submitLabel={submitLabel}
+ extraButton={
+ this.state.page === 0 ? null : (
+ <a
+ href="#"
+ className={'btn btn-default pull-left' + (isSaving ? ' disabled' : '')}
+ onClick={this.back}
+ >
+ Back
+ </a>
+ )
+ }
+ >
+ {this.state.errors.__all__ && (
<div className="alert alert-block alert-error">
<ul>
<li>{this.state.errors.__all__}</li>
</ul>
</div>
- }
+ )}
{fields.map(f => {
return this.renderField({
config: f,
formData: this.state.formData,
formErrors: this.state.errors,
- onChange: this.changeField.bind(this, f.name)
+ onChange: this.changeField.bind(this, f.name),
});
})}
</Form>
diff --git a/src/sentry/static/sentry/app/plugins/jira/index.jsx b/src/sentry/static/sentry/app/plugins/jira/index.jsx
new file mode 100644
index 00000000000000..048e52bce61afd
--- /dev/null
+++ b/src/sentry/static/sentry/app/plugins/jira/index.jsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import DefaultIssuePlugin from 'app/plugins/defaultIssuePlugin';
+
+import Settings from './components/settings';
+import IssueActions from './components/issueActions';
+
+class Jira extends DefaultIssuePlugin {
+ renderSettings(props) {
+ return <Settings plugin={this} {...props} />;
+ }
+
+ renderGroupActions(props) {
+ return <IssueActions plugin={this} {...props} />;
+ }
+}
+
+Jira.displayName = 'Jira';
+
+export default Jira;
diff --git a/src/sentry/static/sentry/app/plugins/sessionstack/components/settings.jsx b/src/sentry/static/sentry/app/plugins/sessionstack/components/settings.jsx
new file mode 100644
index 00000000000000..a8d319a42148c0
--- /dev/null
+++ b/src/sentry/static/sentry/app/plugins/sessionstack/components/settings.jsx
@@ -0,0 +1,93 @@
+import React from 'react';
+import isEqual from 'lodash/isEqual';
+
+import {Form, FormState} from 'app/components/forms';
+import LoadingIndicator from 'app/components/loadingIndicator';
+import BasePlugin from 'app/plugins/basePlugin';
+
+class Settings extends BasePlugin.DefaultSettings {
+ constructor(props) {
+ super(props);
+
+ this.REQUIRED_FIELDS = ['account_email', 'api_token', 'website_id'];
+ this.ON_PREMISES_FIELDS = ['api_url', 'player_url'];
+
+ this.toggleOnPremisesConfiguration = this.toggleOnPremisesConfiguration.bind(this);
+ }
+
+ renderFields(fields) {
+ return fields.map(f => {
+ return this.renderField({
+ config: f,
+ formData: this.state.formData,
+ formErrors: this.state.errors,
+ onChange: this.changeField.bind(this, f.name),
+ });
+ });
+ }
+
+ filterFields(fields, fieldNames) {
+ return fields.filter(field => {
+ return fieldNames.includes(field.name);
+ });
+ }
+
+ toggleOnPremisesConfiguration() {
+ this.setState({
+ showOnPremisesConfiguration: !this.state.showOnPremisesConfiguration,
+ });
+ }
+
+ render() {
+ if (this.state.state === FormState.LOADING) {
+ return <LoadingIndicator />;
+ }
+
+ if (this.state.state === FormState.ERROR && !this.state.fieldList) {
+ return (
+ <div className="alert alert-error m-b-1">
+ An unknown error occurred. Need help with this?{' '}
+ <a href="https://sentry.io/support/">Contact support</a>
+ </div>
+ );
+ }
+
+ const isSaving = this.state.state === FormState.SAVING;
+ const hasChanges = !isEqual(this.state.initialData, this.state.formData);
+
+ const requiredFields = this.filterFields(this.state.fieldList, this.REQUIRED_FIELDS);
+ const onPremisesFields = this.filterFields(
+ this.state.fieldList,
+ this.ON_PREMISES_FIELDS
+ );
+
+ return (
+ <Form onSubmit={this.onSubmit} submitDisabled={isSaving || !hasChanges}>
+ {this.state.errors.__all__ && (
+ <div className="alert alert-block alert-error">
+ <ul>
+ <li>{this.state.errors.__all__}</li>
+ </ul>
+ </div>
+ )}
+ {this.renderFields(requiredFields)}
+ {onPremisesFields.length > 0 ? (
+ <div className="control-group">
+ <button
+ className="btn btn-default"
+ type="button"
+ onClick={this.toggleOnPremisesConfiguration}
+ >
+ Configure on-premises
+ </button>
+ </div>
+ ) : null}
+ {this.state.showOnPremisesConfiguration
+ ? this.renderFields(onPremisesFields)
+ : null}
+ </Form>
+ );
+ }
+}
+
+export default Settings;
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/contexts/sessionstack.jsx b/src/sentry/static/sentry/app/plugins/sessionstack/contexts/sessionstack.jsx
similarity index 61%
rename from src/sentry_plugins/sessionstack/static/sessionstack/contexts/sessionstack.jsx
rename to src/sentry/static/sentry/app/plugins/sessionstack/contexts/sessionstack.jsx
index c6b2f1b94378f3..2232786d7d6c2e 100644
--- a/src/sentry_plugins/sessionstack/static/sessionstack/contexts/sessionstack.jsx
+++ b/src/sentry/static/sentry/app/plugins/sessionstack/contexts/sessionstack.jsx
@@ -1,55 +1,51 @@
-import React from "react";
-import ReactDOM from "react-dom";
-import PropTypes from "prop-types";
+import $ from 'jquery';
+import React from 'react';
+import ReactDOM from 'react-dom';
+import PropTypes from 'prop-types';
const ASPECT_RATIO = 16 / 9;
class SessionStackContextType extends React.Component {
- static propTypes() {
- return {
- alias: PropTypes.string.isRequired,
- data: PropTypes.object.isRequired
- };
- }
+ propTypes = {
+ data: PropTypes.object.isRequired,
+ };
- constructor(props) {
- super(props);
- this.state = {
- showIframe: false
- };
- }
+ state = {
+ showIframe: false,
+ };
componentDidMount() {
+ // eslint-disable-next-line react/no-find-dom-node
this.parentNode = ReactDOM.findDOMNode(this).parentNode;
- window.addEventListener("resize", () => this.setIframeSize(), false);
+ window.addEventListener('resize', () => this.setIframeSize(), false);
this.setIframeSize();
}
componentWillUnmount() {
- window.removeEventListener("resize", () => this.setIframeSize(), false);
+ window.removeEventListener('resize', () => this.setIframeSize(), false);
}
setIframeSize() {
if (!this.showIframe) {
- let parentWidth = $(this.parentNode).width();
+ const parentWidth = $(this.parentNode).width();
this.setState({
width: parentWidth,
- height: parentWidth / ASPECT_RATIO
+ height: parentWidth / ASPECT_RATIO,
});
}
}
playSession() {
this.setState({
- showIframe: true
+ showIframe: true,
});
this.setIframeSize();
}
render() {
- let { session_url } = this.props.data;
+ const {session_url} = this.props.data;
if (!session_url) {
return <h4>Session not found.</h4>;
@@ -78,8 +74,6 @@ class SessionStackContextType extends React.Component {
}
}
-SessionStackContextType.getTitle = function(value) {
- return "SessionStack";
-};
+SessionStackContextType.getTitle = () => 'SessionStack';
export default SessionStackContextType;
diff --git a/src/sentry/static/sentry/app/plugins/sessionstack/index.jsx b/src/sentry/static/sentry/app/plugins/sessionstack/index.jsx
new file mode 100644
index 00000000000000..2a5ca11fc0223b
--- /dev/null
+++ b/src/sentry/static/sentry/app/plugins/sessionstack/index.jsx
@@ -0,0 +1,15 @@
+import React from 'react';
+
+import BasePlugin from 'app/plugins/basePlugin';
+
+import Settings from './components/settings';
+
+class SessionStackPlugin extends BasePlugin {
+ renderSettings(props) {
+ return <Settings plugin={this} {...props} />;
+ }
+}
+
+SessionStackPlugin.displayName = 'SessionStack';
+
+export default SessionStackPlugin;
diff --git a/src/sentry_plugins/jira/plugin.py b/src/sentry_plugins/jira/plugin.py
index 6da0a595d8319f..50a59286d6050b 100644
--- a/src/sentry_plugins/jira/plugin.py
+++ b/src/sentry_plugins/jira/plugin.py
@@ -40,9 +40,6 @@ class JiraPlugin(CorePluginMixin, IssuePlugin2):
conf_title = title
conf_key = slug
- asset_key = "jira"
- assets = ["dist/jira.js"]
-
def get_group_urls(self):
_patterns = super(JiraPlugin, self).get_group_urls()
_patterns.append(
diff --git a/src/sentry_plugins/jira/static/jira/components/issueActions.jsx b/src/sentry_plugins/jira/static/jira/components/issueActions.jsx
deleted file mode 100644
index b7924518fb7b68..00000000000000
--- a/src/sentry_plugins/jira/static/jira/components/issueActions.jsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import React from 'react';
-import {Form, FormState, plugins} from 'sentry';
-
-
-class IssueActions extends plugins.DefaultIssuePlugin.DefaultIssueActions {
- changeField(action, name, value) {
- let key = action + 'FormData';
- let formData = {
- ...this.state[key],
- [name]: value
- };
- let state = {
- [key]: formData
- };
- if (name === 'issuetype') {
- state.state = FormState.LOADING;
- this.setState(state, this.onLoad.bind(this, () => {
- this.api.request((this.getPluginCreateEndpoint() +
- '?issuetype=' + encodeURIComponent(value)), {
- success: (data) => {
- // Try not to change things the user might have edited
- // unless they're no longer valid
- let oldData = this.state.createFormData;
- let createFormData = {};
- data.forEach((field) => {
- let val;
- if (field.choices && !field.choices.find(c => c[0] === oldData[field.name])) {
- val = field.default;
- } else {
- val = oldData[field.name] || field.default;
- }
- createFormData[field.name] = val;
- });
- this.setState({
- createFieldList: data,
- error: null,
- loading: false,
- createFormData: createFormData
- }, this.onLoadSuccess);
- },
- error: this.errorHandler
- });
- }))
- return;
- }
- this.setState(state);
- }
-
- renderForm() {
- let form;
-
- // For create form, split into required and optional fields
- if (this.props.actionType === 'create') {
- if (this.state.createFieldList) {
- let renderField = (field) => {
- if (field.has_autocomplete) {
- field = Object.assign({
- url: ('/api/0/issues/' + this.getGroup().id +
- '/plugins/' + this.props.plugin.slug + '/autocomplete')
- }, field);
- }
- return (
- <div key={field.name}>
- {this.renderField({
- config: field,
- formData: this.state.createFormData,
- onChange: this.changeField.bind(this, 'create', field.name)
- })}
- </div>
- );
- };
- let isRequired = (f) => {
- return f.required != null ? f.required : true;
- };
-
- let fields = this.state.createFieldList;
- let requiredFields = fields.filter(f => isRequired(f)).map(f => renderField(f));
- let optionalFields = fields.filter(f => !isRequired(f)).map(f => renderField(f));
- form = (
- <Form onSubmit={this.createIssue} submitLabel='Create Issue' footerClass="">
- <h5>Required Fields</h5>
- {requiredFields}
- {optionalFields.length ? <h5>Optional Fields</h5> : null}
- {optionalFields}
- </Form>
- );
- }
- } else {
- form = super.renderForm();
- }
-
- return form;
- }
-}
-
-export default IssueActions;
diff --git a/src/sentry_plugins/jira/static/jira/dist/jira.js b/src/sentry_plugins/jira/static/jira/dist/jira.js
deleted file mode 100644
index c873c4a4a7641e..00000000000000
--- a/src/sentry_plugins/jira/static/jira/dist/jira.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=27)}([function(t,e){t.exports=React},function(t,e){t.exports=SentryApp},function(t,e,n){var r=n(10);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(5);t.exports=function(t,e){return r(t,e)}},function(t,e,n){var r=n(6),o=n(26);t.exports=function t(e,n,i,a,u){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,u))}},function(t,e,n){var r=n(7),o=n(14),i=n(19),a=n(20),u=n(23),c=n(3),s=n(24),f=n(25),l=1,p="[object Arguments]",y="[object Array]",b="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,h,g,m){var d=c(t),O=c(e),S=d?y:u(t),j=O?y:u(e),_=(S=S==p?b:S)==b,P=(j=j==p?b:j)==b,w=S==j;if(w&&s(t)){if(!s(e))return!1;d=!0,_=!1}if(w&&!_)return m||(m=new r),d||f(t)?o(t,e,n,h,g,m):i(t,e,S,n,h,g,m);if(!(n&l)){var E=_&&v.call(t,"__wrapped__"),D=P&&v.call(e,"__wrapped__");if(E||D){var L=E?t.value():t,k=D?e.value():e;return m||(m=new r),g(L,k,n,h,m)}}return!!w&&(m||(m=new r),a(t,e,n,h,g,m))}},function(t,e,n){var r=n(8),o=n(9),i=n(11),a=n(12),u=n(13);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(2),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(2);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(2);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(15),o=n(16),i=n(17),a=1,u=2;t.exports=function(t,e,n,c,s,f){var l=n&a,p=t.length,y=e.length;if(p!=y&&!(l&&y>p))return!1;var b=f.get(t);if(b&&f.get(e))return b==e;var v=-1,h=!0,g=n&u?new r:void 0;for(f.set(t,e),f.set(e,t);++v<p;){var m=t[v],d=e[v];if(c)var O=l?c(d,m,v,e,t,f):c(m,d,v,t,e,f);if(void 0!==O){if(O)continue;h=!1;break}if(g){if(!o(e,function(t,e){if(!i(g,e)&&(m===t||s(m,t,n,c,f)))return g.push(e)})){h=!1;break}}else if(m!==d&&!s(m,d,n,c,f)){h=!1;break}}return f.delete(t),f.delete(e),h}},function(t,e,n){var r=n(3);t.exports=function(){if(!arguments.length)return[];var t=arguments[0];return r(t)?t:[t]}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(18);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(21),o=1,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,u,c){var s=n&o,f=r(t),l=f.length;if(l!=r(e).length&&!s)return!1;for(var p=l;p--;){var y=f[p];if(!(s?y in e:i.call(e,y)))return!1}var b=c.get(t);if(b&&c.get(e))return b==e;var v=!0;c.set(t,e),c.set(e,t);for(var h=s;++p<l;){var g=t[y=f[p]],m=e[y];if(a)var d=s?a(m,g,y,e,t,c):a(g,m,y,t,e,c);if(!(void 0===d?g===m||u(g,m,n,a,c):d)){v=!1;break}h||(h="constructor"==y)}if(v&&!h){var O=t.constructor,S=e.constructor;O!=S&&"constructor"in t&&"constructor"in e&&!("function"==typeof O&&O instanceof O&&"function"==typeof S&&S instanceof S)&&(v=!1)}return c.delete(t),c.delete(e),v}},function(t,e,n){var r=n(22)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),i=n(1),a=n(4),u=n.n(a);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var y=function(t){function e(t){var n,r,o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,(n=!(o=f(e).call(this,t))||"object"!==c(o)&&"function"!=typeof o?p(r):o).PAGE_FIELD_LIST={0:["instance_url","username","password"],1:["default_project"],2:["ignored_fields","default_priority","default_issue_type","auto_create"]},n.back=n.back.bind(p(p(n))),n.startEditing=n.startEditing.bind(p(p(n))),n.isLastPage=n.isLastPage.bind(p(p(n))),Object.assign(n.state,{page:0}),n}var n,r,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,i["plugins"].BasePlugin.DefaultSettings),n=e,(r=[{key:"isConfigured",value:function(t){return t=t||this.state,!(!this.state.formData||!this.state.formData.default_project)}},{key:"isLastPage",value:function(){return 2===this.state.page}},{key:"fetchData",value:function(){var t=this;this.api.request(this.getPluginEndpoint(),{success:function(e){var n={},r={};e.config.forEach(function(t){n[t.name]=t.value||t.defaultValue,r[t.name]=t.value}),t.setState({fieldList:e.config,formData:n,initialData:r,editing:!(n&&n.default_project)},t.onLoadSuccess)},error:this.onLoadError})}},{key:"startEditing",value:function(){this.setState({editing:!0})}},{key:"onSubmit",value:function(){var t=this;if(u()(this.state.initialData,this.state.formData))return this.isLastPage()?this.setState({editing:!1,page:0}):this.setState({page:this.state.page+1}),void this.onSaveSuccess(this.onSaveComplete);var e=Object.assign({},this.state.formData);e.default_project!==this.state.initialData.default_project&&(e.default_issue_type=null,e.default_priority=null),this.api.request(this.getPluginEndpoint(),{data:e,method:"PUT",success:this.onSaveSuccess.bind(this,function(e){var n={},r={};e.config.forEach(function(t){n[t.name]=t.value||t.defaultValue,r[t.name]=t.value});var o={formData:n,initialData:r,errors:{},fieldList:e.config};t.isLastPage()?(o.editing=!1,o.page=0):o.page=t.state.page+1,t.setState(o)}),error:this.onSaveError.bind(this,function(e){t.setState({errors:(e.responseJSON||{}).errors||{}})}),complete:this.onSaveComplete})}},{key:"back",value:function(t){t.preventDefault(),this.state.state!==i.FormState.SAVING&&this.setState({page:this.state.page-1})}},{key:"render",value:function(){var t=this;if(this.state.state===i.FormState.LOADING)return o.a.createElement(i.LoadingIndicator,null);if(this.state.state===i.FormState.ERROR&&!this.state.fieldList)return o.a.createElement("div",{className:"alert alert-error m-b-1"},"An unknown error occurred. Need help with this? ",o.a.createElement("a",{href:"https://sentry.io/support/"},"Contact support"));var e,n,r,a=this.state.state===i.FormState.SAVING;return this.state.editing?(e=this.state.fieldList.filter(function(e){return t.PAGE_FIELD_LIST[t.state.page].includes(e.name)}),n=this.onSubmit,r=this.isLastPage()?"Finish":"Save and Continue"):(e=this.state.fieldList.map(function(t){return Object.assign({},t,{readonly:!0})}),n=this.startEditing,r="Edit"),o.a.createElement(i.Form,{onSubmit:n,submitDisabled:a,submitLabel:r,extraButton:0===this.state.page?null:o.a.createElement("a",{href:"#",className:"btn btn-default pull-left"+(a?" disabled":""),onClick:this.back},"Back")},this.state.errors.__all__&&o.a.createElement("div",{className:"alert alert-block alert-error"},o.a.createElement("ul",null,o.a.createElement("li",null,this.state.errors.__all__))),e.map(function(e){return t.renderField({config:e,formData:t.state.formData,formErrors:t.state.errors,onChange:t.changeField.bind(t,e.name)})}))}}])&&s(n.prototype,r),a&&s(n,a),e}();function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e){return!e||"object"!==b(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t,e,n){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e){return(O=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var S=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,d(e).apply(this,arguments))}var n,r,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&O(t,e)}(e,i["plugins"].DefaultIssuePlugin.DefaultIssueActions),n=e,(r=[{key:"changeField",value:function(t,e,n){var r=this,o=t+"FormData",a=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){v(t,e,n[e])})}return t}({},this.state[o],v({},e,n)),u=v({},o,a);if("issuetype"===e)return u.state=i.FormState.LOADING,void this.setState(u,this.onLoad.bind(this,function(){r.api.request(r.getPluginCreateEndpoint()+"?issuetype="+encodeURIComponent(n),{success:function(t){var e=r.state.createFormData,n={};t.forEach(function(t){var r;r=t.choices&&!t.choices.find(function(n){return n[0]===e[t.name]})?t.default:e[t.name]||t.default,n[t.name]=r}),r.setState({createFieldList:t,error:null,loading:!1,createFormData:n},r.onLoadSuccess)},error:r.errorHandler})}));this.setState(u)}},{key:"renderForm",value:function(){var t,n=this;if("create"===this.props.actionType){if(this.state.createFieldList){var r=function(t){return t.has_autocomplete&&(t=Object.assign({url:"/api/0/issues/"+n.getGroup().id+"/plugins/"+n.props.plugin.slug+"/autocomplete"},t)),o.a.createElement("div",{key:t.name},n.renderField({config:t,formData:n.state.createFormData,onChange:n.changeField.bind(n,"create",t.name)}))},a=function(t){return null==t.required||t.required},u=this.state.createFieldList,c=u.filter(function(t){return a(t)}).map(function(t){return r(t)}),s=u.filter(function(t){return!a(t)}).map(function(t){return r(t)});t=o.a.createElement(i.Form,{onSubmit:this.createIssue,submitLabel:"Create Issue",footerClass:""},o.a.createElement("h5",null,"Required Fields"),c,s.length?o.a.createElement("h5",null,"Optional Fields"):null,s)}}else t=m(d(e.prototype),"renderForm",this).call(this);return t}}])&&h(n.prototype,r),a&&h(n,a),e}();function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(){return(_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e){return!e||"object"!==j(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e){return(D=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var L=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),w(this,E(e).apply(this,arguments))}var n,r,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&D(t,e)}(e,i["plugins"].DefaultIssuePlugin),n=e,(r=[{key:"renderSettings",value:function(t){return o.a.createElement(y,_({plugin:this},t))}},{key:"renderGroupActions",value:function(t){return o.a.createElement(S,_({plugin:this},t))}}])&&P(n.prototype,r),a&&P(n,a),e}();L.displayName="Jira",i.plugins.add("jira",L);e.default=L}]);
-//# sourceMappingURL=jira.js.map
\ No newline at end of file
diff --git a/src/sentry_plugins/jira/static/jira/dist/jira.js.gz b/src/sentry_plugins/jira/static/jira/dist/jira.js.gz
deleted file mode 100644
index 82d142b47f9a0e..00000000000000
Binary files a/src/sentry_plugins/jira/static/jira/dist/jira.js.gz and /dev/null differ
diff --git a/src/sentry_plugins/jira/static/jira/dist/jira.js.map b/src/sentry_plugins/jira/static/jira/dist/jira.js.map
deleted file mode 100644
index a5e771f6bd376b..00000000000000
--- a/src/sentry_plugins/jira/static/jira/dist/jira.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"SentryApp\"","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_assocIndexOf.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isArray.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isEqual.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIsEqual.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIsEqualDeep.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_Stack.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheClear.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheDelete.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/eq.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheGet.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheHas.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheSet.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalArrays.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_SetCache.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_arraySome.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_cacheHas.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIndexOf.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalByTag.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalObjects.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_getAllKeys.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_overArg.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_getTag.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isBuffer.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isTypedArray.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isObjectLike.js","webpack:///./components/settings.jsx","webpack:///./components/issueActions.jsx","webpack:///./jira.jsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","React","SentryApp","eq","array","length","isArray","Array","baseIsEqual","other","baseIsEqualDeep","isObjectLike","bitmask","customizer","stack","Stack","equalArrays","equalByTag","equalObjects","getTag","isBuffer","isTypedArray","COMPARE_PARTIAL_FLAG","argsTag","arrayTag","objectTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","entries","index","this","clear","entry","set","has","__data__","size","assocIndexOf","splice","data","pop","undefined","push","SetCache","arraySome","cacheHas","COMPARE_UNORDERED_FLAG","isPartial","arrLength","othLength","stacked","result","seen","arrValue","othValue","compared","othIndex","arguments","predicate","baseIndexOf","fromIndex","getAllKeys","objProps","objLength","skipCtor","objValue","objCtor","constructor","othCtor","nativeKeys","overArg","keys","func","transform","arg","nativeObjectToString","toString","Settings","props","_this","_classCallCheck","_getPrototypeOf","PAGE_FIELD_LIST","0","1","2","back","_assertThisInitialized","startEditing","isLastPage","assign","state","page","plugins","BasePlugin","DefaultSettings","formData","default_project","_this2","api","request","getPluginEndpoint","success","initialData","config","forEach","field","defaultValue","setState","fieldList","editing","onLoadSuccess","error","onLoadError","_this3","isEqual_default","onSaveSuccess","onSaveComplete","default_issue_type","default_priority","method","errors","onSaveError","responseJSON","complete","ev","preventDefault","FormState","SAVING","_this4","LOADING","external_React_default","a","createElement","external_SentryApp_","ERROR","className","href","fields","onSubmit","submitLabel","isSaving","filter","f","includes","map","readonly","submitDisabled","extraButton","onClick","__all__","renderField","formErrors","onChange","changeField","IssueActions","DefaultIssuePlugin","DefaultIssueActions","action","_objectSpread","_defineProperty","onLoad","getPluginCreateEndpoint","encodeURIComponent","oldData","createFormData","val","choices","find","default","createFieldList","loading","errorHandler","form","actionType","has_autocomplete","url","getGroup","id","plugin","slug","isRequired","required","requiredFields","optionalFields","createIssue","footerClass","_get","issueActions_getPrototypeOf","Jira","settings","_extends","issueActions","displayName","add"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,WAA2B,OAAArB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD/B,EAAAkC,EAAA,GAIAlC,IAAAmC,EAAA,oBClFAhC,EAAAD,QAAAkC,qBCAAjC,EAAAD,QAAAmC,2BCAA,IAAAC,EAAStC,EAAQ,IAoBjBG,EAAAD,QAVA,SAAAqC,EAAAZ,GAEA,IADA,IAAAa,EAAAD,EAAAC,OACAA,KACA,GAAAF,EAAAC,EAAAC,GAAA,GAAAb,GACA,OAAAa,EAGA,yBCMA,IAAAC,EAAAC,MAAAD,QAEAtC,EAAAD,QAAAuC,mBCzBA,IAAAE,EAAkB3C,EAAQ,GAkC1BG,EAAAD,QAJA,SAAAmB,EAAAuB,GACA,OAAAD,EAAAtB,EAAAuB,qBC/BA,IAAAC,EAAsB7C,EAAQ,GAC9B8C,EAAmB9C,EAAQ,IA0B3BG,EAAAD,QAVA,SAAAyC,EAAAtB,EAAAuB,EAAAG,EAAAC,EAAAC,GACA,OAAA5B,IAAAuB,IAGA,MAAAvB,GAAA,MAAAuB,IAAAE,EAAAzB,KAAAyB,EAAAF,GACAvB,MAAAuB,KAEAC,EAAAxB,EAAAuB,EAAAG,EAAAC,EAAAL,EAAAM,sBCxBA,IAAAC,EAAYlD,EAAQ,GACpBmD,EAAkBnD,EAAQ,IAC1BoD,EAAiBpD,EAAQ,IACzBqD,EAAmBrD,EAAQ,IAC3BsD,EAAatD,EAAQ,IACrByC,EAAczC,EAAQ,GACtBuD,EAAevD,EAAQ,IACvBwD,EAAmBxD,EAAQ,IAG3ByD,EAAA,EAGAC,EAAA,qBACAC,EAAA,iBACAC,EAAA,kBAMA3B,EAHAnB,OAAAkB,UAGAC,eA6DA9B,EAAAD,QA7CA,SAAA4B,EAAAc,EAAAG,EAAAC,EAAAa,EAAAZ,GACA,IAAAa,EAAArB,EAAAX,GACAiC,EAAAtB,EAAAG,GACAoB,EAAAF,EAAAH,EAAAL,EAAAxB,GACAmC,EAAAF,EAAAJ,EAAAL,EAAAV,GAKAsB,GAHAF,KAAAN,EAAAE,EAAAI,IAGAJ,EACAO,GAHAF,KAAAP,EAAAE,EAAAK,IAGAL,EACAQ,EAAAJ,GAAAC,EAEA,GAAAG,GAAAb,EAAAzB,GAAA,CACA,IAAAyB,EAAAX,GACA,SAEAkB,GAAA,EACAI,GAAA,EAEA,GAAAE,IAAAF,EAEA,OADAjB,MAAA,IAAAC,GACAY,GAAAN,EAAA1B,GACAqB,EAAArB,EAAAc,EAAAG,EAAAC,EAAAa,EAAAZ,GACAG,EAAAtB,EAAAc,EAAAoB,EAAAjB,EAAAC,EAAAa,EAAAZ,GAEA,KAAAF,EAAAU,GAAA,CACA,IAAAY,EAAAH,GAAAjC,EAAA1B,KAAAuB,EAAA,eACAwC,EAAAH,GAAAlC,EAAA1B,KAAAqC,EAAA,eAEA,GAAAyB,GAAAC,EAAA,CACA,IAAAC,EAAAF,EAAAvC,EAAAT,QAAAS,EACA0C,EAAAF,EAAA1B,EAAAvB,QAAAuB,EAGA,OADAK,MAAA,IAAAC,GACAW,EAAAU,EAAAC,EAAAzB,EAAAC,EAAAC,IAGA,QAAAmB,IAGAnB,MAAA,IAAAC,GACAG,EAAAvB,EAAAc,EAAAG,EAAAC,EAAAa,EAAAZ,sBC/EA,IAAAwB,EAAqBzE,EAAQ,GAC7B0E,EAAsB1E,EAAQ,GAC9B2E,EAAmB3E,EAAQ,IAC3B4E,EAAmB5E,EAAQ,IAC3B6E,EAAmB7E,EAAQ,IAS3B,SAAA8E,EAAAC,GACA,IAAAC,GAAA,EACAxC,EAAA,MAAAuC,EAAA,EAAAA,EAAAvC,OAGA,IADAyC,KAAAC,UACAF,EAAAxC,GAAA,CACA,IAAA2C,EAAAJ,EAAAC,GACAC,KAAAG,IAAAD,EAAA,GAAAA,EAAA,KAKAL,EAAA9C,UAAAkD,MAAAT,EACAK,EAAA9C,UAAA,OAAA0C,EACAI,EAAA9C,UAAAf,IAAA0D,EACAG,EAAA9C,UAAAqD,IAAAT,EACAE,EAAA9C,UAAAoD,IAAAP,EAEA1E,EAAAD,QAAA4E,iBCnBA3E,EAAAD,QALA,WACA+E,KAAAK,SAAA,GACAL,KAAAM,KAAA,oBCTA,IAAAC,EAAmBxF,EAAQ,GAM3ByF,EAHA/C,MAAAV,UAGAyD,OA4BAtF,EAAAD,QAjBA,SAAAyB,GACA,IAAA+D,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAA/D,GAEA,QAAAqD,EAAA,IAIAA,GADAU,EAAAlD,OAAA,EAEAkD,EAAAC,MAEAF,EAAAlF,KAAAmF,EAAAV,EAAA,KAEAC,KAAAM,KACA,oBCKApF,EAAAD,QAJA,SAAAmB,EAAAuB,GACA,OAAAvB,IAAAuB,GAAAvB,MAAAuB,uBCjCA,IAAA4C,EAAmBxF,EAAQ,GAkB3BG,EAAAD,QAPA,SAAAyB,GACA,IAAA+D,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAA/D,GAEA,OAAAqD,EAAA,OAAAY,EAAAF,EAAAV,GAAA,qBCfA,IAAAQ,EAAmBxF,EAAQ,GAe3BG,EAAAD,QAJA,SAAAyB,GACA,OAAA6D,EAAAP,KAAAK,SAAA3D,IAAA,oBCZA,IAAA6D,EAAmBxF,EAAQ,GAyB3BG,EAAAD,QAbA,SAAAyB,EAAAN,GACA,IAAAqE,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAA/D,GAQA,OANAqD,EAAA,KACAC,KAAAM,KACAG,EAAAG,KAAA,CAAAlE,EAAAN,KAEAqE,EAAAV,GAAA,GAAA3D,EAEA4D,uBCtBA,IAAAa,EAAe9F,EAAQ,IACvB+F,EAAgB/F,EAAQ,IACxBgG,EAAehG,EAAQ,IAGvByD,EAAA,EACAwC,EAAA,EA4EA9F,EAAAD,QA7DA,SAAAqC,EAAAK,EAAAG,EAAAC,EAAAa,EAAAZ,GACA,IAAAiD,EAAAnD,EAAAU,EACA0C,EAAA5D,EAAAC,OACA4D,EAAAxD,EAAAJ,OAEA,GAAA2D,GAAAC,KAAAF,GAAAE,EAAAD,GACA,SAGA,IAAAE,EAAApD,EAAAhC,IAAAsB,GACA,GAAA8D,GAAApD,EAAAhC,IAAA2B,GACA,OAAAyD,GAAAzD,EAEA,IAAAoC,GAAA,EACAsB,GAAA,EACAC,EAAAxD,EAAAkD,EAAA,IAAAH,OAAAF,EAMA,IAJA3C,EAAAmC,IAAA7C,EAAAK,GACAK,EAAAmC,IAAAxC,EAAAL,KAGAyC,EAAAmB,GAAA,CACA,IAAAK,EAAAjE,EAAAyC,GACAyB,EAAA7D,EAAAoC,GAEA,GAAAhC,EACA,IAAA0D,EAAAR,EACAlD,EAAAyD,EAAAD,EAAAxB,EAAApC,EAAAL,EAAAU,GACAD,EAAAwD,EAAAC,EAAAzB,EAAAzC,EAAAK,EAAAK,GAEA,QAAA2C,IAAAc,EAAA,CACA,GAAAA,EACA,SAEAJ,GAAA,EACA,MAGA,GAAAC,GACA,IAAAR,EAAAnD,EAAA,SAAA6D,EAAAE,GACA,IAAAX,EAAAO,EAAAI,KACAH,IAAAC,GAAA5C,EAAA2C,EAAAC,EAAA1D,EAAAC,EAAAC,IACA,OAAAsD,EAAAV,KAAAc,KAEW,CACXL,GAAA,EACA,YAEK,GACLE,IAAAC,IACA5C,EAAA2C,EAAAC,EAAA1D,EAAAC,EAAAC,GACA,CACAqD,GAAA,EACA,OAKA,OAFArD,EAAA,OAAAV,GACAU,EAAA,OAAAL,GACA0D,oBC/EA,IAAA7D,EAAczC,EAAQ,GA2CtBG,EAAAD,QARA,WACA,IAAA0G,UAAApE,OACA,SAEA,IAAAnB,EAAAuF,UAAA,GACA,OAAAnE,EAAApB,KAAA,CAAAA,mBClBAlB,EAAAD,QAZA,SAAAqC,EAAAsE,GAIA,IAHA,IAAA7B,GAAA,EACAxC,EAAA,MAAAD,EAAA,EAAAA,EAAAC,SAEAwC,EAAAxC,GACA,GAAAqE,EAAAtE,EAAAyC,KAAAzC,GACA,SAGA,2BCnBA,IAAAuE,EAAkB9G,EAAQ,IAgB1BG,EAAAD,QALA,SAAAqC,EAAAlB,GAEA,QADA,MAAAkB,MAAAC,SACAsE,EAAAvE,EAAAlB,EAAA,sBCSAlB,EAAAD,QAZA,SAAAqC,EAAAlB,EAAA0F,GAIA,IAHA,IAAA/B,EAAA+B,EAAA,EACAvE,EAAAD,EAAAC,SAEAwC,EAAAxC,GACA,GAAAD,EAAAyC,KAAA3D,EACA,OAAA2D,EAGA,yBCiBA7E,EAAAD,QAJA,SAAAmB,EAAAuB,GACA,OAAAvB,IAAAuB,GAAAvB,MAAAuB,uBCjCA,IAAAoE,EAAiBhH,EAAQ,IAGzByD,EAAA,EAMAxB,EAHAnB,OAAAkB,UAGAC,eA+EA9B,EAAAD,QAhEA,SAAA4B,EAAAc,EAAAG,EAAAC,EAAAa,EAAAZ,GACA,IAAAiD,EAAAnD,EAAAU,EACAwD,EAAAD,EAAAlF,GACAoF,EAAAD,EAAAzE,OAIA,GAAA0E,GAHAF,EAAApE,GACAJ,SAEA0D,EACA,SAGA,IADA,IAAAlB,EAAAkC,EACAlC,KAAA,CACA,IAAArD,EAAAsF,EAAAjC,GACA,KAAAkB,EAAAvE,KAAAiB,EAAAX,EAAA1B,KAAAqC,EAAAjB,IACA,SAIA,IAAA0E,EAAApD,EAAAhC,IAAAa,GACA,GAAAuE,GAAApD,EAAAhC,IAAA2B,GACA,OAAAyD,GAAAzD,EAEA,IAAA0D,GAAA,EACArD,EAAAmC,IAAAtD,EAAAc,GACAK,EAAAmC,IAAAxC,EAAAd,GAGA,IADA,IAAAqF,EAAAjB,IACAlB,EAAAkC,GAAA,CAEA,IAAAE,EAAAtF,EADAH,EAAAsF,EAAAjC,IAEAyB,EAAA7D,EAAAjB,GAEA,GAAAqB,EACA,IAAA0D,EAAAR,EACAlD,EAAAyD,EAAAW,EAAAzF,EAAAiB,EAAAd,EAAAmB,GACAD,EAAAoE,EAAAX,EAAA9E,EAAAG,EAAAc,EAAAK,GAGA,UAAA2C,IAAAc,EACAU,IAAAX,GAAA5C,EAAAuD,EAAAX,EAAA1D,EAAAC,EAAAC,GACAyD,GACA,CACAJ,GAAA,EACA,MAEAa,MAAA,eAAAxF,GAEA,GAAA2E,IAAAa,EAAA,CACA,IAAAE,EAAAvF,EAAAwF,YACAC,EAAA3E,EAAA0E,YAGAD,GAAAE,GACA,gBAAAzF,GAAA,gBAAAc,KACA,mBAAAyE,mBACA,mBAAAE,qBACAjB,GAAA,GAKA,OAFArD,EAAA,OAAAnB,GACAmB,EAAA,OAAAL,GACA0D,oBCrFA,IAGAkB,EAHcxH,EAAQ,GAGtByH,CAAA3G,OAAA4G,KAAA5G,QAEAX,EAAAD,QAAAsH,iBCSArH,EAAAD,QANA,SAAAyH,EAAAC,GACA,gBAAAC,GACA,OAAAF,EAAAC,EAAAC,qBCTA,IAOAC,EAPAhH,OAAAkB,UAOA+F,SAaA5H,EAAAD,QAJA,SAAAmB,GACA,OAAAyG,EAAAvH,KAAAc,mBCDAlB,EAAAD,QAJA,WACA,yBCGAC,EAAAD,QAJA,WACA,yBCcAC,EAAAD,QAJA,SAAAmB,GACA,aAAAA,GAAA,iBAAAA,0zBC0Je2G,cA7Kb,SAAAA,EAAYC,GAAO,IAAAC,MAAA,mGAAAC,CAAAlD,KAAA+C,KACjB/C,MAAAiD,MAAAE,EAAAJ,GAAAzH,KAAA0E,KAAMgD,mDACDI,gBAAkB,CACrBC,EAAK,CAAC,eAAgB,WAAY,YAClCC,EAAK,CAAC,mBACNC,EAAK,CAAC,iBAAiB,mBAAoB,qBAAsB,gBAGnEN,EAAKO,KAAOP,EAAKO,KAAK7G,KAAV8G,IAAAR,KACZA,EAAKS,aAAeT,EAAKS,aAAa/G,KAAlB8G,IAAAR,KACpBA,EAAKU,WAAaV,EAAKU,WAAWhH,KAAhB8G,IAAAR,KAElBpH,OAAO+H,OAAOX,EAAKY,MAAO,CACxBC,KAAM,IAbSb,wPADEc,aAAQC,WAAWC,4DAkB3BJ,GAEX,OADAA,EAAQA,GAAS7D,KAAK6D,SACZ7D,KAAK6D,MAAMK,WAAYlE,KAAK6D,MAAMK,SAASC,sDAIrD,OAA2B,IAApBnE,KAAK6D,MAAMC,yCAGR,IAAAM,EAAApE,KAGVA,KAAKqE,IAAIC,QAAQtE,KAAKuE,oBAAqB,CACzCC,QAAS,SAAA/D,GACP,IAAIyD,EAAW,GACXO,EAAc,GAClBhE,EAAKiE,OAAOC,QAAQ,SAACC,GACnBV,EAASU,EAAMlJ,MAAQkJ,EAAMxI,OAASwI,EAAMC,aAC5CJ,EAAYG,EAAMlJ,MAAQkJ,EAAMxI,QAElCgI,EAAKU,SAAS,CACZC,UAAWtE,EAAKiE,OAChBR,SAAUA,EACVO,YAAaA,EAEbO,UAAWd,GAAYA,EAASC,kBAG/BC,EAAKa,gBAEVC,MAAOlF,KAAKmF,qDAKdnF,KAAK8E,SAAS,CAACE,SAAS,uCAGf,IAAAI,EAAApF,KACT,GAAIqF,IAAUrF,KAAK6D,MAAMY,YAAazE,KAAK6D,MAAMK,UAO/C,OANIlE,KAAK2D,aACP3D,KAAK8E,SAAS,CAACE,SAAS,EAAOlB,KAAM,IAErC9D,KAAK8E,SAAS,CAAChB,KAAM9D,KAAK6D,MAAMC,KAAO,SAEzC9D,KAAKsF,cAActF,KAAKuF,gBAG1B,IAAIrB,EAAWrI,OAAO+H,OAAO,GAAI5D,KAAK6D,MAAMK,UAExCA,EAASC,kBAAoBnE,KAAK6D,MAAMY,YAAYN,kBACtDD,EAASsB,mBAAqB,KAC9BtB,EAASuB,iBAAmB,MAE9BzF,KAAKqE,IAAIC,QAAQtE,KAAKuE,oBAAqB,CACzC9D,KAAMyD,EACNwB,OAAQ,MACRlB,QAASxE,KAAKsF,cAAc3I,KAAKqD,KAAM,SAAAS,GACrC,IAAIyD,EAAW,GACXO,EAAc,GAClBhE,EAAKiE,OAAOC,QAAQ,SAACC,GACnBV,EAASU,EAAMlJ,MAAQkJ,EAAMxI,OAASwI,EAAMC,aAC5CJ,EAAYG,EAAMlJ,MAAQkJ,EAAMxI,QAElC,IAAIyH,EAAQ,CACVK,SAAUA,EACVO,YAAaA,EACbkB,OAAQ,GACRZ,UAAWtE,EAAKiE,QAEdU,EAAKzB,cACPE,EAAMmB,SAAU,EAChBnB,EAAMC,KAAO,GAEbD,EAAMC,KAAOsB,EAAKvB,MAAMC,KAAO,EAEjCsB,EAAKN,SAASjB,KAEhBqB,MAAOlF,KAAK4F,YAAYjJ,KAAKqD,KAAM,SAAAkF,GACjCE,EAAKN,SAAS,CACZa,QAAST,EAAMW,cAAgB,IAAIF,QAAU,OAGjDG,SAAU9F,KAAKuF,8CAIdQ,GACHA,EAAGC,iBACChG,KAAK6D,MAAMA,QAAUoC,YAAUC,QAGnClG,KAAK8E,SAAS,CACZhB,KAAM9D,KAAK6D,MAAMC,KAAO,qCAInB,IAAAqC,EAAAnG,KACP,GAAIA,KAAK6D,MAAMA,QAAUoC,YAAUG,QACjC,OAAOC,EAAAC,EAAAC,cAACC,EAAA,iBAAD,MAGT,GAAIxG,KAAK6D,MAAMA,QAAUoC,YAAUQ,QAAUzG,KAAK6D,MAAMkB,UACtD,OACEsB,EAAAC,EAAAC,cAAA,OAAKG,UAAU,2BAAf,mDACkDL,EAAAC,EAAAC,cAAA,KAAGI,KAAK,8BAAR,oBAKtD,IAEIC,EACAC,EACAC,EAJAC,EAAW/G,KAAK6D,MAAMA,QAAUoC,YAAUC,OAkB9C,OAbIlG,KAAK6D,MAAMmB,SACb4B,EAAS5G,KAAK6D,MAAMkB,UAAUiC,OAAO,SAAAC,GACnC,OAAOd,EAAK/C,gBAAgB+C,EAAKtC,MAAMC,MAAMoD,SAASD,EAAEvL,QAE1DmL,EAAW7G,KAAK6G,SAChBC,EAAc9G,KAAK2D,aAAe,SAAW,sBAE7CiD,EAAS5G,KAAK6D,MAAMkB,UAAUoC,IAAI,SAAAF,GAChC,OAAOpL,OAAO+H,OAAO,GAAIqD,EAAG,CAACG,UAAU,MAEzCP,EAAW7G,KAAK0D,aAChBoD,EAAc,QAGdT,EAAAC,EAAAC,cAACC,EAAA,KAAD,CAAMK,SAAUA,EACVQ,eAAgBN,EAChBD,YAAaA,EACbQ,YAAiC,IAApBtH,KAAK6D,MAAMC,KAAa,KACxBuC,EAAAC,EAAAC,cAAA,KAAGI,KAAK,IACLD,UAAW,6BAA+BK,EAAW,YAAc,IACnEQ,QAASvH,KAAKwD,MAFjB,SAGhBxD,KAAK6D,MAAM8B,OAAO6B,SACjBnB,EAAAC,EAAAC,cAAA,OAAKG,UAAU,iCACbL,EAAAC,EAAAC,cAAA,UACEF,EAAAC,EAAAC,cAAA,UAAKvG,KAAK6D,MAAM8B,OAAO6B,WAI5BZ,EAAOO,IAAI,SAAAF,GACV,OAAOd,EAAKsB,YAAY,CACtB/C,OAAQuC,EACR/C,SAAUiC,EAAKtC,MAAMK,SACrBwD,WAAYvB,EAAKtC,MAAM8B,OACvBgC,SAAUxB,EAAKyB,YAAYjL,KAAKwJ,EAAMc,EAAEvL,0vCC5ErCmM,gaA3FY9D,aAAQ+D,mBAAmBC,+DACxCC,EAAQtM,EAAMU,GAAO,IAAA6G,EAAAjD,KAC3BtD,EAAMsL,EAAS,WACf9D,oUAAQ+D,CAAA,GACPjI,KAAK6D,MAAMnH,GADJwL,EAAA,GAETxM,EAAOU,IAENyH,EAAKqE,EAAA,GACNxL,EAAMwH,GAET,GAAa,cAATxI,EA6BF,OA5BAmI,EAAMA,MAAQoC,YAAUG,aACxBpG,KAAK8E,SAASjB,EAAO7D,KAAKmI,OAAOxL,KAAKqD,KAAM,WAC1CiD,EAAKoB,IAAIC,QAASrB,EAAKmF,0BACL,cAAgBC,mBAAmBjM,GAAS,CAC5DoI,QAAS,SAAC/D,GAGR,IAAI6H,EAAUrF,EAAKY,MAAM0E,eACrBA,EAAiB,GACrB9H,EAAKkE,QAAQ,SAACC,GACZ,IAAI4D,EAEFA,EADE5D,EAAM6D,UAAY7D,EAAM6D,QAAQC,KAAK,SAAAlN,GAAC,OAAIA,EAAE,KAAO8M,EAAQ1D,EAAMlJ,QAC7DkJ,EAAM+D,QAENL,EAAQ1D,EAAMlJ,OAASkJ,EAAM+D,QAErCJ,EAAe3D,EAAMlJ,MAAQ8M,IAE/BvF,EAAK6B,SAAS,CACZ8D,gBAAiBnI,EACjByE,MAAO,KACP2D,SAAS,EACTN,eAAgBA,GACftF,EAAKgC,gBAEVC,MAAOjC,EAAK6F,kBAKlB9I,KAAK8E,SAASjB,wCAGH,IACPkF,EADO3E,EAAApE,KAIX,GAA8B,WAA1BA,KAAKgD,MAAMgG,YACb,GAAIhJ,KAAK6D,MAAM+E,gBAAiB,CAC9B,IAAInB,EAAc,SAAC7C,GAOjB,OANIA,EAAMqE,mBACRrE,EAAQ/I,OAAO+H,OAAO,CACpBsF,IAAM,iBAAmB9E,EAAK+E,WAAWC,GACnC,YAAchF,EAAKpB,MAAMqG,OAAOC,KAAO,iBAC5C1E,IAGHyB,EAAAC,EAAAC,cAAA,OAAK7J,IAAKkI,EAAMlJ,MACb0I,EAAKqD,YAAY,CAChB/C,OAAQE,EACRV,SAAUE,EAAKP,MAAM0E,eACrBZ,SAAUvD,EAAKwD,YAAYjL,KAAKyH,EAAM,SAAUQ,EAAMlJ,UAK1D6N,EAAa,SAACtC,GAChB,OAAqB,MAAdA,EAAEuC,UAAmBvC,EAAEuC,UAG5B5C,EAAS5G,KAAK6D,MAAM+E,gBACpBa,EAAiB7C,EAAOI,OAAO,SAAAC,GAAC,OAAIsC,EAAWtC,KAAIE,IAAI,SAAAF,GAAC,OAAIQ,EAAYR,KACxEyC,EAAiB9C,EAAOI,OAAO,SAAAC,GAAC,OAAKsC,EAAWtC,KAAIE,IAAI,SAAAF,GAAC,OAAIQ,EAAYR,KAC7E8B,EACE1C,EAAAC,EAAAC,cAACC,EAAA,KAAD,CAAMK,SAAU7G,KAAK2J,YAAa7C,YAAY,eAAe8C,YAAY,IACvEvD,EAAAC,EAAAC,cAAA,6BACCkD,EACAC,EAAenM,OAAS8I,EAAAC,EAAAC,cAAA,6BAA2B,KACnDmD,SAKPX,EAAIc,EAAAC,EAAAjC,EAAA9K,WAAA,aAAAiD,MAAA1E,KAAA0E,MAGN,OAAO+I,iiCCrFLgB,gaAAahG,aAAQ+D,iEACR9E,GACX,OAAOqD,EAAAC,EAAAC,cAACyD,EAADC,EAAA,CAAUZ,OAAQrJ,MAAUgD,+CAGpBA,GACf,OAAOqD,EAAAC,EAAAC,cAAC2D,EAADD,EAAA,CAAcZ,OAAQrJ,MAAUgD,yCAI/C+G,EAAKI,YAAc,OAEnBpG,UAAQqG,IAAI,OAAQL,GAELA","file":"jira.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 27);\n","module.exports = React;","module.exports = SentryApp;","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var isArray = require('./isArray');\n\n/**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\nfunction castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n}\n\nmodule.exports = castArray;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","import React from 'react';\nimport _ from 'lodash';\nimport {Form, FormState, LoadingIndicator, plugins} from 'sentry';\n\n\nclass Settings extends plugins.BasePlugin.DefaultSettings {\n constructor(props) {\n super(props);\n this.PAGE_FIELD_LIST = {\n '0': ['instance_url', 'username', 'password'],\n '1': ['default_project'],\n '2': ['ignored_fields','default_priority', 'default_issue_type', 'auto_create']\n }\n\n this.back = this.back.bind(this);\n this.startEditing = this.startEditing.bind(this);\n this.isLastPage = this.isLastPage.bind(this);\n\n Object.assign(this.state, {\n page: 0\n });\n }\n\n isConfigured(state) {\n state = state || this.state;\n return !!(this.state.formData && this.state.formData.default_project);\n }\n\n isLastPage() {\n return this.state.page === 2;\n }\n\n fetchData() {\n // This is mostly copy paste of parent class\n // except for setting edit state\n this.api.request(this.getPluginEndpoint(), {\n success: data => {\n let formData = {};\n let initialData = {};\n data.config.forEach((field) => {\n formData[field.name] = field.value || field.defaultValue;\n initialData[field.name] = field.value;\n });\n this.setState({\n fieldList: data.config,\n formData: formData,\n initialData: initialData,\n // start off in edit mode if there isn't a project set\n editing: !(formData && formData.default_project),\n // call this here to prevent FormState.READY from being\n // set before fieldList is\n }, this.onLoadSuccess);\n },\n error: this.onLoadError\n });\n }\n\n startEditing() {\n this.setState({editing: true});\n }\n\n onSubmit() {\n if (_.isEqual(this.state.initialData, this.state.formData)) {\n if (this.isLastPage()) {\n this.setState({editing: false, page: 0})\n } else {\n this.setState({page: this.state.page + 1});\n }\n this.onSaveSuccess(this.onSaveComplete);\n return;\n }\n let formData = Object.assign({}, this.state.formData);\n // if the project has changed, it's likely these values aren't valid anymore\n if (formData.default_project !== this.state.initialData.default_project) {\n formData.default_issue_type = null;\n formData.default_priority = null;\n }\n this.api.request(this.getPluginEndpoint(), {\n data: formData,\n method: 'PUT',\n success: this.onSaveSuccess.bind(this, data => {\n let formData = {};\n let initialData = {};\n data.config.forEach((field) => {\n formData[field.name] = field.value || field.defaultValue;\n initialData[field.name] = field.value;\n });\n let state = {\n formData: formData,\n initialData: initialData,\n errors: {},\n fieldList: data.config\n };\n if (this.isLastPage()) {\n state.editing = false;\n state.page = 0;\n } else {\n state.page = this.state.page + 1;\n }\n this.setState(state);\n }),\n error: this.onSaveError.bind(this, error => {\n this.setState({\n errors: (error.responseJSON || {}).errors || {},\n });\n }),\n complete: this.onSaveComplete\n });\n }\n\n back(ev) {\n ev.preventDefault();\n if (this.state.state === FormState.SAVING) {\n return;\n }\n this.setState({\n page: this.state.page - 1\n });\n }\n\n render() {\n if (this.state.state === FormState.LOADING) {\n return <LoadingIndicator />;\n }\n\n if (this.state.state === FormState.ERROR && !this.state.fieldList) {\n return (\n <div className=\"alert alert-error m-b-1\">\n An unknown error occurred. Need help with this? <a href=\"https://sentry.io/support/\">Contact support</a>\n </div>\n );\n }\n\n let isSaving = this.state.state === FormState.SAVING;\n\n let fields;\n let onSubmit;\n let submitLabel;\n if (this.state.editing) {\n fields = this.state.fieldList.filter(f => {\n return this.PAGE_FIELD_LIST[this.state.page].includes(f.name);\n });\n onSubmit = this.onSubmit;\n submitLabel = this.isLastPage() ? 'Finish' : 'Save and Continue';\n } else {\n fields = this.state.fieldList.map(f => {\n return Object.assign({}, f, {readonly: true});\n });\n onSubmit = this.startEditing;\n submitLabel = 'Edit';\n }\n return (\n <Form onSubmit={onSubmit}\n submitDisabled={isSaving}\n submitLabel={submitLabel}\n extraButton={this.state.page === 0 ? null :\n <a href=\"#\"\n className={'btn btn-default pull-left' + (isSaving ? ' disabled' : '')}\n onClick={this.back}>Back</a>}>\n {this.state.errors.__all__ &&\n <div className=\"alert alert-block alert-error\">\n <ul>\n <li>{this.state.errors.__all__}</li>\n </ul>\n </div>\n }\n {fields.map(f => {\n return this.renderField({\n config: f,\n formData: this.state.formData,\n formErrors: this.state.errors,\n onChange: this.changeField.bind(this, f.name)\n });\n })}\n </Form>\n );\n }\n}\n\nexport default Settings;\n","import React from 'react';\nimport {Form, FormState, plugins} from 'sentry';\n\n\nclass IssueActions extends plugins.DefaultIssuePlugin.DefaultIssueActions {\n changeField(action, name, value) {\n let key = action + 'FormData';\n let formData = {\n ...this.state[key],\n [name]: value\n };\n let state = {\n [key]: formData\n };\n if (name === 'issuetype') {\n state.state = FormState.LOADING;\n this.setState(state, this.onLoad.bind(this, () => {\n this.api.request((this.getPluginCreateEndpoint() +\n '?issuetype=' + encodeURIComponent(value)), {\n success: (data) => {\n // Try not to change things the user might have edited\n // unless they're no longer valid\n let oldData = this.state.createFormData;\n let createFormData = {};\n data.forEach((field) => {\n let val;\n if (field.choices && !field.choices.find(c => c[0] === oldData[field.name])) {\n val = field.default;\n } else {\n val = oldData[field.name] || field.default;\n }\n createFormData[field.name] = val;\n });\n this.setState({\n createFieldList: data,\n error: null,\n loading: false,\n createFormData: createFormData\n }, this.onLoadSuccess);\n },\n error: this.errorHandler\n });\n }))\n return;\n }\n this.setState(state);\n }\n\n renderForm() {\n let form;\n\n // For create form, split into required and optional fields\n if (this.props.actionType === 'create') {\n if (this.state.createFieldList) {\n let renderField = (field) => {\n if (field.has_autocomplete) {\n field = Object.assign({\n url: ('/api/0/issues/' + this.getGroup().id +\n '/plugins/' + this.props.plugin.slug + '/autocomplete')\n }, field);\n }\n return (\n <div key={field.name}>\n {this.renderField({\n config: field,\n formData: this.state.createFormData,\n onChange: this.changeField.bind(this, 'create', field.name)\n })}\n </div>\n );\n };\n let isRequired = (f) => {\n return f.required != null ? f.required : true;\n };\n\n let fields = this.state.createFieldList;\n let requiredFields = fields.filter(f => isRequired(f)).map(f => renderField(f));\n let optionalFields = fields.filter(f => !isRequired(f)).map(f => renderField(f));\n form = (\n <Form onSubmit={this.createIssue} submitLabel='Create Issue' footerClass=\"\">\n <h5>Required Fields</h5>\n {requiredFields}\n {optionalFields.length ? <h5>Optional Fields</h5> : null}\n {optionalFields}\n </Form>\n );\n }\n } else {\n form = super.renderForm();\n }\n\n return form;\n }\n}\n\nexport default IssueActions;\n","import React from 'react';\nimport {plugins} from 'sentry';\n\nimport Settings from './components/settings';\nimport IssueActions from './components/issueActions';\n\nclass Jira extends plugins.DefaultIssuePlugin {\n renderSettings(props) {\n return <Settings plugin={this} {...props} />;\n }\n\n renderGroupActions(props) {\n return <IssueActions plugin={this} {...props} />\n }\n}\n\nJira.displayName = 'Jira';\n\nplugins.add('jira', Jira);\n\nexport default Jira;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/src/sentry_plugins/jira/static/jira/dist/jira.js.map.gz b/src/sentry_plugins/jira/static/jira/dist/jira.js.map.gz
deleted file mode 100644
index 7c78ddae863444..00000000000000
Binary files a/src/sentry_plugins/jira/static/jira/dist/jira.js.map.gz and /dev/null differ
diff --git a/src/sentry_plugins/jira/static/jira/jira.jsx b/src/sentry_plugins/jira/static/jira/jira.jsx
deleted file mode 100644
index ff155cd002124f..00000000000000
--- a/src/sentry_plugins/jira/static/jira/jira.jsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-import {plugins} from 'sentry';
-
-import Settings from './components/settings';
-import IssueActions from './components/issueActions';
-
-class Jira extends plugins.DefaultIssuePlugin {
- renderSettings(props) {
- return <Settings plugin={this} {...props} />;
- }
-
- renderGroupActions(props) {
- return <IssueActions plugin={this} {...props} />
- }
-}
-
-Jira.displayName = 'Jira';
-
-plugins.add('jira', Jira);
-
-export default Jira;
diff --git a/src/sentry_plugins/sessionstack/plugin.py b/src/sentry_plugins/sessionstack/plugin.py
index dd60c0520bafcc..2a81665b0ceeb3 100644
--- a/src/sentry_plugins/sessionstack/plugin.py
+++ b/src/sentry_plugins/sessionstack/plugin.py
@@ -31,9 +31,6 @@ class SessionStackPlugin(CorePluginMixin, Plugin2):
conf_title = title
conf_key = slug
- asset_key = "sessionstack"
- assets = ["dist/sessionstack.js"]
-
sessionstack_resource_links = [
("Documentation", "http://docs.sessionstack.com/integrations/sentry/")
]
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/components/settings.jsx b/src/sentry_plugins/sessionstack/static/sessionstack/components/settings.jsx
deleted file mode 100644
index 9f3510eaf11d63..00000000000000
--- a/src/sentry_plugins/sessionstack/static/sessionstack/components/settings.jsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import React from 'react';
-import _ from 'lodash';
-import {Form, FormState, LoadingIndicator, plugins} from 'sentry';
-
-
-class Settings extends plugins.BasePlugin.DefaultSettings {
- constructor(props) {
- super(props);
-
- this.REQUIRED_FIELDS = ['account_email', 'api_token', 'website_id'];
- this.ON_PREMISES_FIELDS = ['api_url', 'player_url'];
-
- this.toggleOnPremisesConfiguration = this.toggleOnPremisesConfiguration.bind(this);
- }
-
- renderFields(fields) {
- return fields.map(f => {
- return this.renderField({
- config: f,
- formData: this.state.formData,
- formErrors: this.state.errors,
- onChange: this.changeField.bind(this, f.name)
- });
- })
- }
-
- filterFields(fields, fieldNames) {
- return fields.filter(field => {
- return fieldNames.includes(field.name);
- })
- }
-
- toggleOnPremisesConfiguration() {
- this.setState({
- showOnPremisesConfiguration: !this.state.showOnPremisesConfiguration
- });
- }
-
- render() {
- if (this.state.state === FormState.LOADING) {
- return <LoadingIndicator />;
- }
-
- if (this.state.state === FormState.ERROR && !this.state.fieldList) {
- return (
- <div className="alert alert-error m-b-1">
- An unknown error occurred. Need help with this? <a href="https://sentry.io/support/">Contact support</a>
- </div>
- );
- }
-
- let isSaving = this.state.state === FormState.SAVING;
- let hasChanges = !_.isEqual(this.state.initialData, this.state.formData);
-
- let requiredFields = this.filterFields(this.state.fieldList, this.REQUIRED_FIELDS);
- let onPremisesFields = this.filterFields(this.state.fieldList, this.ON_PREMISES_FIELDS);
-
- return (
- <Form onSubmit={this.onSubmit}
- submitDisabled={isSaving || !hasChanges}>
- {this.state.errors.__all__ &&
- <div className="alert alert-block alert-error">
- <ul>
- <li>{this.state.errors.__all__}</li>
- </ul>
- </div>
- }
- {this.renderFields(requiredFields)}
- {onPremisesFields.length > 0 ?
- <div className="control-group">
- <button className="btn btn-default" type="button" onClick={this.toggleOnPremisesConfiguration}>
- Configure on-premises
- </button>
- </div>
- : null
- }
- {this.state.showOnPremisesConfiguration ? this.renderFields(onPremisesFields) : null}
- </Form>
- );
- }
-}
-
-export default Settings;
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js b/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js
deleted file mode 100644
index 71d8578d05cdd3..00000000000000
--- a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=29)}([function(t,e){t.exports=React},function(t,e){t.exports=SentryApp},function(t,e,n){var r=n(12);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=PropTypes},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(7);t.exports=function(t,e){return r(t,e)}},function(t,e){t.exports=ReactDOM},function(t,e,n){var r=n(8),o=n(28);t.exports=function t(e,n,i,u,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,u,t,a))}},function(t,e,n){var r=n(9),o=n(16),i=n(21),u=n(22),a=n(25),s=n(4),f=n(26),c=n(27),l=1,p="[object Arguments]",y="[object Array]",b="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,d,m){var g=s(t),_=s(e),O=g?y:a(t),w=_?y:a(e),S=(O=O==p?b:O)==b,j=(w=w==p?b:w)==b,E=O==w;if(E&&f(t)){if(!f(e))return!1;g=!0,S=!1}if(E&&!S)return m||(m=new r),g||c(t)?o(t,e,n,v,d,m):i(t,e,O,n,v,d,m);if(!(n&l)){var P=S&&h.call(t,"__wrapped__"),x=j&&h.call(e,"__wrapped__");if(P||x){var k=P?t.value():t,C=x?e.value():e;return m||(m=new r),d(k,C,n,v,m)}}return!!E&&(m||(m=new r),u(t,e,n,v,d,m))}},function(t,e,n){var r=n(10),o=n(11),i=n(13),u=n(14),a=n(15);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=u,s.prototype.set=a,t.exports=s},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(2),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(2);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(2);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(17),o=n(18),i=n(19),u=1,a=2;t.exports=function(t,e,n,s,f,c){var l=n&u,p=t.length,y=e.length;if(p!=y&&!(l&&y>p))return!1;var b=c.get(t);if(b&&c.get(e))return b==e;var h=-1,v=!0,d=n&a?new r:void 0;for(c.set(t,e),c.set(e,t);++h<p;){var m=t[h],g=e[h];if(s)var _=l?s(g,m,h,e,t,c):s(m,g,h,t,e,c);if(void 0!==_){if(_)continue;v=!1;break}if(d){if(!o(e,function(t,e){if(!i(d,e)&&(m===t||f(m,t,n,s,c)))return d.push(e)})){v=!1;break}}else if(m!==g&&!f(m,g,n,s,c)){v=!1;break}}return c.delete(t),c.delete(e),v}},function(t,e,n){var r=n(4);t.exports=function(){if(!arguments.length)return[];var t=arguments[0];return r(t)?t:[t]}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(20);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(23),o=1,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,u,a,s){var f=n&o,c=r(t),l=c.length;if(l!=r(e).length&&!f)return!1;for(var p=l;p--;){var y=c[p];if(!(f?y in e:i.call(e,y)))return!1}var b=s.get(t);if(b&&s.get(e))return b==e;var h=!0;s.set(t,e),s.set(e,t);for(var v=f;++p<l;){var d=t[y=c[p]],m=e[y];if(u)var g=f?u(m,d,y,e,t,s):u(d,m,y,t,e,s);if(!(void 0===g?d===m||a(d,m,n,u,s):g)){h=!1;break}v||(v="constructor"==y)}if(h&&!v){var _=t.constructor,O=e.constructor;_!=O&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof O&&O instanceof O)&&(h=!1)}return s.delete(t),s.delete(e),h}},function(t,e,n){var r=n(24)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),i=n(1),u=n(5),a=n.n(u);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var y=function(t){function e(t){var n,r,o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,(n=!(o=c(e).call(this,t))||"object"!==s(o)&&"function"!=typeof o?p(r):o).REQUIRED_FIELDS=["account_email","api_token","website_id"],n.ON_PREMISES_FIELDS=["api_url","player_url"],n.toggleOnPremisesConfiguration=n.toggleOnPremisesConfiguration.bind(p(p(n))),n}var n,r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,i["plugins"].BasePlugin.DefaultSettings),n=e,(r=[{key:"renderFields",value:function(t){var e=this;return t.map(function(t){return e.renderField({config:t,formData:e.state.formData,formErrors:e.state.errors,onChange:e.changeField.bind(e,t.name)})})}},{key:"filterFields",value:function(t,e){return t.filter(function(t){return e.includes(t.name)})}},{key:"toggleOnPremisesConfiguration",value:function(){this.setState({showOnPremisesConfiguration:!this.state.showOnPremisesConfiguration})}},{key:"render",value:function(){if(this.state.state===i.FormState.LOADING)return o.a.createElement(i.LoadingIndicator,null);if(this.state.state===i.FormState.ERROR&&!this.state.fieldList)return o.a.createElement("div",{className:"alert alert-error m-b-1"},"An unknown error occurred. Need help with this? ",o.a.createElement("a",{href:"https://sentry.io/support/"},"Contact support"));var t=this.state.state===i.FormState.SAVING,e=!a()(this.state.initialData,this.state.formData),n=this.filterFields(this.state.fieldList,this.REQUIRED_FIELDS),r=this.filterFields(this.state.fieldList,this.ON_PREMISES_FIELDS);return o.a.createElement(i.Form,{onSubmit:this.onSubmit,submitDisabled:t||!e},this.state.errors.__all__&&o.a.createElement("div",{className:"alert alert-block alert-error"},o.a.createElement("ul",null,o.a.createElement("li",null,this.state.errors.__all__))),this.renderFields(n),r.length>0?o.a.createElement("div",{className:"control-group"},o.a.createElement("button",{className:"btn btn-default",type:"button",onClick:this.toggleOnPremisesConfiguration},"Configure on-premises")):null,this.state.showOnPremisesConfiguration?this.renderFields(r):null)}}])&&f(n.prototype,r),u&&f(n,u),e}(),b=n(6),h=n.n(b),v=n(3),d=n.n(v);function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),t}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var j=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=g(this,_(e).call(this,t))).state={showIframe:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&S(t,e)}(e,o.a.Component),w(e,null,[{key:"propTypes",value:function(){return{alias:d.a.string.isRequired,data:d.a.object.isRequired}}}]),w(e,[{key:"componentDidMount",value:function(){var t=this;this.parentNode=h.a.findDOMNode(this).parentNode,window.addEventListener("resize",function(){return t.setIframeSize()},!1),this.setIframeSize()}},{key:"componentWillUnmount",value:function(){var t=this;window.removeEventListener("resize",function(){return t.setIframeSize()},!1)}},{key:"setIframeSize",value:function(){if(!this.showIframe){var t=$(this.parentNode).width();this.setState({width:t,height:t/(16/9)})}}},{key:"playSession",value:function(){this.setState({showIframe:!0}),this.setIframeSize()}},{key:"render",value:function(){var t=this,e=this.props.data.session_url;return e?o.a.createElement("div",{className:"panel-group"},this.state.showIframe?o.a.createElement("iframe",{src:e,sandbox:"allow-scripts allow-same-origin",width:this.state.width,height:this.state.height}):o.a.createElement("button",{className:"btn btn-default",type:"button",onClick:function(){return t.playSession()}},"Play session")):o.a.createElement("h4",null,"Session not found.")}}]),e}();j.getTitle=function(t){return"SessionStack"};var E=j;function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C(t,e){return!e||"object"!==P(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function D(t){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function N(t,e){return(N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var R=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),C(this,D(e).apply(this,arguments))}var n,r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&N(t,e)}(e,i["plugins"].BasePlugin),n=e,(r=[{key:"renderSettings",value:function(t){return o.a.createElement(y,x({plugin:this},t))}}])&&k(n.prototype,r),u&&k(n,u),e}();R.displayName="SessionStack",i.plugins.add("sessionstack",R),i.plugins.addContext("sessionstack",E);e.default=R}]);
-//# sourceMappingURL=sessionstack.js.map
\ No newline at end of file
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.gz b/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.gz
deleted file mode 100644
index 63231d2cb456be..00000000000000
Binary files a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.gz and /dev/null differ
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map b/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map
deleted file mode 100644
index b99ab527036476..00000000000000
--- a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"SentryApp\"","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_assocIndexOf.js","webpack:///external \"PropTypes\"","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isArray.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isEqual.js","webpack:///external \"ReactDOM\"","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIsEqual.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIsEqualDeep.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_Stack.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheClear.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheDelete.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/eq.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheGet.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheHas.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_listCacheSet.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalArrays.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_SetCache.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_arraySome.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_cacheHas.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_baseIndexOf.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalByTag.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_equalObjects.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_getAllKeys.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_overArg.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/_getTag.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isBuffer.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isTypedArray.js","webpack:////Users/scefali/Work/sentry-plugins/node_modules/lodash/isObjectLike.js","webpack:///./components/settings.jsx","webpack:///./contexts/sessionstack.jsx","webpack:///./sessionstack.jsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","React","SentryApp","eq","array","length","PropTypes","isArray","Array","baseIsEqual","other","ReactDOM","baseIsEqualDeep","isObjectLike","bitmask","customizer","stack","Stack","equalArrays","equalByTag","equalObjects","getTag","isBuffer","isTypedArray","COMPARE_PARTIAL_FLAG","argsTag","arrayTag","objectTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","entries","index","this","clear","entry","set","has","__data__","size","assocIndexOf","splice","data","pop","undefined","push","SetCache","arraySome","cacheHas","COMPARE_UNORDERED_FLAG","isPartial","arrLength","othLength","stacked","result","seen","arrValue","othValue","compared","othIndex","arguments","predicate","baseIndexOf","fromIndex","getAllKeys","objProps","objLength","skipCtor","objValue","objCtor","constructor","othCtor","nativeKeys","overArg","keys","func","transform","arg","nativeObjectToString","toString","Settings","props","_this","_classCallCheck","_getPrototypeOf","REQUIRED_FIELDS","ON_PREMISES_FIELDS","toggleOnPremisesConfiguration","_assertThisInitialized","plugins","BasePlugin","DefaultSettings","fields","_this2","map","f","renderField","config","formData","state","formErrors","errors","onChange","changeField","fieldNames","filter","field","includes","setState","showOnPremisesConfiguration","FormState","LOADING","external_React_default","a","createElement","external_SentryApp_","ERROR","fieldList","className","href","isSaving","SAVING","hasChanges","isEqual_default","initialData","requiredFields","filterFields","onPremisesFields","onSubmit","submitDisabled","__all__","renderFields","type","onClick","SessionStackContextType","sessionstack_classCallCheck","sessionstack_possibleConstructorReturn","sessionstack_getPrototypeOf","showIframe","Component","alias","string","isRequired","parentNode","findDOMNode","window","addEventListener","setIframeSize","_this3","removeEventListener","parentWidth","$","width","height","_this4","session_url","src","sandbox","playSession","getTitle","SessionStackPlugin","settings","_extends","plugin","displayName","add","addContext"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,WAA2B,OAAArB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD/B,EAAAkC,EAAA,GAIAlC,IAAAmC,EAAA,oBClFAhC,EAAAD,QAAAkC,qBCAAjC,EAAAD,QAAAmC,2BCAA,IAAAC,EAAStC,EAAQ,IAoBjBG,EAAAD,QAVA,SAAAqC,EAAAZ,GAEA,IADA,IAAAa,EAAAD,EAAAC,OACAA,KACA,GAAAF,EAAAC,EAAAC,GAAA,GAAAb,GACA,OAAAa,EAGA,yBCjBArC,EAAAD,QAAAuC,yBCuBA,IAAAC,EAAAC,MAAAD,QAEAvC,EAAAD,QAAAwC,mBCzBA,IAAAE,EAAkB5C,EAAQ,GAkC1BG,EAAAD,QAJA,SAAAmB,EAAAwB,GACA,OAAAD,EAAAvB,EAAAwB,mBC/BA1C,EAAAD,QAAA4C,0BCAA,IAAAC,EAAsB/C,EAAQ,GAC9BgD,EAAmBhD,EAAQ,IA0B3BG,EAAAD,QAVA,SAAA0C,EAAAvB,EAAAwB,EAAAI,EAAAC,EAAAC,GACA,OAAA9B,IAAAwB,IAGA,MAAAxB,GAAA,MAAAwB,IAAAG,EAAA3B,KAAA2B,EAAAH,GACAxB,MAAAwB,KAEAE,EAAA1B,EAAAwB,EAAAI,EAAAC,EAAAN,EAAAO,sBCxBA,IAAAC,EAAYpD,EAAQ,GACpBqD,EAAkBrD,EAAQ,IAC1BsD,EAAiBtD,EAAQ,IACzBuD,EAAmBvD,EAAQ,IAC3BwD,EAAaxD,EAAQ,IACrB0C,EAAc1C,EAAQ,GACtByD,EAAezD,EAAQ,IACvB0D,EAAmB1D,EAAQ,IAG3B2D,EAAA,EAGAC,EAAA,qBACAC,EAAA,iBACAC,EAAA,kBAMA7B,EAHAnB,OAAAkB,UAGAC,eA6DA9B,EAAAD,QA7CA,SAAA4B,EAAAe,EAAAI,EAAAC,EAAAa,EAAAZ,GACA,IAAAa,EAAAtB,EAAAZ,GACAmC,EAAAvB,EAAAG,GACAqB,EAAAF,EAAAH,EAAAL,EAAA1B,GACAqC,EAAAF,EAAAJ,EAAAL,EAAAX,GAKAuB,GAHAF,KAAAN,EAAAE,EAAAI,IAGAJ,EACAO,GAHAF,KAAAP,EAAAE,EAAAK,IAGAL,EACAQ,EAAAJ,GAAAC,EAEA,GAAAG,GAAAb,EAAA3B,GAAA,CACA,IAAA2B,EAAAZ,GACA,SAEAmB,GAAA,EACAI,GAAA,EAEA,GAAAE,IAAAF,EAEA,OADAjB,MAAA,IAAAC,GACAY,GAAAN,EAAA5B,GACAuB,EAAAvB,EAAAe,EAAAI,EAAAC,EAAAa,EAAAZ,GACAG,EAAAxB,EAAAe,EAAAqB,EAAAjB,EAAAC,EAAAa,EAAAZ,GAEA,KAAAF,EAAAU,GAAA,CACA,IAAAY,EAAAH,GAAAnC,EAAA1B,KAAAuB,EAAA,eACA0C,EAAAH,GAAApC,EAAA1B,KAAAsC,EAAA,eAEA,GAAA0B,GAAAC,EAAA,CACA,IAAAC,EAAAF,EAAAzC,EAAAT,QAAAS,EACA4C,EAAAF,EAAA3B,EAAAxB,QAAAwB,EAGA,OADAM,MAAA,IAAAC,GACAW,EAAAU,EAAAC,EAAAzB,EAAAC,EAAAC,IAGA,QAAAmB,IAGAnB,MAAA,IAAAC,GACAG,EAAAzB,EAAAe,EAAAI,EAAAC,EAAAa,EAAAZ,sBC/EA,IAAAwB,EAAqB3E,EAAQ,IAC7B4E,EAAsB5E,EAAQ,IAC9B6E,EAAmB7E,EAAQ,IAC3B8E,EAAmB9E,EAAQ,IAC3B+E,EAAmB/E,EAAQ,IAS3B,SAAAgF,EAAAC,GACA,IAAAC,GAAA,EACA1C,EAAA,MAAAyC,EAAA,EAAAA,EAAAzC,OAGA,IADA2C,KAAAC,UACAF,EAAA1C,GAAA,CACA,IAAA6C,EAAAJ,EAAAC,GACAC,KAAAG,IAAAD,EAAA,GAAAA,EAAA,KAKAL,EAAAhD,UAAAoD,MAAAT,EACAK,EAAAhD,UAAA,OAAA4C,EACAI,EAAAhD,UAAAf,IAAA4D,EACAG,EAAAhD,UAAAuD,IAAAT,EACAE,EAAAhD,UAAAsD,IAAAP,EAEA5E,EAAAD,QAAA8E,iBCnBA7E,EAAAD,QALA,WACAiF,KAAAK,SAAA,GACAL,KAAAM,KAAA,oBCTA,IAAAC,EAAmB1F,EAAQ,GAM3B2F,EAHAhD,MAAAX,UAGA2D,OA4BAxF,EAAAD,QAjBA,SAAAyB,GACA,IAAAiE,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAAjE,GAEA,QAAAuD,EAAA,IAIAA,GADAU,EAAApD,OAAA,EAEAoD,EAAAC,MAEAF,EAAApF,KAAAqF,EAAAV,EAAA,KAEAC,KAAAM,KACA,oBCKAtF,EAAAD,QAJA,SAAAmB,EAAAwB,GACA,OAAAxB,IAAAwB,GAAAxB,MAAAwB,uBCjCA,IAAA6C,EAAmB1F,EAAQ,GAkB3BG,EAAAD,QAPA,SAAAyB,GACA,IAAAiE,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAAjE,GAEA,OAAAuD,EAAA,OAAAY,EAAAF,EAAAV,GAAA,qBCfA,IAAAQ,EAAmB1F,EAAQ,GAe3BG,EAAAD,QAJA,SAAAyB,GACA,OAAA+D,EAAAP,KAAAK,SAAA7D,IAAA,oBCZA,IAAA+D,EAAmB1F,EAAQ,GAyB3BG,EAAAD,QAbA,SAAAyB,EAAAN,GACA,IAAAuE,EAAAT,KAAAK,SACAN,EAAAQ,EAAAE,EAAAjE,GAQA,OANAuD,EAAA,KACAC,KAAAM,KACAG,EAAAG,KAAA,CAAApE,EAAAN,KAEAuE,EAAAV,GAAA,GAAA7D,EAEA8D,uBCtBA,IAAAa,EAAehG,EAAQ,IACvBiG,EAAgBjG,EAAQ,IACxBkG,EAAelG,EAAQ,IAGvB2D,EAAA,EACAwC,EAAA,EA4EAhG,EAAAD,QA7DA,SAAAqC,EAAAM,EAAAI,EAAAC,EAAAa,EAAAZ,GACA,IAAAiD,EAAAnD,EAAAU,EACA0C,EAAA9D,EAAAC,OACA8D,EAAAzD,EAAAL,OAEA,GAAA6D,GAAAC,KAAAF,GAAAE,EAAAD,GACA,SAGA,IAAAE,EAAApD,EAAAlC,IAAAsB,GACA,GAAAgE,GAAApD,EAAAlC,IAAA4B,GACA,OAAA0D,GAAA1D,EAEA,IAAAqC,GAAA,EACAsB,GAAA,EACAC,EAAAxD,EAAAkD,EAAA,IAAAH,OAAAF,EAMA,IAJA3C,EAAAmC,IAAA/C,EAAAM,GACAM,EAAAmC,IAAAzC,EAAAN,KAGA2C,EAAAmB,GAAA,CACA,IAAAK,EAAAnE,EAAA2C,GACAyB,EAAA9D,EAAAqC,GAEA,GAAAhC,EACA,IAAA0D,EAAAR,EACAlD,EAAAyD,EAAAD,EAAAxB,EAAArC,EAAAN,EAAAY,GACAD,EAAAwD,EAAAC,EAAAzB,EAAA3C,EAAAM,EAAAM,GAEA,QAAA2C,IAAAc,EAAA,CACA,GAAAA,EACA,SAEAJ,GAAA,EACA,MAGA,GAAAC,GACA,IAAAR,EAAApD,EAAA,SAAA8D,EAAAE,GACA,IAAAX,EAAAO,EAAAI,KACAH,IAAAC,GAAA5C,EAAA2C,EAAAC,EAAA1D,EAAAC,EAAAC,IACA,OAAAsD,EAAAV,KAAAc,KAEW,CACXL,GAAA,EACA,YAEK,GACLE,IAAAC,IACA5C,EAAA2C,EAAAC,EAAA1D,EAAAC,EAAAC,GACA,CACAqD,GAAA,EACA,OAKA,OAFArD,EAAA,OAAAZ,GACAY,EAAA,OAAAN,GACA2D,oBC/EA,IAAA9D,EAAc1C,EAAQ,GA2CtBG,EAAAD,QARA,WACA,IAAA4G,UAAAtE,OACA,SAEA,IAAAnB,EAAAyF,UAAA,GACA,OAAApE,EAAArB,KAAA,CAAAA,mBClBAlB,EAAAD,QAZA,SAAAqC,EAAAwE,GAIA,IAHA,IAAA7B,GAAA,EACA1C,EAAA,MAAAD,EAAA,EAAAA,EAAAC,SAEA0C,EAAA1C,GACA,GAAAuE,EAAAxE,EAAA2C,KAAA3C,GACA,SAGA,2BCnBA,IAAAyE,EAAkBhH,EAAQ,IAgB1BG,EAAAD,QALA,SAAAqC,EAAAlB,GAEA,QADA,MAAAkB,MAAAC,SACAwE,EAAAzE,EAAAlB,EAAA,sBCSAlB,EAAAD,QAZA,SAAAqC,EAAAlB,EAAA4F,GAIA,IAHA,IAAA/B,EAAA+B,EAAA,EACAzE,EAAAD,EAAAC,SAEA0C,EAAA1C,GACA,GAAAD,EAAA2C,KAAA7D,EACA,OAAA6D,EAGA,yBCiBA/E,EAAAD,QAJA,SAAAmB,EAAAwB,GACA,OAAAxB,IAAAwB,GAAAxB,MAAAwB,uBCjCA,IAAAqE,EAAiBlH,EAAQ,IAGzB2D,EAAA,EAMA1B,EAHAnB,OAAAkB,UAGAC,eA+EA9B,EAAAD,QAhEA,SAAA4B,EAAAe,EAAAI,EAAAC,EAAAa,EAAAZ,GACA,IAAAiD,EAAAnD,EAAAU,EACAwD,EAAAD,EAAApF,GACAsF,EAAAD,EAAA3E,OAIA,GAAA4E,GAHAF,EAAArE,GACAL,SAEA4D,EACA,SAGA,IADA,IAAAlB,EAAAkC,EACAlC,KAAA,CACA,IAAAvD,EAAAwF,EAAAjC,GACA,KAAAkB,EAAAzE,KAAAkB,EAAAZ,EAAA1B,KAAAsC,EAAAlB,IACA,SAIA,IAAA4E,EAAApD,EAAAlC,IAAAa,GACA,GAAAyE,GAAApD,EAAAlC,IAAA4B,GACA,OAAA0D,GAAA1D,EAEA,IAAA2D,GAAA,EACArD,EAAAmC,IAAAxD,EAAAe,GACAM,EAAAmC,IAAAzC,EAAAf,GAGA,IADA,IAAAuF,EAAAjB,IACAlB,EAAAkC,GAAA,CAEA,IAAAE,EAAAxF,EADAH,EAAAwF,EAAAjC,IAEAyB,EAAA9D,EAAAlB,GAEA,GAAAuB,EACA,IAAA0D,EAAAR,EACAlD,EAAAyD,EAAAW,EAAA3F,EAAAkB,EAAAf,EAAAqB,GACAD,EAAAoE,EAAAX,EAAAhF,EAAAG,EAAAe,EAAAM,GAGA,UAAA2C,IAAAc,EACAU,IAAAX,GAAA5C,EAAAuD,EAAAX,EAAA1D,EAAAC,EAAAC,GACAyD,GACA,CACAJ,GAAA,EACA,MAEAa,MAAA,eAAA1F,GAEA,GAAA6E,IAAAa,EAAA,CACA,IAAAE,EAAAzF,EAAA0F,YACAC,EAAA5E,EAAA2E,YAGAD,GAAAE,GACA,gBAAA3F,GAAA,gBAAAe,KACA,mBAAA0E,mBACA,mBAAAE,qBACAjB,GAAA,GAKA,OAFArD,EAAA,OAAArB,GACAqB,EAAA,OAAAN,GACA2D,oBCrFA,IAGAkB,EAHc1H,EAAQ,GAGtB2H,CAAA7G,OAAA8G,KAAA9G,QAEAX,EAAAD,QAAAwH,iBCSAvH,EAAAD,QANA,SAAA2H,EAAAC,GACA,gBAAAC,GACA,OAAAF,EAAAC,EAAAC,qBCTA,IAOAC,EAPAlH,OAAAkB,UAOAiG,SAaA9H,EAAAD,QAJA,SAAAmB,GACA,OAAA2G,EAAAzH,KAAAc,mBCDAlB,EAAAD,QAJA,WACA,yBCGAC,EAAAD,QAJA,WACA,yBCcAC,EAAAD,QAJA,SAAAmB,GACA,aAAAA,GAAA,iBAAAA,0zBCyDe6G,cA5Eb,SAAAA,EAAYC,GAAO,IAAAC,MAAA,mGAAAC,CAAAlD,KAAA+C,KACjB/C,MAAAiD,MAAAE,EAAAJ,GAAA3H,KAAA4E,KAAMgD,mDAEDI,gBAAkB,CAAC,gBAAiB,YAAa,cACtDH,EAAKI,mBAAqB,CAAC,UAAW,cAEtCJ,EAAKK,8BAAgCL,EAAKK,8BAA8B7G,KAAnC8G,IAAAN,KANpBA,wPADEO,aAAQC,WAAWC,4DAU3BC,GAAQ,IAAAC,EAAA5D,KACnB,OAAO2D,EAAOE,IAAI,SAAAC,GAChB,OAAOF,EAAKG,YAAY,CACtBC,OAAQF,EACRG,SAAUL,EAAKM,MAAMD,SACrBE,WAAYP,EAAKM,MAAME,OACvBC,SAAUT,EAAKU,YAAY7H,KAAKmH,EAAME,EAAEtI,+CAKjCmI,EAAQY,GACnB,OAAOZ,EAAOa,OAAO,SAAAC,GACnB,OAAOF,EAAWG,SAASD,EAAMjJ,gEAKnCwE,KAAK2E,SAAS,CACZC,6BAA8B5E,KAAKkE,MAAMU,+DAK3C,GAAI5E,KAAKkE,MAAMA,QAAUW,YAAUC,QACjC,OAAOC,EAAAC,EAAAC,cAACC,EAAA,iBAAD,MAGT,GAAIlF,KAAKkE,MAAMA,QAAUW,YAAUM,QAAUnF,KAAKkE,MAAMkB,UACtD,OACEL,EAAAC,EAAAC,cAAA,OAAKI,UAAU,2BAAf,mDACkDN,EAAAC,EAAAC,cAAA,KAAGK,KAAK,8BAAR,oBAKtD,IAAIC,EAAWvF,KAAKkE,MAAMA,QAAUW,YAAUW,OAC1CC,GAAcC,IAAU1F,KAAKkE,MAAMyB,YAAa3F,KAAKkE,MAAMD,UAE3D2B,EAAiB5F,KAAK6F,aAAa7F,KAAKkE,MAAMkB,UAAWpF,KAAKoD,iBAC9D0C,EAAmB9F,KAAK6F,aAAa7F,KAAKkE,MAAMkB,UAAWpF,KAAKqD,oBAEpE,OACE0B,EAAAC,EAAAC,cAACC,EAAA,KAAD,CAAMa,SAAU/F,KAAK+F,SACfC,eAAgBT,IAAaE,GAChCzF,KAAKkE,MAAME,OAAO6B,SACjBlB,EAAAC,EAAAC,cAAA,OAAKI,UAAU,iCACbN,EAAAC,EAAAC,cAAA,UACEF,EAAAC,EAAAC,cAAA,UAAKjF,KAAKkE,MAAME,OAAO6B,WAI5BjG,KAAKkG,aAAaN,GAClBE,EAAiBzI,OAAS,EACvB0H,EAAAC,EAAAC,cAAA,OAAKI,UAAU,iBACbN,EAAAC,EAAAC,cAAA,UAAQI,UAAU,kBAAkBc,KAAK,SAASC,QAASpG,KAAKsD,+BAAhE,0BAIA,KAELtD,KAAKkE,MAAMU,4BAA8B5E,KAAKkG,aAAaJ,GAAoB,26BCxExF,IAEMO,cAQJ,SAAAA,EAAYrD,GAAO,IAAAC,EAAA,mGAAAqD,CAAAtG,KAAAqG,IACjBpD,EAAAsD,EAAAvG,KAAAwG,EAAAH,GAAAjL,KAAA4E,KAAMgD,KACDkB,MAAQ,CACXuC,YAAY,GAHGxD,8OARiBhG,IAAMyJ,uDAExC,MAAO,CACLC,MAAOrJ,IAAUsJ,OAAOC,WACxBpG,KAAMnD,IAAUX,OAAOkK,+DAWP,IAAAjD,EAAA5D,KAClBA,KAAK8G,WAAanJ,IAASoJ,YAAY/G,MAAM8G,WAC7CE,OAAOC,iBAAiB,SAAU,kBAAMrD,EAAKsD,kBAAiB,GAC9DlH,KAAKkH,+DAGgB,IAAAC,EAAAnH,KACrBgH,OAAOI,oBAAoB,SAAU,kBAAMD,EAAKD,kBAAiB,2CAIjE,IAAKlH,KAAKyG,WAAY,CACpB,IAAIY,EAAcC,EAAEtH,KAAK8G,YAAYS,QAErCvH,KAAK2E,SAAS,CACZ4C,MAAOF,EACPG,OAAQH,GAjCK,GAAK,4CAuCtBrH,KAAK2E,SAAS,CACZ8B,YAAY,IAGdzG,KAAKkH,iDAGE,IAAAO,EAAAzH,KACD0H,EAAgB1H,KAAKgD,MAAMvC,KAA3BiH,YAEN,OAAKA,EAKH3C,EAAAC,EAAAC,cAAA,OAAKI,UAAU,eACZrF,KAAKkE,MAAMuC,WACV1B,EAAAC,EAAAC,cAAA,UACE0C,IAAKD,EACLE,QAAQ,kCACRL,MAAOvH,KAAKkE,MAAMqD,MAClBC,OAAQxH,KAAKkE,MAAMsD,SAGrBzC,EAAAC,EAAAC,cAAA,UACEI,UAAU,kBACVc,KAAK,SACLC,QAAS,kBAAMqB,EAAKI,gBAHtB,iBAbG9C,EAAAC,EAAAC,cAAA,yCA0BboB,EAAwByB,SAAW,SAAS5L,GAC1C,MAAO,gBAGMmK,kgCC9ET0B,gaAA2BvE,aAAQC,yDACxBT,GACb,OAAO+B,EAAAC,EAAAC,cAAC+C,EAADC,EAAA,CAAUC,OAAQlI,MAAUgD,yCAIvC+E,EAAmBI,YAAc,eAEjC3E,UAAQ4E,IAAI,eAAgBL,GAC5BvE,UAAQ6E,WAAW,eAAgBhC,GAEpB0B","file":"sessionstack.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 29);\n","module.exports = React;","module.exports = SentryApp;","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","module.exports = PropTypes;","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","module.exports = ReactDOM;","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var isArray = require('./isArray');\n\n/**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\nfunction castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n}\n\nmodule.exports = castArray;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","import React from 'react';\nimport _ from 'lodash';\nimport {Form, FormState, LoadingIndicator, plugins} from 'sentry';\n\n\nclass Settings extends plugins.BasePlugin.DefaultSettings {\n constructor(props) {\n super(props);\n\n this.REQUIRED_FIELDS = ['account_email', 'api_token', 'website_id'];\n this.ON_PREMISES_FIELDS = ['api_url', 'player_url'];\n\n this.toggleOnPremisesConfiguration = this.toggleOnPremisesConfiguration.bind(this);\n }\n\n renderFields(fields) {\n return fields.map(f => {\n return this.renderField({\n config: f,\n formData: this.state.formData,\n formErrors: this.state.errors,\n onChange: this.changeField.bind(this, f.name)\n });\n })\n }\n\n filterFields(fields, fieldNames) {\n return fields.filter(field => {\n return fieldNames.includes(field.name);\n })\n }\n\n toggleOnPremisesConfiguration() {\n this.setState({\n showOnPremisesConfiguration: !this.state.showOnPremisesConfiguration\n });\n }\n\n render() {\n if (this.state.state === FormState.LOADING) {\n return <LoadingIndicator />;\n }\n\n if (this.state.state === FormState.ERROR && !this.state.fieldList) {\n return (\n <div className=\"alert alert-error m-b-1\">\n An unknown error occurred. Need help with this? <a href=\"https://sentry.io/support/\">Contact support</a>\n </div>\n );\n }\n\n let isSaving = this.state.state === FormState.SAVING;\n let hasChanges = !_.isEqual(this.state.initialData, this.state.formData);\n\n let requiredFields = this.filterFields(this.state.fieldList, this.REQUIRED_FIELDS);\n let onPremisesFields = this.filterFields(this.state.fieldList, this.ON_PREMISES_FIELDS);\n\n return (\n <Form onSubmit={this.onSubmit}\n submitDisabled={isSaving || !hasChanges}>\n {this.state.errors.__all__ &&\n <div className=\"alert alert-block alert-error\">\n <ul>\n <li>{this.state.errors.__all__}</li>\n </ul>\n </div>\n }\n {this.renderFields(requiredFields)}\n {onPremisesFields.length > 0 ?\n <div className=\"control-group\">\n <button className=\"btn btn-default\" type=\"button\" onClick={this.toggleOnPremisesConfiguration}>\n Configure on-premises\n </button>\n </div>\n : null\n }\n {this.state.showOnPremisesConfiguration ? this.renderFields(onPremisesFields) : null}\n </Form>\n );\n }\n}\n\nexport default Settings;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport PropTypes from \"prop-types\";\n\nconst ASPECT_RATIO = 16 / 9;\n\nclass SessionStackContextType extends React.Component {\n static propTypes() {\n return {\n alias: PropTypes.string.isRequired,\n data: PropTypes.object.isRequired\n };\n }\n\n constructor(props) {\n super(props);\n this.state = {\n showIframe: false\n };\n }\n\n componentDidMount() {\n this.parentNode = ReactDOM.findDOMNode(this).parentNode;\n window.addEventListener(\"resize\", () => this.setIframeSize(), false);\n this.setIframeSize();\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", () => this.setIframeSize(), false);\n }\n\n setIframeSize() {\n if (!this.showIframe) {\n let parentWidth = $(this.parentNode).width();\n\n this.setState({\n width: parentWidth,\n height: parentWidth / ASPECT_RATIO\n });\n }\n }\n\n playSession() {\n this.setState({\n showIframe: true\n });\n\n this.setIframeSize();\n }\n\n render() {\n let { session_url } = this.props.data;\n\n if (!session_url) {\n return <h4>Session not found.</h4>;\n }\n\n return (\n <div className=\"panel-group\">\n {this.state.showIframe ? (\n <iframe\n src={session_url}\n sandbox=\"allow-scripts allow-same-origin\"\n width={this.state.width}\n height={this.state.height}\n />\n ) : (\n <button\n className=\"btn btn-default\"\n type=\"button\"\n onClick={() => this.playSession()}\n >\n Play session\n </button>\n )}\n </div>\n );\n }\n}\n\nSessionStackContextType.getTitle = function(value) {\n return \"SessionStack\";\n};\n\nexport default SessionStackContextType;\n","import React from 'react';\nimport {plugins} from 'sentry';\n\nimport Settings from './components/settings';\nimport SessionStackContextType from './contexts/sessionstack';\n\nclass SessionStackPlugin extends plugins.BasePlugin {\n renderSettings(props) {\n return <Settings plugin={this} {...props} />;\n }\n}\n\nSessionStackPlugin.displayName = 'SessionStack';\n\nplugins.add('sessionstack', SessionStackPlugin);\nplugins.addContext('sessionstack', SessionStackContextType);\n\nexport default SessionStackPlugin;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map.gz b/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map.gz
deleted file mode 100644
index a41f1079619203..00000000000000
Binary files a/src/sentry_plugins/sessionstack/static/sessionstack/dist/sessionstack.js.map.gz and /dev/null differ
diff --git a/src/sentry_plugins/sessionstack/static/sessionstack/sessionstack.jsx b/src/sentry_plugins/sessionstack/static/sessionstack/sessionstack.jsx
deleted file mode 100644
index cf10947fb98417..00000000000000
--- a/src/sentry_plugins/sessionstack/static/sessionstack/sessionstack.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react';
-import {plugins} from 'sentry';
-
-import Settings from './components/settings';
-import SessionStackContextType from './contexts/sessionstack';
-
-class SessionStackPlugin extends plugins.BasePlugin {
- renderSettings(props) {
- return <Settings plugin={this} {...props} />;
- }
-}
-
-SessionStackPlugin.displayName = 'SessionStack';
-
-plugins.add('sessionstack', SessionStackPlugin);
-plugins.addContext('sessionstack', SessionStackContextType);
-
-export default SessionStackPlugin;
|
08b1a5519a983b8009e78a31edc5c1b8b82f8db9
|
2024-01-13 04:08:21
|
Yagiz Nizipli
|
fix: remove lodash/find usages (#63150)
| false
|
remove lodash/find usages (#63150)
|
fix
|
diff --git a/static/app/views/settings/organizationDeveloperSettings/permissionSelection.tsx b/static/app/views/settings/organizationDeveloperSettings/permissionSelection.tsx
index 36c938cbeb9561..bc0f35a4ac71df 100644
--- a/static/app/views/settings/organizationDeveloperSettings/permissionSelection.tsx
+++ b/static/app/views/settings/organizationDeveloperSettings/permissionSelection.tsx
@@ -1,11 +1,10 @@
import {Component, Fragment} from 'react';
-import find from 'lodash/find';
import SelectField from 'sentry/components/forms/fields/selectField';
import FormContext from 'sentry/components/forms/formContext';
import {SENTRY_APP_PERMISSIONS} from 'sentry/constants';
import {t} from 'sentry/locale';
-import {PermissionResource, Permissions, PermissionValue} from 'sentry/types/index';
+import {PermissionResource, Permissions, PermissionValue} from 'sentry/types';
/**
* Custom form element that presents API scopes in a resource-centric way. Meaning
@@ -88,7 +87,7 @@ type State = {
};
function findResource(r: PermissionResource) {
- return find(SENTRY_APP_PERMISSIONS, ['resource', r]);
+ return SENTRY_APP_PERMISSIONS.find(permissions => permissions.resource === r);
}
/**
|
f9b9d88aa6ab0615616920c9eecd17a09a204a91
|
2024-03-05 02:44:36
|
Scott Cooper
|
test(ui): Catch error in hook using try/catch (#66121)
| false
|
Catch error in hook using try/catch (#66121)
|
test
|
diff --git a/static/app/utils/useLocalStorageState.spec.tsx b/static/app/utils/useLocalStorageState.spec.tsx
index 65cc0d0357b730..b5b9f063c5480a 100644
--- a/static/app/utils/useLocalStorageState.spec.tsx
+++ b/static/app/utils/useLocalStorageState.spec.tsx
@@ -1,5 +1,3 @@
-import {Component} from 'react';
-
import {reactHooks, waitFor} from 'sentry-test/reactTestingLibrary';
import localStorageWrapper from 'sentry/utils/localStorage';
@@ -17,25 +15,15 @@ describe('useLocalStorageState', () => {
it('throws if key is not a string', async () => {
let errorResult!: TypeError;
- class ErrorBoundary extends Component<{children: any}> {
- static getDerivedStateFromError(err) {
- errorResult = err;
- return null;
- }
-
- render() {
- return !errorResult && this.props.children;
- }
- }
-
- reactHooks.renderHook(
- () =>
+ reactHooks.renderHook(() => {
+ try {
// @ts-expect-error force incorrect usage
- useLocalStorageState({}, 'default value'),
- {
- wrapper: ErrorBoundary,
+ // biome-ignore lint/correctness/useHookAtTopLevel: <explanation>
+ useLocalStorageState({}, 'default value');
+ } catch (err) {
+ errorResult = err;
}
- );
+ });
await waitFor(() => expect(errorResult).toBeInstanceOf(TypeError));
expect(errorResult.message).toBe('useLocalStorage: key must be a string');
|
06c3a49a3c571b8922172d33df3737a75b9645f5
|
2024-07-02 04:49:06
|
anthony sottile
|
ref: improve annotations for Outbox Managers (#73602)
| false
|
improve annotations for Outbox Managers (#73602)
|
ref
|
diff --git a/src/sentry/models/apitoken.py b/src/sentry/models/apitoken.py
index 2725e0f03c3c40..2e95c8e5fcf35e 100644
--- a/src/sentry/models/apitoken.py
+++ b/src/sentry/models/apitoken.py
@@ -119,9 +119,7 @@ class ApiToken(ReplicatedControlModel, HasApiScopes):
expires_at = models.DateTimeField(null=True, default=default_expiration)
date_added = models.DateTimeField(default=timezone.now)
- objects: ClassVar[ControlOutboxProducingManager[ApiToken]] = ApiTokenManager(
- cache_fields=("token",)
- )
+ objects: ClassVar[ApiTokenManager] = ApiTokenManager(cache_fields=("token",))
class Meta:
app_label = "sentry"
diff --git a/src/sentry/models/integrations/organization_integration.py b/src/sentry/models/integrations/organization_integration.py
index b0322760d7ec50..3869d521c8104a 100644
--- a/src/sentry/models/integrations/organization_integration.py
+++ b/src/sentry/models/integrations/organization_integration.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from collections.abc import Mapping
-from typing import Any, ClassVar
+from typing import Any, ClassVar, Self
from django.db import models
from django.utils import timezone
@@ -37,9 +37,7 @@ class OrganizationIntegration(ReplicatedControlModel):
# After the grace period, we will mark the status as disabled.
grace_period_end = models.DateTimeField(null=True, blank=True, db_index=True)
- objects: ClassVar[
- ControlOutboxProducingManager[OrganizationIntegration]
- ] = ControlOutboxProducingManager()
+ objects: ClassVar[ControlOutboxProducingManager[Self]] = ControlOutboxProducingManager()
class Meta:
app_label = "sentry"
diff --git a/src/sentry/models/organizationmemberteam.py b/src/sentry/models/organizationmemberteam.py
index 3e67cda349ff12..d6ea933bcde334 100644
--- a/src/sentry/models/organizationmemberteam.py
+++ b/src/sentry/models/organizationmemberteam.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from collections.abc import Mapping, MutableMapping
-from typing import Any, ClassVar
+from typing import Any, ClassVar, Self
from django.db import models
@@ -20,9 +20,7 @@ class OrganizationMemberTeam(ReplicatedRegionModel):
Identifies relationships between organization members and the teams they are on.
"""
- objects: ClassVar[
- RegionOutboxProducingManager[OrganizationMemberTeam]
- ] = RegionOutboxProducingManager()
+ objects: ClassVar[RegionOutboxProducingManager[Self]] = RegionOutboxProducingManager()
__relocation_scope__ = RelocationScope.Organization
category = OutboxCategory.ORGANIZATION_MEMBER_TEAM_UPDATE
|
3f80a4c97f5b6e3009319660321dd5459ab33601
|
2021-10-19 02:50:33
|
NisanthanNanthakumar
|
feat(alert-rules): Add feature flag for Alert Rule UI Component (#29384)
| false
|
Add feature flag for Alert Rule UI Component (#29384)
|
feat
|
diff --git a/src/sentry/api/endpoints/sentry_app_details.py b/src/sentry/api/endpoints/sentry_app_details.py
index 3f14219480301b..1df2b740f68546 100644
--- a/src/sentry/api/endpoints/sentry_app_details.py
+++ b/src/sentry/api/endpoints/sentry_app_details.py
@@ -35,7 +35,21 @@ def put(self, request, sentry_app):
# isInternal is not field of our model but it is a field of the serializer
data = request.data.copy()
data["isInternal"] = sentry_app.status == SentryAppStatus.INTERNAL
- serializer = SentryAppSerializer(sentry_app, data=data, partial=True, access=request.access)
+ serializer = SentryAppSerializer(
+ sentry_app,
+ data=data,
+ partial=True,
+ access=request.access,
+ context={
+ "features": {
+ "organizations:alert-rule-ui-component": features.has(
+ "organizations:alert-rule-ui-component",
+ sentry_app.owner,
+ actor=request.user,
+ )
+ }
+ },
+ )
if serializer.is_valid():
result = serializer.validated_data
diff --git a/src/sentry/api/endpoints/sentry_apps.py b/src/sentry/api/endpoints/sentry_apps.py
index 3b8296fbcd500a..f91ef11d43b05e 100644
--- a/src/sentry/api/endpoints/sentry_apps.py
+++ b/src/sentry/api/endpoints/sentry_apps.py
@@ -77,7 +77,17 @@ def post(self, request, organization):
status=403,
)
- serializer = SentryAppSerializer(data=data, access=request.access)
+ serializer = SentryAppSerializer(
+ data=data,
+ access=request.access,
+ context={
+ "features": {
+ "organizations:alert-rule-ui-component": features.has(
+ "organizations:alert-rule-ui-component", organization, actor=request.user
+ )
+ }
+ },
+ )
if serializer.is_valid():
data["redirect_url"] = data["redirectUrl"]
diff --git a/src/sentry/api/serializers/rest_framework/sentry_app.py b/src/sentry/api/serializers/rest_framework/sentry_app.py
index b525eb78ab8803..dd0c261a4b891b 100644
--- a/src/sentry/api/serializers/rest_framework/sentry_app.py
+++ b/src/sentry/api/serializers/rest_framework/sentry_app.py
@@ -49,7 +49,7 @@ def to_internal_value(self, data):
return {}
try:
- validate_ui_element_schema(data)
+ validate_ui_element_schema(data, self.context["features"])
except SchemaValidationError as e:
raise ValidationError(e.message) # noqa: B306
diff --git a/src/sentry/api/validators/sentry_apps/schema.py b/src/sentry/api/validators/sentry_apps/schema.py
index 29d581aae83dec..8fa440bb47ea73 100644
--- a/src/sentry/api/validators/sentry_apps/schema.py
+++ b/src/sentry/api/validators/sentry_apps/schema.py
@@ -195,7 +195,7 @@
"required": ["elements"],
}
-element_types = ["issue-link", "alert-rule-action", "issue-media", "stacktrace-link"]
+ELEMENT_TYPES = ["issue-link", "alert-rule-action", "issue-media", "stacktrace-link"]
def validate_component(schema):
@@ -215,7 +215,8 @@ def check_elements_is_array(instance):
raise SchemaValidationError("'elements' should be an array of objects")
-def check_each_element_for_error(instance):
+def check_each_element_for_error(instance, element_types=None):
+ element_types = element_types or ELEMENT_TYPES
if "elements" not in instance:
return
@@ -248,11 +249,17 @@ def check_only_one_of_each_element(instance):
raise SchemaValidationError(f"Multiple elements of type: {element['type']}")
-def validate_ui_element_schema(instance):
+def validate_ui_element_schema(instance, features=None):
+ features = features or {}
+ available_element_types = (
+ ["issue-link", "issue-media", "stacktrace-link"]
+ if not features.get("organizations:alert-rule-ui-component", False)
+ else ELEMENT_TYPES
+ )
try:
# schema validator will catch elements missing
check_elements_is_array(instance)
- check_each_element_for_error(instance)
+ check_each_element_for_error(instance, element_types=available_element_types)
check_only_one_of_each_element(instance)
except SchemaValidationError as e:
raise e
diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py
index d5db36c54be214..b31ec18b2eff36 100644
--- a/src/sentry/conf/server.py
+++ b/src/sentry/conf/server.py
@@ -898,6 +898,7 @@ def create_partitioned_queues(name):
# Enable advanced search features, like negation and wildcard matching.
"organizations:advanced-search": True,
# Enable obtaining and using API keys.
+ "organizations:alert-rule-ui-component": False,
"organizations:api-keys": False,
# Enable multiple Apple app-store-connect sources per project.
"organizations:app-store-connect-multiple": False,
diff --git a/src/sentry/features/__init__.py b/src/sentry/features/__init__.py
index 79d7deba6dc956..8000554df66007 100644
--- a/src/sentry/features/__init__.py
+++ b/src/sentry/features/__init__.py
@@ -54,6 +54,7 @@
default_manager.add("organizations:advanced-search", OrganizationFeature)
default_manager.add("organizations:alert-details-redesign", OrganizationFeature, True)
default_manager.add("organizations:alert-filters", OrganizationFeature)
+default_manager.add("organizations:alert-rule-ui-component", OrganizationFeature)
default_manager.add("organizations:api-keys", OrganizationFeature)
default_manager.add("organizations:app-store-connect-multiple", OrganizationFeature, False)
default_manager.add("organizations:boolean-search", OrganizationFeature)
diff --git a/tests/sentry/api/endpoints/test_sentry_apps.py b/tests/sentry/api/endpoints/test_sentry_apps.py
index 5801d73ae5bfc8..d8360f38ba2eea 100644
--- a/tests/sentry/api/endpoints/test_sentry_apps.py
+++ b/tests/sentry/api/endpoints/test_sentry_apps.py
@@ -474,7 +474,37 @@ def test_cannot_create_app_without_correct_permissions(self):
assert response.status_code == 400
assert response.data == {"events": ["issue webhooks require the event:read permission."]}
+ def test_create_alert_rule_action_without_feature_flag(self):
+ self.login_as(user=self.user)
+
+ response = self._post(**{"schema": {"elements": [self.create_alert_rule_action_schema()]}})
+
+ assert response.status_code == 400
+ assert response.data == {
+ "schema": [
+ "Element has type 'alert-rule-action'. Type must be one of the following: ['issue-link', 'issue-media', 'stacktrace-link']"
+ ]
+ }
+
+ @with_feature("organizations:alert-rule-ui-component")
+ def test_create_alert_rule_action_with_feature_flag(self):
+ self.login_as(user=self.user)
+
+ response = self._post(**{"schema": {"elements": [self.create_alert_rule_action_schema()]}})
+
+ expected = {
+ "name": "MyApp",
+ "scopes": ["project:read", "event:read"],
+ "events": ["issue"],
+ "webhookUrl": "https://example.com",
+ "schema": {"elements": [self.create_alert_rule_action_schema()]},
+ }
+
+ assert response.status_code == 201, response.content
+ assert expected.items() <= json.loads(response.content).items()
+
@patch("sentry.analytics.record")
+ @with_feature("organizations:alert-rule-ui-component")
def test_wrong_schema_format(self, record):
self.login_as(user=self.user)
kwargs = {
diff --git a/tests/sentry/api/validators/sentry_apps/test_schema.py b/tests/sentry/api/validators/sentry_apps/test_schema.py
index ea1590a3f75370..0f7d8f03d608db 100644
--- a/tests/sentry/api/validators/sentry_apps/test_schema.py
+++ b/tests/sentry/api/validators/sentry_apps/test_schema.py
@@ -76,7 +76,9 @@ def setUp(self):
}
def test_valid_schema_with_options(self):
- validate_ui_element_schema(self.schema)
+ validate_ui_element_schema(
+ self.schema, features={"organizations:alert-rule-ui-component": True}
+ )
@invalid_schema_with_error_message("'elements' is a required property")
def test_invalid_schema_elements_missing(self):
@@ -94,7 +96,7 @@ def test_invalid_schema_type_missing(self):
validate_ui_element_schema(schema)
@invalid_schema_with_error_message(
- "Element has type 'other'. Type must be one of the following: ['issue-link', 'alert-rule-action', 'issue-media', 'stacktrace-link']"
+ "Element has type 'other'. Type must be one of the following: ['issue-link', 'issue-media', 'stacktrace-link']"
)
def test_invalid_schema_type_invalid(self):
schema = {"elements": [{"type": "other"}]}
|
e7f1d9f3b3c33c567935404f5c58b2a63d8242d5
|
2021-11-02 23:22:08
|
Billy Vong
|
build(ci): Retry failed pulls from devservices (#29691)
| false
|
Retry failed pulls from devservices (#29691)
|
build
|
diff --git a/src/sentry/runner/commands/devservices.py b/src/sentry/runner/commands/devservices.py
index b220af1d2f87df..56dda52281b5b1 100644
--- a/src/sentry/runner/commands/devservices.py
+++ b/src/sentry/runner/commands/devservices.py
@@ -46,6 +46,26 @@ def get_or_create(client, thing, name):
return getattr(client, thing + "s").create(name)
+def retryable_pull(client, image, max_attempts=5):
+ from docker.errors import ImageNotFound
+
+ current_attempt = 0
+
+ # `client.images.pull` intermittently fails in CI, and the docker API/docker-py does not give us the relevant error message (i.e. it's not the same error as running `docker pull` from shell)
+ # As a workaround, let's retry when we hit the ImageNotFound exception.
+ #
+ # See https://github.com/docker/docker-py/issues/2101 for more information
+ while True:
+ try:
+ client.images.pull(image)
+ except ImageNotFound as e:
+ if current_attempt + 1 >= max_attempts:
+ raise e
+ current_attempt = current_attempt + 1
+ continue
+ break
+
+
def wait_for_healthcheck(low_level_client, container_name, healthcheck_options):
# healthcheck_options should be the dictionary for docker-py.
@@ -276,7 +296,7 @@ def _start_service(
if not fast:
if pull:
click.secho("> Pulling image '%s'" % options["image"], err=True, fg="green")
- client.images.pull(options["image"])
+ retryable_pull(client, options["image"])
else:
# We want make sure to pull everything on the first time,
# (the image doesn't exist), regardless of pull=True.
@@ -284,7 +304,7 @@ def _start_service(
client.images.get(options["image"])
except NotFound:
click.secho("> Pulling image '%s'" % options["image"], err=True, fg="green")
- client.images.pull(options["image"])
+ retryable_pull(client, options["image"])
for mount in list(options.get("volumes", {}).keys()):
if "/" not in mount:
|
fc50c90da102a47352683c996e993b9a44f93664
|
2023-10-21 01:55:31
|
NisanthanNanthakumar
|
feat(escalating-issues): Add custom order_by to RangeQuerySetWrapper (#58523)
| false
|
Add custom order_by to RangeQuerySetWrapper (#58523)
|
feat
|
diff --git a/src/sentry/tasks/auto_ongoing_issues.py b/src/sentry/tasks/auto_ongoing_issues.py
index c9c775a523069d..da97662aa6b0ae 100644
--- a/src/sentry/tasks/auto_ongoing_issues.py
+++ b/src/sentry/tasks/auto_ongoing_issues.py
@@ -134,18 +134,18 @@ def get_total_count(results):
)
with sentry_sdk.start_span(description="iterate_chunked_group_ids"):
- for new_group_ids in chunked(
+ for groups in chunked(
RangeQuerySetWrapper(
- base_queryset._clone().values_list("id", flat=True),
+ base_queryset._clone(),
step=ITERATOR_CHUNK,
limit=ITERATOR_CHUNK * CHILD_TASK_COUNT,
- result_value_getter=lambda item: item,
callbacks=[get_total_count],
+ order_by="first_seen",
),
ITERATOR_CHUNK,
):
run_auto_transition_issues_new_to_ongoing.delay(
- group_ids=new_group_ids,
+ group_ids=[group.id for group in groups],
)
metrics.incr(
|
4081f02fd5438dfbc43efb5c39bdfae08064a1ae
|
2024-11-25 15:22:34
|
Simon Hellmayr
|
feat(processing): add electron symbol server to default for electron projects (#81118)
| false
|
add electron symbol server to default for electron projects (#81118)
|
feat
|
diff --git a/src/sentry/api/endpoints/team_projects.py b/src/sentry/api/endpoints/team_projects.py
index c13586e89d3c22..697c447e00b047 100644
--- a/src/sentry/api/endpoints/team_projects.py
+++ b/src/sentry/api/endpoints/team_projects.py
@@ -13,6 +13,7 @@
from sentry.api.bases.team import TeamEndpoint, TeamPermission
from sentry.api.fields.sentry_slug import SentrySerializerSlugField
from sentry.api.helpers.default_inbound_filters import set_default_inbound_filters
+from sentry.api.helpers.default_symbol_sources import set_default_symbol_sources
from sentry.api.paginator import OffsetPaginator
from sentry.api.serializers import ProjectSummarySerializer, serialize
from sentry.api.serializers.models.project import OrganizationProjectResponse, ProjectSerializer
@@ -203,6 +204,8 @@ def post(self, request: Request, team: Team) -> Response:
if project.platform and project.platform.startswith("javascript"):
set_default_inbound_filters(project, team.organization)
+ set_default_symbol_sources(project)
+
self.create_audit_entry(
request=request,
organization=team.organization,
diff --git a/src/sentry/api/helpers/default_symbol_sources.py b/src/sentry/api/helpers/default_symbol_sources.py
new file mode 100644
index 00000000000000..4615d9fd6cf443
--- /dev/null
+++ b/src/sentry/api/helpers/default_symbol_sources.py
@@ -0,0 +1,14 @@
+from sentry.models.project import Project
+from sentry.projects.services.project import RpcProject
+
+DEFAULT_SYMBOL_SOURCES = {
+ "electron": ["ios", "microsoft", "electron"],
+ "javascript-electron": ["ios", "microsoft", "electron"],
+}
+
+
+def set_default_symbol_sources(project: Project | RpcProject):
+ if project.platform and project.platform in DEFAULT_SYMBOL_SOURCES:
+ project.update_option(
+ "sentry:builtin_symbol_sources", DEFAULT_SYMBOL_SOURCES[project.platform]
+ )
diff --git a/src/sentry/projects/services/project/impl.py b/src/sentry/projects/services/project/impl.py
index b5d73ae6e28153..e935baa96ed331 100644
--- a/src/sentry/projects/services/project/impl.py
+++ b/src/sentry/projects/services/project/impl.py
@@ -2,6 +2,7 @@
from django.db import router, transaction
+from sentry.api.helpers.default_symbol_sources import set_default_symbol_sources
from sentry.api.serializers import ProjectSerializer
from sentry.auth.services.auth import AuthenticationContext
from sentry.constants import ObjectStatus
@@ -126,6 +127,8 @@ def create_project_for_organization(
if team:
project.add_team(team)
+ set_default_symbol_sources(project)
+
project_created.send(
project=project,
default_rules=True,
diff --git a/tests/sentry/api/endpoints/test_team_projects.py b/tests/sentry/api/endpoints/test_team_projects.py
index a2348cfbe947a9..b3faf33b47481b 100644
--- a/tests/sentry/api/endpoints/test_team_projects.py
+++ b/tests/sentry/api/endpoints/test_team_projects.py
@@ -284,3 +284,44 @@ def test_similarity_project_option_invalid(self):
)
is None
)
+
+ def test_builtin_symbol_sources_electron(self):
+ """
+ Test that project option for builtin symbol sources contains ["electron"] when creating
+ an Electron project, but uses defaults for other platforms.
+ """
+ # Test Electron project
+ response = self.get_success_response(
+ self.organization.slug,
+ self.team.slug,
+ name="electron-app",
+ slug="electron-app",
+ platform="electron",
+ status_code=201,
+ )
+
+ electron_project = Project.objects.get(id=response.data["id"])
+ assert electron_project.platform == "electron"
+ symbol_sources = ProjectOption.objects.get_value(
+ project=electron_project, key="sentry:builtin_symbol_sources"
+ )
+ assert symbol_sources == ["ios", "microsoft", "electron"]
+
+ def test_builtin_symbol_sources_not_electron(self):
+ # Test non-Electron project (e.g. Python)
+ response = self.get_success_response(
+ self.organization.slug,
+ self.team.slug,
+ name="python-app",
+ slug="python-app",
+ platform="python",
+ status_code=201,
+ )
+
+ python_project = Project.objects.get(id=response.data["id"])
+ assert python_project.platform == "python"
+ # Should use default value, not ["electron"]
+ symbol_sources = ProjectOption.objects.get_value(
+ project=python_project, key="sentry:builtin_symbol_sources"
+ )
+ assert "electron" not in symbol_sources
|
048e560694f8982d4d1572c8202deaf97adbf201
|
2024-08-01 23:48:18
|
Jodi Jang
|
chore(similarity): Add option rerank seer records in backfill (#75370)
| false
|
Add option rerank seer records in backfill (#75370)
|
chore
|
diff --git a/src/sentry/options/defaults.py b/src/sentry/options/defaults.py
index 3833e0c6475847..6fd99edc60bbb8 100644
--- a/src/sentry/options/defaults.py
+++ b/src/sentry/options/defaults.py
@@ -2648,6 +2648,11 @@
default=1,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)
+register(
+ "similarity.backfill_use_reranking",
+ default=False,
+ flags=FLAG_AUTOMATOR_MODIFIABLE,
+)
register(
"delayed_processing.batch_size",
default=10000,
diff --git a/src/sentry/seer/similarity/grouping_records.py b/src/sentry/seer/similarity/grouping_records.py
index 2a38eb054fae2b..a5d7b0743ab583 100644
--- a/src/sentry/seer/similarity/grouping_records.py
+++ b/src/sentry/seer/similarity/grouping_records.py
@@ -31,6 +31,7 @@ class CreateGroupingRecordsRequest(TypedDict):
group_id_list: list[int]
data: list[CreateGroupingRecordData]
stacktrace_list: list[str]
+ use_reranking: bool | None
class BulkCreateGroupingRecordsResponse(TypedDict):
@@ -58,6 +59,7 @@ def post_bulk_grouping_records(
"stacktrace_length_sum": sum(
[len(stacktrace) for stacktrace in grouping_records_request["stacktrace_list"]]
),
+ "use_reranking": grouping_records_request.get("use_reranking"),
}
try:
diff --git a/src/sentry/tasks/embeddings_grouping/utils.py b/src/sentry/tasks/embeddings_grouping/utils.py
index b1822330a6629a..8348a7c145d14f 100644
--- a/src/sentry/tasks/embeddings_grouping/utils.py
+++ b/src/sentry/tasks/embeddings_grouping/utils.py
@@ -379,6 +379,7 @@ def send_group_and_stacktrace_to_seer(
group_id_list=groups_to_backfill_with_no_embedding_has_snuba_row_and_nodestore_row,
data=nodestore_results["data"],
stacktrace_list=nodestore_results["stacktrace_list"],
+ use_reranking=options.get("similarity.backfill_use_reranking"),
),
project_id,
)
@@ -397,6 +398,7 @@ def process_chunk(chunk_data, chunk_stacktrace):
group_id_list=chunk_data["group_ids"],
data=chunk_data["data"],
stacktrace_list=chunk_stacktrace,
+ use_reranking=options.get("similarity.backfill_use_reranking"),
),
project_id,
)
diff --git a/tests/sentry/seer/similarity/test_grouping_records.py b/tests/sentry/seer/similarity/test_grouping_records.py
index 06a24ab40b8771..b5f71c181bac1a 100644
--- a/tests/sentry/seer/similarity/test_grouping_records.py
+++ b/tests/sentry/seer/similarity/test_grouping_records.py
@@ -37,6 +37,7 @@
},
],
"stacktrace_list": ["stacktrace 1", "stacktrace 2"],
+ "use_reranking": False,
}
@@ -60,6 +61,7 @@ def test_post_bulk_grouping_records_success(mock_seer_request: MagicMock, mock_l
"group_ids": json.dumps(CREATE_GROUPING_RECORDS_REQUEST_PARAMS["group_id_list"]),
"project_id": 1,
"stacktrace_length_sum": 24,
+ "use_reranking": False,
},
)
@@ -83,6 +85,7 @@ def test_post_bulk_grouping_records_timeout(mock_seer_request: MagicMock, mock_l
"reason": "ReadTimeoutError",
"timeout": POST_BULK_GROUPING_RECORDS_TIMEOUT,
"stacktrace_length_sum": 24,
+ "use_reranking": False,
},
)
@@ -107,6 +110,7 @@ def test_post_bulk_grouping_records_failure(mock_seer_request: MagicMock, mock_l
"project_id": 1,
"reason": "INTERNAL SERVER ERROR",
"stacktrace_length_sum": 24,
+ "use_reranking": False,
},
)
@@ -125,6 +129,34 @@ def test_post_bulk_grouping_records_empty_data(mock_seer_request: MagicMock):
assert response == expected_return_value
[email protected]_db
[email protected]("sentry.seer.similarity.grouping_records.logger")
[email protected]("sentry.seer.similarity.grouping_records.seer_grouping_connection_pool.urlopen")
+def test_post_bulk_grouping_records_use_reranking(
+ mock_seer_request: MagicMock, mock_logger: MagicMock
+):
+ expected_return_value = {
+ "success": True,
+ "groups_with_neighbor": {"1": "00000000000000000000000000000000"},
+ }
+ mock_seer_request.return_value = HTTPResponse(
+ json.dumps(expected_return_value).encode("utf-8"), status=200
+ )
+
+ CREATE_GROUPING_RECORDS_REQUEST_PARAMS.update({"use_reranking": True})
+ response = post_bulk_grouping_records(CREATE_GROUPING_RECORDS_REQUEST_PARAMS)
+ assert response == expected_return_value
+ mock_logger.info.assert_called_with(
+ "seer.post_bulk_grouping_records.success",
+ extra={
+ "group_ids": json.dumps(CREATE_GROUPING_RECORDS_REQUEST_PARAMS["group_id_list"]),
+ "project_id": 1,
+ "stacktrace_length_sum": 24,
+ "use_reranking": True,
+ },
+ )
+
+
@mock.patch("sentry.seer.similarity.grouping_records.logger")
@mock.patch("sentry.seer.similarity.grouping_records.seer_grouping_connection_pool.urlopen")
def test_delete_grouping_records_by_hash_success(
|
87c527dbc8d3966464dbce35a2d09ad382492c73
|
2020-05-02 22:44:15
|
Priscila Oliveira
|
ref(ui): Updated breadcrumbs filter/search - Part 1 (#18482)
| false
|
Updated breadcrumbs filter/search - Part 1 (#18482)
|
ref
|
diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py
index b32d47dd4c08c3..b0f07e70171455 100644
--- a/src/sentry/conf/server.py
+++ b/src/sentry/conf/server.py
@@ -863,6 +863,8 @@ def create_partitioned_queues(name):
"organizations:org-subdomains": False,
# Enable access to more advanced (alpha) datascrubbing settings.
"organizations:datascrubbers-v2": False,
+ # Enable the new version of interface/breadcrumbs
+ "organizations:breadcrumbs-v2": False,
# Enable usage of external relays, for use with Relay. See
# https://github.com/getsentry/relay.
"organizations:relay": False,
diff --git a/src/sentry/features/__init__.py b/src/sentry/features/__init__.py
index 063eebe76c373e..3b2aa0064e3fa5 100644
--- a/src/sentry/features/__init__.py
+++ b/src/sentry/features/__init__.py
@@ -94,6 +94,7 @@
default_manager.add("organizations:tweak-grouping-config", OrganizationFeature) # NOQA
default_manager.add("organizations:set-grouping-config", OrganizationFeature) # NOQA
default_manager.add("organizations:org-subdomains", OrganizationFeature) # NOQA
+default_manager.add("organizations:breadcrumbs-v2", OrganizationFeature) # NOQA
# Project scoped features
default_manager.add("projects:custom-inbound-filters", ProjectFeature) # NOQA
diff --git a/src/sentry/static/sentry/app/components/dropdownControl.jsx b/src/sentry/static/sentry/app/components/dropdownControl.jsx
index c3527bc58b6c15..3761f4140ccf08 100644
--- a/src/sentry/static/sentry/app/components/dropdownControl.jsx
+++ b/src/sentry/static/sentry/app/components/dropdownControl.jsx
@@ -69,7 +69,7 @@ class DropdownControl extends React.Component {
{({isOpen, getMenuProps, getActorProps}) => (
<React.Fragment>
{this.renderButton(isOpen, getActorProps)}
- <MenuContainer
+ <Content
{...getMenuProps()}
alignMenu={alignRight ? 'right' : 'left'}
width={menuWidth}
@@ -79,7 +79,7 @@ class DropdownControl extends React.Component {
blendWithActor={blendWithActor}
>
{children}
- </MenuContainer>
+ </Content>
</React.Fragment>
)}
</DropdownMenu>
@@ -98,11 +98,10 @@ const StyledDropdownButton = styled(DropdownButton)`
white-space: nowrap;
`;
-const MenuContainer = styled(DropdownBubble.withComponent('ul'))`
- list-style: none;
- padding: 0;
- margin: 0;
+const Content = styled(DropdownBubble.withComponent('div'))`
display: ${p => (p.isOpen ? 'block' : 'none')};
+ border-top: 0;
+ top: 100%;
`;
const DropdownItem = styled(MenuItem)`
diff --git a/src/sentry/static/sentry/app/components/events/eventDataSection.tsx b/src/sentry/static/sentry/app/components/events/eventDataSection.tsx
index ff85e30debb60c..c6beeb67af9d54 100644
--- a/src/sentry/static/sentry/app/components/events/eventDataSection.tsx
+++ b/src/sentry/static/sentry/app/components/events/eventDataSection.tsx
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import styled from '@emotion/styled';
+import {css} from '@emotion/core';
import {t} from 'app/locale';
import {callIfFunction} from 'app/utils/callIfFunction';
@@ -12,6 +13,7 @@ import space from 'app/styles/space';
const defaultProps = {
wrapTitle: true,
raw: false,
+ isCentered: false,
};
type DefaultProps = Readonly<typeof defaultProps>;
@@ -66,6 +68,7 @@ class EventDataSection extends React.Component<Props> {
raw,
wrapTitle,
actions,
+ isCentered,
} = this.props;
const titleNode = wrapTitle ? <h3>{title}</h3> : title;
@@ -73,7 +76,7 @@ class EventDataSection extends React.Component<Props> {
return (
<DataSection className={className || ''}>
{title && (
- <SectionHeader id={type}>
+ <SectionHeader id={type} isCentered={isCentered}>
<Permalink href={'#' + type} className="permalink">
<em className="icon-anchor" />
</Permalink>
@@ -116,7 +119,7 @@ const Permalink = styled('a')`
padding: ${space(0.25)} 5px;
`;
-export const SectionHeader = styled('div')`
+const SectionHeader = styled('div')<{isCentered?: boolean}>`
display: flex;
justify-content: space-between;
position: relative;
@@ -156,12 +159,22 @@ export const SectionHeader = styled('div')`
&:hover ${Permalink} {
display: block;
}
+
@media (min-width: ${props => props.theme.breakpoints[2]}) {
& > small {
margin-left: ${space(1)};
display: inline-block;
}
}
+
+ ${p =>
+ p.isCentered &&
+ css`
+ align-items: center;
+ @media (max-width: ${p.theme.breakpoints[0]}) {
+ display: block;
+ }
+ `}
`;
const SectionContents = styled('div')`
diff --git a/src/sentry/static/sentry/app/components/events/eventEntries.jsx b/src/sentry/static/sentry/app/components/events/eventEntries.jsx
index 9806db56b7e469..93778071ea0028 100644
--- a/src/sentry/static/sentry/app/components/events/eventEntries.jsx
+++ b/src/sentry/static/sentry/app/components/events/eventEntries.jsx
@@ -6,7 +6,6 @@ import {analytics} from 'app/utils/analytics';
import {logException} from 'app/utils/logging';
import {objectIsEmpty} from 'app/utils';
import {t} from 'app/locale';
-import BreadcrumbsInterface from 'app/components/events/interfaces/breadcrumbs/breadcrumbs';
import CspInterface from 'app/components/events/interfaces/csp';
import DebugMetaInterface from 'app/components/events/interfaces/debugmeta';
import EventAttachments from 'app/components/events/eventAttachments';
@@ -39,6 +38,8 @@ import space from 'app/styles/space';
import withApi from 'app/utils/withApi';
import withOrganization from 'app/utils/withOrganization';
+import BreadcrumbsInterface from './eventEntriesBreadcrumbs';
+
export const INTERFACES = {
exception: ExceptionInterface,
message: MessageInterface,
diff --git a/src/sentry/static/sentry/app/components/events/eventEntriesBreadcrumbs.tsx b/src/sentry/static/sentry/app/components/events/eventEntriesBreadcrumbs.tsx
new file mode 100644
index 00000000000000..c2fdc20b1e72de
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/eventEntriesBreadcrumbs.tsx
@@ -0,0 +1,21 @@
+import React from 'react';
+
+import Feature from 'app/components/acl/feature';
+import BreadcrumbsInterface from 'app/components/events/interfaces/breadcrumbs/breadcrumbs';
+import BreadcrumbsInterfaceV2 from 'app/components/events/interfaces/breadcrumbsV2/breadcrumbs';
+
+type Props = React.ComponentProps<typeof BreadcrumbsInterfaceV2>;
+
+const EventEntriesBreadcrumbs = (props: Props) => (
+ <Feature features={['breadcrumbs-v2']}>
+ {({hasFeature}) =>
+ hasFeature ? (
+ <BreadcrumbsInterfaceV2 {...props} />
+ ) : (
+ <BreadcrumbsInterface {...props} />
+ )
+ }
+ </Feature>
+);
+
+export default EventEntriesBreadcrumbs;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbs.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbs.tsx
index c624778004428d..e91a7115a711cf 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbs.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbs.tsx
@@ -14,7 +14,7 @@ import BreadcrumbTime from './breadcrumbTime';
import BreadcrumbCollapsed from './breadcrumbCollapsed';
import convertBreadcrumbType from './convertBreadcrumbType';
import getBreadcrumbDetails from './getBreadcrumbDetails';
-import {Breadcrumb} from './types';
+import {Breadcrumb, BreadcrumbType, BreadcrumbLevel} from './types';
import {BreadCrumb, BreadCrumbIconWrapper} from './styles';
const MAX_CRUMBS_WHEN_COLLAPSED = 10;
@@ -85,8 +85,8 @@ class BreadcrumbsContainer extends React.Component<Props, State> {
if (exception) {
const {type, value, module: mdl} = exception.data.values[0];
return {
- type: 'error',
- level: 'error',
+ type: BreadcrumbType.ERROR,
+ level: BreadcrumbLevel.ERROR,
category: this.moduleToCategory(mdl) || 'exception',
data: {
type,
@@ -99,8 +99,8 @@ class BreadcrumbsContainer extends React.Component<Props, State> {
const levelTag = (event.tags || []).find(tag => tag.key === 'level');
return {
- type: 'message',
- level: levelTag?.value as Breadcrumb['level'],
+ type: BreadcrumbType.MESSAGE,
+ level: levelTag?.value as BreadcrumbLevel,
category: 'message',
message: event.message,
timestamp: event.dateCreated,
@@ -206,8 +206,8 @@ class BreadcrumbsContainer extends React.Component<Props, State> {
data-test-id="breadcrumb"
key={idx}
hasError={
- convertedBreadcrumb.type === 'message' ||
- convertedBreadcrumb.type === 'error'
+ convertedBreadcrumb.type === BreadcrumbType.MESSAGE ||
+ convertedBreadcrumb.type === BreadcrumbType.ERROR
}
>
<BreadCrumbIconWrapper color={color} borderColor={borderColor}>
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbsSearch.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbsSearch.tsx
index 6605a851ecb7dd..6d39f2acf68d82 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbsSearch.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbsSearch.tsx
@@ -42,9 +42,9 @@ const Wrapper = styled('div')`
const StyledTextField = styled(TextField)<TextField['props']>`
margin-bottom: 0;
input {
+ height: 28px;
padding-left: ${space(4)};
padding-right: ${space(4)};
- height: 28px;
}
`;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/convertBreadcrumbType.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/convertBreadcrumbType.tsx
index 231b2a6088d48a..dfd6f16bc403bc 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/convertBreadcrumbType.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/convertBreadcrumbType.tsx
@@ -1,18 +1,18 @@
-import {Breadcrumb} from './types';
+import {Breadcrumb, BreadcrumbType} from './types';
function convertBreadcrumbType(breadcrumb: Breadcrumb): Breadcrumb {
if (breadcrumb.level) {
if (breadcrumb.level === 'warning') {
return {
...breadcrumb,
- type: 'warning',
+ type: BreadcrumbType.WARNING,
};
}
if (breadcrumb.level === 'error') {
return {
...breadcrumb,
- type: 'error',
+ type: BreadcrumbType.ERROR,
};
}
}
@@ -23,14 +23,14 @@ function convertBreadcrumbType(breadcrumb: Breadcrumb): Breadcrumb {
if (category === 'ui') {
return {
...breadcrumb,
- type: 'ui',
+ type: BreadcrumbType.UI,
};
}
if (category === 'console' || category === 'navigation') {
return {
...breadcrumb,
- type: 'debug',
+ type: BreadcrumbType.DEBUG,
};
}
@@ -40,7 +40,7 @@ function convertBreadcrumbType(breadcrumb: Breadcrumb): Breadcrumb {
) {
return {
...breadcrumb,
- type: 'error',
+ type: BreadcrumbType.ERROR,
};
}
}
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/getBreadcrumbDetails.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/getBreadcrumbDetails.tsx
index 6378edcf105880..2bae602a79785e 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/getBreadcrumbDetails.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/getBreadcrumbDetails.tsx
@@ -4,13 +4,9 @@ import {Color} from 'app/utils/theme';
import HttpRenderer from 'app/components/events/interfaces/breadcrumbs/httpRenderer';
import ErrorRenderer from 'app/components/events/interfaces/breadcrumbs/errorRenderer';
import DefaultRenderer from 'app/components/events/interfaces/breadcrumbs/defaultRenderer';
-import {IconInfo} from 'app/icons/iconInfo';
-import {IconWarning} from 'app/icons/iconWarning';
-import {IconLocation} from 'app/icons/iconLocation';
-import {IconUser} from 'app/icons/iconUser';
-import {IconRefresh} from 'app/icons/iconRefresh';
+import {IconInfo, IconWarning, IconLocation, IconUser, IconRefresh} from 'app/icons';
-import {Breadcrumb} from './types';
+import {Breadcrumb, BreadcrumbType} from './types';
type Output = {
color: Color;
@@ -21,29 +17,29 @@ type Output = {
function getBreadcrumbDetails(breadcrumb: Breadcrumb): Partial<Output> {
switch (breadcrumb.type) {
- case 'user':
- case 'ui': {
+ case BreadcrumbType.USER:
+ case BreadcrumbType.UI: {
return {
color: 'purple',
icon: <IconUser />,
renderer: <DefaultRenderer breadcrumb={breadcrumb} />,
};
}
- case 'navigation': {
+ case BreadcrumbType.NAVIGATION: {
return {
color: 'blue',
icon: <IconLocation />,
renderer: <DefaultRenderer breadcrumb={breadcrumb} />,
};
}
- case 'info': {
+ case BreadcrumbType.INFO: {
return {
color: 'blue',
icon: <IconInfo />,
renderer: <DefaultRenderer breadcrumb={breadcrumb} />,
};
}
- case 'warning': {
+ case BreadcrumbType.WARNING: {
return {
color: 'yellowOrange',
borderColor: 'yellowOrangeDark',
@@ -51,16 +47,16 @@ function getBreadcrumbDetails(breadcrumb: Breadcrumb): Partial<Output> {
renderer: <ErrorRenderer breadcrumb={breadcrumb} />,
};
}
- case 'exception':
- case 'message':
- case 'error': {
+ case BreadcrumbType.EXCEPTION:
+ case BreadcrumbType.MESSAGE:
+ case BreadcrumbType.ERROR: {
return {
color: 'red',
icon: <IconWarning />,
renderer: <ErrorRenderer breadcrumb={breadcrumb} />,
};
}
- case 'http': {
+ case BreadcrumbType.HTTP: {
return {
color: 'green',
icon: <IconRefresh />,
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/types.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/types.tsx
index 349d33fbd21998..da7d322d86bc26 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/types.tsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/types.tsx
@@ -1,24 +1,39 @@
-type BreadcrumbCategory =
- | 'started'
- | 'UIViewController'
- | 'touch'
- | 'message'
- | 'ui.click'
- | 'xhr'
- | 'console';
+import {Color} from 'app/utils/theme';
+import {IconProps} from 'app/types/iconProps';
-type BreadcrumbLevel = 'fatal' | 'error' | 'warning' | 'info' | 'debug';
+export enum BreadcrumbLevel {
+ FATAL = 'fatal',
+ ERROR = 'error',
+ WARNING = 'warning',
+ INFO = 'info',
+ DEBUG = 'debug',
+}
+
+export enum BreadcrumbType {
+ INFO = 'info',
+ DEBUG = 'debug',
+ MESSAGE = 'message',
+ QUERY = 'query',
+ UI = 'ui',
+ USER = 'user',
+ EXCEPTION = 'exception',
+ WARNING = 'warning',
+ ERROR = 'error',
+ DEFAULT = 'default',
+ HTTP = 'http',
+ NAVIGATION = 'navigation',
+}
type BreadcrumbTypeBase = {
timestamp?: string; //it's recommended
- category?: BreadcrumbCategory;
+ category?: string;
message?: string;
level?: BreadcrumbLevel;
event_id?: string;
};
export type BreadcrumbTypeNavigation = {
- type: 'navigation';
+ type: BreadcrumbType.NAVIGATION;
data?: {
to: string;
from: string;
@@ -26,7 +41,7 @@ export type BreadcrumbTypeNavigation = {
} & BreadcrumbTypeBase;
export type BreadcrumbTypeHTTP = {
- type: 'http';
+ type: BreadcrumbType.HTTP;
data?: {
url?: string;
method?:
@@ -46,16 +61,16 @@ export type BreadcrumbTypeHTTP = {
export type BreadcrumbTypeDefault = {
type:
- | 'error'
- | 'info'
- | 'debug'
- | 'message'
- | 'default'
- | 'query'
- | 'ui'
- | 'user'
- | 'exception'
- | 'warning';
+ | BreadcrumbType.INFO
+ | BreadcrumbType.DEBUG
+ | BreadcrumbType.MESSAGE
+ | BreadcrumbType.QUERY
+ | BreadcrumbType.UI
+ | BreadcrumbType.USER
+ | BreadcrumbType.EXCEPTION
+ | BreadcrumbType.WARNING
+ | BreadcrumbType.ERROR
+ | BreadcrumbType.DEFAULT;
data?: {[key: string]: any};
} & BreadcrumbTypeBase;
@@ -64,4 +79,9 @@ export type Breadcrumb =
| BreadcrumbTypeHTTP
| BreadcrumbTypeDefault;
-export type BreadcrumbType = Breadcrumb['type'];
+export type BreadcrumbDetails = {
+ color?: Color;
+ borderColor?: Color;
+ icon?: React.ComponentType<IconProps>;
+ description: string;
+};
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilter.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilter.tsx
new file mode 100644
index 00000000000000..fb2fd5257b1ccc
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilter.tsx
@@ -0,0 +1,175 @@
+import React from 'react';
+import styled from '@emotion/styled';
+import isEqual from 'lodash/isEqual';
+import {css} from '@emotion/core';
+
+import {t, tn} from 'app/locale';
+import DropdownControl from 'app/components/dropdownControl';
+import DropdownButton from 'app/components/dropdownButton';
+
+import BreadcrumbFilterGroup from './breadcrumbFilterGroup';
+import BreadcrumbFilterHeader from './breadcrumbFilterHeader';
+import BreadcrumbFilterFooter from './breadcrumbFilterFooter';
+import {FilterGroup, FilterGroupType, FilterType} from './types';
+
+type Props = {
+ onFilter: (filterGroups: Array<FilterGroup>) => () => void;
+ filterGroups: Array<FilterGroup>;
+};
+
+type State = {
+ filterGroups: Array<FilterGroup>;
+ checkedOptionsQuantity: number;
+};
+
+class BreadcrumbFilter extends React.Component<Props, State> {
+ state: State = {
+ filterGroups: [],
+ checkedOptionsQuantity: 0,
+ };
+
+ componentDidUpdate(prevProps: Props) {
+ if (!isEqual(this.props.filterGroups, prevProps.filterGroups)) {
+ this.loadState();
+ }
+ }
+
+ setCheckedOptionsQuantity = () => {
+ this.setState(prevState => ({
+ checkedOptionsQuantity: prevState.filterGroups.filter(
+ filterGroup => filterGroup.isChecked
+ ).length,
+ }));
+ };
+
+ loadState() {
+ const {filterGroups} = this.props;
+ this.setState(
+ {
+ filterGroups,
+ },
+ this.setCheckedOptionsQuantity
+ );
+ }
+
+ handleClickItem = (type: FilterType, groupType: FilterGroupType) => {
+ this.setState(
+ prevState => ({
+ filterGroups: prevState.filterGroups.map(filterGroup => {
+ if (filterGroup.groupType === groupType && filterGroup.type === type) {
+ return {
+ ...filterGroup,
+ isChecked: !filterGroup.isChecked,
+ };
+ }
+ return filterGroup;
+ }),
+ }),
+ this.setCheckedOptionsQuantity
+ );
+ };
+
+ handleSelectAll = (selectAll: boolean) => {
+ this.setState(
+ prevState => ({
+ filterGroups: prevState.filterGroups.map(data => ({
+ ...data,
+ isChecked: selectAll,
+ })),
+ }),
+ this.setCheckedOptionsQuantity
+ );
+ };
+
+ getDropDownButton = ({isOpen, getActorProps}) => {
+ const {checkedOptionsQuantity} = this.state;
+
+ let buttonLabel = t('Filter By');
+ let buttonPriority = 'default';
+
+ if (checkedOptionsQuantity > 0) {
+ buttonLabel = tn('%s Active Filter', '%s Active Filters', checkedOptionsQuantity);
+ buttonPriority = 'primary';
+ }
+
+ return (
+ <StyledDropdownButton
+ {...getActorProps()}
+ isOpen={isOpen}
+ size="small"
+ priority={buttonPriority}
+ >
+ {buttonLabel}
+ </StyledDropdownButton>
+ );
+ };
+
+ render() {
+ const {onFilter} = this.props;
+ const {filterGroups, checkedOptionsQuantity} = this.state;
+
+ const hasFilterGroupsGroupTypeLevel = filterGroups.find(
+ filterGroup => filterGroup.groupType === FilterGroupType.LEVEL
+ );
+
+ return (
+ <Wrapper>
+ <DropdownControl menuWidth="20vh" blendWithActor button={this.getDropDownButton}>
+ <React.Fragment>
+ <BreadcrumbFilterHeader
+ onSelectAll={this.handleSelectAll}
+ selectedQuantity={checkedOptionsQuantity}
+ isAllSelected={filterGroups.length === checkedOptionsQuantity}
+ />
+ <BreadcrumbFilterGroup
+ groupHeaderTitle={t('Type')}
+ onClick={this.handleClickItem}
+ data={filterGroups.filter(
+ filterGroup => filterGroup.groupType === FilterGroupType.TYPE
+ )}
+ />
+ {hasFilterGroupsGroupTypeLevel && (
+ <BreadcrumbFilterGroup
+ groupHeaderTitle={t('Level')}
+ onClick={this.handleClickItem}
+ data={filterGroups.filter(
+ filterGroup => filterGroup.groupType === FilterGroupType.LEVEL
+ )}
+ />
+ )}
+ {!isEqual(this.props.filterGroups, filterGroups) && (
+ <BreadcrumbFilterFooter onSubmit={onFilter(filterGroups)} />
+ )}
+ </React.Fragment>
+ </DropdownControl>
+ </Wrapper>
+ );
+ }
+}
+
+export default BreadcrumbFilter;
+
+const StyledDropdownButton = styled(DropdownButton)`
+ border-right: 0;
+ z-index: ${p => p.theme.zIndex.dropdownAutocomplete.actor};
+ border-radius: ${p =>
+ p.isOpen
+ ? `${p.theme.borderRadius} 0 0 0`
+ : `${p.theme.borderRadius} 0 0 ${p.theme.borderRadius}`};
+ white-space: nowrap;
+ max-width: 200px;
+ &:hover,
+ &:active {
+ border-right: 0;
+ }
+ ${p =>
+ !p.isOpen &&
+ css`
+ border-bottom-color: ${p.theme.button.primary.border};
+ `}
+`;
+
+const Wrapper = styled('div')`
+ position: relative;
+ display: flex;
+`;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterFooter.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterFooter.tsx
new file mode 100644
index 00000000000000..09b42d24292b99
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterFooter.tsx
@@ -0,0 +1,33 @@
+import React from 'react';
+import styled from '@emotion/styled';
+
+import Button from 'app/components/button';
+import {growIn} from 'app/styles/animations';
+import space from 'app/styles/space';
+import {t} from 'app/locale';
+
+type Props = {
+ onSubmit: () => void;
+};
+
+const BreadcrumbFilterFooter = ({onSubmit}: Props) => (
+ <Wrapper>
+ <ApplyFilterButton onClick={onSubmit} size="xsmall" priority="primary">
+ {t('Apply Filter')}
+ </ApplyFilterButton>
+ </Wrapper>
+);
+
+const Wrapper = styled('div')`
+ display: flex;
+ justify-content: flex-end;
+ background-color: ${p => p.theme.offWhite};
+ padding: ${space(1)};
+`;
+
+const ApplyFilterButton = styled(Button)`
+ animation: 0.1s ${growIn} ease-in;
+ margin: ${space(0.5)} 0;
+`;
+
+export default BreadcrumbFilterFooter;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroup.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroup.tsx
new file mode 100644
index 00000000000000..abdc57a3f24497
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroup.tsx
@@ -0,0 +1,97 @@
+import React from 'react';
+import styled from '@emotion/styled';
+
+import space from 'app/styles/space';
+import CheckboxFancy from 'app/components/checkboxFancy/checkboxFancy';
+
+import {FilterType, FilterGroupType, FilterGroup} from './types';
+import BreadcrumbFilterGroupIcon from './breadcrumbFilterGroupIcon';
+
+type Props = {
+ groupHeaderTitle: string;
+ data: Array<FilterGroup>;
+ onClick: (type: FilterType, groupType: FilterGroupType) => void;
+};
+
+const BreadcrumbFilterGroup = ({groupHeaderTitle, data, onClick}: Props) => {
+ const handleClick = (type: FilterType, groupType: FilterGroupType) => (
+ event: React.MouseEvent<HTMLLIElement>
+ ) => {
+ event.stopPropagation();
+ onClick(type, groupType);
+ };
+
+ return (
+ <div>
+ <FilterGroupHeader>{groupHeaderTitle}</FilterGroupHeader>
+ <FilterGroupList>
+ {data.map(
+ ({type, groupType, description, isChecked, icon, color, borderColor}) => (
+ <FilterGroupListItem
+ key={type}
+ isChecked={isChecked}
+ onClick={handleClick(type, groupType)}
+ >
+ <BreadcrumbFilterGroupIcon
+ icon={icon}
+ color={color}
+ borderColor={borderColor}
+ />
+ <ListItemDescription>{description}</ListItemDescription>
+ <CheckboxFancy isChecked={isChecked} />
+ </FilterGroupListItem>
+ )
+ )}
+ </FilterGroupList>
+ </div>
+ );
+};
+
+export default BreadcrumbFilterGroup;
+
+const FilterGroupHeader = styled('div')`
+ display: flex;
+ align-items: center;
+ margin: 0;
+ background-color: ${p => p.theme.offWhite};
+ color: ${p => p.theme.gray2};
+ font-weight: normal;
+ font-size: ${p => p.theme.fontSizeMedium};
+ padding: ${space(1)} ${space(2)};
+ border-bottom: 1px solid ${p => p.theme.borderDark};
+`;
+
+const FilterGroupList = styled('ul')`
+ list-style: none;
+ margin: 0;
+ padding: 0;
+`;
+
+const FilterGroupListItem = styled('li')<{isChecked?: boolean}>`
+ display: grid;
+ grid-template-columns: max-content 1fr max-content;
+ grid-column-gap: ${space(1)};
+ align-items: center;
+ padding: ${space(1)} ${space(2)};
+ border-bottom: 1px solid ${p => p.theme.borderDark};
+ cursor: pointer;
+ :hover {
+ background-color: ${p => p.theme.offWhite};
+ }
+ ${CheckboxFancy} {
+ opacity: ${p => (p.isChecked ? 1 : 0.3)};
+ }
+
+ &:hover ${CheckboxFancy} {
+ opacity: 1;
+ }
+
+ &:hover span {
+ color: ${p => p.theme.blue};
+ text-decoration: underline;
+ }
+`;
+
+const ListItemDescription = styled('div')`
+ font-size: ${p => p.theme.fontSizeMedium};
+`;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroupIcon.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroupIcon.tsx
new file mode 100644
index 00000000000000..69c03d05a1aa91
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterGroupIcon.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+
+import {IconProps} from 'app/types/iconProps';
+
+import {BreadCrumbIconWrapper} from '../styles';
+import {BreadcrumbDetails} from './types';
+
+const BreadcrumbFilterGroupIcon = ({
+ icon,
+ color,
+ borderColor,
+}: Omit<BreadcrumbDetails, 'description'>) => {
+ if (!icon) return null;
+
+ const Icon = icon as React.ComponentType<IconProps>;
+
+ return (
+ <BreadCrumbIconWrapper color={color} borderColor={borderColor} size={20}>
+ <Icon size="xs" />
+ </BreadCrumbIconWrapper>
+ );
+};
+
+export default BreadcrumbFilterGroupIcon;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterHeader.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterHeader.tsx
new file mode 100644
index 00000000000000..11716988e07172
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/breadcrumbFilterHeader.tsx
@@ -0,0 +1,72 @@
+import React from 'react';
+import styled from '@emotion/styled';
+
+import space from 'app/styles/space';
+import {t, tct} from 'app/locale';
+import CheckboxFancy from 'app/components/checkboxFancy/checkboxFancy';
+
+type Props = {
+ selectedQuantity: number;
+ isAllSelected: boolean;
+ onSelectAll: (selectAll: boolean) => void;
+};
+
+const BreadcrumbFilterHeader = ({
+ selectedQuantity,
+ isAllSelected,
+ onSelectAll,
+}: Props) => {
+ const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {
+ event.stopPropagation();
+
+ if (isAllSelected) {
+ onSelectAll(false);
+ return;
+ }
+
+ onSelectAll(true);
+ };
+
+ const getCheckboxLabel = () => {
+ if (isAllSelected) {
+ return t('Unselect All');
+ }
+
+ if (selectedQuantity === 0) {
+ return t('Select All');
+ }
+
+ return tct('[selectedQuantity] selected', {selectedQuantity});
+ };
+
+ return (
+ <Wrapper>
+ <CheckboxWrapper onClick={handleClick}>
+ <span>{getCheckboxLabel()}</span>
+ <CheckboxFancy
+ isChecked={isAllSelected}
+ isIndeterminate={!isAllSelected && selectedQuantity > 0}
+ />
+ </CheckboxWrapper>
+ </Wrapper>
+ );
+};
+
+const Wrapper = styled('div')`
+ display: flex;
+ background-color: ${p => p.theme.offWhite};
+ padding: ${space(1)} ${space(2)};
+ border-bottom: 1px solid ${p => p.theme.borderDark};
+ justify-content: flex-end;
+`;
+
+const CheckboxWrapper = styled('div')`
+ text-align: right;
+ align-items: center;
+ display: grid;
+ grid-gap: ${space(1)};
+ grid-template-columns: minmax(100px, auto) 16px;
+ font-size: ${p => p.theme.fontSizeMedium};
+`;
+
+export default BreadcrumbFilterHeader;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/types.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/types.tsx
new file mode 100644
index 00000000000000..b540da753805c3
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbFilter/types.tsx
@@ -0,0 +1,30 @@
+import {
+ BreadcrumbDetails,
+ BreadcrumbType,
+ BreadcrumbLevel,
+} from '../../breadcrumbs/types';
+
+export enum FilterGroupType {
+ LEVEL = 'level',
+ TYPE = 'type',
+}
+
+type FilterGroupBase = {
+ isChecked: boolean;
+} & BreadcrumbDetails;
+
+type FilterGroupTypeType = {
+ groupType: FilterGroupType.TYPE;
+ type: BreadcrumbType;
+} & FilterGroupBase;
+
+type FilterGroupTypeLevel = {
+ groupType: FilterGroupType.LEVEL;
+ type: BreadcrumbLevel;
+} & FilterGroupBase;
+
+export type FilterGroup = FilterGroupTypeType | FilterGroupTypeLevel;
+
+export type FilterType = BreadcrumbLevel | BreadcrumbType;
+
+export {BreadcrumbDetails};
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbRenderer.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbRenderer.tsx
new file mode 100644
index 00000000000000..89a380f70e9525
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbRenderer.tsx
@@ -0,0 +1,29 @@
+import React from 'react';
+
+import HttpRenderer from '../breadcrumbs/httpRenderer';
+import DefaultRenderer from '../breadcrumbs/defaultRenderer';
+import ErrorRenderer from '../breadcrumbs/errorRenderer';
+import {Breadcrumb, BreadcrumbType} from '../breadcrumbs/types';
+
+type Props = {
+ breadcrumb: Breadcrumb;
+};
+
+const BreadcrumbRenderer = ({breadcrumb}: Props) => {
+ if (breadcrumb.type === BreadcrumbType.HTTP) {
+ return <HttpRenderer breadcrumb={breadcrumb} />;
+ }
+
+ if (
+ breadcrumb.type === BreadcrumbType.WARNING ||
+ breadcrumb.type === BreadcrumbType.MESSAGE ||
+ breadcrumb.type === BreadcrumbType.EXCEPTION ||
+ breadcrumb.type === BreadcrumbType.ERROR
+ ) {
+ return <ErrorRenderer breadcrumb={breadcrumb} />;
+ }
+
+ return <DefaultRenderer breadcrumb={breadcrumb} />;
+};
+
+export default BreadcrumbRenderer;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbs.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbs.tsx
new file mode 100644
index 00000000000000..c8d6c50209ff36
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/breadcrumbs.tsx
@@ -0,0 +1,368 @@
+import React from 'react';
+import styled from '@emotion/styled';
+
+import EventDataSection from 'app/components/events/eventDataSection';
+import GuideAnchor from 'app/components/assistant/guideAnchor';
+import EmptyStateWarning from 'app/components/emptyStateWarning';
+import {t} from 'app/locale';
+import {Event} from 'app/types';
+import space from 'app/styles/space';
+import SearchBar from 'app/components/searchBar';
+import {IconProps} from 'app/types/iconProps';
+
+import {PlatformContextProvider} from '../breadcrumbs/platformContext';
+import BreadcrumbTime from '../breadcrumbs/breadcrumbTime';
+import BreadcrumbCollapsed from '../breadcrumbs/breadcrumbCollapsed';
+import {
+ Breadcrumb,
+ BreadcrumbDetails,
+ BreadcrumbType,
+ BreadcrumbLevel,
+} from '../breadcrumbs/types';
+import BreadcrumbFilter from './breadcrumbFilter/breadcrumbFilter';
+import convertBreadcrumbType from './convertBreadcrumbType';
+import getBreadcrumbDetails from './getBreadcrumbDetails';
+import BreadcrumbRenderer from './breadcrumbRenderer';
+import {BreadCrumb, BreadCrumbIconWrapper} from './styles';
+import {FilterGroupType} from './breadcrumbFilter/types';
+
+const MAX_CRUMBS_WHEN_COLLAPSED = 10;
+
+type BreadcrumbWithDetails = Breadcrumb & BreadcrumbDetails & {id: number};
+type BreadcrumbFilterGroups = React.ComponentProps<
+ typeof BreadcrumbFilter
+>['filterGroups'];
+
+type State = {
+ isCollapsed: boolean;
+ searchTerm: string;
+ breadcrumbs: Array<BreadcrumbWithDetails>;
+ filteredBreadcrumbsByCustomSearch: Array<BreadcrumbWithDetails>;
+ filteredBreadcrumbs: Array<BreadcrumbWithDetails>;
+ breadcrumbFilterGroups: BreadcrumbFilterGroups;
+};
+
+type Props = {
+ event: Event;
+ type: string;
+ data: {
+ values: Array<Breadcrumb>;
+ };
+};
+
+class BreadcrumbsContainer extends React.Component<Props, State> {
+ state: State = {
+ isCollapsed: true,
+ searchTerm: '',
+ breadcrumbs: [],
+ filteredBreadcrumbsByCustomSearch: [],
+ filteredBreadcrumbs: [],
+ breadcrumbFilterGroups: [],
+ };
+
+ componentDidMount() {
+ this.loadBreadcrumbs();
+ }
+
+ loadBreadcrumbs = () => {
+ const {data} = this.props;
+ let breadcrumbs = data.values;
+
+ // Add the error event as the final (virtual) breadcrumb
+ const virtualCrumb = this.getVirtualCrumb();
+ if (virtualCrumb) {
+ breadcrumbs = [...breadcrumbs, virtualCrumb];
+ }
+
+ const breadcrumbTypes: BreadcrumbFilterGroups = [];
+
+ // TODO(Priscila): implement levels
+ //const breadcrumbLevels: BreadcrumbFilterGroups = [];
+
+ const convertedBreadcrumbs = breadcrumbs.map((breadcrumb, index) => {
+ const convertedBreadcrumb = convertBreadcrumbType(breadcrumb);
+ const breadcrumbDetails = getBreadcrumbDetails(convertedBreadcrumb.type);
+
+ if (!breadcrumbTypes.find(b => b.type === convertedBreadcrumb.type)) {
+ !breadcrumbTypes.push({
+ groupType: FilterGroupType.TYPE,
+ type: convertedBreadcrumb.type,
+ ...breadcrumbDetails,
+ isChecked: true,
+ });
+ }
+
+ return {
+ id: index,
+ ...convertedBreadcrumb,
+ ...breadcrumbDetails,
+ };
+ });
+
+ this.setState({
+ breadcrumbs: convertedBreadcrumbs,
+ filteredBreadcrumbs: convertedBreadcrumbs,
+ filteredBreadcrumbsByCustomSearch: convertedBreadcrumbs,
+ breadcrumbFilterGroups: breadcrumbTypes
+ // in case of a breadcrumb of type BreadcrumbType.DEFAULT, moves it to the last position of the array
+ .filter(crumbType => crumbType.type !== BreadcrumbType.DEFAULT)
+ .concat(
+ breadcrumbTypes.filter(crumbType => crumbType.type === BreadcrumbType.DEFAULT)
+ ),
+ });
+ };
+
+ moduleToCategory = (module: any) => {
+ if (!module) {
+ return undefined;
+ }
+ const match = module.match(/^.*\/(.*?)(:\d+)/);
+ if (!match) {
+ return module.split(/./)[0];
+ }
+ return match[1];
+ };
+
+ getVirtualCrumb = (): Breadcrumb | undefined => {
+ const {event} = this.props;
+
+ const exception = event.entries.find(
+ entry => entry.type === BreadcrumbType.EXCEPTION
+ );
+
+ if (!exception && !event.message) {
+ return undefined;
+ }
+
+ if (exception) {
+ const {type, value, module: mdl} = exception.data.values[0];
+ return {
+ type: BreadcrumbType.EXCEPTION,
+ level: BreadcrumbLevel.ERROR,
+ category: this.moduleToCategory(mdl) || 'exception',
+ data: {
+ type,
+ value,
+ },
+ timestamp: event.dateCreated,
+ };
+ }
+
+ const levelTag = (event.tags || []).find(tag => tag.key === 'level');
+
+ return {
+ type: BreadcrumbType.MESSAGE,
+ level: levelTag?.value as BreadcrumbLevel,
+ category: 'message',
+ message: event.message,
+ timestamp: event.dateCreated,
+ };
+ };
+
+ getCollapsedCrumbQuantity = (): {
+ filteredCollapsedBreadcrumbs: Array<BreadcrumbWithDetails>;
+ collapsedQuantity: number;
+ } => {
+ const {isCollapsed, filteredBreadcrumbs} = this.state;
+
+ let filteredCollapsedBreadcrumbs = filteredBreadcrumbs;
+
+ if (isCollapsed && filteredCollapsedBreadcrumbs.length > MAX_CRUMBS_WHEN_COLLAPSED) {
+ filteredCollapsedBreadcrumbs = filteredCollapsedBreadcrumbs.slice(
+ -MAX_CRUMBS_WHEN_COLLAPSED
+ );
+ }
+
+ return {
+ filteredCollapsedBreadcrumbs,
+ collapsedQuantity: filteredBreadcrumbs.length - filteredCollapsedBreadcrumbs.length,
+ };
+ };
+
+ handleFilter = (breadcrumbFilterGroups: BreadcrumbFilterGroups) => () => {
+ //types
+ const breadcrumbFilterGroupTypes = breadcrumbFilterGroups.filter(
+ breadcrumbFilterGroup => breadcrumbFilterGroup.groupType === 'type'
+ );
+
+ // TODO(Priscila): implement levels
+ // const breadcrumbFilterGroupLevels = breadcrumbFilterGroups
+ // .filter(breadcrumbFilterGroup => breadcrumbFilterGroup.groupType === 'level')
+ // .map(breadcrumbFilterGroup => breadcrumbFilterGroup.type);
+
+ this.setState({
+ filteredBreadcrumbs: this.state.breadcrumbs.filter(breadcrumb => {
+ const foundBreadcrumbFilterData = breadcrumbFilterGroupTypes.find(
+ crumbFilterData => crumbFilterData.type === breadcrumb.type
+ );
+ if (foundBreadcrumbFilterData) {
+ return foundBreadcrumbFilterData.isChecked;
+ }
+
+ return false;
+ }),
+ breadcrumbFilterGroups,
+ });
+ };
+
+ handleFilterBySearchTerm = (value: string) => {
+ const {filteredBreadcrumbsByCustomSearch} = this.state;
+
+ const searchTerm = value.toLocaleLowerCase();
+
+ const filteredBreadcrumbs = filteredBreadcrumbsByCustomSearch.filter(
+ item =>
+ !!['category', 'message', 'level', 'timestamp'].find(prop => {
+ const searchValue = item[prop];
+ if (searchValue) {
+ return searchValue.toLowerCase().indexOf(searchTerm) !== -1;
+ }
+ return false;
+ })
+ );
+
+ this.setState({
+ searchTerm,
+ filteredBreadcrumbs,
+ });
+ };
+
+ handleCollapseToggle = () => {
+ this.setState(prevState => ({
+ isCollapsed: !prevState.isCollapsed,
+ }));
+ };
+
+ handleCleanSearch = () => {
+ this.setState({
+ searchTerm: '',
+ isCollapsed: true,
+ });
+ };
+
+ render() {
+ const {event, type} = this.props;
+ const {breadcrumbFilterGroups, searchTerm} = this.state;
+
+ const {
+ collapsedQuantity,
+ filteredCollapsedBreadcrumbs,
+ } = this.getCollapsedCrumbQuantity();
+
+ return (
+ <EventDataSection
+ type={type}
+ title={
+ <h3>
+ <GuideAnchor target="breadcrumbs" position="bottom">
+ {t('Breadcrumbs')}
+ </GuideAnchor>
+ </h3>
+ }
+ actions={
+ <Search>
+ <BreadcrumbFilter
+ onFilter={this.handleFilter}
+ filterGroups={breadcrumbFilterGroups}
+ />
+ <StyledSearchBar
+ placeholder={t('Search breadcrumbs\u2026')}
+ onChange={this.handleFilterBySearchTerm}
+ query={searchTerm}
+ />
+ </Search>
+ }
+ wrapTitle={false}
+ isCentered
+ >
+ <Content>
+ {filteredCollapsedBreadcrumbs.length > 0 ? (
+ <PlatformContextProvider value={{platform: event.platform}}>
+ <BreadCrumbs className="crumbs">
+ {collapsedQuantity > 0 && (
+ <BreadcrumbCollapsed
+ onClick={this.handleCollapseToggle}
+ quantity={collapsedQuantity}
+ />
+ )}
+ {filteredCollapsedBreadcrumbs.map(
+ ({color, borderColor, icon, ...crumb}, idx) => {
+ const Icon = icon as React.ComponentType<IconProps>;
+ return (
+ <BreadCrumb
+ data-test-id="breadcrumb"
+ key={idx}
+ hasError={
+ crumb.type === BreadcrumbType.MESSAGE ||
+ crumb.type === BreadcrumbType.EXCEPTION
+ }
+ >
+ <BreadCrumbIconWrapper color={color} borderColor={borderColor}>
+ <Icon />
+ </BreadCrumbIconWrapper>
+ <BreadcrumbRenderer breadcrumb={crumb as Breadcrumb} />
+ <BreadcrumbTime timestamp={crumb.timestamp} />
+ </BreadCrumb>
+ );
+ }
+ )}
+ </BreadCrumbs>
+ </PlatformContextProvider>
+ ) : (
+ <EmptyStateWarning small>
+ {t('Sorry, no breadcrumbs match your search query.')}
+ </EmptyStateWarning>
+ )}
+ </Content>
+ </EventDataSection>
+ );
+ }
+}
+
+export default BreadcrumbsContainer;
+
+const BreadCrumbs = styled('ul')`
+ padding-left: 0;
+ list-style: none;
+ margin-bottom: 0;
+`;
+
+const Content = styled('div')`
+ border: 1px solid ${p => p.theme.borderLight};
+ border-radius: 3px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
+ margin-bottom: ${space(3)};
+`;
+
+const Search = styled('div')`
+ display: flex;
+ width: 100%;
+ margin-top: ${space(1)};
+
+ @media (min-width: ${props => props.theme.breakpoints[1]}) {
+ width: 400px;
+ margin-top: 0;
+ }
+
+ @media (min-width: ${props => props.theme.breakpoints[3]}) {
+ width: 600px;
+ }
+`;
+
+const StyledSearchBar = styled(SearchBar)`
+ width: 100%;
+ .search-input {
+ height: 32px;
+ }
+ .search-input,
+ .search-input:focus {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+ .icon-search {
+ height: 32px;
+ top: 0;
+ display: flex;
+ align-items: center;
+ }
+`;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/convertBreadcrumbType.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/convertBreadcrumbType.tsx
new file mode 100644
index 00000000000000..7da3639b2916dc
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/convertBreadcrumbType.tsx
@@ -0,0 +1,39 @@
+import {Breadcrumb, BreadcrumbType} from '../breadcrumbs/types';
+
+function convertBreadcrumbType(breadcrumb: Breadcrumb): Breadcrumb {
+ // special case for 'ui.' and `sentry.` category breadcrumbs
+ // TODO: find a better way to customize UI around non-schema data
+ if (
+ (!breadcrumb.type || breadcrumb.type === BreadcrumbType.DEFAULT) &&
+ breadcrumb.category
+ ) {
+ const [category, subcategory] = breadcrumb.category.split('.');
+ if (category === 'ui') {
+ return {
+ ...breadcrumb,
+ type: BreadcrumbType.UI,
+ };
+ }
+
+ if (category === 'console' || category === 'navigation') {
+ return {
+ ...breadcrumb,
+ type: BreadcrumbType.DEBUG,
+ };
+ }
+
+ if (
+ category === 'sentry' &&
+ (subcategory === 'transaction' || subcategory === 'event')
+ ) {
+ return {
+ ...breadcrumb,
+ type: BreadcrumbType.EXCEPTION,
+ };
+ }
+ }
+
+ return breadcrumb;
+}
+
+export default convertBreadcrumbType;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/getBreadcrumbDetails.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/getBreadcrumbDetails.tsx
new file mode 100644
index 00000000000000..569c0657c2db14
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/getBreadcrumbDetails.tsx
@@ -0,0 +1,74 @@
+import {
+ IconInfo,
+ IconWarning,
+ IconLocation,
+ IconUser,
+ IconRefresh,
+ IconTerminal,
+} from 'app/icons';
+import {t} from 'app/locale';
+
+import {BreadcrumbType, BreadcrumbDetails} from '../breadcrumbs/types';
+
+function getBreadcrumbDetails(breadcrumbType: BreadcrumbType): BreadcrumbDetails {
+ switch (breadcrumbType) {
+ case BreadcrumbType.USER:
+ case BreadcrumbType.UI: {
+ return {
+ color: 'purple',
+ icon: IconUser,
+ description: t('User Action'),
+ };
+ }
+ case BreadcrumbType.NAVIGATION: {
+ return {
+ color: 'blue',
+ icon: IconLocation,
+ description: t('Navigation'),
+ };
+ }
+ case BreadcrumbType.INFO: {
+ return {
+ color: 'blue',
+ icon: IconInfo,
+ description: t('Info'),
+ };
+ }
+ case BreadcrumbType.WARNING: {
+ return {
+ color: 'yellowOrange',
+ borderColor: 'yellowOrangeDark',
+ icon: IconWarning,
+ description: t('Warning'),
+ };
+ }
+ case BreadcrumbType.DEBUG: {
+ return {
+ icon: IconTerminal,
+ description: t('Debug'),
+ };
+ }
+ case BreadcrumbType.EXCEPTION:
+ case BreadcrumbType.MESSAGE: {
+ return {
+ color: 'red',
+ icon: IconWarning,
+ description: t('Error'),
+ };
+ }
+ case BreadcrumbType.HTTP: {
+ return {
+ color: 'green',
+ icon: IconRefresh,
+ description: t('HTTP request'),
+ };
+ }
+ default:
+ return {
+ icon: IconRefresh,
+ description: t('Others'),
+ };
+ }
+}
+
+export default getBreadcrumbDetails;
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/styles.tsx b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/styles.tsx
new file mode 100644
index 00000000000000..91bc3908adc84a
--- /dev/null
+++ b/src/sentry/static/sentry/app/components/events/interfaces/breadcrumbsV2/styles.tsx
@@ -0,0 +1,58 @@
+import styled from '@emotion/styled';
+import {css} from '@emotion/core';
+
+import {Color} from 'app/utils/theme';
+import space from 'app/styles/space';
+
+// TODO(style): the color #fffcfb and #e7c0bc are not yet in theme and no similar theme's color was found.
+const BreadCrumb = styled('li')<{hasError?: boolean}>`
+ font-size: ${p => p.theme.fontSizeMedium};
+ position: relative;
+ padding: ${space(1)} ${space(3)} ${space(0.75)} ${space(3)} !important;
+ display: grid;
+ grid-template-columns: 26px 1fr 50px;
+ grid-gap: ${space(1.5)};
+ :before {
+ content: '';
+ display: block;
+ width: 2px;
+ top: 0;
+ bottom: 0;
+ left: 32px;
+ background: ${p => p.theme.borderLight};
+ position: absolute;
+ }
+ border-bottom: 1px solid ${p => p.theme.borderLight};
+ :last-child:before {
+ bottom: calc(100% - ${space(1)});
+ }
+ ${p =>
+ p.hasError &&
+ css`
+ background: #fffcfb;
+ border: 1px solid #e7c0bc;
+ margin: -1px;
+ `}
+`;
+
+const BreadCrumbIconWrapper = styled('div')<{
+ color?: Color;
+ borderColor?: Color;
+ size?: number;
+}>`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: ${p => (p.size ? `${p.size}px` : '26px')};
+ height: ${p => (p.size ? `${p.size}px` : '26px')};
+ background: ${p => p.theme.white};
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
+ border-radius: 32px;
+ z-index: 1;
+ position: relative;
+ color: ${p => (p.color ? p.theme[p.color] : 'inherit')};
+ border-color: ${p => (p.borderColor ? p.theme[p.borderColor] : 'currentColor')};
+ border: 1px solid ${p => (p.color ? p.theme[p.color] : p.theme.gray2)};
+`;
+
+export {BreadCrumb, BreadCrumbIconWrapper};
diff --git a/src/sentry/static/sentry/app/components/events/interfaces/debugmeta.jsx b/src/sentry/static/sentry/app/components/events/interfaces/debugmeta.jsx
index d111aa41ed29f5..fce37dd014f28b 100644
--- a/src/sentry/static/sentry/app/components/events/interfaces/debugmeta.jsx
+++ b/src/sentry/static/sentry/app/components/events/interfaces/debugmeta.jsx
@@ -10,7 +10,7 @@ import GuideAnchor from 'app/components/assistant/guideAnchor';
import Button from 'app/components/button';
import Checkbox from 'app/components/checkbox';
import DebugFileFeature from 'app/components/debugFileFeature';
-import EventDataSection, {SectionHeader} from 'app/components/events/eventDataSection';
+import EventDataSection from 'app/components/events/eventDataSection';
import InlineSvg from 'app/components/inlineSvg';
import {Panel, PanelBody, PanelItem} from 'app/components/panels';
import Tooltip from 'app/components/tooltip';
@@ -479,6 +479,7 @@ class DebugMetaInterface extends React.PureComponent {
title={titleElement}
actions={this.renderToolbar()}
wrapTitle={false}
+ isCentered
>
<ClippedBox clipHeight={350}>
<DebugImagesPanel>
@@ -524,13 +525,6 @@ const Label = styled('label')`
`;
const StyledEventDataSection = styled(EventDataSection)`
- ${SectionHeader} {
- align-items: center;
- @media (max-width: ${p => p.theme.breakpoints[0]}) {
- display: block;
- }
- }
-
@media (max-width: ${p => p.theme.breakpoints[0]}) {
padding-bottom: ${space(4)};
}
diff --git a/src/sentry/static/sentry/app/components/forms/formField.tsx b/src/sentry/static/sentry/app/components/forms/formField.tsx
index 3cb7bb2f4a23f1..2470b0a67468ad 100644
--- a/src/sentry/static/sentry/app/components/forms/formField.tsx
+++ b/src/sentry/static/sentry/app/components/forms/formField.tsx
@@ -67,16 +67,16 @@ export default class FormField<
meta: PropTypes.any, // eslint-disable-line react/no-unused-prop-types
};
+ static contextTypes = {
+ form: PropTypes.object,
+ };
+
static defaultProps = {
hideErrorMessage: false,
disabled: false,
required: false,
};
- static contextTypes = {
- form: PropTypes.object,
- };
-
constructor(props: Props, context: Context) {
super(props, context);
this.state = {
diff --git a/src/sentry/static/sentry/app/icons/iconSearch.tsx b/src/sentry/static/sentry/app/icons/iconSearch.tsx
index 3dab396fec3f4d..e760133ec12fb3 100644
--- a/src/sentry/static/sentry/app/icons/iconSearch.tsx
+++ b/src/sentry/static/sentry/app/icons/iconSearch.tsx
@@ -7,7 +7,7 @@ export const IconSearch = React.forwardRef(function IconSearch(
{color: providedColor = 'currentColor', size: providedSize = 'sm', ...props}: IconProps,
ref: React.Ref<SVGSVGElement>
) {
- const color = providedColor;
+ const color = theme[providedColor] ?? providedColor;
const size = theme.iconSizes[providedSize] ?? providedSize;
return (
diff --git a/src/sentry/static/sentry/app/icons/index.tsx b/src/sentry/static/sentry/app/icons/index.tsx
index 4ce991cdb2fa19..9cf916429aa40d 100644
--- a/src/sentry/static/sentry/app/icons/index.tsx
+++ b/src/sentry/static/sentry/app/icons/index.tsx
@@ -76,3 +76,4 @@ export {IconUser} from './iconUser';
export {IconVsts} from './iconVsts';
export {IconWarning} from './iconWarning';
export {IconWindow} from './iconWindow';
+export {IconTerminal} from './iconTerminal';
diff --git a/tests/js/spec/components/__snapshots__/toggleRawEventData.spec.jsx.snap b/tests/js/spec/components/__snapshots__/toggleRawEventData.spec.jsx.snap
index 371ab9ad217474..0e4bfbfe9792a8 100644
--- a/tests/js/spec/components/__snapshots__/toggleRawEventData.spec.jsx.snap
+++ b/tests/js/spec/components/__snapshots__/toggleRawEventData.spec.jsx.snap
@@ -6,6 +6,7 @@ exports[`EventDataSection renders formatted 1`] = `
>
<SectionHeader
id="extra"
+ isCentered={false}
>
<Permalink
className="permalink"
@@ -48,6 +49,7 @@ exports[`EventDataSection renders raw 1`] = `
>
<SectionHeader
id="extra"
+ isCentered={false}
>
<Permalink
className="permalink"
diff --git a/tests/js/spec/components/events/__snapshots__/sdkUpdates.spec.jsx.snap b/tests/js/spec/components/events/__snapshots__/sdkUpdates.spec.jsx.snap
index 4ffe577fe45b01..ef071f772f5675 100644
--- a/tests/js/spec/components/events/__snapshots__/sdkUpdates.spec.jsx.snap
+++ b/tests/js/spec/components/events/__snapshots__/sdkUpdates.spec.jsx.snap
@@ -29,6 +29,7 @@ exports[`EventSdkUpdates renders a suggestion to update the sdk and then enable
}
>
<EventDataSection
+ isCentered={false}
raw={false}
title={null}
type="sdk-updates"
diff --git a/tests/js/spec/components/forms/rangeField.spec.jsx b/tests/js/spec/components/forms/rangeField.spec.jsx
index 838151327c0144..879342b5f2f044 100644
--- a/tests/js/spec/components/forms/rangeField.spec.jsx
+++ b/tests/js/spec/components/forms/rangeField.spec.jsx
@@ -62,7 +62,7 @@ describe('RangeField', function() {
},
});
- expect(wrapper.find('input').prop('value')).toBe(0);
+ expect(wrapper.find('[name="fieldName"]').prop('value')).toBe(0);
});
});
});
diff --git a/tests/js/spec/views/sharedGroupDetails/__snapshots__/index.spec.jsx.snap b/tests/js/spec/views/sharedGroupDetails/__snapshots__/index.spec.jsx.snap
index 253f44dc3e01b2..1d9c9371cb3c09 100644
--- a/tests/js/spec/views/sharedGroupDetails/__snapshots__/index.spec.jsx.snap
+++ b/tests/js/spec/views/sharedGroupDetails/__snapshots__/index.spec.jsx.snap
@@ -569,6 +569,7 @@ exports[`SharedGroupDetails renders 1`] = `
"title": "ApiException",
}
}
+ isCentered={false}
raw={false}
title="Message"
type="message"
@@ -582,6 +583,7 @@ exports[`SharedGroupDetails renders 1`] = `
>
<SectionHeader
id="message"
+ isCentered={false}
>
<div
className="css-zang02-SectionHeader e1fbjd861"
|
0925763a36ab96679d0635af582b72b42b5dd75b
|
2022-07-27 20:13:33
|
Priscila Oliveira
|
ref(error-item): Replace getMeta (proxy) with _meta object (#37107)
| false
|
Replace getMeta (proxy) with _meta object (#37107)
|
ref
|
diff --git a/static/app/components/events/errorItem.tsx b/static/app/components/events/errorItem.tsx
index a90a0882562012..1fde5a44fdba25 100644
--- a/static/app/components/events/errorItem.tsx
+++ b/static/app/components/events/errorItem.tsx
@@ -5,7 +5,7 @@ import moment from 'moment';
import Button from 'sentry/components/button';
import KeyValueList from 'sentry/components/events/interfaces/keyValueList';
-import {getMeta} from 'sentry/components/events/meta/metaProxy';
+import AnnotatedText from 'sentry/components/events/meta/annotatedText';
import ListItem from 'sentry/components/list/listItem';
import {JavascriptProcessingErrors} from 'sentry/constants/eventErrors';
import {t, tct} from 'sentry/locale';
@@ -35,9 +35,10 @@ const keyMapping = {
export type ErrorItemProps = {
error: Error;
+ meta?: Record<any, any>;
};
-export function ErrorItem({error}: ErrorItemProps) {
+export function ErrorItem({error, meta}: ErrorItemProps) {
const [expanded, setExpanded] = useState(false);
const cleanedData = useMemo(() => {
@@ -69,25 +70,38 @@ export function ErrorItem({error}: ErrorItemProps) {
);
}
- return Object.entries(data).map(([key, value]) => ({
- key,
- value,
- subject: keyMapping[key] || startCase(key),
- meta: getMeta(data, key),
- }));
- }, [error.data]);
+ return Object.entries(data)
+ .map(([key, value]) => ({
+ key,
+ value,
+ subject: keyMapping[key] || startCase(key),
+ meta: key === 'image_name' ? meta?.image_path?.[''] : meta?.[key]?.[''],
+ }))
+ .filter(d => {
+ if (!d.value && !!d.meta) {
+ return true;
+ }
+ return !!d.value;
+ });
+ }, [error.data, meta]);
return (
<StyledListItem>
<OverallInfo>
<div>
- {!error.data?.name || typeof error.data?.name !== 'string' ? null : (
+ {meta?.data?.name?.[''] ? (
+ <AnnotatedText value={error.message} meta={meta?.data?.name?.['']} />
+ ) : !error.data?.name || typeof error.data?.name !== 'string' ? null : (
<Fragment>
<strong>{error.data?.name}</strong>
{': '}
</Fragment>
)}
- {error.message}
+ {meta?.message?.[''] ? (
+ <AnnotatedText value={error.message} meta={meta?.message?.['']} />
+ ) : (
+ error.message
+ )}
{Object.values(JavascriptProcessingErrors).includes(
error.type as JavascriptProcessingErrors
) && (
diff --git a/static/app/components/events/errors.tsx b/static/app/components/events/errors.tsx
index 24814b29e710e1..83ffd141f6804c 100644
--- a/static/app/components/events/errors.tsx
+++ b/static/app/components/events/errors.tsx
@@ -114,7 +114,7 @@ class Errors extends Component<Props, State> {
render() {
const {event, proGuardErrors} = this.props;
const {releaseArtifacts} = this.state;
- const {dist: eventDistribution, errors: eventErrors = []} = event;
+ const {dist: eventDistribution, errors: eventErrors = [], _meta} = event;
// XXX: uniqWith returns unique errors and is not performant with large datasets
const otherErrors: Array<Error> =
@@ -136,6 +136,8 @@ class Errors extends Component<Props, State> {
>
{errors.map((error, errorIdx) => {
const data = error.data ?? {};
+ const meta = _meta?.errors?.[errorIdx];
+
if (
error.type === JavascriptProcessingErrors.JS_MISSING_SOURCE &&
data.url &&
@@ -166,7 +168,7 @@ class Errors extends Component<Props, State> {
}
}
- return <ErrorItem key={errorIdx} error={{...error, data}} />;
+ return <ErrorItem key={errorIdx} error={{...error, data}} meta={meta} />;
})}
</ErrorList>,
]}
diff --git a/tests/js/spec/components/events/interfaces/errorItem.spec.tsx b/tests/js/spec/components/events/interfaces/errorItem.spec.tsx
index 4659da07d57166..024fb200c3e25d 100644
--- a/tests/js/spec/components/events/interfaces/errorItem.spec.tsx
+++ b/tests/js/spec/components/events/interfaces/errorItem.spec.tsx
@@ -24,4 +24,35 @@ describe('Issue error item', function () {
expect(screen.getByText('Mapping Uuid')).toBeInTheDocument();
});
+
+ it('display redacted data', async function () {
+ render(
+ <ErrorItem
+ error={{
+ data: {
+ image_path: '',
+ image_uuid: '6b77ffb6-5aba-3b5f-9171-434f9660f738',
+ message: '',
+ },
+ message: 'A required debug information file was missing.',
+ type: 'native_missing_dsym',
+ }}
+ meta={{
+ image_path: {'': {rem: [['project:2', 's', 0, 0]], len: 117}},
+ }}
+ />
+ );
+
+ userEvent.click(screen.getByLabelText('Expand'));
+
+ expect(screen.getByText('File Name')).toBeInTheDocument();
+ expect(screen.getByText('File Path')).toBeInTheDocument();
+ expect(screen.getAllByText(/redacted/)).toHaveLength(2);
+
+ userEvent.hover(screen.getAllByText(/redacted/)[0]);
+
+ expect(
+ await screen.findByText('Replaced because of PII rule "project:2"')
+ ).toBeInTheDocument(); // tooltip description
+ });
});
|
f5816fc80be76350cbdbac036c51329459e93de1
|
2018-10-06 03:02:26
|
Lyn Nagara
|
fix(discover): Fix loading indicator height (#10031)
| false
|
Fix loading indicator height (#10031)
|
fix
|
diff --git a/src/sentry/static/sentry/app/views/organizationDiscover/index.jsx b/src/sentry/static/sentry/app/views/organizationDiscover/index.jsx
index bd2fc3b7a9fc76..df61cb551b6509 100644
--- a/src/sentry/static/sentry/app/views/organizationDiscover/index.jsx
+++ b/src/sentry/static/sentry/app/views/organizationDiscover/index.jsx
@@ -8,6 +8,7 @@ import Discover from './discover';
import createQueryBuilder from './queryBuilder';
import {getQueryFromQueryString} from './utils';
+import {LoadingContainer} from './styles';
const OrganizationDiscoverContainer = createReactClass({
displayName: 'OrganizationDiscoverContainer',
@@ -41,9 +42,9 @@ const OrganizationDiscoverContainer = createReactClass({
renderLoading: function() {
return (
- <div>
+ <LoadingContainer>
<LoadingIndicator />
- </div>
+ </LoadingContainer>
);
},
diff --git a/src/sentry/static/sentry/app/views/organizationDiscover/styles.jsx b/src/sentry/static/sentry/app/views/organizationDiscover/styles.jsx
index dc3618143af3f7..8b4fefddfc0e78 100644
--- a/src/sentry/static/sentry/app/views/organizationDiscover/styles.jsx
+++ b/src/sentry/static/sentry/app/views/organizationDiscover/styles.jsx
@@ -50,6 +50,11 @@ export const BodyContent = styled(Flex)`
padding: ${space(1.5)} 32px 32px 32px;
`;
+export const LoadingContainer = styled(Flex)`
+ flex: 1;
+ height: calc(100vh - ${FOOTER_HEIGHT}px);
+`;
+
export const TopBar = styled(Flex)`
padding: 0 ${space(4)};
border-bottom: 1px solid ${p => p.theme.borderLight};
|
dba732061d4d96e1b9fee7e575cda55fcefa90e2
|
2019-12-06 23:40:40
|
josh
|
feat(django 1.10): continue to let inactive/soft-deleted users authenticate (#15974)
| false
|
continue to let inactive/soft-deleted users authenticate (#15974)
|
feat
|
diff --git a/src/sentry/utils/auth.py b/src/sentry/utils/auth.py
index 2320d8d92c2567..bbbc757461bf69 100644
--- a/src/sentry/utils/auth.py
+++ b/src/sentry/utils/auth.py
@@ -298,3 +298,10 @@ def authenticate(self, username=None, password=None):
except ValueError:
continue
return None
+
+ # TODO(joshuarli): When we're fully on Django 1.10, we should switch to
+ # subclassing AllowAllUsersModelBackend (this isn't available in 1.9 and
+ # simply overriding user_can_authenticate here is a lot less verbose than
+ # conditionally importing).
+ def user_can_authenticate(self, user):
+ return True
diff --git a/tests/sentry/web/frontend/test_auth_organization_login.py b/tests/sentry/web/frontend/test_auth_organization_login.py
index 73f4aa4f79e9f4..30ca0fc2492c2c 100644
--- a/tests/sentry/web/frontend/test_auth_organization_login.py
+++ b/tests/sentry/web/frontend/test_auth_organization_login.py
@@ -425,7 +425,7 @@ def test_flow_duplicate_users_with_membership_and_verified(self):
# setup a 'previous' identity, such as when we migrated Google from
# the old idents to the new
- user = self.create_user("[email protected]", is_active=False, is_managed=True)
+ user = self.create_user("[email protected]", is_managed=True, is_active=False)
auth_identity = AuthIdentity.objects.create(
auth_provider=auth_provider, user=user, ident="[email protected]"
)
@@ -480,7 +480,7 @@ def test_flow_duplicate_users_without_verified(self):
# setup a 'previous' identity, such as when we migrated Google from
# the old idents to the new
- user = self.create_user("[email protected]", is_active=False, is_managed=True)
+ user = self.create_user("[email protected]", is_managed=True)
AuthIdentity.objects.create(auth_provider=auth_provider, user=user, ident="[email protected]")
# they must be a member for the auto merge to happen
@@ -543,7 +543,7 @@ def test_flow_managed_duplicate_users_without_membership(self):
# setup a 'previous' identity, such as when we migrated Google from
# the old idents to the new
- user = self.create_user("[email protected]", is_active=False, is_managed=True)
+ user = self.create_user("[email protected]", is_managed=True)
AuthIdentity.objects.create(auth_provider=auth_provider, user=user, ident="[email protected]")
# user needs to be logged in
@@ -580,14 +580,14 @@ def test_swapped_identities(self):
# setup a 'previous' identity, such as when we migrated Google from
# the old idents to the new
- user = self.create_user("[email protected]", is_active=False, is_managed=True)
+ user = self.create_user("[email protected]", is_managed=True, is_active=False)
identity1 = AuthIdentity.objects.create(
auth_provider=auth_provider, user=user, ident="[email protected]"
)
# create another identity which is used, but not by the authenticating
# user
- user2 = self.create_user("[email protected]", is_active=False, is_managed=True)
+ user2 = self.create_user("[email protected]", is_managed=True, is_active=False)
identity2 = AuthIdentity.objects.create(
auth_provider=auth_provider, user=user2, ident="[email protected]"
)
|
8c56078939c970ae4cf81315fe5cb5b060dad085
|
2022-09-01 22:17:52
|
Evan Purkhiser
|
feat(performance-issues): Add search fields (#38360)
| false
|
Add search fields (#38360)
|
feat
|
diff --git a/static/app/stores/tagStore.tsx b/static/app/stores/tagStore.tsx
index e6504313ff8104..adb4e1d843284d 100644
--- a/static/app/stores/tagStore.tsx
+++ b/static/app/stores/tagStore.tsx
@@ -78,6 +78,18 @@ const storeConfig: TagStoreDefinition = {
values: [],
predefined: true,
},
+ [FieldKey.ISSUE_CATEGORY]: {
+ key: FieldKey.ISSUE_CATEGORY,
+ name: 'Issue Category',
+ values: ['error', 'performance'],
+ predefined: true,
+ },
+ [FieldKey.ISSUE_TYPE]: {
+ key: FieldKey.ISSUE_TYPE,
+ name: 'Issue Type',
+ values: [],
+ predefined: true,
+ },
[FieldKey.LAST_SEEN]: {
key: FieldKey.LAST_SEEN,
name: 'Last Seen',
diff --git a/static/app/utils/fields/index.ts b/static/app/utils/fields/index.ts
index 65e828ce3bf5ca..92fdf0ceefe54a 100644
--- a/static/app/utils/fields/index.ts
+++ b/static/app/utils/fields/index.ts
@@ -51,6 +51,8 @@ export enum FieldKey {
ID = 'id',
IS = 'is',
ISSUE = 'issue',
+ ISSUE_CATEGORY = 'issue.category',
+ ISSUE_TYPE = 'issue.type',
LAST_SEEN = 'lastSeen',
LEVEL = 'level',
LOCATION = 'location',
@@ -623,6 +625,19 @@ const FIELD_DEFINITIONS: Record<AllFieldKeys, FieldDefinition> = {
kind: FieldKind.FIELD,
valueType: FieldValueType.STRING,
},
+ [FieldKey.ISSUE_CATEGORY]: {
+ desc: t('The category of issue'),
+ kind: FieldKind.FIELD,
+ valueType: FieldValueType.STRING,
+ keywords: ['error', 'performance'],
+ featureFlag: 'performance-issues',
+ },
+ [FieldKey.ISSUE_TYPE]: {
+ desc: t('The type of issue'),
+ kind: FieldKind.FIELD,
+ valueType: FieldValueType.STRING,
+ featureFlag: 'performance-issues',
+ },
[FieldKey.LAST_SEEN]: {
desc: t('Issues last seen at a given time'),
kind: FieldKind.FIELD,
@@ -897,6 +912,8 @@ export const ISSUE_FIELDS = [
FieldKey.HTTP_URL,
FieldKey.ID,
FieldKey.IS,
+ FieldKey.ISSUE_CATEGORY,
+ FieldKey.ISSUE_TYPE,
FieldKey.LAST_SEEN,
FieldKey.LOCATION,
FieldKey.MESSAGE,
|
eeaf5d31125b8fb74dc5ca263f10913d5fa76221
|
2020-10-06 22:26:30
|
Scott Cooper
|
ref(ts): Convert issue list searchbar to typescript (#21129)
| false
|
Convert issue list searchbar to typescript (#21129)
|
ref
|
diff --git a/src/sentry/static/sentry/app/actionCreators/savedSearches.tsx b/src/sentry/static/sentry/app/actionCreators/savedSearches.tsx
index 9b5d90f0db7fc0..cd1eaff14c2e25 100644
--- a/src/sentry/static/sentry/app/actionCreators/savedSearches.tsx
+++ b/src/sentry/static/sentry/app/actionCreators/savedSearches.tsx
@@ -123,7 +123,7 @@ export function fetchRecentSearches(
api: Client,
orgSlug: string,
type: SavedSearchType,
- query: string
+ query?: string
): Promise<RecentSearch[]> {
const url = getRecentSearchUrl(orgSlug);
const promise = api.requestPromise(url, {
diff --git a/src/sentry/static/sentry/app/views/issueList/searchBar.jsx b/src/sentry/static/sentry/app/views/issueList/searchBar.tsx
similarity index 70%
rename from src/sentry/static/sentry/app/views/issueList/searchBar.jsx
rename to src/sentry/static/sentry/app/views/issueList/searchBar.tsx
index aca01f1801d6d3..5bab209a8adfc3 100644
--- a/src/sentry/static/sentry/app/views/issueList/searchBar.jsx
+++ b/src/sentry/static/sentry/app/views/issueList/searchBar.tsx
@@ -2,15 +2,17 @@ import PropTypes from 'prop-types';
import React from 'react';
import styled from '@emotion/styled';
-import {fetchRecentSearches} from 'app/actionCreators/savedSearches';
import {t} from 'app/locale';
+import {Client} from 'app/api';
+import {SavedSearchType, Tag, TagValue, Organization, SavedSearch} from 'app/types';
+import {fetchRecentSearches} from 'app/actionCreators/savedSearches';
import SentryTypes from 'app/sentryTypes';
-import {SavedSearchType} from 'app/types';
import SmartSearchBar from 'app/components/smartSearchBar';
import withApi from 'app/utils/withApi';
import withOrganization from 'app/utils/withOrganization';
+import {SearchItem} from 'app/components/smartSearchBar/types';
-const SEARCH_ITEMS = [
+const SEARCH_ITEMS: SearchItem[] = [
{
title: t('Tag'),
desc: 'browser:"Chrome 34", has:browser',
@@ -43,16 +45,32 @@ const SEARCH_ITEMS = [
},
];
-class IssueListSearchBar extends React.Component {
+type Props = React.ComponentProps<typeof SmartSearchBar> & {
+ api: Client;
+ organization: Organization;
+ tagValueLoader: (
+ key: string,
+ search: string,
+ projectIds?: string[]
+ ) => Promise<TagValue[]>;
+ projectIds?: string[];
+ savedSearch?: SavedSearch;
+ isOpen?: boolean;
+};
+
+type State = {
+ defaultSearchItems: [SearchItem[], SearchItem[]];
+ recentSearches: string[];
+};
+
+class IssueListSearchBar extends React.Component<Props, State> {
static propTypes = {
- ...SmartSearchBar.propTypes,
-
savedSearch: SentryTypes.SavedSearch,
tagValueLoader: PropTypes.func.isRequired,
onSidebarToggle: PropTypes.func,
};
- state = {
+ state: State = {
defaultSearchItems: [SEARCH_ITEMS, []],
recentSearches: [],
};
@@ -83,29 +101,23 @@ class IssueListSearchBar extends React.Component {
};
/**
- * Returns array of tag values that substring match `query`; invokes `callback`
- * with data when ready
+ * @returns array of tag values that substring match `query`
*/
- getTagValues = (tag, query) => {
+ getTagValues = async (tag: Tag, query: string): Promise<string[]> => {
const {tagValueLoader, projectIds} = this.props;
- return tagValueLoader(tag.key, query, projectIds).then(
- values => values.map(({value}) => value),
- () => {
- throw new Error('Unable to fetch project tags');
- }
- );
+ const values = await tagValueLoader(tag.key, query, projectIds);
+ return values.map(({value}) => value);
};
- getRecentSearches = async fullQuery => {
+ getRecentSearches = async (): Promise<string[]> => {
const {api, organization} = this.props;
const recent = await fetchRecentSearches(
api,
organization.slug,
- SavedSearchType.ISSUE,
- fullQuery
+ SavedSearchType.ISSUE
);
- return (recent && recent.map(({query}) => query)) || [];
+ return recent?.map(({query}) => query) ?? [];
};
handleSavedRecentSearch = () => {
@@ -128,14 +140,14 @@ class IssueListSearchBar extends React.Component {
defaultSearchItems={this.state.defaultSearchItems}
onSavedRecentSearch={this.handleSavedRecentSearch}
onSidebarToggle={onSidebarToggle}
- pinnedSearch={savedSearch && savedSearch.isPinned ? savedSearch : null}
+ pinnedSearch={savedSearch?.isPinned ? savedSearch : undefined}
{...props}
/>
);
}
}
-const SmartSearchBarNoLeftCorners = styled(SmartSearchBar)`
+const SmartSearchBarNoLeftCorners = styled(SmartSearchBar)<{isOpen?: boolean}>`
border-radius: ${p =>
p.isOpen
? `0 ${p.theme.borderRadius} 0 0`
|
92b15778ed87800f033bbe883d519a9ca7ac46a0
|
2020-07-11 02:18:18
|
Markus Unterwaditzer
|
fix(grouping): Do not crash when logentry.formatted is null (#19818)
| false
|
Do not crash when logentry.formatted is null (#19818)
|
fix
|
diff --git a/src/sentry/data/samples/invalid-interfaces.json b/src/sentry/data/samples/invalid-interfaces.json
index 5013168b5bee63..91e41665ec2dca 100644
--- a/src/sentry/data/samples/invalid-interfaces.json
+++ b/src/sentry/data/samples/invalid-interfaces.json
@@ -88,8 +88,9 @@
},
"logentry": {
"params": [
- "missing message or formatted"
- ]
+ "bogus"
+ ],
+ "formatted": 42
},
"request": {
"method": "unknown",
diff --git a/src/sentry/grouping/strategies/message.py b/src/sentry/grouping/strategies/message.py
index e7f5818d5e99e9..2ad3b6d0746721 100644
--- a/src/sentry/grouping/strategies/message.py
+++ b/src/sentry/grouping/strategies/message.py
@@ -110,13 +110,13 @@ def _handle_match(match):
@strategy(id="message:v1", interfaces=["message"], variants=["default"], score=0)
def message_v1(message_interface, **meta):
return GroupingComponent(
- id="message", values=[message_interface.message or message_interface.formatted]
+ id="message", values=[message_interface.message or message_interface.formatted or u""]
)
@strategy(id="message:v2", interfaces=["message"], variants=["default"], score=0)
def message_v2(message_interface, **meta):
- message_in = message_interface.message or message_interface.formatted
+ message_in = message_interface.message or message_interface.formatted or u""
message_trimmed = trim_message_for_grouping(message_in)
hint = "stripped common values" if message_in != message_trimmed else None
return GroupingComponent(id="message", values=[message_trimmed], hint=hint)
|
1ba73dc39cc6d5f5e46c31c846a932c60e2c40a8
|
2020-11-10 22:58:33
|
Billy Vong
|
build(gha): Reduce backend test instances, change acceptance grouping (#21887)
| false
|
Reduce backend test instances, change acceptance grouping (#21887)
|
build
|
diff --git a/.github/workflows/acceptance-py3.6.yml b/.github/workflows/acceptance-py3.6.yml
index 8967a03416c5a4..c99976fd97ac4a 100644
--- a/.github/workflows/acceptance-py3.6.yml
+++ b/.github/workflows/acceptance-py3.6.yml
@@ -18,6 +18,7 @@ jobs:
env:
MIGRATIONS_TEST_MIGRATE: 1
+ TEST_GROUP_STRATEGY: roundrobin
steps:
- uses: actions/checkout@v2
diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml
index 0a8024295c828d..2276c2eafc0c95 100644
--- a/.github/workflows/acceptance.yml
+++ b/.github/workflows/acceptance.yml
@@ -96,6 +96,7 @@ jobs:
env:
VISUAL_SNAPSHOT_ENABLE: 1
+ TEST_GROUP_STRATEGY: roundrobin
steps:
- uses: actions/checkout@v2
diff --git a/.github/workflows/backend-test-py2.7.yml b/.github/workflows/backend-test-py2.7.yml
index bc0d98896bdd21..da085c6550ad6c 100644
--- a/.github/workflows/backend-test-py2.7.yml
+++ b/.github/workflows/backend-test-py2.7.yml
@@ -13,7 +13,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
- instance: [0, 1, 2]
+ instance: [0, 1]
env:
MIGRATIONS_TEST_MIGRATE: 1
diff --git a/.github/workflows/backend-test-py3.6.yml b/.github/workflows/backend-test-py3.6.yml
index 96ae8f2d25968f..747a95bbe9ce71 100644
--- a/.github/workflows/backend-test-py3.6.yml
+++ b/.github/workflows/backend-test-py3.6.yml
@@ -13,7 +13,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
- instance: [0, 1, 2]
+ instance: [0, 1]
env:
MIGRATIONS_TEST_MIGRATE: 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.