Gilad Chaplik has posted comments on this change.

Change subject: core, webadmin: Show only supported watchdogs
......................................................................


Patch Set 1:

(3 comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
Line 1247:         ArrayList<String> watchDogModels = new ArrayList<String>();
Line 1248:         watchDogModels.add(null);
Line 1249:         for (VmWatchdogType type : VmWatchdogType.values()) {
Line 1250:             
watchDogModels.add(EnumTranslator.createAndTranslate(type));
Line 1251:         }
[1] The watchdog models dropdown is updated according to the VmWatchdogType 
enum. (is it what we want?)
Line 1252:         getWatchdogModel().setItems(watchDogModels);
Line 1253: 
Line 1254:         setIsAutoAssign(new NotChangableForVmInPoolEntityModel());
Line 1255:         getIsAutoAssign().getEntityChangedEvent().addListener(this);


Line 1737:     }
Line 1738: 
Line 1739:     private void updateWatchdogModels(Integer osType) {
Line 1740:         VDSGroup cluster = getSelectedCluster();
Line 1741:         if (osType != null && cluster != null) {
cluster is null on dialog init (looks like a bug). this method is invoked only 
when changing OS.
Line 1742:             AsyncQuery asyncQuery = new AsyncQuery();
Line 1743:             asyncQuery.asyncCallback = new INewAsyncCallback() {
Line 1744:                 @Override
Line 1745:                 public void onSuccess(Object model, Object 
returnValue) {


Line 1746:                     ArrayList<String> watchDogModels = 
(ArrayList<String>) ((VdcQueryReturnValue) returnValue)
Line 1747:                             .getReturnValue();
Line 1748:                     watchDogModels.add(0, null);
Line 1749:                     getWatchdogModel().setItems(
Line 1750:                             (ArrayList<String>) watchDogModels);
* please set the items according to [1] (maybe extract a method for both).
* also in case a model has already been selected, and exists in fetched items, 
we should try to preserve the selection.
Line 1751:                 }
Line 1752:             };
Line 1753:             AsyncDataProvider.getWatchDogModels(osType,
Line 1754:                     cluster.getcompatibility_version(), asyncQuery);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib23f7357751025ff71c0deceda02aa51c2d8542c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianc...@eldorado.org.br>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.l...@eldorado.org.br>
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

Reply via email to