Daniel Erez has posted comments on this change.

Change subject: Modifying Add\Edit Host popup view
......................................................................


Patch Set 9: (16 inline comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-06-24 21:05:27 +0300
Line 4: Commit:     Yaniv Bronhaim <ybron...@redhat.com>
Line 5: CommitDate: 2013-07-02 12:17:15 +0300
Line 6: 
Line 7: Modifying Add\Edit Host popup view
add 'webadmin:' prefix
Line 8: 
Line 9: 1. Adding username and password fields for authentication.
Line 10: 2. Adding ssh fingerprint field and fetch button.
Line 11: 3. Adding port field to communicate with host.


Line 10: 2. Adding ssh fingerprint field and fetch button.
Line 11: 3. Adding port field to communicate with host.
Line 12: 
Line 13: Change-Id: I4e59c8b89da7345733439db95bdb4c729435e372
Line 14: Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=848072
remove bug url


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
Line 820:         // Save changes.
Line 821:         host.setVdsName((String) model.getName().getEntity());
Line 822:         host.setHostName((String) model.getHost().getEntity());
Line 823:         
host.setPort(Integer.parseInt(model.getPort().getEntity().toString()));
Line 824:         
host.setSSHPort(Integer.parseInt(model.getHostPort().getEntity().toString()));
check if simple (int) casting is enough..
Line 825:         
host.setSSHUsername(model.getUserName().getEntity().toString());
Line 826:         
host.setSSHKeyFingerprint(model.getFetchSshFingerprint().getEntity().toString());
Line 827:         host.setVdsSpmPriority(model.getSpmPriorityValue());
Line 828:         boolean consoleAddressSet = (Boolean) 
model.getConsoleAddressEnabled().getEntity();


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
Line 974:                              
ConstantsManager.getInstance().getConstants().errorLoadingFingerprint());
Line 975:                 }
Line 976:             }
Line 977:         };
Line 978:         getFetchSshFingerprint().setEntity("");
* probably should be in ctr or at the beginning of the method.
* add //$NON-NLS-1$
Line 979:         getFetchResult().setEntity("");
Line 980:         getHost().validateEntity(new IValidation[] {
Line 981:                 new NotEmptyValidation(),
Line 982:                 new LengthValidation(255),


Line 976:             }
Line 977:         };
Line 978:         getFetchSshFingerprint().setEntity("");
Line 979:         getFetchResult().setEntity("");
Line 980:         getHost().validateEntity(new IValidation[] {
move it to 'validate' method
Line 981:                 new NotEmptyValidation(),
Line 982:                 new LengthValidation(255),
Line 983:                 new HostAddressValidation() });
Line 984:         if (!getHost().getIsValid()) {


Line 981:                 new NotEmptyValidation(),
Line 982:                 new LengthValidation(255),
Line 983:                 new HostAddressValidation() });
Line 984:         if (!getHost().getIsValid()) {
Line 985:             getFetchResult().setEntity("Address Error: " + 
getHost().getInvalidityReasons().get(0)); //$NON-NLS-1$
localization
Line 986:         }
Line 987:         else {
Line 988:             getFetchResult().setEntity((String) 
ConstantsManager.getInstance().getConstants().loadingFingerprint());
Line 989:             AsyncDataProvider.getHostFingerprint(aQuery, 
getHost().getEntity().toString());


....................................................
File 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
Line 288
Line 289
Line 290
Line 291
Line 292
probably redundant change...


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
Line 82:     @DefaultMessage("Some new hosts are detected in the cluster. You 
can <a>Import</a> them to engine or <a>Detach</a> them from the cluster.")
Line 83:     String clusterHasNewGlusterHosts();
Line 84: 
Line 85:     @DefaultMessage("Enter host fingerprint or <a>fetch</a> manually 
from host")
Line 86:     String fetchingHostFingerprint();
can be moved to ApplicationConstants


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostInstallPopupView.java
Line 35
Line 36
Line 37
Line 38
Line 39
redundant change


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
Line 379: 
Line 380:     private final ApplicationResources resources;
Line 381: 
Line 382:     // We need this to get the text of the alert messages:
Line 383:     private final ApplicationMessages messages;
constants probably can be used instead
Line 384: 
Line 385:     @Inject
Line 386:     public HostPopupView(EventBus eventBus, ApplicationResources 
resources, ApplicationConstants constants, CommonApplicationTemplates 
applicationTemplates) {
Line 387:         super(eventBus, resources);


Line 490:         userNameEditor.setLabel(constants.hostPopupUsernameLabel());
Line 491:         
hostAddressEditor.setLabel(constants.hostPopupHostAddressLabel());
Line 492:         hostPortEditor.setLabel(constants.hostPopupPortLabel());
Line 493:         authLabel.setText(constants.hostPopupAuthLabel());
Line 494:         //createAuthControls(constants);
remove
Line 495: 
Line 496:         
fingerprintLabel.setText(constants.hostPopupHostFingerprintLabel());
Line 497:         
overrideIpTablesEditor.setLabel(constants.hostPopupOverrideIpTablesLabel());
Line 498:         
externalHostProviderEnabledEditor.setLabel(constants.hostPopupEnableExternalHostProvider());


Line 585:             }
Line 586:         });
Line 587: 
Line 588:         rbPassword.setValue(true);
Line 589:         
passwordEditor.getElement().getStyle().setVisibility(Visibility.VISIBLE);
extract to a method
Line 590:         
publicKeyEditor.getElement().getStyle().setVisibility(Visibility.HIDDEN);
Line 591:         fetchSshFingerprint.hideLabel();
Line 592:         object.setAuthenticationMethod(AuthenticationMethod.Password);
Line 593: 


Line 594:         rbPassword.addValueChangeHandler(new 
ValueChangeHandler<Boolean>() {
Line 595:             @Override
Line 596:             public void onValueChange(ValueChangeEvent<Boolean> 
event) {
Line 597:                 
object.setAuthenticationMethod(AuthenticationMethod.Password);
Line 598:                 
passwordEditor.getElement().getStyle().setVisibility(Visibility.VISIBLE);
same
Line 599:                 
publicKeyEditor.getElement().getStyle().setVisibility(Visibility.HIDDEN);
Line 600:             }
Line 601:         });
Line 602: 


Line 603:         rbPublicKey.addValueChangeHandler(new 
ValueChangeHandler<Boolean>() {
Line 604:             @Override
Line 605:             public void onValueChange(ValueChangeEvent<Boolean> 
event) {
Line 606:                 
object.setAuthenticationMethod(AuthenticationMethod.PublicKey);
Line 607:                 
publicKeyEditor.getElement().getStyle().setVisibility(Visibility.VISIBLE);
same
Line 608:                 
passwordEditor.getElement().getStyle().setVisibility(Visibility.HIDDEN);
Line 609:             }
Line 610:         });
Line 611: 


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
Line 186:         .fingerprintEditor {
Line 187:             width: 495px;
Line 188:         }
Line 189: 
Line 190:         .content {
formatter
Line 191:                       width:100%;
Line 192:               }
Line 193: 
Line 194:         .expanderContent {


Line 206:             font-size: 10pt;
Line 207:             width: 450px;
Line 208:         }
Line 209: 
Line 210:               .pkStyle {
formatter
Line 211:                       resize: none;
Line 212:               }
Line 213: 
Line 214:     </ui:style>


-- 
To view, visit http://gerrit.ovirt.org/16048
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e59c8b89da7345733439db95bdb4c729435e372
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to