File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
public/pages/CreateTrigger Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,14 @@ import {
2626import { FormikFieldText , FormikComboBox } from '../../../../components/FormControls' ;
2727import { isInvalid , hasError , validateActionName } from '../../../../utils/validate' ;
2828import { validateDestination } from './utils/validate' ;
29- import { DEFAULT_ACTION_TYPE , MANAGE_CHANNELS_PATH } from '../../utils/constants' ;
29+ import {
30+ DEFAULT_ACTION_TYPE ,
31+ MANAGE_CHANNELS_PATH ,
32+ webhookNotificationActionMessageComponent ,
33+ defaultNotificationActionMessageComponent ,
34+ } from '../../utils/constants' ;
3035import NotificationsCallOut from '../NotificationsCallOut' ;
3136import MinimalAccordion from '../../../../components/FeatureAnywhereContextMenu/MinimalAccordion' ;
32- import Message from './actions' ;
3337
3438const Action = ( {
3539 action,
@@ -63,9 +67,9 @@ const Action = ({
6367 let ActionComponent ;
6468 const actionLabel = 'Notification' ;
6569 if ( type === 'webhook' ) {
66- ActionComponent = ( props ) => < Message isSubjectDisabled { ... props } /> ;
70+ ActionComponent = webhookNotificationActionMessageComponent ;
6771 } else {
68- ActionComponent = ( props ) => < Message { ... props } /> ;
72+ ActionComponent = defaultNotificationActionMessageComponent ;
6973 }
7074
7175 const manageChannelsUrl = httpClient . basePath . prepend ( MANAGE_CHANNELS_PATH ) ;
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: Apache-2.0
44 */
55
6+ import React from 'react' ;
7+ import Message from '../components/Action/actions' ;
8+
69export const DEFAULT_MESSAGE_SOURCE = {
710 BUCKET_LEVEL_MONITOR : `
811 Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.
@@ -77,3 +80,8 @@ export const DEFAULT_TRIGGER_NAME = 'New trigger';
7780export const DEFAULT_ACTION_TYPE = 'slack' ;
7881
7982export const MANAGE_CHANNELS_PATH = `/app/notifications-dashboards#/channels` ;
83+
84+ export const webhookNotificationActionMessageComponent = ( props ) => (
85+ < Message isSubjectDisabled { ...props } />
86+ ) ;
87+ export const defaultNotificationActionMessageComponent = ( props ) => < Message { ...props } /> ;
You can’t perform that action at this time.
0 commit comments