You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/03/26 18:08:37 UTC

[38/50] [abbrv] airavata git commit: Added token field to workflow launch window to provide valid token when launching an experiment.

Added token field to workflow launch window to provide valid token when launching an experiment.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5e5630d3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5e5630d3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5e5630d3

Branch: refs/heads/master
Commit: 5e5630d32ccf267260ada711a5b0d3b65bd6b081
Parents: 7d787b8
Author: shamrath <sh...@gmail.com>
Authored: Wed Mar 25 11:35:01 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Wed Mar 25 11:35:01 2015 -0400

----------------------------------------------------------------------
 .../experiment/WorkflowInterpreterLaunchWindow.java | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5e5630d3/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index df27269..1678f19 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -99,6 +99,7 @@ public class WorkflowInterpreterLaunchWindow {
 
     private JComboBox host;
     private HashMap<String, String> hostNames;
+    private XBayaTextField token;
 
     /**
      * Constructs a WorkflowInterpreterLaunchWindow.
@@ -172,9 +173,7 @@ public class WorkflowInterpreterLaunchWindow {
             e2.printStackTrace();
         }
 
-
         hostNames = new HashMap<String, String>();
-
         Iterator it=hosts.entrySet().iterator();
         while(it.hasNext()){
             Map.Entry pairs=(Map.Entry)it.next();
@@ -192,7 +191,6 @@ public class WorkflowInterpreterLaunchWindow {
             host.addItem(key);
         }
         host.setSelectedIndex(0);
-
         XBayaLabel hostLabel = new XBayaLabel("Host", host);
         this.parameterPanel.add(hostLabel);
         this.parameterPanel.add(host);
@@ -212,14 +210,18 @@ public class WorkflowInterpreterLaunchWindow {
 
     private void initGUI() {
         this.parameterPanel = new GridPanel(true);
+        GridPanel infoPanel = new GridPanel();
 
         this.instanceNameTextField = new XBayaTextField();
         XBayaLabel instanceNameLabel = new XBayaLabel("Experiment name", this.instanceNameTextField);
-
-        GridPanel infoPanel = new GridPanel();
         infoPanel.add(instanceNameLabel);
         infoPanel.add(this.instanceNameTextField);
-        infoPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);
+
+        token = new XBayaTextField("");
+        JLabel tokenLabel = new JLabel("Token Id: ");
+        infoPanel.add(tokenLabel);
+        infoPanel.add(token);
+        infoPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);
 
         GridPanel mainPanel = new GridPanel();
         mainPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
@@ -376,7 +378,7 @@ public class WorkflowInterpreterLaunchWindow {
         } catch (MonitorException e) {
             logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
         }
-        airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
+        airavataClient.launchExperiment(experiment.getExperimentID(), token.getText());
         hide();
     }