Skip to content

Commit

Permalink
Merge pull request #807 from jbellister-slac/show_timeplot
Browse files Browse the repository at this point in the history
Always show time plots in designer regardless of archiver environment varilable
  • Loading branch information
YektaY authored Mar 9, 2022
2 parents 863eda0 + 3212a32 commit a4c6e9c
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions pydm/widgets/qtplugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,19 @@
icon=ifont.icon("tag"))

# Time Plot plugin
PyDMTimePlotPlugin = qtplugin_factory(PyDMTimePlot, group=WidgetCategory.PLOT,
extensions=[TimeCurveEditorExtension,
RulesExtension],
icon=ifont.icon("chart-line"))

# In order to keep the archiver functionality invisible to users who do not have access to an instance of the
# archiver appliance, choose which version of the time plot to load here based on the user's environment
if "PYDM_ARCHIVER_URL" not in os.environ:
PyDMTimePlotPlugin = qtplugin_factory(PyDMTimePlot, group=WidgetCategory.PLOT,
extensions=[TimeCurveEditorExtension,
RulesExtension],
icon=ifont.icon("chart-line"))
else:
# archiver appliance, only load this if the user has the associated environment variable set
if "PYDM_ARCHIVER_URL" in os.environ:
# Time Plot with archiver appliance support plugin
PyDMTimePlotPlugin = qtplugin_factory(PyDMArchiverTimePlot, group=WidgetCategory.PLOT,
extensions=[ArchiveTimeCurveEditorExtension,
RulesExtension],
icon=ifont.icon("chart-line")
)
PyDMArchiverTimePlotPlugin = qtplugin_factory(PyDMArchiverTimePlot, group=WidgetCategory.PLOT,
extensions=[ArchiveTimeCurveEditorExtension,
RulesExtension],
icon=ifont.icon("chart-line"))

# Waveform Plot plugin
PyDMWaveformPlotPlugin = qtplugin_factory(PyDMWaveformPlot,
Expand Down

0 comments on commit a4c6e9c

Please sign in to comment.