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

Quick: handle missing default system; enable work as default system locally #867

Merged
merged 2 commits into from
Sep 29, 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: 1 addition & 1 deletion client/src/components/Applications/AppForm/AppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export const AppSchemaForm = ({ app }) => {
const hasCorral =
configuration.length &&
['corral.tacc.utexas.edu', 'data.tacc.utexas.edu'].some((s) =>
defaultHost.endsWith(s)
defaultHost?.endsWith(s)
);
return {
allocations: matchingExecutionHost
Expand Down
2 changes: 1 addition & 1 deletion server/portal/apps/datafiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get(self, request):
if 'homeDir' in system else system for system in portal_systems
]

default_system = settings.PORTAL_DATAFILES_DEFAULT_STORAGE_SYSTEM
default_system = settings.PORTAL_DATAFILES_DEFAULT_STORAGE_SYSTEM or settings.PORTAL_DATAFILES_STORAGE_SYSTEMS[0]
if default_system:
system_id = default_system.get('system')
system_def = request.user.tapis_oauth.client.systems.getSystem(systemId=system_id, select='host')
Expand Down
2 changes: 1 addition & 1 deletion server/portal/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
PORTAL_DATAFILES_STORAGE_SYSTEMS = getattr(
settings_custom, '_PORTAL_DATAFILES_STORAGE_SYSTEMS', []
)
PORTAL_DATAFILES_DEFAULT_STORAGE_SYSTEM = next((sys for sys in PORTAL_DATAFILES_STORAGE_SYSTEMS if sys['default'] is True), None)
PORTAL_DATAFILES_DEFAULT_STORAGE_SYSTEM = next((sys for sys in PORTAL_DATAFILES_STORAGE_SYSTEMS if sys.get('default')), None)

PORTAL_SEARCH_MANAGERS = {
'my-data': 'portal.apps.search.api.managers.private_data_search.PrivateDataSearchManager',
Expand Down
13 changes: 6 additions & 7 deletions server/portal/settings/settings_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,21 @@

_PORTAL_DATAFILES_STORAGE_SYSTEMS = [
{
'name': 'My Data (Corral)',
'system': 'cloud.data',
'name': 'My Data (Work)',
'system': 'frontera',
'scheme': 'private',
'api': 'tapis',
'homeDir': '/home/{username}',
'homeDir': '/work/{tasdir}',
'icon': None,
'keyservice': True,
'default': True
},
{
'name': 'My Data (Work)',
'name': 'My Data (Scratch)',
'system': 'frontera',
'scheme': 'private',
'api': 'tapis',
'homeDir': '/work/{tasdir}',
'icon': None,
'homeDir': '/scratch1/{tasdir}',
'icon': None
},
{
'name': 'My Data (Frontera)',
Expand Down