add. use host port parameter in YaCyApp

pull/1/head
reger 10 years ago
parent ad0da5f246
commit f07392ff17

@ -115,7 +115,7 @@ public class InfoPage implements Layout {
String infotext = String infotext =
"This is a YaCy GUI wrappper.\n\n" + "This is a YaCy GUI wrappper.\n\n" +
"The YaCy administration interface is in your browser\n" + "The YaCy administration interface is in your browser\n" +
"just open http://localhost:8090\n\n" + "just open http://" + this.host + ":" + this.port + "\n\n" +
"You may also enter a search term and press enter,\n" + "You may also enter a search term and press enter,\n" +
"then the query will be opened in your browser\n"; "then the query will be opened in your browser\n";
if (OS.isMacArchitecture) infotext += "\nThe application data on Mac is stored at ~Library/YaCy/\n"; if (OS.isMacArchitecture) infotext += "\nThe application data on Mac is stored at ~Library/YaCy/\n";

@ -96,7 +96,7 @@ public class YaCyApp {
} }
} }
public static void start(String host, int port) { public static void start(final String host, final int port) {
Switchboard.startInfoUpdater(); Switchboard.startInfoUpdater();
operation = new Op(app, host, port); operation = new Op(app, host, port);
@ -137,7 +137,7 @@ public class YaCyApp {
@Override @Override
public void run() { public void run() {
Thread.currentThread().setName("YaCyApp"); Thread.currentThread().setName("YaCyApp");
app = new Application("YaCy GUI", operation, menues, new InfoPage("localhost", 8090)); app = new Application("YaCy GUI", operation, menues, new InfoPage(host, port));
app.setLocationRelativeTo(null); app.setLocationRelativeTo(null);
app.setVisible(true); app.setVisible(true);
} }

@ -153,6 +153,7 @@ public class Switchboard {
* this is not reversible. * this is not reversible.
*/ */
public static void shutdown() { public static void shutdown() {
if (InfoBox != null) InfoBox.setText("waiting for shutdown process to complete ...");
shallrun = false; shallrun = false;
} }

Loading…
Cancel
Save