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

[Feature] Supports Bulletin to view all metrics. #2584

Merged
merged 93 commits into from
Aug 26, 2024
Merged

[Feature] Supports Bulletin to view all metrics. #2584

merged 93 commits into from
Aug 26, 2024

Conversation

zqr10159
Copy link
Member

What's changed?

image

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

- Implement new monitor bulletin functionality.
- Add corresponding UI components for bulletin management.
- Update app-data.json to include new menu item for monitor bulletin.
- Refactor bulletin.component.html and .spec.ts files.
- Create Bulletin.java class with Monitor, Status, and Metrics fields.
- Add BulletinService.java interface defining methods for bulletin operations.
…tions.

- Create Bulletin.java with JPA annotations for database mapping.
- Add BulletinDao interface extending JpaRepository and JpaSpecificationExecutor.
- Implement BulletinServiceImpl with methods for bulletin operations.
- Update BulletinController with new endpoints for bulletin management.
- Refactor AlertDefinesController to remove unnecessary search criteria.- Add and modify tests for BulletinService and BulletinDao.

BREAKING CHANGE: This commit introduces changes to the database schema and
requires migration for existing databases to incorporate the Bulletin entity.
…ations.- Create Bulletin.java with JPA annotations for database mapping.

- Add BulletinDao interface extending JpaRepository and JpaSpecificationExecutor.
- Implement BulletinServiceImpl with methods for bulletin operations.
- Update BulletinController with new endpoints for bulletin management.
- Refactor AlertDefinesController to remove unnecessary search criteria.
- Add and modify tests for BulletinService and BulletinDao.

BREAKING CHANGE: This commit introduces changes to the database schema and
requires migration for existing databases to incorporate the Bulletin entity.
Implement the Bulletin entity with JPA annotations for database mapping, along with a service layer for bulletin operations. Update the controller and tests accordingly.

BREAKING CHANGE: This commit introduces changes to the database schema and requires migration for existing databases to incorporate the Bulletin entity.
Introduce a dropdown menu in the bulletin component for improved user
interaction. The dropdown offers multiple options for users to select
and submit as part of the bulletin form.
Implement a new endpoint `/apps/defines` in the backend to support
retrieving application definitions. Extend the `AppController` and
`AppService` with new methods to handle this functionality. Additionally,
introduce internationalization (i18n) support for application names,
providing localized versions of app names in the frontend.The frontend `AppDefineService` has been updated to consume the new
endpoint and manage the application define list. Changes in the
`bulletin.component.html` and `bulletin.component.ts` files include the
renaming of variables and the addition of new functionality to handle
the application define selection.

BREAKING CHANGE: The introduction of i18n support changes the data
structure and may affect existing clients that rely on the previous
format.
Replace the existing metric dropdown in the bulletin component with a
tree structure to facilitate hierarchical metric selection. This new
interface allows users to navigate and choose metrics in a more intuitive
and visual manner.
Replace the metric dropdown in the bulletin component with a transfer
component to improve the user experience for selecting metrics. The new
transfer component allows users to easily navigate and transfer metrics
between different categories.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 2568 files.

Valid Invalid Ignored Fixed
1099 2 1467 0
Click to see the invalid file list
  • manager/src/main/java/org/apache/hertzbeat/manager/service/impl/BulletinServiceImpl.java
  • web-app/src/app/pojo/Fields.ts
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

zqr10159 and others added 7 commits August 22, 2024 17:45
Code refactor includes:
- Standardizing import statements across various files by removing unused imports and adjusting import formatting for consistency.
- Consolidating and organizing the components within modules for better readability and
  maintainability, specifically in `BulletinController.java`, `BulletinServiceImpl.java`,
  and `RoutesModule.ts`.

Note: The adjust in the `AppDefineService.ts` seems to follow the code style by adding a
missing space before the method signature. The `BulletinDefine.ts` adjustment corrects
the import statement for the `Fields` class.
```
Add the Apache License 2.0 header comment to the Fields.ts interface file to ensure
compliance with the project's licensing requirements. This license grants users the
necessary permissions to use, modify, and distribute the software, provided that they
保留此文件中的版权声明和许可声明。
```
Adjust unit tests for the isJsonStr method in JsonUtilTest to reflect the correct expected behavior.
Strings representing JSON objects and arrays should return true, aligning with the intended
functionality of the method.
```
@zqr10159 zqr10159 self-assigned this Aug 25, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 17.71218% with 223 lines in your changes missing coverage. Please review.

Project coverage is 28.77%. Comparing base (5eef247) to head (5aa67ff).

Files Patch % Lines
...beat/manager/service/impl/BulletinServiceImpl.java 2.10% 93 Missing ⚠️
...hertzbeat/manager/service/impl/AppServiceImpl.java 50.00% 33 Missing and 5 partials ⚠️
...rtzbeat/manager/controller/BulletinController.java 6.45% 29 Missing ⚠️
...n/entity/manager/bulletin/BulletinMetricsData.java 0.00% 27 Missing ⚠️
...zbeat/common/entity/manager/bulletin/Bulletin.java 0.00% 14 Missing ⚠️
...eat/common/entity/manager/bulletin/BulletinVo.java 0.00% 9 Missing ⚠️
...he/hertzbeat/manager/controller/AppController.java 40.00% 6 Missing ⚠️
...at/common/entity/manager/bulletin/BulletinDto.java 0.00% 5 Missing ⚠️
...ava/org/apache/hertzbeat/common/util/JsonUtil.java 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2584      +/-   ##
============================================
- Coverage     29.05%   28.77%   -0.28%     
- Complexity     1627     1636       +9     
============================================
  Files           431      437       +6     
  Lines         17678    17888     +210     
  Branches       2312     2327      +15     
============================================
+ Hits           5136     5147      +11     
- Misses        11957    12154     +197     
- Partials        585      587       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomsun28 tomsun28 added this to the 1.6.1 milestone Aug 25, 2024
@kerwin612 kerwin612 merged commit 5d416e8 into master Aug 26, 2024
4 checks passed
@zqr10159 zqr10159 deleted the bulletin branch September 23, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants