From 812c85ec65ff0f5d2ebcfbdbadacaea2b84005d6 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Wed, 17 Aug 2011 12:28:14 +0530 Subject: Fixed Bug 3427 - All the extra added terminals are gone once we change the view --- .../plugin.xml | 11 +-------- .../management/console/ConsoleConstants.java | 26 ++++++++++++++++++++++ .../management/console/utils/GUIHelper.java | 5 ++--- .../console/views/GlusterViewsManager.java | 9 ++++---- .../management/console/views/TerminalView.java | 26 ---------------------- .../WebContent/scripts/Globals.py | 1 + .../WebContent/scripts/Protocol.py | 1 + .../WebContent/scripts/Utils.py | 1 + .../WebContent/scripts/XmlHandler.py | 1 + .../WebContent/scripts/add_user_cifs_all.py | 1 + .../WebContent/scripts/create_volume_cifs_all.py | 1 + .../WebContent/scripts/delete_user_cifs_all.py | 1 + .../WebContent/scripts/delete_volume_cifs_all.py | 1 + .../WebContent/scripts/get_volume_user_cifs.py | 1 + .../WebContent/scripts/gmg-reset-password.sh | 1 + .../WebContent/scripts/grun.py | 1 + .../scripts/multicast-discover-servers.py | 1 + .../WebContent/scripts/setup_cifs_config_all.py | 1 + .../WebContent/scripts/update_volume_cifs_all.py | 1 + .../gateway/constants/VolumeOptionsDefaults.java | 1 - 20 files changed, 47 insertions(+), 45 deletions(-) create mode 100644 src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ConsoleConstants.java delete mode 100644 src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py create mode 120000 src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py diff --git a/src/com.gluster.storage.management.console/plugin.xml b/src/com.gluster.storage.management.console/plugin.xml index 675b7e52..9cadd537 100644 --- a/src/com.gluster.storage.management.console/plugin.xml +++ b/src/com.gluster.storage.management.console/plugin.xml @@ -175,15 +175,6 @@ name="Tasks" restorable="true"> - - @@ -1419,7 +1410,7 @@ + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License + * for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see + * . + *******************************************************************************/ +package com.gluster.storage.management.console; + +/** + * + */ +public class ConsoleConstants { + public static final String TERMINAL_VIEW_ID = "org.eclipse.tm.terminal.view.TerminalView"; +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java index 841d5a9d..f46f9ddf 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java @@ -80,11 +80,11 @@ import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.progress.IProgressConstants; import com.gluster.storage.management.console.Application; +import com.gluster.storage.management.console.ConsoleConstants; import com.gluster.storage.management.console.GlusterDataModelManager; import com.gluster.storage.management.console.IImageKeys; import com.gluster.storage.management.console.views.NavigationView; import com.gluster.storage.management.console.views.TasksView; -import com.gluster.storage.management.console.views.TerminalView; import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; import com.gluster.storage.management.core.model.Disk; import com.gluster.storage.management.core.utils.JavaUtil; @@ -460,8 +460,7 @@ public class GUIHelper { } public void showTerminalView() { - //showView("org.eclipse.tm.terminal.view.TerminalView"); - showView(TerminalView.ID); + showView(ConsoleConstants.TERMINAL_VIEW_ID); } public void showProgressView() { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java index 928bc7fc..05c30626 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java @@ -24,6 +24,7 @@ import org.eclipse.ui.IViewReference; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; +import com.gluster.storage.management.console.ConsoleConstants; import com.gluster.storage.management.core.model.Cluster; import com.gluster.storage.management.core.model.Entity; import com.gluster.storage.management.core.model.EntityGroup; @@ -44,6 +45,7 @@ public class GlusterViewsManager implements ViewsManager { /* (non-Javadoc) * @see com.gluster.storage.management.console.views.ViewsManager#updateViews(com.gluster.storage.management.core.model.Entity) */ + @SuppressWarnings("rawtypes") @Override public void updateViews(Entity entity) { closeAllViews(); @@ -65,13 +67,11 @@ public class GlusterViewsManager implements ViewsManager { } } - /** - * - */ private void closeAllViews() { IViewReference[] viewReferences = page.getViewReferences(); for (final IViewReference viewReference : viewReferences) { - if (!(viewReference.getId().equals(NavigationView.ID) || viewReference.getId().equals(TerminalView.ID))) { + if (!(viewReference.getId().equals(NavigationView.ID) || viewReference.getId().equals( + ConsoleConstants.TERMINAL_VIEW_ID))) { page.hideView(viewReference); } } @@ -80,7 +80,6 @@ public class GlusterViewsManager implements ViewsManager { private void showViewsForCluster(Cluster cluster) throws PartInitException { page.showView(ClusterSummaryView.ID); page.showView(TasksView.ID, null, IWorkbenchPage.VIEW_CREATE); - //page.showView("org.eclipse.tm.terminal.view.TerminalView", null, IWorkbenchPage.VIEW_CREATE); } private void showViewsForVolume(Volume volume) throws PartInitException { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java deleted file mode 100644 index d99ac513..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * . - *******************************************************************************/ -package com.gluster.storage.management.console.views; - -/** - * - */ -public class TerminalView extends org.eclipse.tm.internal.terminal.view.TerminalView { - public static final String ID = TerminalView.class.getName(); -} diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py new file mode 120000 index 00000000..7d230498 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/common/Globals.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py new file mode 120000 index 00000000..7ecad84d --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/common/Protocol.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py new file mode 120000 index 00000000..df26ff44 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/common/Utils.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py new file mode 120000 index 00000000..880349a1 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py new file mode 120000 index 00000000..fec57917 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py new file mode 120000 index 00000000..03752d57 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py new file mode 120000 index 00000000..d517e46c --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py new file mode 120000 index 00000000..be9e627c --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py new file mode 120000 index 00000000..3eff03fd --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh b/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh new file mode 120000 index 00000000..13b9a40b --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py new file mode 120000 index 00000000..5e56bfbb --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/grun.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py new file mode 120000 index 00000000..6288f182 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py new file mode 120000 index 00000000..e3f44800 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py new file mode 120000 index 00000000..8496fae4 --- /dev/null +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py @@ -0,0 +1 @@ +../../../com.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py \ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/constants/VolumeOptionsDefaults.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/constants/VolumeOptionsDefaults.java index 892ebf11..508a3029 100644 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/constants/VolumeOptionsDefaults.java +++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/constants/VolumeOptionsDefaults.java @@ -30,7 +30,6 @@ import com.gluster.storage.management.core.constants.CoreConstants; import com.gluster.storage.management.core.exceptions.ConnectionException; import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Status; import com.gluster.storage.management.core.model.VolumeOptionInfo; import com.gluster.storage.management.core.response.VolumeOptionInfoListResponse; import com.gluster.storage.management.gateway.services.ClusterService; -- cgit