diff --git a/CHANGES.rst b/CHANGES.rst index aa381b24f3..4157714093 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,8 @@ Bug Fixes - Fixes overwrite behavior for plugin plots, and properly closes overwrite warning overlay after confirmation. [#3094] +- Disable all non-image exporting when the server is not running locally, to avoid confusion with the file being saved on the server. [#3096] + Cubeviz ^^^^^^^ diff --git a/jdaviz/configs/default/plugins/export/export.py b/jdaviz/configs/default/plugins/export/export.py index f8611eb680..0f16268ed2 100644 --- a/jdaviz/configs/default/plugins/export/export.py +++ b/jdaviz/configs/default/plugins/export/export.py @@ -101,6 +101,10 @@ class Export(PluginTemplateMixin, ViewerSelectMixin, SubsetSelectMixin, overwrite_warn = Bool(False).tag(sync=True) + # This is a temporary measure to allow server-installations to disable saving server-side until + # saving client-side is supported for all exports. + serverside_enabled = Bool(True).tag(sync=True) + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -175,6 +179,11 @@ def __init__(self, *args, **kwargs): self.session.hub.subscribe(self, SubsetDeleteMessage, handler=self._set_subset_not_supported_msg) + if self.app.state.settings.get('server_is_remote', False): + # when the server is remote, saving the file in python would save on the server, not + # on the user's machine, so export support in cubeviz should be disabled + self.serverside_enabled = False + @property def user_api(self): # TODO: backwards compat for save_figure, save_movie, diff --git a/jdaviz/configs/default/plugins/export/export.vue b/jdaviz/configs/default/plugins/export/export.vue index 16354a61bb..4903e4ccee 100644 --- a/jdaviz/configs/default/plugins/export/export.vue +++ b/jdaviz/configs/default/plugins/export/export.vue @@ -91,7 +91,7 @@ -