message: vm volume deletion dialog - don't ask if vm has no volumes
diff: @@ -156,15 +156,7 @@ export class VmService extends BaseBackendService<VirtualMachine> {
  }
  public destroy(e: IVmActionEvent): void {
  - this.translateService.get(['CONFIRM_VM_DELETE_DRIVES', 'NO', 'YES'])
  - .switchMap(strs => {
  - return this.dialogService.confirm(
  - strs['CONFIRM_VM_DELETE_DRIVES'],
  - strs['NO'],
  - strs['YES']
  - );
  - })
  - .subscribe(
  + this.destroyVolumeDeleteConfirmDialog(e.vm).subscribe(
  () => {
  this.command(e).subscribe((job: AsyncJob<VirtualMachine>) => {
  if (job && job.result && job.result.state === 'Destroyed') {
  @@ -174,9 +166,7 @@ export class VmService extends BaseBackendService<VirtualMachine> {
  }
  });
  },
  - () => {
  - this.command(e).subscribe();
  - }
  + () => this.command(e).subscribe()
  );
  }
  @@ -284,6 +274,21 @@ export class VmService extends BaseBackendService<VirtualMachine> {
  });
  }
  + private destroyVolumeDeleteConfirmDialog(vm: VirtualMachine): any {
  + if (vm.volumes.length === 1) {
  + return Observable.of(false);
  + }
  +
  + return this.translateService.get(['CONFIRM_VM_DELETE_DRIVES', 'NO', 'YES'])
  + .switchMap(strs => {
  + return this.dialogService.confirm(
  + strs['CONFIRM_VM_DELETE_DRIVES'],
  + strs['NO'],
  + strs['YES']
  + );
  + });
  + }
  +
  private buildCommandParams(id: string, commandName: string): any {
  let params = {};
  if (commandName === 'restore') {
  