diff --git a/CHANGELOG.md b/CHANGELOG.md index 278c8470c4..c6346991c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix team search when filtering resources by @vadimkerr ([#1680](https://github.com/grafana/oncall/pull/1680)) - Fix issue when trying to scroll in Safari ([#415](https://github.com/grafana/oncall/issues/415)) +### Changed + +- Display warnings on users page in a clean and consistent way by @iskhakov ([#1681](https://github.com/grafana/oncall/pull/1681)) + ## v1.2.6 (2023-03-30) ### Fixed diff --git a/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.tsx b/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.tsx index 59fa375957..5ffb7c3e07 100644 --- a/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.tsx +++ b/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.tsx @@ -4,8 +4,8 @@ import { Tooltip, VerticalGroup } from '@grafana/ui'; import cn from 'classnames/bind'; import PluginLink from 'components/PluginLink/PluginLink'; -import ScheduleCounter from 'components/ScheduleCounter/ScheduleCounter'; import { ScheduleQualityDetails } from 'components/ScheduleQualityDetails/ScheduleQualityDetails'; +import StatusCounterBadgeWithTooltip from 'components/StatusCounterBadgeWithTooltip/StatusCounterBadgeWithTooltip'; import Tag from 'components/Tag/Tag'; import Text from 'components/Text/Text'; import { Schedule, ScheduleScoreQualityResponse, ScheduleScoreQualityResult } from 'models/schedule/schedule.types'; @@ -40,7 +40,7 @@ const ScheduleQuality: FC = ({ schedule, lastUpdated }) => <>
{relatedEscalationChains?.length > 0 && schedule?.number_of_escalation_chains > 0 && ( - = ({ schedule, lastUpdated }) => )} {schedule.warnings?.length > 0 && ( - ; count: number; tooltipTitle: string; @@ -23,7 +23,7 @@ const typeToIcon = { const cx = cn.bind(styles); -const ScheduleCounter: FC = (props) => { +const StatusCounterBadgeWithTooltip: FC = (props) => { const { type, count, tooltipTitle, tooltipContent, onHover, addPadding } = props; return ( @@ -55,4 +55,4 @@ const ScheduleCounter: FC = (props) => { ); }; -export default ScheduleCounter; +export default StatusCounterBadgeWithTooltip; diff --git a/grafana-plugin/src/pages/schedules/Schedules.tsx b/grafana-plugin/src/pages/schedules/Schedules.tsx index 84f0aea9e2..42edf46ea9 100644 --- a/grafana-plugin/src/pages/schedules/Schedules.tsx +++ b/grafana-plugin/src/pages/schedules/Schedules.tsx @@ -11,8 +11,8 @@ import Avatar from 'components/Avatar/Avatar'; import { MatchMediaTooltip } from 'components/MatchMediaTooltip/MatchMediaTooltip'; import NewScheduleSelector from 'components/NewScheduleSelector/NewScheduleSelector'; import PluginLink from 'components/PluginLink/PluginLink'; -import ScheduleCounter from 'components/ScheduleCounter/ScheduleCounter'; import { SchedulesFiltersType } from 'components/SchedulesFilters/SchedulesFilters.types'; +import StatusCounterBadgeWithTooltip from 'components/StatusCounterBadgeWithTooltip/StatusCounterBadgeWithTooltip'; import Table from 'components/Table/Table'; import Text from 'components/Text/Text'; import TimelineMarks from 'components/TimelineMarks/TimelineMarks'; @@ -306,7 +306,7 @@ class SchedulesPage extends React.Component {item.number_of_escalation_chains > 0 && ( - 0 && ( - { } return ( -
- - {texts.join(', ')} -
+ + + {texts.map((warning, index) => ( + + {warning} + + ))} + + } + /> + ); }