Skip to content

Commit

Permalink
remove unused AlertTemplatesForm
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Mordasov committed Jan 2, 2024
1 parent c93395b commit f05f3ac
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 585 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AppFeature } from 'state/features';

import { Template, TemplateForEdit, commonTemplateForEdit } from './CommonAlertTemplatesForm.config';
import { TemplateForEdit, commonTemplateForEdit } from './CommonAlertTemplatesForm.config';

export const getTemplatesForEdit = (features: Record<string, boolean>) => {
if (features[AppFeature.MsTeams]) {
Expand Down Expand Up @@ -42,165 +42,4 @@ const additionalTemplateForEdit: { [id: string]: TemplateForEdit } = {
},
};

export const getTemplatesToRender = (features: Record<string, boolean>) => {
if (features[AppFeature.MsTeams]) {
return templatesToRenderWithMsTeams;
}
return templatesToRender;
};

export const templatesToRender: Template[] = [
{
name: 'web_title_template',
group: 'web',
},
{
name: 'slack_title_template',
group: 'slack',
},
{
name: 'sms_title_template',
group: 'sms',
},
{
name: 'phone_call_title_template',
group: 'phone',
},
{
name: 'email_title_template',
group: 'email',
},
{
name: 'telegram_title_template',
group: 'telegram',
},
{
name: 'slack_message_template',
group: 'slack',
},
{
name: 'web_message_template',
group: 'web',
},
{
name: 'email_message_template',
group: 'email',
},
{
name: 'telegram_message_template',
group: 'telegram',
},
{
name: 'slack_image_url_template',
group: 'slack',
},
{
name: 'web_image_url_template',
group: 'web',
},
{
name: 'telegram_image_url_template',
group: 'telegram',
},
{
name: 'grouping_id_template',
group: 'alert behaviour',
},
{
name: 'acknowledge_condition_template',
group: 'alert behaviour',
},
{
name: 'resolve_condition_template',
group: 'alert behaviour',
},
{
name: 'source_link_template',
group: 'alert behaviour',
},
];

export const templatesToRenderWithMsTeams: Template[] = [
{
name: 'web_title_template',
group: 'web',
},
{
name: 'slack_title_template',
group: 'slack',
},
{
name: 'sms_title_template',
group: 'sms',
},
{
name: 'phone_call_title_template',
group: 'phone',
},
{
name: 'email_title_template',
group: 'email',
},
{
name: 'telegram_title_template',
group: 'telegram',
},
{
name: 'msteams_title_template',
group: 'microsoft teams',
},
{
name: 'msteams_message_template',
group: 'microsoft teams',
},
{
name: 'msteams_image_url_template',
group: 'microsoft teams',
},
{
name: 'slack_message_template',
group: 'slack',
},
{
name: 'web_message_template',
group: 'web',
},
{
name: 'email_message_template',
group: 'email',
},
{
name: 'telegram_message_template',
group: 'telegram',
},
{
name: 'slack_image_url_template',
group: 'slack',
},
{
name: 'web_image_url_template',
group: 'web',
},
{
name: 'telegram_image_url_template',
group: 'telegram',
},
{
name: 'grouping_id_template',
group: 'alert behaviour',
},
{
name: 'acknowledge_condition_template',
group: 'alert behaviour',
},
{
name: 'resolve_condition_template',
group: 'alert behaviour',
},
{
name: 'source_link_template',
group: 'alert behaviour',
},
];

export const FORM_NAME = 'AlertTemplates';

This file was deleted.

Loading

0 comments on commit f05f3ac

Please sign in to comment.