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 frontend/user/vue-components/ApplicationLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<li>
<a href="#"
id="share-button"
:class="{ 'disabled-entry': !currentApp.isRunning() }"
:class="{ 'disabled-entry': !currentApp.isRunning() || currentApp.appData.image.type == 'webapp' }"
@click="shareDialog.visible = true">
<i class="fa fa-clipboard text-light-blue"></i>
Share session
Expand Down
3 changes: 3 additions & 0 deletions frontend/user/vue-components/ApplicationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<div class="box-tools pull-right"></div>
</div>
<div class="box-body">
<h4>Type</h4>
<span>{{ currentApp.appData.image.type == "webapp" ? "Web": "VNC" }} application</span>

<h4>Description</h4>
<span id="app-description">{{ currentApp.appData.image.description }}</span>

Expand Down
12 changes: 7 additions & 5 deletions remoteappmanager/webapi/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Image(ResourceFragment):
ui_name = Unicode()
icon_128 = Unicode()
description = Unicode()
type = Unicode()
policy = OneOf(Policy)
configurables = List(Unicode)

Expand Down Expand Up @@ -71,11 +72,12 @@ def retrieve(self, resource, **kwargs):
resource.mapping_id = identifier
resource.image = Image()
resource.image.fill({
"name": image.name,
"ui_name": image.ui_name,
"icon_128": image.icon_128,
"description": image.description,
"configurables": [conf.tag for conf in image.configurables]
"name": image.name,
"ui_name": image.ui_name,
"icon_128": image.icon_128,
"description": image.description,
"type": image.type,
"configurables": [conf.tag for conf in image.configurables]
})
resource.image.policy = Policy()
resource.image.policy.fill(policy)
Expand Down
26 changes: 15 additions & 11 deletions remoteappmanager/webapi/tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_items(self):
},
'name': 'boo',
'icon_128': '',
'type': '',
'ui_name': 'foo_ui',
'description': '',
'configurables': []
Expand All @@ -94,6 +95,7 @@ def test_items(self):
'volume_target': 'bar'
},
'name': 'boo',
'type': '',
'icon_128': '',
'ui_name': 'foo_ui',
'description': '',
Expand Down Expand Up @@ -128,17 +130,18 @@ def test_retrieve(self):
{
'mapping_id': "one",
'image': {
'configurables': [],
'description': '',
'icon_128': '',
'name': 'boo',
'policy': {
"allow_home": True,
"volume_mode": 'ro',
"volume_source": "foo",
"volume_target": "bar",
},
'ui_name': 'foo_ui'}})
'configurables': [],
'description': '',
'type': '',
'icon_128': '',
'name': 'boo',
'policy': {
"allow_home": True,
"volume_mode": 'ro',
"volume_source": "foo",
"volume_target": "bar",
},
'ui_name': 'foo_ui'}})

self._app.container_manager.find_containers = \
mock_coro_factory(return_value=[Container(
Expand All @@ -159,6 +162,7 @@ def test_retrieve(self):
'image': {
'description': '',
'icon_128': '',
'type': '',
'name': 'boo',
'ui_name': 'foo_ui',
'policy': {
Expand Down