-
Notifications
You must be signed in to change notification settings - Fork 116
CSSTUDIO-2167 Support for "decorations" in the Logbook application #3191
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
…plication supporting only 1 Enum-PV.
…le and controller.
…concurrency issues.
…ist of enum choices.
…, display "..." to indicate that there was more than 1 change since the last log entry.
… single class imports.
|
This is specific to the OLog. Since I don't use that, I'm fine with the PR. I would worry a little about adding a dependency from the logbook viewer to the archive. Logbook and archive are separate services which so far were completely independent. For some sites, the logbook is a legal record. As a consequence, one may annotate but not otherwise edit existing entries. In that scenario, a logbook needs to reproducibly show the content of each entry in the legal record. Showing some aspect of it, but then connecting to the archive to complete the display of each entry would be problematic. If entries should be augmented by the machine state, that should be done in the logbook system whenever an entry is created. Add some "augmentation" hook to the olog which for example adds the value of certain key PVs to each logbook entry. Each entry then contains this information, it will never change after the entry has been created, and all the information for an entry can be displayed right away without need to query separate services like the archive, channel finder, ... |
georgweiss
left a comment
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.
A few comments inlined.
In my view any UI visualization of decorations configuration does not belong in the advanced search view since it is not related to how search is performed in Elasticsearch.
app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/LogEntryCellController.java
Show resolved
Hide resolved
app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/spi/Decoration.java
Outdated
Show resolved
Hide resolved
…Advanced Search" in the Logbook application.
That is a valid point. It has been decided to remove the ability to input PV names at runtime, and therefore no options will appear under "Advanced Search". |
|
@kasemir wrote:
Thank you for your thoughtful input! I have raised the issue here, and after discussion it has been decided that it is not an issue for us that data is retrieved from the archiver and displayed next to the log entries in the Logbook application. For clarity, I would like to point out that the dependency on the archiver is added in our site-specific customization of Phoebus; what is added in this pull request to Phoebus is an interface that enables the addition of (possibly site-specific, as in our case) decorations to the Logbook application in Phoebus. |
…the interface 'Decoration'.
c9fb2ae to
a906512
Compare
At ESS, we have implemented a "decoration" feature into the Logbook application.
Using this feature, it is possible to enter PV Names of VEnum-type into the "Advanced Search" part of the Logbook UI, and the logbook entries are then decorated by the status of the specified VEnum PVs using color coding: each possible Enum-value is represented using one color. A graphical symbol next to the logentry displays the value of the PV.
The intention is to be able to see, at a glance, what state the corresponding PV was in when a log entry was made and to see where the PV changed its value.
Since this feature is very likely to be of interest to ESS only, the feature itself has been implemented in a ESS-specific module. However, for the feature to function, there needs to be support for adding the decoration in the main Phoebus source code. This pull request adds this functionality to Phoebus.
In particular, this pull request adds the SPI interface
org.phoebus.logbook.olog.ui.spi.Decoration, which has the following signature:A new decoration (displayed next to the search results in the Logbook application) is added by implementing these four methods:
createDecorationForLogEntryCell()computes a decoration to be displayed next to one line of the search results (corresponding to thelogEntrythat is its argument) in the Logbook application.setRefreshLogEntryTableView()receives as an argument theRunnable refreshLogEntryTableViewwhich refreshes theLogEntryTableViewthat displays the search results. This can be used by the implementation of the decoration to update theLogEntryTableView. In our case, the data that the decoration depends on needs to be fetched from the archiver, and when the data has arrived and the correct decoration has been determined,refreshLogEntryTableView()is called in order to refresh the UI.setLogEntries()is called by the Logbook application when it has received a new set of log entries to be displayed. (E.g., when a search query has returned, or when the user clicks to see the next page of the results list.)getDecorationInputNode()specifies a JavaFX node that is displayed under "Advanced Search" in the Logbook UI, and where the user can specify input for a given decoration. In our case, this is implemented by textfields where the user can specify PVs of type VEnum.To make the use-case more concrete, the following is a screenshot of some results in the result list of the Logbook application, decorated using a decoration that has been implemented using this interface: