Francesco Romani has posted comments on this change. Change subject: userportal, webadmin: VM console key management ......................................................................
Patch Set 4: (7 comments) https://gerrit.ovirt.org/#/c/35810/4//COMMIT_MSG Commit Message: Line 16: public key assigned to the user in the database Line 17: Line 18: - A new command to implement the functionality of this button was Line 19: implemented Line 20: > is there a bug/wiki-page related to this feature? Yes, will add Line 21: Change-Id: Id2364cafc687ba6dee2504322234067ff98dc00c https://gerrit.ovirt.org/#/c/35810/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java: Line 225: { Line 226: privateNewTemplateCommand = value; Line 227: } Line 228: Line 229: private UICommand privateSetConsoleKeyCommand; > please don't use the 'private' prefix in new code will do. Is there any recommendation for the naming? I just dropped the 'private' prefix: privateSetConsoleKeyCommand -> setConsoleKeyCommand Line 230: Line 231: public UICommand getSetConsoleKeyCommand() { Line 232: return privateSetConsoleKeyCommand; Line 233: } Line 540: model.getCommands().add(tempVar); Line 541: UICommand tempVar2 = new UICommand("Cancel", this); //$NON-NLS-1$ Line 542: tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel()); Line 543: tempVar2.setIsCancel(true); Line 544: model.getCommands().add(tempVar2); > you can simplify this to: Done Line 545: Line 546: AsyncDataProvider.getInstance().getConsolePublicKey(new AsyncQuery(model, Line 547: new INewAsyncCallback() { Line 548: @Override Line 546: AsyncDataProvider.getInstance().getConsolePublicKey(new AsyncQuery(model, Line 547: new INewAsyncCallback() { Line 548: @Override Line 549: public void onSuccess(Object target, Object returnValue) { Line 550: PublicKeyModel model = (PublicKeyModel)target; > please avoid using the 'target' facility from AsyncQuery. It is a remnant f Nice to learn that. Done. Line 551: Line 552: Object publicKey = ((VdcQueryReturnValue) returnValue).getReturnValue(); Line 553: Line 554: model.getTextInput().setEntity((String)publicKey); Line 548: @Override Line 549: public void onSuccess(Object target, Object returnValue) { Line 550: PublicKeyModel model = (PublicKeyModel)target; Line 551: Line 552: Object publicKey = ((VdcQueryReturnValue) returnValue).getReturnValue(); > since VdcQueryReturnValue#getReturnValue() is generic, you can make publicK Done Line 553: Line 554: model.getTextInput().setEntity((String)publicKey); Line 555: } Line 556: })); Line 568: new IFrontendActionAsyncCallback() { Line 569: @Override Line 570: public void executed(FrontendActionAsyncResult result) { Line 571: Line 572: PublicKeyModel model = (PublicKeyModel) result.getState(); > similarly: by making model final on line 561, you can capture the model and Done Line 573: model.stopProgress(); Line 574: cancel(); Line 575: } Line 576: }, model); https://gerrit.ovirt.org/#/c/35810/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java: Line 1818: cancel(); Line 1819: } Line 1820: }, model); Line 1821: } Line 1822: > same set of comments for #editConsoleKey and #onSetConsoleKey as in UserPor Done Line 1823: private void editConsoleKey() { Line 1824: Line 1825: PublicKeyModel model = new PublicKeyModel(); Line 1826: -- To view, visit https://gerrit.ovirt.org/35810 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2364cafc687ba6dee2504322234067ff98dc00c Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vitor de Lima <vdel...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches