-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[type:feat]Alert module adapts to namespace transformation #5692
base: master
Are you sure you want to change the base?
Conversation
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import jakarta.validation.Valid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not change the order
@@ -156,6 +156,12 @@ private List<AlertReceiverDTO> matchReceiverByRules(final AlarmContent alert) { | |||
return true; | |||
} | |||
|
|||
if (!Objects.isNull(item.getNamespaceId())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use StringUtils.isNotBlank
@Override | ||
public void deleteReceiver(final List<String> ids) { | ||
public void deleteByNamespaceId(final List<String> ids, final String namespaceId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the method deleteReceiverByNamespaceId
pls modify these changes, and check the alert module for shenyu-bootstrap |
@@ -75,61 +77,122 @@ public static void alarm(final AlarmContent alarmContent) { | |||
* @param labels Alarm labels | |||
*/ | |||
public static void alarm(final byte level, final String title, final String content, final Map<String, String> labels) { | |||
alarm(level, title, content, labels, SYS_DEFAULT_NAMESPACE_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be a fixed ‘SYS_DEFAULT_NAMESPACE_ID’
… into feat_namespace_alert
Make sure that: