Skip to content

Commit

Permalink
Update the VM remote console button to the new unified HTML5 console
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Jul 2, 2019
1 parent a587543 commit 305b253
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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
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

0 comments on commit 305b253

Please sign in to comment.