Skip to content

Conversation

@Shahbaz-dataq
Copy link
Contributor

Description

The SNMP MIB Compiler page, a Vaadin-based page (features/vaadin-snmp-events-and-metrics, MibCompilerApplication.java) use to compile SNMP MIB files and create event configurations, currently reads from / writes to the filesystem. This needs to be updated to use the database Dao instead.

In MibCompilerPanel, if a user selects and right-clicks on an item in the compiled MIB Tree, and selects Generate Events, then MibCompilerPanel.generateEvents is called, which calls showEventsWindow. which opens an events.EventWindow to display the newly-created events, which haven’t yet been added to the DB.

Save Events File will save to a file. The EventWindow constructor takes both an Events object and a File object. One approach would be to take a DB id or Dao object instead of the File object, or null if this is a newly-generated Event that has not yet been saved, as is the case when coming from the MIB Compiler. Then when user clicks Save Events Filethis can make the DB call. We should avoid creating any temporary .event.xml files; just keep the Events object in memory and eventually write it to the DB using the Dao.

Note that the .mib files themselves will continue to be written to the file system.

External References

@Shahbaz-dataq Shahbaz-dataq changed the title Initial changes Update SNMP MIB Compiler page to use DB instead of filesystem Oct 11, 2025
@Shahbaz-dataq Shahbaz-dataq marked this pull request as ready for review October 13, 2025 11:40
Copy link
Contributor

@synqotik synqotik left a comment

Choose a reason for hiding this comment

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

Overall looks good, added some comments.

Copy link
Contributor

@synqotik synqotik left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

Looks good. Minor comment.

@indigo423 indigo423 changed the title Update SNMP MIB Compiler page to use DB instead of filesystem NMS-18546: Update SNMP MIB Compiler page to use DB instead of filesystem Oct 21, 2025
Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

LGTM!

@Shahbaz-dataq Shahbaz-dataq merged commit d5221dd into features/event-conf Oct 30, 2025
18 checks passed
@Shahbaz-dataq Shahbaz-dataq deleted the Jira/NMS-18546 branch October 30, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants