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

Backport PR #3239 on branch v4.0.x (disable file imports when running on external server) #3240

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
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Cubeviz
Imviz
^^^^^

- Remove "From File.." option when running on an external server. [#3239]

Mosviz
^^^^^^

Expand Down Expand Up @@ -189,6 +191,17 @@ Other Changes and Additions
- Bump required specutils version to 1.16. Moment 0 calculation is now in units
of flux*dx (rather than flux) [#3184]

3.10.4 (unreleased)
===================

Bug Fixes
---------

Imviz
^^^^^

- Remove "From File.." option when running on an external server. [#3239]

3.10.3 (2024-07-22)
===================

Expand Down
6 changes: 4 additions & 2 deletions jdaviz/configs/imviz/plugins/catalogs/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ def user_api(self):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
cat_options = ['SDSS', 'Gaia']
if not self.app.state.settings.get('server_is_remote', False):
cat_options.append('From File...')
self.catalog = FileImportSelectPluginComponent(self,
items='catalog_items',
selected='catalog_selected',
manual_options=['SDSS', 'Gaia',
'From File...'])
manual_options=cat_options)

# set the custom file parser for importing catalogs
self.catalog._file_parser = self._file_parser
Expand Down
3 changes: 2 additions & 1 deletion jdaviz/configs/imviz/plugins/footprints/footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def __init__(self, *args, **kwargs):
preset_options = list(preset_regions._instruments.keys())
else:
preset_options = ['None']
preset_options.append('From File...')
if not self.app.state.settings.get('server_is_remote', False):
preset_options.append('From File...')
self.preset = FileImportSelectPluginComponent(self,
items='preset_items',
selected='preset_selected',
Expand Down
Loading