Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Add Activated Alert Rules to alert rule index #69124

Merged
merged 10 commits into from
Apr 18, 2024
Merged
Prev Previous commit
Next Next commit
nits
  • Loading branch information
nhsiehgit committed Apr 18, 2024
commit aa40fdb6eb4946d55b84a1d2395d515037349442
26 changes: 13 additions & 13 deletions static/app/views/alerts/list/rules/activatedRuleRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ function ActivatedRuleListRow({
<ErrorBoundary>
<AlertNameWrapper>
<AlertNameAndStatus>
<AlertName>
<div>{rule.name}</div>
</AlertName>
<AlertName>{rule.name}</AlertName>
<AlertActivationDate>{renderLatestActivation()}</AlertActivationDate>
</AlertNameAndStatus>
</AlertNameWrapper>
Expand Down Expand Up @@ -295,12 +293,7 @@ function ActivatedRuleListRow({
<ActorAvatar actor={teamActor} size={24} />
) : (
<AssigneeWrapper>
{!projectsLoaded && (
<LoadingIndicator
mini
style={{height: '24px', margin: 0, marginRight: 11}}
/>
)}
{!projectsLoaded && <StyledLoadingIndicator mini />}
{projectsLoaded && (
<DropdownAutoComplete
data-test-id="alert-row-assignee"
Expand Down Expand Up @@ -351,6 +344,7 @@ function ActivatedRuleListRow({
);
}

// TODO: see static/app/components/profiling/flex.tsx and utilize the FlexContainer styled component
const FlexCenter = styled('div')`
display: flex;
align-items: center;
Expand Down Expand Up @@ -434,23 +428,29 @@ const IconContainer = styled('div')`
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
width: ${p => p.theme.iconSizes.lg};
height: ${p => p.theme.iconSizes.lg};
flex-shrink: 0;
`;

const MenuItemWrapper = styled('div')`
display: flex;
align-items: center;
font-size: 13px;
font-size: ${p => p.theme.fontSizeSmall};
`;

const Label = styled(TextOverflow)`
margin-left: 6px;
margin-left: ${space(0.75)};
`;

const MarginLeft = styled('div')`
margin-left: ${space(1)};
`;

const StyledLoadingIndicator = styled(LoadingIndicator)`
height: 24px;
margin: 0;
margin-right: ${space(1.5)};
`;

export default ActivatedRuleListRow;
22 changes: 12 additions & 10 deletions static/app/views/alerts/list/rules/row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,7 @@ function RuleListRow({
<ActorAvatar actor={teamActor} size={24} />
) : (
<AssigneeWrapper>
{!projectsLoaded && (
<LoadingIndicator
mini
style={{height: '24px', margin: 0, marginRight: 11}}
/>
)}
{!projectsLoaded && <StyledLoadingIndicator mini />}
{projectsLoaded && (
<DropdownAutoComplete
data-test-id="alert-row-assignee"
Expand Down Expand Up @@ -423,6 +418,7 @@ function RuleListRow({
);
}

// TODO: see static/app/components/profiling/flex.tsx and utilize the FlexContainer styled component
const FlexCenter = styled('div')`
display: flex;
align-items: center;
Expand Down Expand Up @@ -506,23 +502,29 @@ const IconContainer = styled('div')`
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
width: ${p => p.theme.iconSizes.lg};
height: ${p => p.theme.iconSizes.lg};
flex-shrink: 0;
`;

const MenuItemWrapper = styled('div')`
display: flex;
align-items: center;
font-size: 13px;
font-size: ${p => p.theme.fontSizeSmall};
`;

const Label = styled(TextOverflow)`
margin-left: 6px;
margin-left: ${space(0.75)};
`;

const MarginLeft = styled('div')`
margin-left: ${space(1)};
`;

const StyledLoadingIndicator = styled(LoadingIndicator)`
height: 24px;
margin: 0;
margin-right: ${space(1.5)};
`;

export default RuleListRow;