kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

DataBrowser 3 deletes disconnected archive data sources #481

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

If you open a .plt containing PVs with multiple archive data sources, and some of those are disconnected, then the disconnected archive data sources are automatically deleted from the .plt and the DataBrowser window is marked as modified. If then the user saves it, those data sources are lost forever, even it was a temporary network glitch.

Moreover, if you don't have access to the network (maybe working with your laptop in a train trip) it is impossible to add archive data sources to .plt PVs.

I suggest to:

kasemir commented 5 years ago

Most of the time, the end users at your site shouldn't have to care about archive data sources. They will change over time, and only the sys admins know what the current list of valid sources are.

So set these options in the preferences:

# Default data sources for newly added channels
# Format:  <name>|<key>|<url>*<name>|<key>|<url>*<name>|<key>|<url>
# "xnds:..." URLs use the key. Other URLs might ignore the key.
archives=RDB|1|jdbc:mysql://localhost/archive*- All -|1|xnds://localhost/archive/cgi/ArchiveDataServer.cgi

# When opening existing data browser plot,
# use archive data sources specified in the configuration file (original default)
# or ignore saved data sources and instead use the preference settings?
use_default_archives=true

.. and that's it. The sources in the *.plt files are ignored, you always use the proper list from the preferences. That list may include several sources, we try each one once, and then drop those which didn't have data for a channel.

claudio-rosati commented 5 years ago

We missed the use_default_archives=true. I'll ask my people to use it and I'll set it as default. Thank you