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

Update the VM remote console button to the new unified HTML5 console #1553

Merged
merged 1 commit into from
Jul 17, 2019
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/app/core/product-features.constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ADD": "sui_vm_snapshot_create",
"DELETE": "sui_vm_snapshot_delete"
},
"CONSOLE": "sui_vm_console",
"HTML5_CONSOLE": "sui_vm_html5_console",
"WEB_CONSOLE": "sui_vm_web_console",
"TAGS": "sui_vm_tags",
"RETIRE": "sui_vm_retire",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function ComponentController ($stateParams, $state, $window, CollectionsApi, Eve
}

function openConsole (item) {
if (item.supported_consoles.vnc.visible && item.supported_consoles.vnc.enabled) {
if (item.supported_consoles.html5.visible && item.supported_consoles.html5.enabled) {
Consoles.open(item.id)
}
}
Expand Down
12 changes: 6 additions & 6 deletions client/app/services/service-details/service-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ <h2 translate>Resources</h2>
</ul>
</div>
<div class="btn-group" uib-dropdown dropdown-append-to-body
ng-if="($ctrl.customScope.permissions.cockpit || $ctrl.customScope.permissions.console)
&& (item.supported_consoles.vnc.visible || item.supported_consoles.vnc.message
ng-if="($ctrl.customScope.permissions.cockpit || $ctrl.customScope.permissions.html5_console)
&& (item.supported_consoles.html5.visible || item.supported_consoles.html5.message
|| item.supported_consoles.cockpit.visible || item.supported_consoles.cockpit.message)"> <button type="button" class="btn btn-default" uib-dropdown-toggle
type="button">
<i class="fa fa-window-maximize "></i>
Expand All @@ -296,13 +296,13 @@ <h2 translate>Resources</h2>
</button>
<ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu role="menu"
aria-labelledby="btn-append-to-to-body">
<li ng-if="item.supported_consoles.vnc.visible || item.supported_consoles.vnc.message"
<li ng-if="item.supported_consoles.html5.visible || item.supported_consoles.html5.message"
role="menuitem"
uib-tooltip="{{item.supported_consoles.vnc.message}}"
uib-tooltip="{{item.supported_consoles.html5.message}}"
tooltip-placement="bottom"
ng-class="{'disabled': !item.supported_consoles.vnc.enabled || !$ctrl.customScope.permissions.console}"
ng-class="{'disabled': !item.supported_consoles.html5.enabled || !$ctrl.customScope.permissions.html5_console}"
ng-click="$ctrl.customScope.openConsole(item)">
<a href="#" translate>VM Console</a>
<a href="#" translate>VM HTML5 Console</a>
</li>
<li ng-if="item.supported_consoles.cockpit.visible || item.supported_consoles.cockpit.message"
role="menuitem"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Component: serviceExplorer', () => {
serviceStop: false,
serviceSuspend: false,
cockpit: false,
console: false,
html5_console: false,
viewSnapshots: false,
vm_snapshot_show_list: false,
vm_snapshot_add: false,
Expand Down
2 changes: 1 addition & 1 deletion client/app/services/services-state.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function ServicesStateFactory (ListConfiguration, CollectionsApi, RBAC) {
instanceSuspend: RBAC.has(RBAC.FEATURES.VMS.SUSPEND),
instanceRetire: RBAC.hasAny([RBAC.FEATURES.SERVICES.RETIRE.RETIRE_NOW, RBAC.FEATURES.SERVICES.RETIRE.SET_DATE]),
cockpit: RBAC.has(RBAC.FEATURES.VMS.WEB_CONSOLE),
console: RBAC.has(RBAC.FEATURES.VMS.CONSOLE),
html5_console: RBAC.has(RBAC.FEATURES.VMS.HTML5_CONSOLE),
viewSnapshots: RBAC.has(RBAC.FEATURES.VMS.SNAPSHOTS.VIEW),

vm_snapshot_show_list: RBAC.has(RBAC.FEATURES.VMS.SNAPSHOTS.VIEW), // Display Lists of VM Snapshots
Expand Down
2 changes: 1 addition & 1 deletion client/app/services/services-state.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Service: ServicesStateFactory', () => {
'instanceSuspend': false,
'instanceRetire': false,
'cockpit': false,
'console': false,
'html5_console': false,
'viewSnapshots': false,
'vm_snapshot_add': false,
'vm_snapshot_show_list': false,
Expand Down