From f7beced64e0d6299eb45d3a5bd35b01fc2a30cda Mon Sep 17 00:00:00 2001 From: Rares Mardare Date: Mon, 27 May 2024 16:28:56 +0300 Subject: [PATCH] More emotionjs migration changes (#4362) # What this PR does - Get rid of some of the hardcoded css variables defined in `vars.css`, specifically tags-related, but not only - Migrated a few more components to emotion --- grafana-plugin/src/assets/style/vars.css | 32 -- .../src/components/CardButton/CardButton.tsx | 4 +- .../src/components/Collapse/Collapse.tsx | 2 +- grafana-plugin/src/components/GList/GList.tsx | 2 +- .../src/components/GTable/GTable.tsx | 8 +- .../IntegrationCollapsibleTreeView.tsx | 4 +- .../IntegrationInputField.tsx | 2 +- .../Integrations/IntegrationBlock.tsx | 2 +- .../Integrations/IntegrationBlockItem.tsx | 6 +- .../Integrations/IntegrationTemplateBlock.tsx | 6 +- .../NewScheduleSelector.tsx | 10 +- .../PageErrorHandlingWrapper.tsx | 6 +- .../ScheduleBorderedAvatar.tsx | 8 +- .../ScheduleFilters/ScheduleFilters.tsx | 4 +- .../ScheduleQuality/ScheduleQuality.tsx | 4 +- .../ScheduleQualityDetails.tsx | 32 +- .../ScheduleQualityProgressBar.tsx | 2 +- .../src/components/SourceCode/SourceCode.tsx | 4 +- grafana-plugin/src/components/Table/Table.tsx | 6 +- grafana-plugin/src/components/Tag/Tag.tsx | 5 +- .../components/TooltipBadge/TooltipBadge.tsx | 2 +- .../src/components/Tutorial/Tutorial.tsx | 18 +- .../components/Unauthorized/Unauthorized.tsx | 6 +- .../src/components/UserGroups/UserGroups.tsx | 14 +- .../VerticalTabsBar/VerticalTabsBar.tsx | 2 +- .../AddResponders/AddResponders.module.scss | 65 ---- .../AddResponders/AddResponders.styles.ts | 77 ++++ .../AddResponders/AddResponders.tsx | 51 +-- .../__snapshots__/AddResponders.test.tsx.snap | 32 +- .../parts/TeamResponder/TeamResponder.tsx | 45 +-- .../__snapshots__/TeamResponder.test.tsx.snap | 4 +- .../parts/UserResponder/UserResponder.tsx | 60 ++-- .../__snapshots__/UserResponder.test.tsx.snap | 4 +- .../containers/Rotations/Rotations.module.css | 91 ----- .../containers/Rotations/Rotations.styles.ts | 93 +++++ .../src/containers/Rotations/Rotations.tsx | 56 +-- .../containers/Rotations/ScheduleFinal.tsx | 26 +- .../Rotations/ScheduleOverrides.tsx | 35 +- .../containers/Rotations/SchedulePersonal.tsx | 26 +- .../ScheduleSlot/ScheduleSlot.module.css | 128 ------- .../containers/ScheduleSlot/ScheduleSlot.tsx | 203 +++++++++-- grafana-plugin/src/navbar/Header/Header.tsx | 18 +- .../EscalationChains.module.css | 50 --- .../EscalationChains.styles.ts | 61 ++++ .../escalation-chains/EscalationChains.tsx | 50 +-- .../src/pages/incident/Incident.helpers.tsx | 43 ++- .../src/pages/incident/Incident.module.scss | 209 ----------- .../src/pages/incident/Incident.tsx | 328 +++++++++++++++--- .../src/pages/incidents/Incidents.module.scss | 102 ------ .../src/pages/incidents/Incidents.tsx | 199 +++++++++-- .../incidents/parts/IncidentDropdown.tsx | 38 +- .../integrations/Integrations.module.scss | 59 ---- .../integrations/Integrations.styles.tsx | 71 ++++ .../src/pages/integrations/Integrations.tsx | 89 +++-- .../OutgoingWebhooks.module.scss | 17 - .../outgoing_webhooks/OutgoingWebhooks.tsx | 62 +++- .../src/pages/schedule/Schedule.module.css | 44 --- .../src/pages/schedule/Schedule.styles.ts | 45 +++ .../src/pages/schedule/Schedule.tsx | 42 ++- .../src/pages/schedules/Schedules.module.css | 41 --- .../src/pages/schedules/Schedules.styles.ts | 44 +++ .../src/pages/schedules/Schedules.tsx | 56 +-- .../pages/settings/SettingsPage.module.css | 3 - .../src/pages/settings/SettingsPage.tsx | 31 +- .../src/pages/users/Users.module.css | 67 ---- .../src/pages/users/Users.styles.ts | 74 ++++ grafana-plugin/src/pages/users/Users.tsx | 41 ++- grafana-plugin/src/styles/utils.styles.ts | 52 ++- 68 files changed, 1674 insertions(+), 1449 deletions(-) delete mode 100644 grafana-plugin/src/containers/AddResponders/AddResponders.module.scss create mode 100644 grafana-plugin/src/containers/AddResponders/AddResponders.styles.ts create mode 100644 grafana-plugin/src/containers/Rotations/Rotations.styles.ts delete mode 100644 grafana-plugin/src/containers/ScheduleSlot/ScheduleSlot.module.css delete mode 100644 grafana-plugin/src/pages/escalation-chains/EscalationChains.module.css create mode 100644 grafana-plugin/src/pages/escalation-chains/EscalationChains.styles.ts delete mode 100644 grafana-plugin/src/pages/incident/Incident.module.scss delete mode 100644 grafana-plugin/src/pages/incidents/Incidents.module.scss delete mode 100644 grafana-plugin/src/pages/integrations/Integrations.module.scss create mode 100644 grafana-plugin/src/pages/integrations/Integrations.styles.tsx delete mode 100644 grafana-plugin/src/pages/outgoing_webhooks/OutgoingWebhooks.module.scss delete mode 100644 grafana-plugin/src/pages/schedule/Schedule.module.css create mode 100644 grafana-plugin/src/pages/schedule/Schedule.styles.ts delete mode 100644 grafana-plugin/src/pages/schedules/Schedules.module.css create mode 100644 grafana-plugin/src/pages/schedules/Schedules.styles.ts delete mode 100644 grafana-plugin/src/pages/settings/SettingsPage.module.css delete mode 100644 grafana-plugin/src/pages/users/Users.module.css create mode 100644 grafana-plugin/src/pages/users/Users.styles.ts diff --git a/grafana-plugin/src/assets/style/vars.css b/grafana-plugin/src/assets/style/vars.css index fbd53fca..199730ed 100644 --- a/grafana-plugin/src/assets/style/vars.css +++ b/grafana-plugin/src/assets/style/vars.css @@ -7,12 +7,6 @@ --always-gray: #ccccdc; --title-marginBottom: 16px; --opacity: 0.5; - --tag-danger: #e02f44; - --tag-warning: #c69b06; - --tag-primary: #299c46; - --tag-secondary: #464c54; - --tag-secondary-transparent: rgba(204, 204, 220, 0.07); - --tag-border-link: rgba(56, 113, 220, 0.2); } .theme-light { @@ -32,25 +26,12 @@ --oncall-icon-stroke-color: #fff; --hover-selected: #f4f5f5; --background-canvas: #f4f5f5; - --background-primary: #fff; --background-secondary: #f4f5f5; --border-medium-color: rgba(36, 41, 46, 0.3); --border-medium: 1px solid rgba(36, 41, 46, 0.3); --border-strong: 1px solid rgba(36, 41, 46, 0.4); --border-weak: 1px solid rgba(36, 41, 46, 0.12); --shadows-z3: 0 13px 20px 1px rgba(24, 26, 27, 0.18); - --tag-background-primary: rgba(50, 116, 217, 0.15); - --tag-border-primary: rgb(136, 174, 233); - --tag-text-primary: rgb(26, 71, 139); - --tag-background-warning: rgba(255, 120, 10, 0.15); - --tag-border-warning: rgb(255, 176, 112); - --tag-text-warning: rgb(163, 73, 0); - --tag-background-success: rgba(86, 166, 75, 0.15); - --tag-border-success: rgb(148, 203, 140); - --tag-text-success: rgb(50, 96, 43); - --tag-background-danger: rgba(224, 47, 68, 0.15); - --tag-border-danger: rgb(237, 136, 148); - --tag-text-danger: rgb(147, 22, 37); --button-background: rgba(36, 41, 46, 0.08); --button-hover-background: rgba(36, 41, 46, 0.15); --box-background: rgba(244, 245, 245); @@ -79,25 +60,12 @@ --hover-selected-hardcoded: #34363d; --oncall-icon-stroke-color: #181b1f; --background-canvas: #111217; - --background-primary: #181b1f; --background-secondary: #22252b; --border-medium-color: rgba(204, 204, 220, 0.15); --border-medium: 1px solid rgba(204, 204, 220, 0.15); --border-strong: 1px solid rgba(204, 204, 220, 0.25); --border-weak: 1px solid rgba(204, 204, 220, 0.07); --shadows-z3: 0 8px 24px rgb(1, 4, 9); - --tag-background-primary: rgba(87, 148, 242, 0.15); - --tag-border-primary: rgb(13, 72, 163); - --tag-text-primary: rgb(158, 193, 247); - --tag-background-warning: rgba(255, 152, 48, 0.15); - --tag-border-warning: rgb(150, 75, 0); - --tag-text-warning: rgb(255, 190, 124); - --tag-background-success: rgba(115, 191, 105, 0.15); - --tag-border-success: rgb(49, 100, 43); - --tag-text-success: rgb(165, 214, 159); - --tag-background-danger: rgba(242, 73, 92, 0.15); - --tag-border-danger: rgb(151, 11, 27); - --tag-text-danger: rgb(247, 144, 156); --box-background: rgba(10, 10, 10, 0.4); --working-hours-shades-color: rgba(17, 18, 23, 0.15); --working-hours-shades-color-light: rgba(17, 18, 23, 0.1); diff --git a/grafana-plugin/src/components/CardButton/CardButton.tsx b/grafana-plugin/src/components/CardButton/CardButton.tsx index f3087e4e..c7a3303e 100644 --- a/grafana-plugin/src/components/CardButton/CardButton.tsx +++ b/grafana-plugin/src/components/CardButton/CardButton.tsx @@ -28,8 +28,8 @@ export const CardButton: FC = (props) => { className={cx(styles.root, { [styles.rootSelected]: selected })} data-testid="test__cardButton" > -
{icon}
-
+
{icon}
+
{description} {title} diff --git a/grafana-plugin/src/components/Collapse/Collapse.tsx b/grafana-plugin/src/components/Collapse/Collapse.tsx index 7595634c..6d5a296d 100644 --- a/grafana-plugin/src/components/Collapse/Collapse.tsx +++ b/grafana-plugin/src/components/Collapse/Collapse.tsx @@ -50,7 +50,7 @@ export const Collapse: FC = (props) => { data-testid="test__toggle" > -
{label}
+
{label}
{isOpen && (
diff --git a/grafana-plugin/src/components/GList/GList.tsx b/grafana-plugin/src/components/GList/GList.tsx index c26bb87b..4fcdf7c6 100644 --- a/grafana-plugin/src/components/GList/GList.tsx +++ b/grafana-plugin/src/components/GList/GList.tsx @@ -64,7 +64,7 @@ export const GList = (props: GListProps) => { } return ( -
+
{items ? ( items.map((item) => (
(props: key: 'check', title: ( 0 && rowSelection.selectedRowKeys.length === data?.length} /> @@ -124,7 +124,7 @@ export const GTable = (props: render: (item: any) => { return ( @@ -136,7 +136,7 @@ export const GTable = (props: }, [rowSelection, columnsProp, data]); return ( -
+
expandable={expandable} rowKey={rowKey} @@ -148,7 +148,7 @@ export const GTable = (props: {...restProps} /> {pagination && ( -
+
)} diff --git a/grafana-plugin/src/components/IntegrationCollapsibleTreeView/IntegrationCollapsibleTreeView.tsx b/grafana-plugin/src/components/IntegrationCollapsibleTreeView/IntegrationCollapsibleTreeView.tsx index 9cadb0e5..1d50da08 100644 --- a/grafana-plugin/src/components/IntegrationCollapsibleTreeView/IntegrationCollapsibleTreeView.tsx +++ b/grafana-plugin/src/components/IntegrationCollapsibleTreeView/IntegrationCollapsibleTreeView.tsx @@ -120,7 +120,7 @@ const IntegrationCollapsibleTreeItem: React.FC<{ return (
+ {elementPosition} ); diff --git a/grafana-plugin/src/components/IntegrationInputField/IntegrationInputField.tsx b/grafana-plugin/src/components/IntegrationInputField/IntegrationInputField.tsx index 25bee117..885b8f00 100644 --- a/grafana-plugin/src/components/IntegrationInputField/IntegrationInputField.tsx +++ b/grafana-plugin/src/components/IntegrationInputField/IntegrationInputField.tsx @@ -35,7 +35,7 @@ export const IntegrationInputField: React.FC = ({ return (
-
{renderInputField()}
+
{renderInputField()}
diff --git a/grafana-plugin/src/components/Integrations/IntegrationBlock.tsx b/grafana-plugin/src/components/Integrations/IntegrationBlock.tsx index 4e19558e..b9c68052 100644 --- a/grafana-plugin/src/components/Integrations/IntegrationBlock.tsx +++ b/grafana-plugin/src/components/Integrations/IntegrationBlock.tsx @@ -41,7 +41,7 @@ export const IntegrationBlock: React.FC = ({ )} {content && ( -
+
{content}
)} diff --git a/grafana-plugin/src/components/Integrations/IntegrationBlockItem.tsx b/grafana-plugin/src/components/Integrations/IntegrationBlockItem.tsx index 13c3b81f..26849a84 100644 --- a/grafana-plugin/src/components/Integrations/IntegrationBlockItem.tsx +++ b/grafana-plugin/src/components/Integrations/IntegrationBlockItem.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; @@ -12,8 +12,8 @@ export const IntegrationBlockItem: React.FC = (props) const styles = useStyles2(getStyles); return ( -
-
{props.children}
+
+
{props.children}
); }; diff --git a/grafana-plugin/src/components/Integrations/IntegrationTemplateBlock.tsx b/grafana-plugin/src/components/Integrations/IntegrationTemplateBlock.tsx index 2280e192..d25ea77a 100644 --- a/grafana-plugin/src/components/Integrations/IntegrationTemplateBlock.tsx +++ b/grafana-plugin/src/components/Integrations/IntegrationTemplateBlock.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { Button, InlineLabel, LoadingPlaceholder, useStyles2 } from '@grafana/ui'; @@ -41,11 +41,11 @@ export const IntegrationTemplateBlock: React.FC = } return ( -
+
{label} -
+
{renderInput()} {isTemplateEditable && ( <> diff --git a/grafana-plugin/src/components/NewScheduleSelector/NewScheduleSelector.tsx b/grafana-plugin/src/components/NewScheduleSelector/NewScheduleSelector.tsx index 28a1ba09..d7318e86 100644 --- a/grafana-plugin/src/components/NewScheduleSelector/NewScheduleSelector.tsx +++ b/grafana-plugin/src/components/NewScheduleSelector/NewScheduleSelector.tsx @@ -1,6 +1,6 @@ import React, { FC, useCallback, useState } from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { Button, Drawer, HorizontalGroup, Icon, VerticalGroup, useStyles2 } from '@grafana/ui'; import { Block } from 'components/GBlock/Block'; @@ -33,9 +33,9 @@ export const NewScheduleSelector: FC = ({ onHide, onCr return ( -
+
- + @@ -53,7 +53,7 @@ export const NewScheduleSelector: FC = ({ onHide, onCr - + @@ -69,7 +69,7 @@ export const NewScheduleSelector: FC = ({ onHide, onCr - + diff --git a/grafana-plugin/src/components/PageErrorHandlingWrapper/PageErrorHandlingWrapper.tsx b/grafana-plugin/src/components/PageErrorHandlingWrapper/PageErrorHandlingWrapper.tsx index 8d9409e9..814f8e9d 100644 --- a/grafana-plugin/src/components/PageErrorHandlingWrapper/PageErrorHandlingWrapper.tsx +++ b/grafana-plugin/src/components/PageErrorHandlingWrapper/PageErrorHandlingWrapper.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { VerticalGroup, useStyles2 } from '@grafana/ui'; @@ -52,9 +52,9 @@ export const PageErrorHandlingWrapper = function ({ const { wrongTeamNoPermissions } = errorData; return ( -
+
- + 403 {wrongTeamNoPermissions && ( diff --git a/grafana-plugin/src/components/ScheduleBorderedAvatar/ScheduleBorderedAvatar.tsx b/grafana-plugin/src/components/ScheduleBorderedAvatar/ScheduleBorderedAvatar.tsx index ccc8b722..ffa20a57 100644 --- a/grafana-plugin/src/components/ScheduleBorderedAvatar/ScheduleBorderedAvatar.tsx +++ b/grafana-plugin/src/components/ScheduleBorderedAvatar/ScheduleBorderedAvatar.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { useStyles2 } from '@grafana/ui'; interface ScheduleBorderedAvatarProps { @@ -20,13 +20,13 @@ export const ScheduleBorderedAvatar = function ({ }: ScheduleBorderedAvatarProps) { const styles = useStyles2(getStyles); - return
{renderSVG()}
; + return
{renderSVG()}
; function renderAvatarIcon() { return ( <> -
{renderAvatar()}
-
{renderIcon()}
+
{renderAvatar()}
+
{renderIcon()}
); } diff --git a/grafana-plugin/src/components/ScheduleFilters/ScheduleFilters.tsx b/grafana-plugin/src/components/ScheduleFilters/ScheduleFilters.tsx index 92c87ddb..c43ff373 100644 --- a/grafana-plugin/src/components/ScheduleFilters/ScheduleFilters.tsx +++ b/grafana-plugin/src/components/ScheduleFilters/ScheduleFilters.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { InlineSwitch, useStyles2 } from '@grafana/ui'; @@ -35,7 +35,7 @@ export const ScheduleFilters = (props: SchedulesFiltersProps) => { ); return ( -
+
= observer(({ schedule }) return ( <> -
+
{relatedScheduleEscalationChains?.length > 0 && schedule?.number_of_escalation_chains > 0 && ( = observer(({ schedule }) content={} >
- + Quality: {getScheduleQualityString(quality.total_score)}
diff --git a/grafana-plugin/src/components/ScheduleQualityDetails/ScheduleQualityDetails.tsx b/grafana-plugin/src/components/ScheduleQualityDetails/ScheduleQualityDetails.tsx index b64e86a6..43e9f3cd 100644 --- a/grafana-plugin/src/components/ScheduleQualityDetails/ScheduleQualityDetails.tsx +++ b/grafana-plugin/src/components/ScheduleQualityDetails/ScheduleQualityDetails.tsx @@ -30,12 +30,12 @@ export const ScheduleQualityDetails: FC = ({ qualit const warningComments = comments.filter((c) => c.type === 'warning'); return ( -
-
+
+
- + Schedule quality:{' '} - + {getScheduleQualityString(score)} @@ -53,10 +53,10 @@ export const ScheduleQualityDetails: FC = ({ qualit <> {/* Show Info comments */} {infoComments?.length > 0 && ( -
-
+
+
-
+
{infoComments.map((comment, index) => ( {comment.text} @@ -69,10 +69,10 @@ export const ScheduleQualityDetails: FC = ({ qualit {/* Show Warning comments afterwards */} {warningComments?.length > 0 && ( -
-
+
+
-
+
Rotation structure issues {warningComments.map((comment, index) => ( @@ -87,13 +87,13 @@ export const ScheduleQualityDetails: FC = ({ qualit )} {overloaded_users?.length > 0 && ( -
-
+
+
-
+
Overloaded users {overloaded_users.map((overloadedUser, index) => ( - + {overloadedUser.username} (+{overloadedUser.score}% avg) ))} @@ -115,7 +115,7 @@ export const ScheduleQualityDetails: FC = ({ qualit - + Calculation methodology @@ -126,7 +126,7 @@ export const ScheduleQualityDetails: FC = ({ qualit /> {expanded && ( - + The next 52 weeks (~1 year) are taken into account when generating the quality report. Refer to the{' '} = ({ classNa const classList = [styles.bar, className || '']; return ( -
+
{!numTotalSteps &&
} {renderSteps(numTotalSteps, completed)}
diff --git a/grafana-plugin/src/components/SourceCode/SourceCode.tsx b/grafana-plugin/src/components/SourceCode/SourceCode.tsx index 56357f11..96158c52 100644 --- a/grafana-plugin/src/components/SourceCode/SourceCode.tsx +++ b/grafana-plugin/src/components/SourceCode/SourceCode.tsx @@ -54,7 +54,7 @@ export const SourceCode: FC = ({ {showClipboardIconOnly ? ( = ({ /> ) : (
); }, - expandedRowClassName: (_record, index) => (index % 2 === 0 ? cx(styles.rowEven) : ''), + expandedRowClassName: (_record, index) => (index % 2 === 0 ? styles.rowEven : ''), } : null; }, [expandable]); @@ -61,11 +61,11 @@ export const GTable: FC = (props) => { columns={columns} data={data} expandable={expandableFn} - rowClassName={(_record, index) => (index % 2 === 0 ? cx(styles.rowEven) : '')} + rowClassName={(_record, index) => (index % 2 === 0 ? styles.rowEven : '')} {...restProps} /> {pagination && ( -
+
)} diff --git a/grafana-plugin/src/components/Tag/Tag.tsx b/grafana-plugin/src/components/Tag/Tag.tsx index 3dc9feb4..9934c18f 100644 --- a/grafana-plugin/src/components/Tag/Tag.tsx +++ b/grafana-plugin/src/components/Tag/Tag.tsx @@ -2,7 +2,7 @@ import React, { FC } from 'react'; import { css, cx } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; -import { useStyles2 } from '@grafana/ui'; +import { useStyles2, useTheme2 } from '@grafana/ui'; import { bem, getLabelCss } from 'styles/utils.styles'; interface TagProps { @@ -30,6 +30,7 @@ export enum TagColor { export const Tag: FC = (props) => { const { color, children, className, onClick, size = 'medium' } = props; + const theme = useTheme2(); const styles = useStyles2(getStyles); @@ -49,7 +50,7 @@ export const Tag: FC = (props) => { styles[color] : css` background-color: ${color}; - color: text; + color: ${theme.colors.primary.contrastText}; `; } diff --git a/grafana-plugin/src/components/TooltipBadge/TooltipBadge.tsx b/grafana-plugin/src/components/TooltipBadge/TooltipBadge.tsx index 858af3dc..888170e2 100644 --- a/grafana-plugin/src/components/TooltipBadge/TooltipBadge.tsx +++ b/grafana-plugin/src/components/TooltipBadge/TooltipBadge.tsx @@ -46,7 +46,7 @@ export const TooltipBadge: FC = (props) => { placement={placement || 'bottom-start'} interactive content={ -
+
{tooltipTitle} {tooltipContent && {tooltipContent}} diff --git a/grafana-plugin/src/components/Tutorial/Tutorial.tsx b/grafana-plugin/src/components/Tutorial/Tutorial.tsx index f6bb5ee2..0ad6a337 100644 --- a/grafana-plugin/src/components/Tutorial/Tutorial.tsx +++ b/grafana-plugin/src/components/Tutorial/Tutorial.tsx @@ -26,10 +26,10 @@ export const Tutorial: FC = (props) => { const styles = useStyles2(getStyles); return ( - -
{title}
-
-
+ +
{title}
+
+
@@ -38,7 +38,7 @@ export const Tutorial: FC = (props) => { Add integration with a monitoring system
-
+
@@ -47,7 +47,7 @@ export const Tutorial: FC = (props) => { Setup escalation chain to handle notifications
-
+
@@ -56,7 +56,7 @@ export const Tutorial: FC = (props) => { Connect to your chat workspace
-
+
@@ -65,7 +65,7 @@ export const Tutorial: FC = (props) => { Add your team calendar to define an on-call rotation.
-
+
@@ -81,7 +81,7 @@ export const Tutorial: FC = (props) => { const Arrow = () => { const styles = useStyles2(getStyles); return ( -
+
diff --git a/grafana-plugin/src/components/Unauthorized/Unauthorized.tsx b/grafana-plugin/src/components/Unauthorized/Unauthorized.tsx index 58c02971..cdb4ed25 100644 --- a/grafana-plugin/src/components/Unauthorized/Unauthorized.tsx +++ b/grafana-plugin/src/components/Unauthorized/Unauthorized.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { css, cx } from '@emotion/css'; +import { css } from '@emotion/css'; import { GrafanaTheme2, OrgRole } from '@grafana/data'; import { VerticalGroup, useStyles2 } from '@grafana/ui'; import { contextSrv } from 'grafana/app/core/core'; @@ -16,9 +16,9 @@ export const Unauthorized: FC = ({ requiredUserAction: { permission, fall const styles = useStyles2(getStyles); return ( -
+
- + 403 diff --git a/grafana-plugin/src/components/UserGroups/UserGroups.tsx b/grafana-plugin/src/components/UserGroups/UserGroups.tsx index a521a738..42373d38 100644 --- a/grafana-plugin/src/components/UserGroups/UserGroups.tsx +++ b/grafana-plugin/src/components/UserGroups/UserGroups.tsx @@ -95,14 +95,14 @@ export const UserGroups = (props: UserGroupsProps) => { }; const renderItem = (item: Item, index: number) => ( -
  • +
  • {renderUser(item.data)} {!disabled && ( -
    +
    @@ -114,7 +114,7 @@ export const UserGroups = (props: UserGroupsProps) => { ); return ( -
    +
    {!disabled && ( { renderItem={renderItem} axis="y" lockAxis="y" - helperClass={cx(styles.sortable)} + helperClass={styles.sortable} items={items} onSortEnd={onSortEnd} handleAddGroup={handleAddUserGroup} @@ -178,7 +178,7 @@ export const SortableList = SortableContainer( }, [items]); return ( -