Gilad Chaplik has posted comments on this change.

Change subject: webadmin: Enable/Disable Gluster hooks
......................................................................


Patch Set 2: (6 inline comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGlusterHookListModel.java
Line 70:         if (getEntity() == null || getSelectedItems() == null || 
getSelectedItems().size() == 0) {
Line 71:             return;
Line 72:         }
Line 73: 
Line 74:         ArrayList<VdcActionParametersBase> list = new 
java.util.ArrayList<VdcActionParametersBase>();
why use qualified name?
Line 75:         for (Object item : getSelectedItems())
Line 76:         {
Line 77:             GlusterHookEntity hook = (GlusterHookEntity) item;
Line 78:             list.add(new GlusterHookParameters(getEntity().getId(), 
hook.getId()));


Line 72:         }
Line 73: 
Line 74:         ArrayList<VdcActionParametersBase> list = new 
java.util.ArrayList<VdcActionParametersBase>();
Line 75:         for (Object item : getSelectedItems())
Line 76:         {
is it gerrit or the code isn't formatted ?
Line 77:             GlusterHookEntity hook = (GlusterHookEntity) item;
Line 78:             list.add(new GlusterHookParameters(getEntity().getId(), 
hook.getId()));
Line 79:         }
Line 80:         Frontend.RunMultipleAction(VdcActionType.EnableGlusterHook, 
list);


Line 98:         
model.setMessage(ConstantsManager.getInstance().getConstants().disableGlusterHooksMessage());
Line 99: 
Line 100:         if (getSelectedItems() == null) {
Line 101:             return;
Line 102:         }
checked it already in line 89
Line 103: 
Line 104:         java.util.ArrayList<String> list = new 
java.util.ArrayList<String>();
Line 105:         for (GlusterHookEntity item : Linq.<GlusterHookEntity> 
Cast(getSelectedItems()))
Line 106:         {


Line 101:             return;
Line 102:         }
Line 103: 
Line 104:         java.util.ArrayList<String> list = new 
java.util.ArrayList<String>();
Line 105:         for (GlusterHookEntity item : Linq.<GlusterHookEntity> 
Cast(getSelectedItems()))
use a single convention to cast SelectedItems (line 75), I prefer the former
Line 106:         {
Line 107:             list.add(item.getName());
Line 108:         }
Line 109:         model.setItems(list);


Line 179: 
Line 180:         getEnableHookCommand().setIsExecutionAllowed(true);
Line 181:         getDisableHookCommand().setIsExecutionAllowed(true);
Line 182: 
Line 183:         for (GlusterHookEntity hook : Linq.<GlusterHookEntity> 
Cast(getSelectedItems()))
same.
Line 184:         {
Line 185:             if (hook.getStatus() == GlusterHookStatus.ENABLED)
Line 186:             {
Line 187:                 getEnableHookCommand().setIsExecutionAllowed(false);


Line 188:             }
Line 189:             else
Line 190:             {
Line 191:                 getDisableHookCommand().setIsExecutionAllowed(false);
Line 192:             }
use 2 flags to break.
Line 193:         }
Line 194:     }
Line 195: 
Line 196:     @Override


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If4b3af2c0669278e1fc776420e1ed8bf70ddbe5f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to