Skip to content

Commit

Permalink
added default port to config
Browse files Browse the repository at this point in the history
  • Loading branch information
mattebit committed Nov 21, 2023
1 parent 6b4b312 commit 69bd9a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion tool/src/main/java/migt/DecodeOperation.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package migt;

import com.jayway.jsonpath.JsonPath;
import org.json.JSONArray;
import org.json.JSONObject;

Expand Down
7 changes: 5 additions & 2 deletions tool/src/main/java/migt/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public class GUI extends JSplitPane {
private String DRIVER_PATH = "";
private Thread active_ex;
private boolean active_ex_finished = false;
private Integer DEFAULT_PORT = 8080;

/**
* Constructor of the plugin UI
Expand Down Expand Up @@ -284,6 +285,8 @@ private void readConfigFile() {
JSONObject obj = new JSONObject(tmp);
String last_driver_path = obj.getString("last_driver_path");
String last_used_browser = obj.getString("last_browser_used");
DEFAULT_PORT = obj.getInt("default_port");


if (!last_driver_path.equals("")) {
DRIVER_PATH = last_driver_path;
Expand Down Expand Up @@ -397,7 +400,7 @@ private void readJSONinput(String jsonInput) {
for (Session s : test.sessions) {
if (!sessions_names.contains(s.name)) {
sessions_names.add(s.name);
session_port.put(s.name, "8080"); // set default port to session
session_port.put(s.name, DEFAULT_PORT.toString()); // set default port to session
}
}
}
Expand Down Expand Up @@ -1000,7 +1003,7 @@ public void onSetVar(Var v) {
!btnselectChrome.isEnabled(),
DRIVER_PATH,
track,
"8080",
DEFAULT_PORT.toString(),
"test");
ex.registerExecuteTrackListener(listener);
new Thread(ex).start();
Expand Down

0 comments on commit 69bd9a1

Please sign in to comment.