use of org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.NewHostNetworkQosModel in project ovirt-engine by oVirt.
the class NetworkModel method addQos.
private void addQos() {
NewHostNetworkQosModel qosModel = new NewHostNetworkQosModel(this, getSelectedDc()) {
@Override
protected void postSaveAction(boolean succeeded) {
if (succeeded) {
List<HostNetworkQos> qosItems = new ArrayList<>(NetworkModel.this.getQos().getItems());
qosItems.add(1, getQos());
NetworkModel.this.getQos().setItems(qosItems);
NetworkModel.this.getQos().setSelectedItem(getQos());
}
super.postSaveAction(succeeded);
}
@Override
protected void cancel() {
sourceListModel.setConfirmWindow(null);
}
};
qosModel.getDataCenters().setIsChangeable(false);
sourceListModel.setConfirmWindow(qosModel);
}
Aggregations