Search in sources :

Example 1 with VmPoolType

use of org.ovirt.engine.core.common.businessentities.VmPoolType in project ovirt-engine by oVirt.

the class PoolListModel method edit.

public void edit() {
    final VmPool pool = getSelectedItem();
    if (getWindow() != null) {
        return;
    }
    final PoolListModel poolListModel = this;
    Frontend.getInstance().runQuery(QueryType.GetVmDataByPoolId, new IdQueryParameters(pool.getVmPoolId()), new AsyncQuery<QueryReturnValue>(result -> {
        final VM vm = result.getReturnValue();
        final ExistingPoolModelBehavior behavior = new ExistingPoolModelBehavior(vm, pool);
        behavior.getPoolModelBehaviorInitializedEvent().addListener((ev, sender, args) -> {
            final PoolModel model = behavior.getModel();
            for (EntityModel<VmPoolType> item : model.getPoolType().getItems()) {
                if (item.getEntity() == pool.getVmPoolType()) {
                    model.getPoolType().setSelectedItem(item);
                    break;
                }
            }
            String cdImage = null;
            if (vm != null) {
                model.getDataCenterWithClustersList().setSelectedItem(null);
                model.getDataCenterWithClustersList().setSelectedItem(Linq.firstOrNull(model.getDataCenterWithClustersList().getItems(), new Linq.DataCenterWithClusterPredicate(vm.getStoragePoolId(), vm.getClusterId())));
                model.getTemplateWithVersion().setIsChangeable(false);
                cdImage = vm.getIsoPath();
                model.getVmType().setSelectedItem(vm.getVmType());
            } else {
                model.getDataCenterWithClustersList().setSelectedItem(Linq.firstOrNull(model.getDataCenterWithClustersList().getItems()));
            }
            model.getDataCenterWithClustersList().setIsChangeable(vm == null);
            boolean hasCd = !StringHelper.isNullOrEmpty(cdImage);
            model.getCdImage().setIsChangeable(hasCd);
            model.getCdAttached().setEntity(hasCd);
            model.getProvisioning().setIsChangeable(false);
            model.getStorageDomain().setIsChangeable(false);
        });
        PoolModel model = new PoolModel(behavior);
        model.setCustomPropertiesKeysList(AsyncDataProvider.getInstance().getCustomPropertiesList());
        // $NON-NLS-1$
        model.setIsAdvancedModeLocalStorageKey("wa_pool_dialog");
        setWindow(model);
        VmBasedWidgetSwitchModeCommand switchModeCommand = new VmBasedWidgetSwitchModeCommand();
        switchModeCommand.init(model);
        model.getCommands().add(switchModeCommand);
        // $NON-NLS-1$
        UICommand command = UICommand.createDefaultOkUiCommand("OnSave", poolListModel);
        model.getCommands().add(command);
        // $NON-NLS-1$
        model.getCommands().add(UICommand.createCancelUiCommand("Cancel", poolListModel));
        model.setTitle(ConstantsManager.getInstance().getConstants().editPoolTitle());
        model.setHelpTag(HelpTag.edit_pool);
        // $NON-NLS-1$
        model.setHashName("edit_pool");
        model.initialize();
        model.getName().setEntity(pool.getName());
        model.getDescription().setEntity(pool.getVmPoolDescription());
        model.getComment().setEntity(pool.getComment());
        model.getPoolStateful().setEntity(pool.isStateful());
        model.getAssignedVms().setEntity(pool.getAssignedVmsCount());
        model.getPrestartedVms().setEntity(pool.getPrestartedVms());
        // $NON-NLS-1$
        model.setPrestartedVmsHint("0-" + pool.getAssignedVmsCount());
        model.getMaxAssignedVmsPerUser().setEntity(pool.getMaxAssignedVmsPerUser());
    }));
}
Also used : SearchType(org.ovirt.engine.core.common.interfaces.SearchType) VmType(org.ovirt.engine.core.common.businessentities.VmType) SearchObjects(org.ovirt.engine.core.searchbackend.SearchObjects) CoreUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.CoreUnitToVmBaseBuilder) Inject(com.google.inject.Inject) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) KernelParamsUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.KernelParamsUnitToVmBaseBuilder) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) CpuProfileUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.CpuProfileUnitToVmBaseBuilder) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) HasEntity(org.ovirt.engine.ui.uicommonweb.models.HasEntity) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) AddVmPoolParameters(org.ovirt.engine.core.common.action.AddVmPoolParameters) DisplayType(org.ovirt.engine.core.common.businessentities.DisplayType) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) DedicatedVmForVdsUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.DedicatedVmForVdsUnitToVmBaseBuilder) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) UsbPolicyUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.UsbPolicyUnitToVmBaseBuilder) StringHelper(org.ovirt.engine.core.compat.StringHelper) VmHighPerformanceConfigurationModel(org.ovirt.engine.ui.uicommonweb.models.vms.VmHighPerformanceConfigurationModel) List(java.util.List) KeyValueModel(org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel) Cloner(org.ovirt.engine.ui.uicommonweb.Cloner) NewPoolModelBehavior(org.ovirt.engine.ui.uicommonweb.models.vms.NewPoolModelBehavior) UnitToGraphicsDeviceParamsBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.UnitToGraphicsDeviceParamsBuilder) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) PermissionListModel(org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel) Guid(org.ovirt.engine.core.compat.Guid) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) ArrayList(java.util.ArrayList) Frontend(org.ovirt.engine.ui.frontend.Frontend) VmPoolType(org.ovirt.engine.core.common.businessentities.VmPoolType) NameUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.NameUnitToVmBaseBuilder) VmPool(org.ovirt.engine.core.common.businessentities.VmPool) Linq(org.ovirt.engine.ui.uicommonweb.Linq) BuilderExecutor(org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor) VmPoolParametersBase(org.ovirt.engine.core.common.action.VmPoolParametersBase) SearchStringMapping(org.ovirt.engine.ui.uicommonweb.models.SearchStringMapping) VmBasedWidgetSwitchModeCommand(org.ovirt.engine.ui.uicommonweb.models.vms.VmBasedWidgetSwitchModeCommand) MigrationOptionsUnitToVmBaseBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.MigrationOptionsUnitToVmBaseBuilder) ExistingPoolModelBehavior(org.ovirt.engine.ui.uicommonweb.models.vms.ExistingPoolModelBehavior) VM(org.ovirt.engine.core.common.businessentities.VM) TabName(org.ovirt.engine.ui.uicommonweb.models.TabName) ListWithSimpleDetailsModel(org.ovirt.engine.ui.uicommonweb.models.ListWithSimpleDetailsModel) WebAdminApplicationPlaces(org.ovirt.engine.ui.uicommonweb.place.WebAdminApplicationPlaces) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) VmSpecificUnitToVmBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.VmSpecificUnitToVmBuilder) Linq(org.ovirt.engine.ui.uicommonweb.Linq) ExistingPoolModelBehavior(org.ovirt.engine.ui.uicommonweb.models.vms.ExistingPoolModelBehavior) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) VmBasedWidgetSwitchModeCommand(org.ovirt.engine.ui.uicommonweb.models.vms.VmBasedWidgetSwitchModeCommand) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VmPool(org.ovirt.engine.core.common.businessentities.VmPool) VM(org.ovirt.engine.core.common.businessentities.VM) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand)

Example 2 with VmPoolType

use of org.ovirt.engine.core.common.businessentities.VmPoolType in project ovirt-engine by oVirt.

the class PoolListModel method savePoolPostValidation.

public void savePoolPostValidation() {
    final PoolModel model = (PoolModel) getWindow();
    VmPool pool = getCurrentPool();
    setConfirmWindow(null);
    // Save changes.
    pool.setName(model.getName().getEntity());
    pool.setVmPoolDescription(model.getDescription().getEntity());
    pool.setClusterId(model.getSelectedCluster().getId());
    pool.setComment(model.getComment().getEntity());
    pool.setStateful(model.getPoolStateful().getEntity());
    pool.setPrestartedVms(model.getPrestartedVms().getEntity());
    pool.setMaxAssignedVmsPerUser(model.getMaxAssignedVmsPerUser().getEntity());
    pool.setAutoStorageSelect(model.getDisksAllocationModel().getDiskAllocationTargetEnabled().getEntity());
    EntityModel<VmPoolType> poolTypeSelectedItem = model.getPoolType().getSelectedItem();
    pool.setVmPoolType(poolTypeSelectedItem.getEntity());
    if (model.getSpiceProxyEnabled().getEntity()) {
        pool.setSpiceProxy(model.getSpiceProxy().getEntity());
    }
    VM vm = buildVmOnSave(model);
    vm.setVmInit(model.getVmInitModel().buildCloudInitParameters(model));
    vm.setUseLatestVersion(model.getTemplateWithVersion().getSelectedItem().isLatest());
    vm.setStateless(false);
    vm.setInstanceTypeId(model.getInstanceTypes().getSelectedItem().getId());
    AddVmPoolParameters param = new AddVmPoolParameters(pool, vm, model.getNumOfDesktops().getEntity());
    param.setStorageDomainId(Guid.Empty);
    param.setDiskInfoDestinationMap(model.getDisksAllocationModel().getImageToDestinationDomainMap());
    param.setConsoleEnabled(model.getIsConsoleDeviceEnabled().getEntity());
    param.setVirtioScsiEnabled(model.getIsVirtioScsiEnabled().getEntity());
    param.setSoundDeviceEnabled(model.getIsSoundcardEnabled().getEntity());
    param.setRngDevice(model.getIsRngEnabled().getEntity() ? model.generateRngDevice() : null);
    param.setSoundDeviceEnabled(model.getIsSoundcardEnabled().getEntity());
    param.setBalloonEnabled(model.getMemoryBalloonDeviceEnabled().getEntity());
    if (model.getIsHeadlessModeEnabled().getEntity()) {
        param.getVmStaticData().setDefaultDisplayType(DisplayType.none);
    }
    BuilderExecutor.build(model, param, new UnitToGraphicsDeviceParamsBuilder());
    param.getVmStaticData().setUseHostCpuFlags(model.getHostCpu().getEntity());
    param.getVmStaticData().setCpuPinning(model.getCpuPinning().getEntity());
    if (model.getQuota().getSelectedItem() != null) {
        vm.setQuotaId(model.getQuota().getSelectedItem().getId());
    }
    model.startProgress();
    if (model.getIsNew()) {
        if (model.getIcon().getEntity().isCustom()) {
            param.setVmLargeIcon(model.getIcon().getEntity().getIcon());
        }
        Frontend.getInstance().runAction(ActionType.AddVmPool, param, result -> {
            cancel();
            stopProgress();
        }, this);
    } else {
        Frontend.getInstance().runAction(ActionType.UpdateVmPool, param, result -> {
            cancel();
            stopProgress();
        }, this);
    }
}
Also used : UnitToGraphicsDeviceParamsBuilder(org.ovirt.engine.ui.uicommonweb.builders.vm.UnitToGraphicsDeviceParamsBuilder) VmPool(org.ovirt.engine.core.common.businessentities.VmPool) VM(org.ovirt.engine.core.common.businessentities.VM) VmPoolType(org.ovirt.engine.core.common.businessentities.VmPoolType) AddVmPoolParameters(org.ovirt.engine.core.common.action.AddVmPoolParameters)

Example 3 with VmPoolType

use of org.ovirt.engine.core.common.businessentities.VmPoolType in project ovirt-engine by oVirt.

the class AbstractVmPopupWidget method initListBoxEditors.

@SuppressWarnings({ "rawtypes", "unchecked" })
private void initListBoxEditors() {
    // General tab
    dataCenterWithClusterEditor = new GroupedListModelListBoxEditor<>(new GroupedListModelListBox<DataCenterWithCluster>(new NameRenderer<>()) {

        @Override
        public String getModelLabel(DataCenterWithCluster model) {
            return model.getCluster().getName();
        }

        @Override
        public String getGroupLabel(DataCenterWithCluster model) {
            return messages.hostDataCenter(model.getDataCenter().getName());
        }

        public Comparator<DataCenterWithCluster> getComparator() {
            return Comparator.comparing((DataCenterWithCluster d) -> d.getDataCenter().getName(), Comparator.nullsLast(String.CASE_INSENSITIVE_ORDER)).thenComparing(d -> d.getCluster().getName(), Comparator.nullsLast(String.CASE_INSENSITIVE_ORDER));
        }
    });
    quotaEditor = new ListModelTypeAheadListBoxEditor<>(new ListModelTypeAheadListBoxEditor.NullSafeSuggestBoxRenderer<Quota>() {

        @Override
        public String getReplacementStringNullSafe(Quota data) {
            return data.getQuotaName();
        }

        @Override
        public String getDisplayStringNullSafe(Quota data) {
            return typeAheadNameDescriptionTemplateNullSafe(data.getQuotaName(), data.getDescription());
        }
    }, new ModeSwitchingVisibilityRenderer());
    baseTemplateEditor = new ListModelTypeAheadListBoxEditor<>(new ListModelTypeAheadListBoxEditor.NullSafeSuggestBoxRenderer<VmTemplate>() {

        @Override
        public String getReplacementStringNullSafe(VmTemplate data) {
            return data.getName();
        }

        @Override
        public String getDisplayStringNullSafe(VmTemplate data) {
            return typeAheadNameDescriptionTemplateNullSafe(data.getName(), data.getDescription());
        }
    }, new ModeSwitchingVisibilityRenderer());
    templateWithVersionEditor = new ListModelTypeAheadListBoxEditor<>(new ListModelTypeAheadListBoxEditor.NullSafeSuggestBoxRenderer<TemplateWithVersion>() {

        @Override
        public String getReplacementStringNullSafe(TemplateWithVersion templateWithVersion) {
            return getFirstColumn(templateWithVersion) + // $NON-NLS-1$
            " | " + getSecondColumn(templateWithVersion);
        }

        @Override
        public String getDisplayStringNullSafe(TemplateWithVersion templateWithVersion) {
            return typeAheadNameDescriptionTemplateNullSafe(getFirstColumn(templateWithVersion), getSecondColumn(templateWithVersion));
        }

        private String getFirstColumn(TemplateWithVersion templateWithVersion) {
            return templateWithVersion.getBaseTemplate().getName();
        }

        private String getSecondColumn(TemplateWithVersion templateWithVersion) {
            final VmTemplate versionTemplate = templateWithVersion.getTemplateVersion();
            final String versionName = versionTemplate.getTemplateVersionName() == null ? // $NON-NLS-1$
            "" : // $NON-NLS-1$
            versionTemplate.getTemplateVersionName() + " ";
            return templateWithVersion.isLatest() ? constants.latest() : // $NON-NLS-1$
            versionName + "(" + versionTemplate.getTemplateVersionNumber() + // $NON-NLS-1$
            ")";
        }
    }, new ModeSwitchingVisibilityRenderer(), new SuggestionMatcher.ContainsSuggestionMatcher());
    oSTypeEditor = new ListModelListBoxEditor<>(new AbstractRenderer<Integer>() {

        @Override
        public String render(Integer object) {
            return AsyncDataProvider.getInstance().getOsName(object);
        }
    }, new ModeSwitchingVisibilityRenderer());
    vmTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer<VmType>(), new ModeSwitchingVisibilityRenderer());
    instanceTypesEditor = new ListModelTypeAheadListBoxEditor<>(new ListModelTypeAheadListBoxEditor.NullSafeSuggestBoxRenderer<InstanceType>() {

        @Override
        public String getReplacementStringNullSafe(InstanceType data) {
            return data.getName();
        }

        @Override
        public String getDisplayStringNullSafe(InstanceType data) {
            return typeAheadNameDescriptionTemplateNullSafe(data.getName(), data.getDescription());
        }
    }, new ModeSwitchingVisibilityRenderer());
    emulatedMachine = new ListModelTypeAheadChangeableListBoxEditor(new ListModelTypeAheadChangeableListBoxEditor.NullSafeSuggestBoxRenderer() {

        @Override
        public String getDisplayStringNullSafe(String data) {
            if (data == null || data.trim().isEmpty()) {
                data = getDefaultEmulatedMachineLabel();
            }
            return typeAheadNameTemplateNullSafe(data);
        }
    }, false, new ModeSwitchingVisibilityRenderer(), constants.clusterDefaultOption());
    customCpu = new ListModelTypeAheadChangeableListBoxEditor(new ListModelTypeAheadChangeableListBoxEditor.NullSafeSuggestBoxRenderer() {

        @Override
        public String getDisplayStringNullSafe(String data) {
            if (data == null || data.trim().isEmpty()) {
                data = getDefaultCpuTypeLabel();
            }
            return typeAheadNameTemplateNullSafe(data);
        }
    }, false, new ModeSwitchingVisibilityRenderer(), constants.clusterDefaultOption());
    numOfSocketsEditor = new ListModelListBoxEditor<>(new ModeSwitchingVisibilityRenderer());
    numOfSocketsEditorWithDetachable = new EntityModelDetachableWidgetWithLabel(numOfSocketsEditor);
    corePerSocketEditor = new ListModelListBoxEditor<>(new ModeSwitchingVisibilityRenderer());
    corePerSocketEditorWithDetachable = new EntityModelDetachableWidgetWithLabel(corePerSocketEditor);
    initThreadsPerCore();
    // Pools
    poolTypeEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<EntityModel<VmPoolType>>() {

        @Override
        public String renderNullSafe(EntityModel<VmPoolType> object) {
            return object.getTitle();
        }
    }, new ModeSwitchingVisibilityRenderer());
    timeZoneEditor = new ListModelListBoxOnlyEditor<>(new NullSafeRenderer<TimeZoneModel>() {

        @Override
        public String renderNullSafe(TimeZoneModel timeZone) {
            if (timeZone.isDefault()) {
                return messages.defaultTimeZoneCaption(timeZone.getDisplayValue());
            } else {
                return timeZone.getDisplayValue();
            }
        }
    }, new ModeSwitchingVisibilityRenderer());
    EnableableFormLabel label = new EnableableFormLabel();
    label.setText(constants.timeZoneVm());
    timeZoneEditorWithInfo = new EntityModelWidgetWithInfo(label, timeZoneEditor);
    timeZoneEditorWithInfo.setExplanation(templates.italicText(constants.timeZoneInfo()));
    // Console tab
    displayTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer<DisplayType>(), new ModeSwitchingVisibilityRenderer());
    graphicsTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer<UnitVmModel.GraphicsTypes>());
    usbSupportEditor = new ListModelListBoxEditor<>(new EnumRenderer<UsbPolicy>(), new ModeSwitchingVisibilityRenderer());
    consoleDisconnectActionEditor = new ListModelListBoxEditor<>(new EnumRenderer<ConsoleDisconnectAction>(), new ModeSwitchingVisibilityRenderer());
    numOfMonitorsEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<Integer>() {

        @Override
        public String renderNullSafe(Integer object) {
            return object.toString();
        }
    }, new ModeSwitchingVisibilityRenderer());
    numOfMonitorsEditor.hideLabel();
    vncKeyboardLayoutEditor = new ListModelListBoxEditor<>(new VncKeyMapRenderer(), new ModeSwitchingVisibilityRenderer());
    // Host Tab
    // $NON-NLS-1$
    specificHost = new EntityModelRadioButtonEditor("runVmOnHostGroup", new ModeSwitchingVisibilityRenderer());
    isAutoAssignEditor = // $NON-NLS-1$
    new EntityModelRadioButtonEditor("runVmOnHostGroup", new ModeSwitchingVisibilityRenderer());
    defaultHostEditor = new ListModelMultipleSelectListBoxEditor<>(new NameRenderer<VDS>(), new ModeSwitchingVisibilityRenderer());
    defaultHostEditor.hideLabel();
    migrationModeEditor = new ListModelListBoxEditor<>(new EnumRenderer<MigrationSupport>(), new ModeSwitchingVisibilityRenderer());
    migrationModeEditor.hideLabel();
    overrideMigrationDowntimeEditor = new EntityModelCheckBoxEditor(Align.RIGHT, new ModeSwitchingVisibilityRenderer());
    migrationDowntimeEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    overrideMigrationPolicyEditor = new EntityModelCheckBoxEditor(Align.RIGHT, new ModeSwitchingVisibilityRenderer());
    migrationPolicyEditor = new ListModelListBoxOnlyEditor<>(new NameRenderer<MigrationPolicy>(), new ModeSwitchingVisibilityRenderer());
    autoConvergeEditor = new ListModelListBoxEditor<>(new BooleanRendererWithNullText(constants.autoConverge(), constants.dontAutoConverge(), constants.inheritFromCluster()), new ModeSwitchingVisibilityRenderer());
    migrateCompressedEditor = new ListModelListBoxEditor<>(new BooleanRendererWithNullText(constants.compress(), constants.dontCompress(), constants.inheritFromCluster()), new ModeSwitchingVisibilityRenderer());
    // Resource Allocation
    provisioningThinEditor = // $NON-NLS-1$
    new EntityModelRadioButtonEditor("provisioningGroup", new ModeSwitchingVisibilityRenderer());
    provisioningCloneEditor = // $NON-NLS-1$
    new EntityModelRadioButtonEditor("provisioningGroup", new ModeSwitchingVisibilityRenderer());
    // Boot Options Tab
    firstBootDeviceEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<EntityModel<BootSequence>>() {

        @Override
        public String renderNullSafe(EntityModel<BootSequence> object) {
            return object.getTitle();
        }
    }, new ModeSwitchingVisibilityRenderer());
    secondBootDeviceEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<EntityModel<BootSequence>>() {

        @Override
        public String renderNullSafe(EntityModel<BootSequence> object) {
            return object.getTitle();
        }
    }, new ModeSwitchingVisibilityRenderer());
    cdImageEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<RepoImage>() {

        @Override
        public String renderNullSafe(RepoImage object) {
            // For old ISO images from an ISO domain the image name is empty
            if (StringHelper.isNullOrEmpty(object.getRepoImageName())) {
                return object.getRepoImageId();
            }
            return object.getRepoImageName();
        }
    }, new ModeSwitchingVisibilityRenderer());
    cdImageEditor.hideLabel();
    cpuProfilesEditor = new ListModelListBoxEditor<>(new NameRenderer<CpuProfile>());
    cpuSharesAmountSelectionEditor = new ListModelListBoxOnlyEditor<>(new EnumRenderer<UnitVmModel.CpuSharesAmount>(), new ModeSwitchingVisibilityRenderer());
    numaTuneMode = new ListModelListBoxEditor<>(new EnumRenderer(), new ModeSwitchingVisibilityRenderer());
    providersEditor = new ListModelListBoxEditor<>(new NameRenderer<Provider<OpenstackNetworkProviderProperties>>());
    providersEditor.setLabel(constants.providerLabel());
}
Also used : ListModelTypeAheadChangeableListBoxEditor(org.ovirt.engine.ui.common.widget.editor.ListModelTypeAheadChangeableListBoxEditor) UnitVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel) TemplateWithVersion(org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion) VmTemplate(org.ovirt.engine.core.common.businessentities.VmTemplate) NullSafeRenderer(org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer) DataCenterWithCluster(org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) InstanceType(org.ovirt.engine.core.common.businessentities.InstanceType) OpenstackNetworkProviderProperties(org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties) EntityModelDetachableWidgetWithLabel(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelDetachableWidgetWithLabel) BooleanRendererWithNullText(org.ovirt.engine.ui.common.widget.renderer.BooleanRendererWithNullText) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) BootSequence(org.ovirt.engine.core.common.businessentities.BootSequence) VmPoolType(org.ovirt.engine.core.common.businessentities.VmPoolType) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel) TimeZoneModel(org.ovirt.engine.ui.uicommonweb.models.vms.TimeZoneModel) VncKeyMapRenderer(org.ovirt.engine.ui.common.widget.editor.VncKeyMapRenderer) GroupedListModelListBox(org.ovirt.engine.ui.common.widget.editor.GroupedListModelListBox) EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) Quota(org.ovirt.engine.core.common.businessentities.Quota) RepoImage(org.ovirt.engine.core.common.businessentities.storage.RepoImage) AbstractRenderer(com.google.gwt.text.shared.AbstractRenderer) IntegerEntityModelTextBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxOnlyEditor) EntityModelRadioButtonEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)

Aggregations

VmPoolType (org.ovirt.engine.core.common.businessentities.VmPoolType)3 AddVmPoolParameters (org.ovirt.engine.core.common.action.AddVmPoolParameters)2 VM (org.ovirt.engine.core.common.businessentities.VM)2 VmPool (org.ovirt.engine.core.common.businessentities.VmPool)2 UnitToGraphicsDeviceParamsBuilder (org.ovirt.engine.ui.uicommonweb.builders.vm.UnitToGraphicsDeviceParamsBuilder)2 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)2 AbstractRenderer (com.google.gwt.text.shared.AbstractRenderer)1 Inject (com.google.inject.Inject)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 VmPoolParametersBase (org.ovirt.engine.core.common.action.VmPoolParametersBase)1 BootSequence (org.ovirt.engine.core.common.businessentities.BootSequence)1 DisplayType (org.ovirt.engine.core.common.businessentities.DisplayType)1 InstanceType (org.ovirt.engine.core.common.businessentities.InstanceType)1 OpenstackNetworkProviderProperties (org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties)1 Quota (org.ovirt.engine.core.common.businessentities.Quota)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)1