use of org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel in project ovirt-engine by oVirt.
the class DataCenterListModel method onForceRemove.
public void onForceRemove() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (!model.validate()) {
return;
}
StoragePoolParametersBase tempVar = new StoragePoolParametersBase(getSelectedItem().getId());
tempVar.setForceDelete(true);
ActionParametersBase parametersBase = tempVar;
Frontend.getInstance().runAction(ActionType.RemoveStoragePool, parametersBase);
cancel();
}
use of org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel in project ovirt-engine by oVirt.
the class DataCenterListModel method remove.
public void remove() {
if (getWindow() != null) {
return;
}
boolean shouldAddressWarnning = false;
ConfirmationModel model = new ConfirmationModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().removeDataCenterTitle());
model.setHelpTag(HelpTag.remove_data_center);
// $NON-NLS-1$
model.setHashName("remove_data_center");
ArrayList<String> list = new ArrayList<>();
for (StoragePool a : getSelectedItems()) {
list.add(a.getName());
// If one of the Data Centers contain Storage Domain, show the warnning.
if (a.getStatus() != StoragePoolStatus.Uninitialized) {
shouldAddressWarnning = true;
}
}
model.setItems(list);
// $NON-NLS-1$
UICommand tempVar = UICommand.createDefaultOkUiCommand("OnRemove", this);
model.getCommands().add(tempVar);
// $NON-NLS-1$
UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this);
model.getCommands().add(tempVar2);
if (shouldAddressWarnning) {
model.setNote(ConstantsManager.getInstance().getConstants().removeDataCenterWarnningNote());
}
}
use of org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel in project ovirt-engine by oVirt.
the class DataCenterNetworkListModel method remove.
public void remove() {
if (getConfirmWindow() != null) {
return;
}
ConfirmationModel model = new RemoveNetworksModel(this);
setConfirmWindow(model);
}
use of org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel in project ovirt-engine by oVirt.
the class DataCenterNetworkQoSListModel method remove.
public void remove() {
if (getConfirmWindow() != null) {
return;
}
ConfirmationModel model = new RemoveNetworkQoSModel(this);
setConfirmWindow(model);
}
use of org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel in project ovirt-engine by oVirt.
the class DataCenterStorageListModel method postDetach.
public void postDetach(Model model) {
Frontend.getInstance().runMultipleAction(ActionType.RemoveStorageDomain, getRemoveParams(), outerResult -> {
Object[] array = (Object[]) outerResult.getState();
ConfirmationModel localModel1 = (ConfirmationModel) array[0];
List<ActionParametersBase> parameters = (List<ActionParametersBase>) array[1];
Frontend.getInstance().runMultipleAction(ActionType.DetachStorageDomainFromPool, parameters, innerResult -> {
ConfirmationModel localModel2 = (ConfirmationModel) innerResult.getState();
localModel2.stopProgress();
cancel();
}, localModel1);
}, new Object[] { model, getDetachParams() });
}
Aggregations