diff options
Diffstat (limited to 'src')
3 files changed, 25 insertions, 19 deletions
diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java index 6d13e409..4e1143d3 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java @@ -110,7 +110,6 @@ public class ClusterSummaryView extends ViewPart { super.alertsGenerated(); guiHelper.clearSection(alertsSection); populateAlerts(); - alertsSection.layout(); } @Override @@ -128,13 +127,12 @@ public class ClusterSummaryView extends ViewPart { @Override public void taskUpdated(TaskInfo taskInfo) { super.taskUpdated(taskInfo); - updateTaskSection(); + updateTaskSection(); } private void updateTaskSection() { guiHelper.clearSection(tasksSection); populateTasksSection(); - tasksSection.layout(); } }; GlusterDataModelManager.getInstance().addClusterListener(clusterListener); @@ -333,6 +331,8 @@ public class ClusterSummaryView extends ViewPart { for (Alert alert : alerts) { addAlertLabel(alertsSection, alert); } + alertsSection.layout(); + form.reflow(true); } private void addAlertLabel(Composite section, Alert alert) { @@ -491,6 +491,8 @@ public class ClusterSummaryView extends ViewPart { for (TaskInfo taskInfo : cluster.getTaskInfoList()) { addTaskLabel(tasksSection, taskInfo); } + tasksSection.layout(); + form.reflow(true); } private void addTaskLabel(Composite section, TaskInfo taskInfo) { diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServersSummaryView.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServersSummaryView.java index 9e04c482..3a2ff7e3 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServersSummaryView.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServersSummaryView.java @@ -22,6 +22,7 @@ package com.gluster.storage.management.gui.views; import java.util.List; +import org.eclipse.core.internal.resources.projectvariables.ParentVariableResolver; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.graphics.Image; @@ -77,25 +78,24 @@ public class GlusterServersSummaryView extends ViewPart { @Override public void serverAdded(GlusterServer server) { super.serverAdded(server); - guiHelper.clearSection(serversAvailabilitySection); - populateAvailabilitySection(); - serversAvailabilitySection.layout(); + updateServerAvailabilitySection(); } @Override public void serverRemoved(GlusterServer server) { super.serverRemoved(server); - guiHelper.clearSection(serversAvailabilitySection); - populateAvailabilitySection(); - serversAvailabilitySection.layout(); + updateServerAvailabilitySection(); } @Override public void serverChanged(GlusterServer server, Event event) { super.serverChanged(server, event); + updateServerAvailabilitySection(); + } + + private void updateServerAvailabilitySection() { guiHelper.clearSection(serversAvailabilitySection); populateAvailabilitySection(); - serversAvailabilitySection.layout(); } @Override @@ -103,31 +103,29 @@ public class GlusterServersSummaryView extends ViewPart { super.alertsGenerated(); guiHelper.clearSection(alertsSection); populateAlertSection(); - alertsSection.layout(); } @Override public void taskAdded(TaskInfo taskInfo) { super.taskAdded(taskInfo); - updateTaskSection(); + updateTasksSection(); } @Override public void taskRemoved(TaskInfo taskInfo) { super.taskRemoved(taskInfo); - updateTaskSection(); + updateTasksSection(); } @Override public void taskUpdated(TaskInfo taskInfo) { super.taskUpdated(taskInfo); - updateTaskSection(); + updateTasksSection(); } - private void updateTaskSection() { + private void updateTasksSection() { guiHelper.clearSection(tasksSection); populateTasksSection(); - tasksSection.layout(); } }; GlusterDataModelManager.getInstance().addClusterListener(clusterListener); @@ -202,6 +200,8 @@ public class GlusterServersSummaryView extends ViewPart { addAlertLabel(alertsSection, alert); } } + alertsSection.pack(true); + form.reflow(true); } private void addAlertLabel(Composite section, Alert alert) { @@ -242,6 +242,8 @@ public class GlusterServersSummaryView extends ViewPart { addTaskLabel(tasksSection, taskInfo); } } + tasksSection.layout(); + form.reflow(true); } private void addTaskLabel(Composite section, TaskInfo taskInfo) { diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/VolumesSummaryView.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/VolumesSummaryView.java index fa8264bf..60656d51 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/VolumesSummaryView.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/VolumesSummaryView.java @@ -108,7 +108,7 @@ public class VolumesSummaryView extends ViewPart { private void updateSummarySection() { guiHelper.clearSection(summarySection); populateSummarySection(); - summarySection.layout(); + summarySection.layout(); } @Override @@ -116,7 +116,6 @@ public class VolumesSummaryView extends ViewPart { super.alertsGenerated(); guiHelper.clearSection(alertsSection); populateAlertSection(); - alertsSection.layout(); } @Override @@ -140,7 +139,6 @@ public class VolumesSummaryView extends ViewPart { private void updateTasksSection() { guiHelper.clearSection(tasksSection); populateTasks(); - tasksSection.layout(); } }; GlusterDataModelManager.getInstance().addClusterListener(clusterListener); @@ -172,6 +170,8 @@ public class VolumesSummaryView extends ViewPart { addAlertLabel(alertsSection, alert); } } + alertsSection.pack(true); + form.reflow(true); } private void addAlertLabel(Composite section, Alert alert) { @@ -192,6 +192,8 @@ public class VolumesSummaryView extends ViewPart { if (taskInfo.getType() == TASK_TYPE.BRICK_MIGRATE || taskInfo.getType() == TASK_TYPE.VOLUME_REBALANCE) addTaskLabel(tasksSection, taskInfo); } + tasksSection.pack(true); + form.reflow(true); } private void addTaskLabel(Composite section, TaskInfo taskInfo) { |
