use of org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel in project ovirt-engine by oVirt.
the class NetworkClusterListModel method manage.
public void manage() {
if (getWindow() != null) {
return;
}
ClusterNetworkManageModel manageModel = createManageList();
setWindow(manageModel);
manageModel.setTitle(ConstantsManager.getInstance().getConstants().assignDetachNetworkTitle());
manageModel.setHelpTag(HelpTag.assign_network);
// $NON-NLS-1$
manageModel.setHashName("assign_network");
}
use of org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel in project ovirt-engine by oVirt.
the class NetworkClusterListModel method createManageList.
private ClusterNetworkManageModel createManageList() {
List<ClusterNetworkModel> networkManageModelList = new ArrayList<>();
Iterable<PairQueryable<Cluster, NetworkCluster>> items = getItems();
for (PairQueryable<Cluster, NetworkCluster> item : items) {
Network network = (Network) Cloner.clone(getEntity());
if (item.getSecond() != null) {
network.setCluster((NetworkCluster) Cloner.clone(item.getSecond()));
}
ClusterNetworkModel networkManageModel = new ClusterNetworkModel(network) {
@Override
public String getDisplayedName() {
return getCluster().getName();
}
};
networkManageModel.setCluster((Cluster) Cloner.clone(item.getFirst()));
networkManageModelList.add(networkManageModel);
}
Collections.sort(networkManageModelList, manageModelComparator);
ClusterNetworkManageModel listModel = new ClusterNetworkManageModel(this) {
@Override
public boolean isMultiCluster() {
return true;
}
};
listModel.setItems(networkManageModelList);
return listModel;
}
Aggregations