summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gui
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-07-27 23:02:14 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-07-27 23:02:14 +0530
commitef3564d50685c4a2ca09e489c9f9b41278323c57 (patch)
tree8719182ea036b53a62fb534b3d676375469c2bdd /src/com.gluster.storage.management.gui
parent6fde61c2c46ac1a94a52e561dc05fb9bcf82b762 (diff)
parenta0488e4bc20abad5ddc0d14b6f4501fc67784df8 (diff)
Merge branch 'master' of github.com:Selvasundaram/console into ss
Diffstat (limited to 'src/com.gluster.storage.management.gui')
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/ClusterSummaryView.java8
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/GlusterServersSummaryView.java28
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/views/VolumesSummaryView.java8
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 5a84b1bc..89f862ed 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
@@ -105,7 +105,6 @@ public class ClusterSummaryView extends ViewPart {
super.alertsGenerated();
guiHelper.clearSection(alertsSection);
populateAlerts();
- alertsSection.layout();
}
@Override
@@ -123,13 +122,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);
@@ -210,6 +208,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) {
@@ -345,6 +345,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) {