use of org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor in project ovirt-engine by oVirt.
the class HostInstallPopupView method initEditors.
void initEditors() {
isoEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<RpmVersion>() {
@Override
public String renderNullSafe(RpmVersion version) {
// Format string to contain major.minor version only.
return version.getRpmName();
}
});
// $NON-NLS-1$
rbPassword = new RadioButton("1");
// $NON-NLS-1$
rbPublicKey = new RadioButton("1");
publicKeyEditor = new StringEntityModelTextAreaLabelEditor();
activateHostAfterInstallEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
overrideIpTablesEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
}
use of org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor in project ovirt-engine by oVirt.
the class HostPopupView method initEditors.
private void initEditors() {
publicKeyEditor = new StringEntityModelTextAreaLabelEditor();
// List boxes
clusterEditor = new GroupedListModelListBoxEditor<>(new GroupedListModelListBox<Cluster>(new NameRenderer<Cluster>()) {
@Override
public String getModelLabel(Cluster model) {
return model.getName();
}
@Override
public String getGroupLabel(Cluster model) {
return messages.hostDataCenter(model.getStoragePoolName());
}
@Override
public Comparator<Cluster> getComparator() {
return new DataCenterClusterComparator();
}
/**
* Comparator that sorts on data center name first, and then cluster name. Ignoring case.
*/
final class DataCenterClusterComparator implements Comparator<Cluster> {
@Override
public int compare(Cluster cluster1, Cluster cluster2) {
if (cluster1.getStoragePoolName() != null && cluster2.getStoragePoolName() == null) {
return -1;
} else if (cluster2.getStoragePoolName() != null && cluster1.getStoragePoolName() == null) {
return 1;
} else if (cluster1.getStoragePoolName() == null && cluster2.getStoragePoolName() == null) {
return 0;
}
if (cluster1.getStoragePoolName().equals(cluster2.getStoragePoolName())) {
return cluster1.getName().compareToIgnoreCase(cluster2.getName());
} else {
return cluster1.getStoragePoolName().compareToIgnoreCase(cluster2.getStoragePoolName());
}
}
}
});
externalHostNameEditor = new ListModelListBoxEditor<>(new NameRenderer<VDS>());
providersEditor = new ListModelListBoxEditor<>(new NameRenderer<Provider<OpenstackNetworkProviderProperties>>());
externalDiscoveredHostsEditor = getListModelTypeAheadListBoxEditor();
externalHostGroupsEditor = getListModelTypeAheadListBoxEditor();
externalComputeResourceEditor = getListModelTypeAheadListBoxEditor();
// Check boxes
pmEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
pmEnabledEditor.setUsePatternFly(true);
pmKdumpDetectionEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
pmKdumpDetectionEditor.setUsePatternFly(true);
disableAutomaticPowerManagementEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
disableAutomaticPowerManagementEditor.setUsePatternFly(true);
externalHostProviderEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
overrideIpTablesEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
// $NON-NLS-1$
rbPassword = new RadioButton("1");
// $NON-NLS-1$
rbPublicKey = new RadioButton("1");
// $NON-NLS-1$
rbDiscoveredHost = new EntityModelRadioButtonEditor("2");
// $NON-NLS-1$
rbProvisionedHost = new EntityModelRadioButtonEditor("2");
kernelCmdlineBlacklistNouveau = new EntityModelCheckBoxEditor(Align.RIGHT);
kernelCmdlineIommu = new EntityModelCheckBoxEditor(Align.RIGHT);
kernelCmdlineKvmNested = new EntityModelCheckBoxEditor(Align.RIGHT);
kernelCmdlineUnsafeInterrupts = new EntityModelCheckBoxEditor(Align.RIGHT);
kernelCmdlinePciRealloc = new EntityModelCheckBoxEditor(Align.RIGHT);
consoleAddressEnabled = new EntityModelCheckBoxEditor(Align.RIGHT);
hostedEngineDeployActionsEditor = new ListModelListBoxEditor<>(new EnumRenderer<HostedEngineDeployConfiguration.Action>());
}
Aggregations