Browse Source

chore(crons): Remove too many issues alert (#64126)

Now that we fixed the issues list display, this shouldn't be as big of a
problem. Also more users should understand issue thresholds
David Wang 1 year ago
parent
commit
bf26663171
1 changed files with 1 additions and 39 deletions
  1. 1 39
      static/app/views/monitors/components/monitorIssues.tsx

+ 1 - 39
static/app/views/monitors/components/monitorIssues.tsx

@@ -1,19 +1,15 @@
 import {Fragment, useState} from 'react';
 import styled from '@emotion/styled';
 
-import Alert from 'sentry/components/alert';
-import {Button, LinkButton} from 'sentry/components/button';
-import ButtonBar from 'sentry/components/buttonBar';
+import {LinkButton} from 'sentry/components/button';
 import EmptyStateWarning from 'sentry/components/emptyStateWarning';
 import GroupList from 'sentry/components/issues/groupList';
 import Panel from 'sentry/components/panels/panel';
 import PanelBody from 'sentry/components/panels/panelBody';
 import {SegmentedControl} from 'sentry/components/segmentedControl';
-import {IconClose} from 'sentry/icons';
 import {t} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
 import {getUtcDateString} from 'sentry/utils/dates';
-import useDismissAlert from 'sentry/utils/useDismissAlert';
 import usePageFilters from 'sentry/utils/usePageFilters';
 
 import type {Monitor, MonitorEnvironment} from '../types';
@@ -47,9 +43,6 @@ function MonitorIssuesEmptyMessage() {
 }
 
 function MonitorIssues({orgSlug, monitor, monitorEnvs}: Props) {
-  const {dismiss, isDismissed} = useDismissAlert({
-    key: `${orgSlug}:thresholds-setting-alert-dismissed`,
-  });
   const {selection} = usePageFilters();
   const {start, end, period} = selection.datetime;
   const timeProps =
@@ -81,37 +74,6 @@ function MonitorIssues({orgSlug, monitor, monitorEnvs}: Props) {
   // TODO(epurkhiser): We probably want to filter on envrionemnt
   return (
     <Fragment>
-      {!isDismissed && (
-        <Alert
-          type="warning"
-          showIcon
-          trailingItems={
-            <ButtonBar gap={1}>
-              <LinkButton
-                size="xs"
-                to={{
-                  pathname: `/organizations/${orgSlug}/crons/${monitor.slug}/edit/`,
-                  query: {
-                    environment: selection.environments,
-                    project: selection.projects,
-                  },
-                }}
-              >
-                {t('Monitor Settings')}
-              </LinkButton>
-              <Button
-                aria-label={t('Dismiss')}
-                size="xs"
-                borderless
-                icon={<IconClose />}
-                onClick={dismiss}
-              />
-            </ButtonBar>
-          }
-        >
-          {t('Too many issues? Configure thresholds in your monitor settings')}
-        </Alert>
-      )}
       <ControlsWrapper>
         <SegmentedControl
           aria-label={t('Issue category')}