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

[type:feat]Alert module adapts to namespace transformation #5692

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

478320
Copy link

@478320 478320 commented Oct 10, 2024

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

@478320
Copy link
Author

478320 commented Oct 10, 2024

#5623

import org.springframework.web.bind.annotation.RequestParam;

import jakarta.validation.Valid;
Copy link
Member

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())) {
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the method deleteReceiverByNamespaceId

@moremind
Copy link
Member

pls modify these changes, and check the alert module for shenyu-bootstrap

db/init/mysql/schema.sql Outdated Show resolved Hide resolved
@@ -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);
Copy link
Member

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’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants