Skip to content

Commit

Permalink
disable file imports when running on external server (#3239)
Browse files Browse the repository at this point in the history
* disable file imports when running on external server
* add changelog entry (4.0.1 AND 3.10.4)
  • Loading branch information
kecnry authored Oct 22, 2024
1 parent f5b3a1d commit f552510
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Cubeviz
Imviz
^^^^^

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

Mosviz
^^^^^^

Expand Down Expand Up @@ -251,6 +253,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

0 comments on commit f552510

Please sign in to comment.