Search in sources :

Example 1 with NeutronAgentModel

use of org.ovirt.engine.ui.uicommonweb.models.providers.NeutronAgentModel in project ovirt-engine by oVirt.

the class HostNetworkProviderWidget method edit.

@Override
public void edit(HostNetworkProviderModel model) {
    driver.edit(model);
    final NeutronAgentModel neutronAgentModel = model.getNeutronAgentModel();
    neutronAgentWidget.edit(neutronAgentModel);
    neutronAgentWidget.setVisible(neutronAgentModel.isPluginConfigurationAvailable().getEntity());
    IEventListener<EventArgs> providerPluginTypeListener = (ev, sender, args) -> neutronAgentWidget.setVisible(model.getNetworkProviderType().getSelectedItem() == OPENSTACK_NETWORK && model.providerPluginTypeIsOpenstack());
    model.getNetworkProviderType().getSelectedItemChangedEvent().addListener(providerPluginTypeListener);
    model.getProviderPluginType().getSelectedItemChangedEvent().addListener(providerPluginTypeListener);
}
Also used : NeutronAgentModel(org.ovirt.engine.ui.uicommonweb.models.providers.NeutronAgentModel) EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) AssetProvider(org.ovirt.engine.ui.webadmin.gin.AssetProvider) HostNetworkProviderModel(org.ovirt.engine.ui.uicommonweb.models.providers.HostNetworkProviderModel) Inject(com.google.inject.Inject) IEventListener(org.ovirt.engine.ui.uicompat.IEventListener) Provider(org.ovirt.engine.core.common.businessentities.Provider) Align(org.ovirt.engine.ui.common.widget.Align) GWT(com.google.gwt.core.client.GWT) ListModelListBoxEditor(org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel) UiBinder(com.google.gwt.uibinder.client.UiBinder) ApplicationConstants(org.ovirt.engine.ui.webadmin.ApplicationConstants) ListModelListBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) OpenstackNetworkProviderProperties(org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties) NeutronAgentModel(org.ovirt.engine.ui.uicommonweb.models.providers.NeutronAgentModel) ElementIdHandler(org.ovirt.engine.ui.common.idhandler.ElementIdHandler) AbstractModelBoundPopupWidget(org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractModelBoundPopupWidget) UiCommonEditorDriver(org.ovirt.engine.ui.common.editor.UiCommonEditorDriver) PatternFlyCompatible(org.ovirt.engine.ui.common.widget.PatternFlyCompatible) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) WithElementId(org.ovirt.engine.ui.common.idhandler.WithElementId) ListModelSuggestBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.ListModelSuggestBoxEditor) ApplicationTemplates(org.ovirt.engine.ui.webadmin.ApplicationTemplates) Widget(com.google.gwt.user.client.ui.Widget) OPENSTACK_NETWORK(org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_NETWORK) EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) UiField(com.google.gwt.uibinder.client.UiField) ProviderType(org.ovirt.engine.core.common.businessentities.ProviderType) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs)

Aggregations

GWT (com.google.gwt.core.client.GWT)1 UiBinder (com.google.gwt.uibinder.client.UiBinder)1 UiField (com.google.gwt.uibinder.client.UiField)1 Widget (com.google.gwt.user.client.ui.Widget)1 Inject (com.google.inject.Inject)1 OpenstackNetworkProviderProperties (org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties)1 Provider (org.ovirt.engine.core.common.businessentities.Provider)1 ProviderType (org.ovirt.engine.core.common.businessentities.ProviderType)1 OPENSTACK_NETWORK (org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_NETWORK)1 UiCommonEditorDriver (org.ovirt.engine.ui.common.editor.UiCommonEditorDriver)1 ElementIdHandler (org.ovirt.engine.ui.common.idhandler.ElementIdHandler)1 WithElementId (org.ovirt.engine.ui.common.idhandler.WithElementId)1 Align (org.ovirt.engine.ui.common.widget.Align)1 EntityModelWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo)1 PatternFlyCompatible (org.ovirt.engine.ui.common.widget.PatternFlyCompatible)1 ListModelListBoxEditor (org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor)1 ListModelListBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.ListModelListBoxOnlyEditor)1 EntityModelCheckBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)1 ListModelSuggestBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.ListModelSuggestBoxEditor)1 EnableableFormLabel (org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)1