feat(notifications): add support for included topics
this can be used to configure processors to only process notifications that contain specific topics. if notification does not have a topic and included topics are configured, the notification will not get processed by the specific processor. this is mainly for the email processor but can be used by other processors as well. closes #32497 Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -64,6 +64,7 @@ export type NotificationProcessorFilters = {
|
||||
minSeverity?: NotificationSeverity;
|
||||
maxSeverity?: NotificationSeverity;
|
||||
excludedTopics?: string[];
|
||||
includedTopics?: string[];
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -43,5 +43,8 @@ export const getProcessorFiltersFromConfig = (config: Config) => {
|
||||
filter.excludedTopics = config.getOptionalStringArray(
|
||||
'filter.excludedTopics',
|
||||
);
|
||||
filter.includedTopics = config.getOptionalStringArray(
|
||||
'filter.includedTopics',
|
||||
);
|
||||
return filter;
|
||||
};
|
||||
|
||||
@@ -130,6 +130,7 @@ export type NotificationProcessorFilters = {
|
||||
minSeverity?: NotificationSeverity;
|
||||
maxSeverity?: NotificationSeverity;
|
||||
excludedTopics?: string[];
|
||||
includedTopics?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user