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

Secrets consistency for the chart. Bugfixing. #1

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,36 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## v1.2.46 (2023-06-22)

### Added

- Make it possible to completely delete a rotation oncall [1505](https://github.com/grafana/oncall/issues/1505)
- Polish rotation modal form oncall [1506](https://github.com/grafana/oncall/issues/1506)
- Quick actions when editing a schedule oncall [1507](https://github.com/grafana/oncall/issues/1507)
- Enable schedule related profile settings oncall [1508](https://github.com/grafana/oncall/issues/1508)
- Highlight user shifts oncall [1509](https://github.com/grafana/oncall/issues/1509)
- Rename or Description for Schedules Rotations [1460](https://github.com/grafana/oncall/issues/1406)
- Secrets consistency for the chart. Bugfixing [#1016](https://github.com/grafana/oncall/pull/1016)
- Make it possible to completely delete a rotation oncall ([#1505](https://github.com/grafana/oncall/issues/1505))
- Polish rotation modal form oncall ([#1506](https://github.com/grafana/oncall/issues/1506))
- Quick actions when editing a schedule oncall ([#1507](https://github.com/grafana/oncall/issues/1507))
- Enable schedule related profile settings oncall ([#1508](https://github.com/grafana/oncall/issues/1508))
- Highlight user shifts oncall ([#1509](https://github.com/grafana/oncall/issues/1509))
- Rename or Description for Schedules Rotations ([#1460](https://github.com/grafana/oncall/issues/1406))
- Add documentation for OnCall metrics exporter ([#2149](https://github.com/grafana/oncall/pull/2149))
- Add dashboard for OnCall metrics ([#1973](https://github.com/grafana/oncall/pull/1973))

## Changed

- Change mobile shift notifications title and subtitle by @imtoori ([#2288](https://github.com/grafana/oncall/pull/2288))
- Make web schedule updates to trigger sync refresh of its ical representation ([#2279](https://github.com/grafana/oncall/pull/2279))

## Fixed

- Fix duplicate orders for user notification policies by @vadimkerr ([#2278](https://github.com/grafana/oncall/pull/2278))
- Fix broken markup on alert group page, declutter, make time format consistent [#2296](https://github.com/grafana/oncall/pull/2295)
- Fix broken markup on alert group page, declutter, make time format consistent ([#2296](https://github.com/grafana/oncall/pull/2295))

## v1.2.45 (2023-06-19)

### Changed

- Change .Values.externalRabbitmq.passwordKey from `password` to `""` (default value `rabbitmq-password`) ([#864](https://github.com/grafana/oncall/pull/864))
- Remove deprecated `permissions` string array from the internal API user serializer by @joeyorlando ([#2269](https://github.com/grafana/oncall/pull/2269))
- Make web schedule updates to trigger sync refresh of its ical representation ([#2279](https://github.com/grafana/oncall/pull/2279))

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,116 +16,140 @@ export interface TemplateForEdit {
additionalDescription?: string;
};
isRoute?: boolean;
type?: 'html' | 'plain' | 'image' | 'boolean';
}

export const commonTemplateForEdit: { [id: string]: TemplateForEdit } = {
web_title_template: {
displayName: 'Web title',
name: TemplateOptions.WebTitle.key,
description: '',
type: 'html',
},
web_message_template: {
displayName: 'Web message',
name: TemplateOptions.WebMessage.key,
description: '',
type: 'html',
},
slack_title_template: {
name: 'slack_title_template',
displayName: TemplateOptions.SlackTitle.key,
description: '',
additionalData: {
chatOpsName: 'slack',
chatOpsDisplayName: 'Slack',
data: 'Click "Acknowledge" and then "Unacknowledge" in Slack to trigger re-rendering.',
},
type: 'plain',
},
sms_title_template: {
name: TemplateOptions.SMS.key,
displayName: 'Sms title',
description: '',
type: 'plain',
},
phone_call_title_template: {
name: TemplateOptions.Phone.key,
displayName: 'Phone call title',
description: '',
type: 'plain',
},
email_title_template: {
name: TemplateOptions.EmailTitle.key,
displayName: 'Email title',
description: '',
type: 'plain',
},
telegram_title_template: {
name: TemplateOptions.TelegramTitle.key,
displayName: 'Telegram title',
description: '',
additionalData: {
chatOpsName: 'telegram',
chatOpsDisplayName: 'Telegram',
},
type: 'plain',
},
slack_message_template: {
name: TemplateOptions.SlackMessage.key,
displayName: 'Slack message',
description: '',
additionalData: {
chatOpsName: 'slack',
chatOpsDisplayName: 'Slack',
data: 'Click "Acknowledge" and then "Unacknowledge" in Slack to trigger re-rendering.',
},
type: 'plain',
},
email_message_template: {
name: TemplateOptions.EmailMessage.key,
displayName: 'Email message',
description: '',
type: 'plain',
},
telegram_message_template: {
name: TemplateOptions.TelegramMessage.key,
displayName: 'Telegram message',
description: '',
additionalData: {
chatOpsName: 'telegram',
chatOpsDisplayName: 'Telegram',
},
type: 'plain',
},
slack_image_url_template: {
name: TemplateOptions.SlackImage.key,
displayName: 'Slack image url',
description: '',
additionalData: {
chatOpsName: 'slack',
chatOpsDisplayName: 'Slack',
data: 'Click "Acknowledge" and then "Unacknowledge" in Slack to trigger re-rendering.',
},
type: 'plain',
},
web_image_url_template: {
name: TemplateOptions.WebImage.key,
displayName: 'Web image url',
description: '',
type: 'image',
},
telegram_image_url_template: {
name: TemplateOptions.TelegramImage.key,
displayName: 'Telegram image url',
description: '',
additionalData: {
chatOpsName: 'telegram',
chatOpsDisplayName: 'Telegram',
},
type: 'image',
},
grouping_id_template: {
name: TemplateOptions.Grouping.key,
displayName: 'Grouping',
description:
'Reduce noise, minimize duplication with Alert Grouping, based on time, alert content, and even multiple features at the same time. Check the cheasheet to customize your template.',
type: 'plain',
},
acknowledge_condition_template: {
name: TemplateOptions.Autoacknowledge.key,
displayName: 'Acknowledge condition',
description: '',
type: 'boolean',
},
resolve_condition_template: {
name: TemplateOptions.Resolve.key,
displayName: 'Resolve condition',
description:
'When monitoring systems return to normal, they can send "resolve" alerts. OnCall can use these signals to resolve alert groups accordingly.',
type: 'boolean',
},
source_link_template: {
name: TemplateOptions.SourceLink.key,
displayName: 'Source link',
description: '',
type: 'plain',
},
route_template: {
name: TemplateOptions.Routing.key,
Expand All @@ -137,5 +161,6 @@ export const commonTemplateForEdit: { [id: string]: TemplateForEdit } = {
data: 'Selected Alert will be directed to this route',
},
isRoute: true,
type: 'boolean',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@
.integrationBlock__heading {
background-color: var(--background-secondary);
border: var(--border-medium) !important;
border-radius: 0 !important;
border-top-left-radius: 4px !important;
border-top-right-radius: 4px !important;
border-radius: 4px !important;

&--noBorderBottom {
border-bottom-left-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
}

.integrationBlock__content {
background: var(--background-primary);
border: var(--border-medium) !important;

border-top: none !important;
padding-bottom: 0;
border-bottom-left-radius: 4px !important;
border-bottom-right-radius: 4px !important;

&--collapsedBorder {
padding-left: 0;
padding-right: 0;
padding-bottom: 24px;
}
}
20 changes: 11 additions & 9 deletions grafana-plugin/src/components/Integrations/IntegrationBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const cx = cn.bind(styles);

interface IntegrationBlockProps {
className?: string;
hasCollapsedBorder: boolean;
noContent: boolean;
heading: React.ReactNode;
content: React.ReactNode;
toggle?: () => void;
Expand All @@ -20,24 +20,26 @@ interface IntegrationBlockProps {
const IntegrationBlock: React.FC<IntegrationBlockProps> = ({
heading,
content,
hasCollapsedBorder,
noContent,
className,
toggle = noop,
}) => {
return (
<div className={cx('integrationBlock', className)}>
{heading && (
<Block bordered shadowed className={cx('integrationBlock__heading')} onClick={toggle}>
<Block
bordered
shadowed
className={cx('integrationBlock__heading', {
'integrationBlock__heading--noBorderBottom': !noContent,
})}
onClick={toggle}
>
{heading}
</Block>
)}
{content && (
<div
className={cx('integrationBlock__content', {
'integrationBlock__content--collapsedBorder': hasCollapsedBorder,
})}
onClick={toggle}
>
<div className={cx('integrationBlock__content')} onClick={toggle}>
{content}
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.spacing {
margin-bottom: 12px;
}

.icon-exclamation {
color: var(--error-text-color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CollapsedIntegrationRouteDisplay: React.FC<CollapsedIntegrationRouteDispla
return (
<>
<IntegrationBlock
hasCollapsedBorder={false}
noContent={false}
key={channelFilterId}
toggle={toggle}
heading={
Expand Down Expand Up @@ -98,7 +98,7 @@ const CollapsedIntegrationRouteDisplay: React.FC<CollapsedIntegrationRouteDispla
</div>
}
content={
<div className={cx('spacing')}>
<div>
<div className={cx('collapsedRoute__container')}>
{chatOpsAvailableChannels.length > 0 && (
<div className={cx('collapsedRoute__item')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
&:hover {
background: var(--cards-background);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const ExpandedIntegrationRouteDisplay: React.FC<ExpandedIntegrationRouteDisplayP
return (
<>
<IntegrationBlock
hasCollapsedBorder
noContent={false}
key={channelFilterId}
heading={
<HorizontalGroup justify={'space-between'}>
Expand Down
Loading