Lior Vernia has posted comments on this change.
Change subject: webadmin: Refactored code concerning Neutron agent
......................................................................
Patch Set 3: (7 inline comments)
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/provider/NeutronAgentSection.java
Line 20: import com.google.gwt.user.client.ui.FlowPanel;
Line 21: import com.google.gwt.user.client.ui.Label;
Line 22: import com.google.inject.Inject;
Line 23:
Line 24: public class NeutronAgentSection extends
AbstractModelBoundPopupWidget<NeutronAgentBehavior> {
Done
Line 25:
Line 26: interface Driver extends
SimpleBeanEditorDriver<NeutronAgentBehavior, NeutronAgentSection> {
Line 27: }
Line 28:
Line 85: driver.initialize(this);
Line 86: }
Line 87:
Line 88: @Override
Line 89: public void edit(final NeutronAgentBehavior behavior) {
Done
Line 90: qpidTitle.setVisible(behavior.getIsAvailable());
Line 91: interfaceMappings.setLabel((String)
behavior.getInterfaceMappingsLabel().getEntity());
Line 92: behavior.getPropertyChangedEvent().addListener(new
IEventListener() {
Line 93:
Line 93:
Line 94: @Override
Line 95: public void eventRaised(Event ev, Object sender, EventArgs
args) {
Line 96: if ("IsAvailable".equals(((PropertyChangedEventArgs)
args).PropertyName)) { //$NON-NLS-1$
Line 97: qpidTitle.setVisible(behavior.getIsAvailable());
Won't be needed if I just make a whole panel disappear as we discussed.
Line 98: }
Line 99: }
Line 100: });
Line 101:
behavior.getInterfaceMappingsLabel().getEntityChangedEvent().addListener(new
IEventListener() {
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/NeutronAgentBehavior.java
Line 13: import org.ovirt.engine.ui.uicompat.EventArgs;
Line 14: import org.ovirt.engine.ui.uicompat.IEventListener;
Line 15: import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
Line 16:
Line 17: public class NeutronAgentBehavior extends EntityModel {
Done
Line 18:
Line 19: private static final String QPID_PORT_DEFAULT = "5672";
//$NON-NLS-1$
Line 20:
Line 21: private final ListModel type;
Line 94: getPropertyChangedEvent().addListener(new IEventListener() {
Line 95:
Line 96: @Override
Line 97: public void eventRaised(Event ev, Object sender, EventArgs
args) {
Line 98: if ("IsAvailable".equals(((PropertyChangedEventArgs)
args).PropertyName)) { //$NON-NLS-1$
Done
Line 99: boolean available = getIsAvailable();
Line 100: getInterfaceMappings().setIsAvailable(available);
Line 101: getQpidHost().setIsAvailable(available);
Line 102: getQpidPort().setIsAvailable(available);
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/NeutronPluginTranslator.java
Line 31: }
Line 32:
Line 33: public static String getDisplayStringForPluginName(String
pluginName) {
Line 34: try {
Line 35: return
EnumTranslator.createAndTranslate(OpenstackNetworkPluginType.valueOf(pluginName));
The map contains display strings (e.g. "Open vSwitch") and not plugin names
(e.g. "OPEN_VSWITCH"). I know, the translation is ugly, I did the best I could.
Line 36: }
Line 37: catch (IllegalArgumentException e) {
Line 38: return pluginName;
Line 39: }
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
Line 57: private ListModel pluginType = new ListModel();
Line 58: private UICommand testCommand;
Line 59: private EntityModel testResult = new EntityModel();
Line 60:
Line 61: private NeutronAgentBehavior neutronAgentTab;
Done
Line 62:
Line 63: public EntityModel getName() {
Line 64: return name;
Line 65: }
--
To view, visit http://gerrit.ovirt.org/16893
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbec5113f146e4955945d6913c5b11eb60ca2389
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches