Skip to content
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

handle ping without timestamp #2411

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ Bug Fixes
Previously this resulted in a traceback, but now applies the default selection for
single-select mode. [#2404]

- Fixes tracebacks from plugins opened in popout windows. [#2411]

Cubeviz
^^^^^^^

Expand Down
4 changes: 4 additions & 0 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@
return PluginUserApi(self, expose=[])

def vue_plugin_ping(self, ping_timestamp):
if isinstance(ping_timestamp, dict):

Check warning on line 279 in jdaviz/core/template_mixin.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/core/template_mixin.py#L279

Added line #L279 was not covered by tests
# popout windows can sometimes ping but send an empty dictionary instead of the
# timestamp, in that case, let's set the latest ping time to now
ping_timestamp = time.time() * 1000

Check warning on line 282 in jdaviz/core/template_mixin.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/core/template_mixin.py#L282

Added line #L282 was not covered by tests
self._ping_timestamp = ping_timestamp

# we've received a ping, so immediately set plugin_opened state to True
Expand Down
Loading