Kobi Ianko has posted comments on this change.

Change subject: webadmin: Disable new Pools popup when no Templates are 
available
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
Line 1158:             public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 1159:                 Boolean enabled = 
object.getEditingEnabled().getEntity();
Line 1160:                 if (Boolean.FALSE.equals(enabled)) {
Line 1161:                     disableAllTabs();
Line 1162:                     
generalWarningMessage.setText(object.getEditingEnabled().getMessage()/*constants.notAvailableWithNoUpDC()*/);
Done
Line 1163:                 }
Line 1164:             }
Line 1165:         });
Line 1166: 


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewPoolModelBehavior.java
Line 78:         return parentValidation;
Line 79:     }
Line 80: 
Line 81:     @Override
Line 82:     protected void templateValidate() {
Done
Line 83:         AsyncDataProvider.getAllVmTemplates(new AsyncQuery(getModel(), 
 new INewAsyncCallback() {
Line 84:             @Override
Line 85:             public void onSuccess(Object model, Object returnValue) {
Line 86:                 List<VmTemplate> templates = (List<VmTemplate>) 
returnValue;


Line 79:     }
Line 80: 
Line 81:     @Override
Line 82:     protected void templateValidate() {
Line 83:         AsyncDataProvider.getAllVmTemplates(new AsyncQuery(getModel(), 
 new INewAsyncCallback() {
from what I understood at version 3.4 all the queries to the backend will be 
replaced from GWT-RPC to Rest.
I'm not a big expert in Rest, but from what I understood there is no elegant 
way to return a number from the backend (the return value will be a list of 
entities).
In that case when we will move to Rest api we will not be able to use the 
"getNumOfTemplates" and we will need to use "getAllTemplates" and count them as 
I did here.

If you know more about Rest, and feel that I'm wrong assuming that changing the 
query to "getNumOfTemplates" will cause a harder shift to Rest, please let me 
know
Line 84:             @Override
Line 85:             public void onSuccess(Object model, Object returnValue) {
Line 86:                 List<VmTemplate> templates = (List<VmTemplate>) 
returnValue;
Line 87:                 if(templates.size() <= 1) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iacb121d2e89922b04b8331db92e437cefc8b6b5c
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to