Skip to content

Commit

Permalink
Adds "View Graphs" link to service details [Fixes #146157721]
Browse files Browse the repository at this point in the history
Transitions user to vms-details state with a defalut viewType specified
At the moment, graphs component does not appear to be working correctly, can't handle being the default view, following up with pr to fix
  • Loading branch information
AllenBW committed Jun 19, 2017
1 parent f6c2af7 commit 26fce93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/app/services/service-details/service-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ <h2 translate>Resources</h2>
<a ng-click="$ctrl.customScope.gotoComputeResource(item)" translate>View
Details</a>
</li>
<li role="menuitem">
<a ui-sref="vms.details({vmId: item.id, viewType: 'graphsView'})" translate>View
Graphs</a>
</li>
<li role="menuitem" ng-if="$ctrl.customScope.permissions.viewSnapshots">
<a ui-sref="vms.snapshots({vmId: item.id})" translate>View
Snapshots</a>
Expand Down
2 changes: 1 addition & 1 deletion client/app/services/vm-details/vm-details.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function ComponentController($stateParams, VmsService, ServicesState, sprintf, l
availableText: __('Available'),
notAvailable: __("Not Available"),
vmDetails: {},
viewType: 'detailsView',
viewType: $stateParams.viewType || 'graphsView',
viewSelected: viewSelected,
instance: {},
cpuChart: UsageGraphsService.getChartConfig(vm.cpuChartConfigOptions),
Expand Down
1 change: 1 addition & 0 deletions client/app/states/vms/details/details.state.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function getStates() {
return {
'vms.details': {
url: '/:vmId',
params: { viewType: null },
template: '<vm-details \>',
title: N_('VM Details'),
},
Expand Down

0 comments on commit 26fce93

Please sign in to comment.