-
Notifications
You must be signed in to change notification settings - Fork 608
NMS-18546: Update SNMP MIB Compiler page to use DB instead of filesystem #8036
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
Conversation
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.
Overall looks good, added some comments.
...ents-and-metrics/src/main/java/org/opennms/features/vaadin/config/EventAdminApplication.java
Outdated
Show resolved
Hide resolved
...ents-and-metrics/src/main/java/org/opennms/features/vaadin/config/EventAdminApplication.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
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.
LGTM!
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.
Looks good. Minor comment.
...din-snmp-events-and-metrics/src/main/java/org/opennms/features/vaadin/events/EventPanel.java
Outdated
Show resolved
Hide resolved
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.
LGTM!
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