use of org.ovirt.engine.core.common.businessentities.comparators.LexoNumericNameableComparator in project ovirt-engine by oVirt.
the class StorageTemplateListModel method syncSearch.
@Override
protected void syncSearch() {
if (getEntity() == null) {
return;
}
super.syncSearch();
GetVmTemplatesFromStorageDomainParameters tempVar = new GetVmTemplatesFromStorageDomainParameters(getEntity().getId(), true);
tempVar.setRefresh(getIsQueryFirstTime());
Frontend.getInstance().runQuery(QueryType.GetVmTemplatesFromStorageDomain, tempVar, new AsyncQuery<QueryReturnValue>(returnValue -> {
ArrayList<VmTemplate> templates = returnValue.getReturnValue();
Collections.sort(templates, new LexoNumericNameableComparator<>());
setItems(templates);
setIsEmpty(templates.size() == 0);
}));
}
use of org.ovirt.engine.core.common.businessentities.comparators.LexoNumericNameableComparator in project ovirt-engine by oVirt.
the class StorageVmListModel method syncSearch.
@Override
protected void syncSearch() {
if (getEntity() == null) {
return;
}
super.syncSearch();
IdQueryParameters tempVar = new IdQueryParameters(getEntity().getId());
tempVar.setRefresh(getIsQueryFirstTime());
Frontend.getInstance().runQuery(QueryType.GetVmsByStorageDomain, tempVar, new AsyncQuery<QueryReturnValue>(returnValue -> {
ArrayList<VM> vms = returnValue.getReturnValue();
Collections.sort(vms, new LexoNumericNameableComparator<>());
setItems(vms);
setIsEmpty(vms.size() == 0);
}));
}
use of org.ovirt.engine.core.common.businessentities.comparators.LexoNumericNameableComparator in project ovirt-engine by oVirt.
the class SnapshotModel method updateVmConfiguration.
public void updateVmConfiguration(final AsyncCallback<Void> onUpdateAsyncCallback) {
Snapshot snapshot = getEntity();
if (snapshot == null) {
return;
}
AsyncDataProvider.getInstance().getVmConfigurationBySnapshot(new AsyncQuery<>(vm -> {
Snapshot snapshot1 = getEntity();
if (vm != null && snapshot1 != null) {
setVm(vm);
setDisks(vm.getDiskList());
setNics(vm.getInterfaces());
setApps(Arrays.asList(snapshot1.getAppList() != null ? snapshot1.getAppList().split(",") : // $NON-NLS-1$
new String[] {}));
Collections.sort(getDisks(), new DiskByDiskAliasComparator());
Collections.sort(getNics(), new LexoNumericNameableComparator<>());
}
onUpdateAsyncCallback.onSuccess(null);
}), snapshot.getId());
}
Aggregations