Skip to content
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 doc/source/developer/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Currently reserved env keys:
- ``x11-width``: for the VNC images, the X11 width
- ``x11-height``: for the VNC images, the X11 height
- ``x11-depth``: for the VNC images, the X11 depth (currently unused, fixed at 16)
- ``srdata``: this variable can be set to a file that will be loaded by an application
- ``startupdata``: this variable can be set to a file that will be loaded by an application
upon startup

Container Labels
Expand Down
2 changes: 1 addition & 1 deletion frontend/user/vue-components/ApplicationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
:configDict.sync="configurable.configDict"></component>
</fieldset>
<fieldset v-else>
<component v-for="configurable in currentApp.configurables" v-if="configurable.tag !== 'srdata'"
<component v-for="configurable in currentApp.configurables" v-if="configurable.tag !== 'startupdata'"
:key="configurable.tag"
:is="configurable.tag + '-component'"
:configDict.sync="configurable.configDict"></component>
Expand Down
6 changes: 3 additions & 3 deletions remoteappmanager/docker/configurables.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def default_env(cls):
class StartupData(Configurable):
""" Support opening a specific file when an application starts up. """

tag = "srdata"
tag = "startupdata"

@classmethod
def supported_by(cls, image):
Expand All @@ -119,9 +119,9 @@ def supported_by(cls, image):
def config_dict_to_env(cls, config_dict):
""" The config dict must contain the tag key, e.g.:

cls.tag = "srdata"
cls.tag = "startupdata"

{"srdata": "/home/user/can.ex2"}
{"startupdata": "/home/user/can.ex2"}
"""
if config_dict is None or len(config_dict) == 0:
return cls.default_env()
Expand Down
9 changes: 5 additions & 4 deletions remoteappmanager/docker/tests/test_configurables.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ def test_config_dict_to_env_resolution(self):

def test_config_dict_to_env_startup_data(self):
self.assertEqual(
StartupData.config_dict_to_env({"srdata": "/home/test/can.ex2"}),
{"SRDATA": "/home/test/can.ex2"}
StartupData.config_dict_to_env(
{"startupdata": "/home/test/can.ex2"}),
{"STARTUPDATA": "/home/test/can.ex2"}

)

default = StartupData.default_env()
self.assertEqual(default, {"SRDATA": ""})
self.assertEqual(default, {"STARTUPDATA": ""})
self.assertEqual(StartupData.config_dict_to_env(None), default)
self.assertEqual(StartupData.config_dict_to_env({}), default)

with self.assertRaises(ValueError):
StartupData.config_dict_to_env({"srdata": 123})
StartupData.config_dict_to_env({"startupdata": 123})
2 changes: 1 addition & 1 deletion remoteappmanager/tests/mocking/virtual/docker_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def _init_available_images(self):
SIMPHONY_NS_ENV['x11-width']: '',
SIMPHONY_NS_ENV['x11-height']: '',
SIMPHONY_NS_ENV['x11-depth']: '',
SIMPHONY_NS_ENV['srdata']: '',
SIMPHONY_NS_ENV['startupdata']: '',
},
exposed_ports=["8888/tcp"]
)
Expand Down