From 06ec8c88556b02782c7b91a233de91eaf4a1439d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 09 Jun 2009 12:28:05 +0000
Subject: [PATCH] Fix for issue 3550 (Consider making the control panel able to manage remote servers)
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java
index b3d86b7..11bef95 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java
@@ -60,6 +60,7 @@
import org.opends.guitools.controlpanel.datamodel.AbstractIndexDescriptor;
import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo;
import org.opends.guitools.controlpanel.datamodel.IndexDescriptor;
+import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent;
import org.opends.guitools.controlpanel.event.ScrollPaneBorderListener;
import org.opends.guitools.controlpanel.task.DeleteIndexTask;
@@ -249,10 +250,13 @@
/**
* {@inheritDoc}
*/
- public void configurationChanged(final ConfigurationChangeEvent ev)
+ public void configurationChanged(ConfigurationChangeEvent ev)
{
- updateErrorPaneIfAuthRequired(ev.getNewDescriptor(),
- INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_INDEX_EDITING.get());
+ final ServerDescriptor desc = ev.getNewDescriptor();
+ updateErrorPaneIfAuthRequired(desc,
+ isLocal() ?
+ INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_INDEX_EDITING.get() :
+ INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
SwingUtilities.invokeLater(new Runnable()
{
/**
@@ -261,7 +265,7 @@
public void run()
{
checkSaveButton();
- deleteIndex.setEnabled(!authenticationRequired(ev.getNewDescriptor()));
+ deleteIndex.setEnabled(!authenticationRequired(desc));
}
});
}
@@ -581,7 +585,7 @@
Collection<Message> incompatibilityReasons)
{
boolean canLaunch = true;
- if (state == State.RUNNING)
+ if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched))
{
// All the operations are incompatible if they apply to this
// backend for safety. This is a short operation so the limitation
--
Gitblit v1.10.0