|
@@ -1,10 +1,9 @@
|
|
|
-import {css} from '@emotion/react';
|
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
import {DateTime} from 'sentry/components/dateTime';
|
|
|
import {Tooltip} from 'sentry/components/tooltip';
|
|
|
import {CheckInStatus} from 'sentry/views/monitors/types';
|
|
|
-import {tickStyle} from 'sentry/views/monitors/utils';
|
|
|
+import {getTickStyle} from 'sentry/views/monitors/utils';
|
|
|
|
|
|
import {getAggregateStatus} from './utils/getAggregateStatus';
|
|
|
import {mergeBuckets} from './utils/mergeBuckets';
|
|
@@ -131,44 +130,7 @@ const JobTick = styled('div')<{
|
|
|
transform: translateY(-50%);
|
|
|
opacity: 0.7;
|
|
|
|
|
|
- ${p => {
|
|
|
- const style = tickStyle[p.status];
|
|
|
-
|
|
|
- if (style.hatchTick === undefined) {
|
|
|
- return css`
|
|
|
- background: ${p.theme[style.tickColor]};
|
|
|
- `;
|
|
|
- }
|
|
|
-
|
|
|
- return css`
|
|
|
- border: 1px solid ${p.theme[style.tickColor]};
|
|
|
- ${!p.roundedLeft && 'border-left-width: 0'};
|
|
|
- ${!p.roundedRight && 'border-right-width: 0'};
|
|
|
-
|
|
|
- background-size: 3px 3px;
|
|
|
- opacity: 0.5;
|
|
|
- background-image: linear-gradient(
|
|
|
- -45deg,
|
|
|
- ${p.theme[style.hatchTick]} 25%,
|
|
|
- transparent 25%,
|
|
|
- transparent 50%,
|
|
|
- ${p.theme[style.hatchTick]} 50%,
|
|
|
- ${p.theme[style.hatchTick]} 75%,
|
|
|
- transparent 75%,
|
|
|
- transparent
|
|
|
- ),
|
|
|
- linear-gradient(
|
|
|
- 45deg,
|
|
|
- ${p.theme[style.hatchTick]} 25%,
|
|
|
- transparent 25%,
|
|
|
- transparent 50%,
|
|
|
- ${p.theme[style.hatchTick]} 50%,
|
|
|
- ${p.theme[style.hatchTick]} 75%,
|
|
|
- transparent 75%,
|
|
|
- transparent
|
|
|
- );
|
|
|
- `;
|
|
|
- }};
|
|
|
+ ${p => getTickStyle(p.status, p.theme)};
|
|
|
|
|
|
${p =>
|
|
|
p.roundedLeft &&
|
|
@@ -182,4 +144,6 @@ const JobTick = styled('div')<{
|
|
|
border-top-right-radius: 2px;
|
|
|
border-bottom-right-radius: 2px;
|
|
|
`}
|
|
|
+ ${p => !p.roundedLeft && 'border-left-width: 0'};
|
|
|
+ ${p => !p.roundedRight && 'border-right-width: 0'};
|
|
|
`;
|