Frank Kobzik has uploaded a new change for review.

Change subject: frontend: Clarify CPU labels in host view
......................................................................

frontend: Clarify CPU labels in host view

This patch clarifies naming of labels and fields related to CPU.
In past there were two fields with cpu information:
 - name
 - type.
The naming of these fields didn't make any sense since "name" field
contained value with cpu family whereas "type" field contained actual
name of the cpu model. In order to avoid the confusion, this patch
renames the fields in this way:
 type -> model
 name -> type.

There will be a follow-up patch that clarifies cluster view as well.

Change-Id: I5137dbb61dcc07dc7d5ccced390d94ddc1c9ba4e
Signed-off-by: Frantisek Kobzik <fkob...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/1012984
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
4 files changed, 23 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/11/20111/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
index 08843e7..8ed2ed1 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
@@ -167,7 +167,7 @@
     // cluster.setname(name);
     // cluster.setdescription((String) m.getDescription().getEntity());
     // cluster.setstorage_pool_id(getData().getDataCenterId());
-    // cluster.setcpu_name(((ServerCpu) 
m.getCPU().getSelectedItem()).getCpuName());
+    // cluster.setcpu_name(((ServerCpu) 
m.getCPU().getSelectedItem()).getCpuType());
     // cluster.setmax_vds_memory_over_commit(m.getMemoryOverCommit());
     // cluster.setTransparentHugepages(version.compareTo(new Version("3.0")) 
>= 0);
     // cluster.setcompatibility_version(version);
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
index 3a0a348..5c69d1b 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
@@ -357,22 +357,6 @@
         }
     }
 
-    private String cpuName;
-
-    public String getCpuName()
-    {
-        return cpuName;
-    }
-
-    public void setCpuName(String value)
-    {
-        if (!StringHelper.stringsEqual(cpuName, value))
-        {
-            cpuName = value;
-            onPropertyChanged(new PropertyChangedEventArgs("CpuName")); 
//$NON-NLS-1$
-        }
-    }
-
     private String cpuType;
 
     public String getCpuType()
@@ -386,6 +370,22 @@
         {
             cpuType = value;
             onPropertyChanged(new PropertyChangedEventArgs("CpuType")); 
//$NON-NLS-1$
+        }
+    }
+
+    private String cpuModel;
+
+    public String getCpuModel()
+    {
+        return cpuModel;
+    }
+
+    public void setCpuModel(String value)
+    {
+        if (!StringHelper.stringsEqual(cpuModel, value))
+        {
+            cpuModel = value;
+            onPropertyChanged(new PropertyChangedEventArgs("CpuModel")); 
//$NON-NLS-1$
         }
     }
 
@@ -1046,8 +1046,8 @@
 
         setSpmPriorityValue(vds.getVdsSpmPriority());
         setActiveVms(vds.getVmActive());
-        setCpuName(vds.getCpuName() != null ? vds.getCpuName().getCpuName() : 
null);
-        setCpuType(vds.getCpuModel());
+        setCpuType(vds.getCpuName() != null ? vds.getCpuName().getCpuName() : 
null);
+        setCpuModel(vds.getCpuModel());
         setNumberOfSockets(vds.getCpuSockets());
         setCoresPerSocket((vds.getCpuCores() != null && vds.getCpuSockets() != 
null)
                 ? vds.getCpuCores() / vds.getCpuSockets() : null);
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
index a43d14d..a4c6112 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
@@ -1327,8 +1327,8 @@
     @DefaultStringValue("Active VMs")
     String activeVmsHostGeneral();
 
-    @DefaultStringValue("CPU Name")
-    String cpuNameHostGeneral();
+    @DefaultStringValue("CPU Model")
+    String cpuModelHostGeneral();
 
     @DefaultStringValue("CPU Type")
     String cpuTypeHostGeneral();
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
index 98bc146..df5a8db 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
@@ -56,8 +56,8 @@
     TextBoxLabel kernelVersion = new TextBoxLabel();
     @Path("IScsiInitiatorName")
     TextBoxLabel iScsiInitiatorName = new TextBoxLabel();
-    TextBoxLabel cpuName = new TextBoxLabel();
     TextBoxLabel cpuType = new TextBoxLabel();
+    TextBoxLabel cpuModel = new TextBoxLabel();
     TextBoxLabel threadsPerCore = new TextBoxLabel();
     VersionLabel vdsmVersion = new VersionLabel();
     PercentLabel<Integer> sharedMemory = new PercentLabel<Integer>();
@@ -144,7 +144,7 @@
 
         formBuilder.addFormItem(new FormItem(constants.spmPriority(), 
spmPriority, 0, 1, virtSupported));
         formBuilder.addFormItem(new FormItem(constants.activeVmsHostGeneral(), 
activeVms, 1, 1, virtSupported));
-        formBuilder.addFormItem(new FormItem(constants.cpuNameHostGeneral(), 
cpuName, 2, 1));
+        formBuilder.addFormItem(new FormItem(constants.cpuModelHostGeneral(), 
cpuModel, 2, 1));
         formBuilder.addFormItem(new FormItem(constants.cpuTypeHostGeneral(), 
cpuType, 3, 1));
         formBuilder.addFormItem(new 
FormItem(constants.numOfSocketsHostGeneral(), numberOfSockets, 4, 1));
         formBuilder.addFormItem(new 
FormItem(constants.numOfCoresPerSocketHostGeneral(), coresPerSocket, 5, 1));


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5137dbb61dcc07dc7d5ccced390d94ddc1c9ba4e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to