Skip to content

Commit 29fcff2

Browse files
authored
feat(aci): Add disabled text to list views and properly apply system created icon (#97313)
1 parent bf2f564 commit 29fcff2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

static/app/components/workflowEngine/gridCell/automationTitleCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function AutomationTitleCell({automation}: Props) {
1414
<TitleCell
1515
name={automation.name}
1616
link={makeAutomationDetailsPathname(organization.slug, automation.id)}
17-
systemCreated={!automation.createdBy}
17+
disabled={!automation.enabled}
1818
/>
1919
);
2020
}

static/app/components/workflowEngine/gridCell/titleCell.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export function TitleCell({
2323
className,
2424
}: TitleCellProps) {
2525
return (
26-
<TitleWrapper to={link} disabled={disabled} className={className}>
27-
<Name disabled={disabled}>
26+
<TitleWrapper to={link} className={className}>
27+
<Name>
2828
<NameText>{name}</NameText>
2929
{systemCreated && <CreatedBySentryIcon size="xs" color="subText" />}
3030
{disabled && <span>&mdash; Disabled</span>}
@@ -34,7 +34,7 @@ export function TitleCell({
3434
);
3535
}
3636

37-
const Name = styled('div')<{disabled: boolean}>`
37+
const Name = styled('div')`
3838
color: ${p => p.theme.textColor};
3939
display: flex;
4040
align-items: center;
@@ -51,7 +51,7 @@ const CreatedBySentryIcon = styled(IconSentry)`
5151
flex-shrink: 0;
5252
`;
5353

54-
const TitleWrapper = styled(Link)<{disabled: boolean}>`
54+
const TitleWrapper = styled(Link)`
5555
display: flex;
5656
flex-direction: column;
5757
gap: ${space(0.5)};

static/app/views/detectors/components/detectorLink.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {unreachable} from 'sentry/utils/unreachable';
2323
import useOrganization from 'sentry/utils/useOrganization';
2424
import useProjectFromId from 'sentry/utils/useProjectFromId';
2525
import {makeMonitorDetailsPathname} from 'sentry/views/detectors/pathnames';
26+
import {detectorTypeIsUserCreateable} from 'sentry/views/detectors/utils/detectorTypeConfig';
2627
import {getMetricDetectorSuffix} from 'sentry/views/detectors/utils/metricDetectorSuffix';
2728

2829
type DetectorLinkProps = {
@@ -183,7 +184,8 @@ export function DetectorLink({detector, className}: DetectorLinkProps) {
183184
className={className}
184185
name={detector.name}
185186
link={makeMonitorDetailsPathname(org.slug, detector.id)}
186-
systemCreated={!detector.createdBy}
187+
systemCreated={!detectorTypeIsUserCreateable(detector.type)}
188+
disabled={!detector.enabled}
187189
details={
188190
<Fragment>
189191
{project && (

0 commit comments

Comments
 (0)