Skip to content

Commit

Permalink
VM custom button dialog - use the VM instead of the parent service
Browse files Browse the repository at this point in the history
Triggering a VM-based custom button on a Service's VM Resource causes the right dialog to appear..

But the inital data assumes the associated resource is the service, not the VM.
Subsequent field refresh requests and submit already use the VM, but the initial load was missed in #1022.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1687061
  • Loading branch information
himdel committed Apr 30, 2019
1 parent ba65b58 commit 41a30d5
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -55,6 +55,10 @@ function StateController ($state, $stateParams, CollectionsApi, EventNotificatio
target_id: vm.serviceId,
target_type: 'service'
}
if (vm.vmId) {
options.target_type = 'vm'
options.target_id = vm.vmId
}

const dialogId = vm.resourceAction.dialog_id
const resolveDialogs = CollectionsApi.query(`service_dialogs/${dialogId}`, options)
Expand Down

0 comments on commit 41a30d5

Please sign in to comment.