anmolbabu has uploaded a new change for review.

Change subject: webadmin : Gluster Volume Profile Popup
......................................................................

webadmin : Gluster Volume Profile Popup

This patch creates a Gluster Volume Profile Popup
that pops up when user selects details menu from
profiling drop-down action on Volumes tab for a selected
volume.

Change-Id: I26cda9f8603e77296720f2dc062b94d5c10e7fd1
Signed-off-by: Anmol Babu <anb...@redhat.com>
---
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStatisticsEntity.java
A 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/gluster/VolumeProfileStatisticsPopupPresenterWidget.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.ui.xml
5 files changed, 243 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/26998/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStatisticsEntity.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStatisticsEntity.java
new file mode 100644
index 0000000..db33ea1
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStatisticsEntity.java
@@ -0,0 +1,12 @@
+package org.ovirt.engine.core.common.businessentities.gluster;
+
+import java.io.Serializable;
+
+public class GlusterVolumeProfileStatisticsEntity implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 4140732970815664309L;
+    
+}
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java
new file mode 100644
index 0000000..6b0674e
--- /dev/null
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeProfileStatisticsModel.java
@@ -0,0 +1,54 @@
+package org.ovirt.engine.ui.uicommonweb.models.gluster;
+
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStatisticsEntity;
+import org.ovirt.engine.ui.uicommonweb.models.EntityModel;
+import org.ovirt.engine.ui.uicommonweb.models.ListModel;
+import org.ovirt.engine.ui.uicommonweb.models.Model;
+
+public class VolumeProfileStatisticsModel extends Model {
+    private ListModel cumulativeStatistics;
+    private ListModel bricks;
+    private EntityModel profileRunTime;
+    private EntityModel bytesRead;
+    private EntityModel bytesWritten;
+    public ListModel getCumulativeStatistics() {
+        return cumulativeStatistics;
+    }
+    public void setCumulativeStatistics(ListModel cumulativeStatistics) {
+        this.cumulativeStatistics = cumulativeStatistics;
+    }
+    public ListModel getBricks() {
+        return bricks;
+    }
+    public void setBricks(ListModel bricks) {
+        this.bricks = bricks;
+    }
+    public EntityModel getProfileRunTime() {
+        return profileRunTime;
+    }
+    public void setProfileRunTime(EntityModel profileRunTime) {
+        this.profileRunTime = profileRunTime;
+    }
+    public EntityModel getBytesRead() {
+        return bytesRead;
+    }
+    public void setBytesRead(EntityModel bytesRead) {
+        this.bytesRead = bytesRead;
+    }
+    public EntityModel getBytesWritten() {
+        return bytesWritten;
+    }
+    public void setBytesWritten(EntityModel bytesWritten) {
+        this.bytesWritten = bytesWritten;
+    }
+    public VolumeProfileStatisticsModel() {
+        setCumulativeStatistics(new ListModel());
+        setBricks(new ListModel());
+        setProfileRunTime(new EntityModel());
+        setBytesRead(new EntityModel());
+        setBytesWritten(new EntityModel());
+    }
+    public void showProfileStats(GlusterVolumeProfileStatisticsEntity entity) {
+        
+    }
+}
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/gluster/VolumeProfileStatisticsPopupPresenterWidget.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/gluster/VolumeProfileStatisticsPopupPresenterWidget.java
new file mode 100644
index 0000000..77e8b63
--- /dev/null
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/gluster/VolumeProfileStatisticsPopupPresenterWidget.java
@@ -0,0 +1,17 @@
+package org.ovirt.engine.ui.webadmin.section.main.presenter.popup.gluster;
+
+import 
org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget;
+import 
org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeProfileStatisticsModel;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+
+public class VolumeProfileStatisticsPopupPresenterWidget extends 
AbstractModelBoundPopupPresenterWidget<VolumeProfileStatisticsModel, 
VolumeProfileStatisticsPopupPresenterWidget.ViewDef> {
+    public interface ViewDef extends 
AbstractModelBoundPopupPresenterWidget.ViewDef<VolumeProfileStatisticsModel> {
+    }
+
+    @Inject
+    public VolumeProfileStatisticsPopupPresenterWidget(EventBus eventBus, 
ViewDef view) {
+        super(eventBus, view);
+    }
+}
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java
new file mode 100644
index 0000000..3bd6781
--- /dev/null
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.java
@@ -0,0 +1,122 @@
+package org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster;
+
+import org.ovirt.engine.ui.common.idhandler.ElementIdHandler;
+import org.ovirt.engine.ui.common.idhandler.WithElementId;
+import org.ovirt.engine.ui.common.view.popup.AbstractModelBoundPopupView;
+import org.ovirt.engine.ui.common.widget.dialog.SimpleDialogPanel;
+import org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable;
+import org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor;
+import 
org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelLabelEditor;
+import org.ovirt.engine.ui.uicommonweb.models.ListModel;
+import 
org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeProfileStatisticsModel;
+import org.ovirt.engine.ui.webadmin.ApplicationConstants;
+import org.ovirt.engine.ui.webadmin.ApplicationMessages;
+import org.ovirt.engine.ui.webadmin.ApplicationResources;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.editor.client.SimpleBeanEditorDriver;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+
+public class VolumeProfileStatisticsPopupView extends 
AbstractModelBoundPopupView<VolumeProfileStatisticsModel>{
+
+    interface Driver extends 
SimpleBeanEditorDriver<VolumeProfileStatisticsModel, 
VolumeProfileStatisticsPopupView> {
+    }
+
+    interface ViewUiBinder extends UiBinder<SimpleDialogPanel, 
VolumeProfileStatisticsPopupView> {
+        ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class);
+    }
+
+    interface ViewIdHandler extends 
ElementIdHandler<VolumeProfileStatisticsPopupView> {
+        ViewIdHandler idHandler = GWT.create(ViewIdHandler.class);
+    }
+
+    private final Driver driver = GWT.create(Driver.class);
+
+    @UiField(provided = true)
+    @Path(value = "bricks.selectedItem")
+    @WithElementId
+    private ListModelListBoxEditor bricks;
+
+    @UiField(provided = true)
+    @Ignore
+    @WithElementId
+    private EntityModelCellTable<ListModel> volumeProfileStats;
+
+    @UiField
+    @Path("profileRunTime.entity")
+    @WithElementId
+    private StringEntityModelLabelEditor profileRunTime;
+
+    @UiField
+    @Path("bytesRead.entity")
+    @WithElementId
+    private StringEntityModelLabelEditor bytesRead;
+
+    @UiField
+    @Path("bytesWritten.entity")
+    @WithElementId
+    private StringEntityModelLabelEditor bytesWritten;
+
+    public VolumeProfileStatisticsPopupView(EventBus eventBus, 
ApplicationResources resources, ApplicationConstants constants, 
ApplicationMessages messages) {
+        super(eventBus, resources);
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
+    public void edit(VolumeProfileStatisticsModel object) {
+        driver.edit(object);
+    }
+
+    @Override
+    public VolumeProfileStatisticsModel flush() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ListModelListBoxEditor getBricks() {
+        return bricks;
+    }
+
+    public void setBricks(ListModelListBoxEditor bricks) {
+        this.bricks = bricks;
+    }
+
+    public EntityModelCellTable<ListModel> getVolumeProfileStats() {
+        return volumeProfileStats;
+    }
+
+    public void setVolumeProfileStats(EntityModelCellTable<ListModel> 
volumeProfileStats) {
+        this.volumeProfileStats = volumeProfileStats;
+    }
+
+    public StringEntityModelLabelEditor getProfileRunTime() {
+        return profileRunTime;
+    }
+
+    public void setProfileRunTime(StringEntityModelLabelEditor profileRunTime) 
{
+        this.profileRunTime = profileRunTime;
+    }
+
+    public StringEntityModelLabelEditor getBytesRead() {
+        return bytesRead;
+    }
+
+    public void setBytesRead(StringEntityModelLabelEditor bytesRead) {
+        this.bytesRead = bytesRead;
+    }
+
+    public StringEntityModelLabelEditor getBytesWritten() {
+        return bytesWritten;
+    }
+
+    public void setBytesWritten(StringEntityModelLabelEditor bytesWritten) {
+        this.bytesWritten = bytesWritten;
+    }
+
+    public Driver getDriver() {
+        return driver;
+    }
+
+}
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.ui.xml
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.ui.xml
new file mode 100644
index 0000000..bd4eed1
--- /dev/null
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/gluster/VolumeProfileStatisticsPopupView.ui.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+    xmlns:g="urn:import:com.google.gwt.user.client.ui" 
xmlns:d="urn:import:org.ovirt.engine.ui.common.widget.dialog"
+    xmlns:e="urn:import:org.ovirt.engine.ui.common.widget.editor" 
xmlns:w="urn:import:org.ovirt.engine.ui.common.widget"
+    xmlns:ge="urn:import:org.ovirt.engine.ui.common.widget.editor.generic">
+
+    <ui:style>
+
+    </ui:style>
+
+    <d:SimpleDialogPanel width="1000px" height="550px">
+        <d:content>
+            <g:VerticalPanel>
+                <g:HorizontalPanel>
+                    <e:ListModelListBoxEditor ui:field="serverEditor"/>
+                </g:HorizontalPanel>
+                <g:HorizontalPanel>
+                    <g:Label ui:field="cummulativeStatsLabel"/> 
+                    <g:ScrollPanel>
+                        <e:EntityModelCellTable ui:field="volumeProfileStats" 
/>
+                    </g:ScrollPanel>
+                </g:HorizontalPanel>
+                <g:HorizontalPanel>
+                    <ge:StringEntityModelTextBoxEditor 
ui:field="profileRunTime" />
+                </g:HorizontalPanel>
+                <g:HorizontalPanel>
+                    <ge:StringEntityModelTextBoxEditor ui:field="bytesRead" />
+                </g:HorizontalPanel>
+                <g:HorizontalPanel>
+                    <ge:StringEntityModelTextBoxEditor ui:field="bytesWritten" 
/>
+                </g:HorizontalPanel>
+            </g:VerticalPanel>
+        </d:content>
+       </d:SimpleDialogPanel>
+
+</ui:UiBinder>
+       
\ No newline at end of file


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

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

Reply via email to