use of org.ovirt.engine.core.common.action.TransferImageStatusParameters in project ovirt-engine by oVirt.
the class UploadImageModel method onCancelUpload.
public static void onCancelUpload(ConfirmationModel model, List<? extends Disk> disks) {
if (model.getProgress() != null) {
return;
}
model.startProgress(null);
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Disk disk : disks) {
ImageTransfer updates = new ImageTransfer();
updates.setPhase(ImageTransferPhase.CANCELLED);
TransferImageStatusParameters parameters = new TransferImageStatusParameters();
parameters.setUpdates(updates);
parameters.setDiskId(disk.getId());
list.add(parameters);
}
Frontend.getInstance().runMultipleAction(ActionType.TransferImageStatus, list, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
// parent.cancel();
localModel.getCancelCommand().execute();
}, model);
}
Aggregations