Ravi Nori has uploaded a new change for review.

Change subject: webadmin: cluster general subtab: show virt/gluster service 
status
......................................................................

webadmin: cluster general subtab: show virt/gluster service status

show on cluster subtab if virt and gluster services are
enabled or disabled for cluster

Change-Id: Ib8557e466fc5929607746f0640d51d5b386895a3
Bug-Url: https://bugzilla.redhat.com/867643
Signed-off-by: Ravi Nori <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.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/cluster/ClusterGeneralModelForm.java
3 files changed, 34 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/85/39585/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
index 11f6dda..abf41e3 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
@@ -174,6 +174,8 @@
     private boolean cpuThreads;
     private ClusterType clusterType;
     private String emulatedMachine;
+    private boolean glusterEnabled;
+    private boolean virtEnabled;
 
     public void setConsoleAddressPartiallyOverridden(Boolean 
consoleAddressPartiallyOverridden) {
         if (isConsoleAddressPartiallyOverridden().booleanValue() !=
@@ -229,6 +231,8 @@
         setDataCenterName(vdsGroup.getStoragePoolName());
         setMemoryOverCommit(vdsGroup.getMaxVdsMemoryOverCommit());
         setCpuThreads(vdsGroup.getCountThreadsAsCores());
+        setGlusterEnabled(vdsGroup.supportsGlusterService());
+        setVirtEnabled(vdsGroup.supportsVirtService());
         setResiliencePolicy(vdsGroup.getMigrateOnError());
         setEmulatedMachine(vdsGroup.getEmulatedMachine());
         setCompatibilityVersion(vdsGroup.getCompatibilityVersion().getValue());
@@ -784,6 +788,22 @@
         this.cpuThreads = cpuThreads;
     }
 
+    public boolean getGlusterEnabled() {
+        return glusterEnabled;
+    }
+
+    public void setGlusterEnabled(boolean glusterEnabled) {
+        this.glusterEnabled = glusterEnabled;
+    }
+
+    public boolean getVirtEnabled() {
+        return virtEnabled;
+    }
+
+    public void setVirtEnabled(boolean virtEnabled) {
+        this.virtEnabled = virtEnabled;
+    }
+
     public String getCompatibilityVersion() {
         return compatibilityVersion;
     }
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 89a2e49..5e71449 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
@@ -3328,6 +3328,12 @@
     @DefaultStringValue("Cluster Node Type")
     String clusterType();
 
+    @DefaultStringValue("Gluster Supported")
+    String glusterSupported();
+
+    @DefaultStringValue("Virt Supported")
+    String virtSupported();
+
     @DefaultStringValue("used")
     String used();
 
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/cluster/ClusterGeneralModelForm.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/cluster/ClusterGeneralModelForm.java
index 3e81b53..5bd5ac0 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/cluster/ClusterGeneralModelForm.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/cluster/ClusterGeneralModelForm.java
@@ -31,6 +31,8 @@
     PercentLabel<Integer> memoryOverCommit;
     ResiliencePolicyLabel resiliencePolicy;
     ClusterTypeLabel clusterType;
+    BooleanLabel glusterEnabled;
+    BooleanLabel virtEnabled;
     TextBoxLabel noOfVolumesTotal = new TextBoxLabel();
     TextBoxLabel noOfVolumesUp = new TextBoxLabel();
     TextBoxLabel noOfVolumesDown = new TextBoxLabel();
@@ -43,7 +45,7 @@
     private final static ApplicationConstants constants = 
AssetProvider.getConstants();
 
     public ClusterGeneralModelForm(ModelProvider<ClusterGeneralModel> 
modelProvider) {
-        super(modelProvider, 3, 6);
+        super(modelProvider, 3, 7);
     }
 
     /**
@@ -52,6 +54,8 @@
      */
     public void initialize() {
         cpuThreads = new BooleanLabel(constants.yes(), constants.no());
+        glusterEnabled = new BooleanLabel(constants.yes(), constants.no());
+        virtEnabled = new BooleanLabel(constants.yes(), constants.no());
         memoryOverCommit = new PercentLabel<Integer>();
         resiliencePolicy = new ResiliencePolicyLabel();
         clusterType = new ClusterTypeLabel();
@@ -83,9 +87,11 @@
         formBuilder.addFormItem(new FormItem(constants.descriptionCluster(), 
description, 1, 0));
         formBuilder.addFormItem(new FormItem(constants.dcCluster(), 
dataCenterName, 2, 0, virtSupported));
         formBuilder.addFormItem(new 
FormItem(constants.compatibilityVersionCluster(), compatibilityVersion, 3, 0));
+        formBuilder.addFormItem(new FormItem(constants.glusterSupported(), 
glusterEnabled, 4, 0));
+        formBuilder.addFormItem(new FormItem(constants.virtSupported(), 
virtEnabled, 5, 0));
 
         // Show the cluster type only if the application is running in both 
the modes
-        formBuilder.addFormItem(new FormItem(constants.clusterType(), 
clusterType, 4, 0, virtSupported
+        formBuilder.addFormItem(new FormItem(constants.clusterType(), 
clusterType, 6, 0, virtSupported
                 && glusterSupported));
 
         // properties for virt support


-- 
To view, visit https://gerrit.ovirt.org/39585
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8557e466fc5929607746f0640d51d5b386895a3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to