Skip to content

Commit

Permalink
Moving ConsoleServlet to a more appropriate package, it's not beta al…
Browse files Browse the repository at this point in the history
…ready
  • Loading branch information
barancev committed Feb 14, 2018
1 parent 5925677 commit c640d73
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.openqa.grid.internal.listeners.TestSessionListener;
import org.openqa.grid.internal.listeners.TimeoutListener;
import org.openqa.grid.internal.utils.HtmlRenderer;
import org.openqa.grid.web.servlet.beta.WebProxyHtmlRendererBeta;
import org.openqa.grid.web.servlet.console.DefaultProxyHtmlRenderer;
import org.openqa.selenium.remote.server.jmx.JMXHelper;
import org.openqa.selenium.remote.server.jmx.ManagedAttribute;
import org.openqa.selenium.remote.server.jmx.ManagedService;
Expand Down Expand Up @@ -97,7 +97,7 @@ public void beforeCommand(TestSession session, HttpServletRequest request, HttpS
session.put("lastCommand", request.getMethod() + " - " + request.getPathInfo() + " executing ...");
}

private final HtmlRenderer renderer = new WebProxyHtmlRendererBeta(this);
private final HtmlRenderer renderer = new DefaultProxyHtmlRenderer(this);

@Override
public HtmlRenderer getHtmlRender() {
Expand Down
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/web/Hub.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.openqa.grid.web.servlet.RegistrationServlet;
import org.openqa.grid.web.servlet.ResourceServlet;
import org.openqa.grid.web.servlet.TestSessionStatusServlet;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.grid.web.servlet.console.ConsoleServlet;
import org.openqa.grid.web.utils.ExtraServletUtil;
import org.openqa.selenium.json.Json;
import org.openqa.selenium.net.NetworkUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.google.gson.GsonBuilder;

import org.openqa.grid.common.GridRole;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.grid.web.servlet.console.ConsoleServlet;
import org.openqa.selenium.internal.BuildInfo;

import java.io.BufferedReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.grid.web.servlet.beta;
package org.openqa.grid.web.servlet.console;

import com.google.common.io.ByteStreams;

Expand Down Expand Up @@ -212,7 +212,7 @@ private String getConfigInfo(boolean verbose) {

StringBuilder builder = new StringBuilder();

GridHubConfiguration config = getRegistry().getConfiguration();
GridHubConfiguration config = getRegistry().getHub().getConfiguration();
builder.append("<div id='hub-config'>");
builder.append("<b>Config for the hub :</b><br/>");
builder.append(prettyHtmlPrint(config));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.grid.web.servlet.beta;
package org.openqa.grid.web.servlet.console;

import com.google.gson.JsonObject;

Expand All @@ -28,14 +28,14 @@
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.CapabilityType;

public class WebProxyHtmlRendererBeta implements HtmlRenderer {
public class DefaultProxyHtmlRenderer implements HtmlRenderer {

private RemoteProxy proxy;

@SuppressWarnings("unused")
private WebProxyHtmlRendererBeta() {}
private DefaultProxyHtmlRenderer() {}

public WebProxyHtmlRendererBeta(RemoteProxy proxy) {
public DefaultProxyHtmlRenderer(RemoteProxy proxy) {
this.proxy = proxy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.grid.web.servlet.beta;
package org.openqa.grid.web.servlet.console;

import org.openqa.grid.internal.TestSlot;
import org.openqa.selenium.remote.BrowserType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.grid.web.servlet.beta;
package org.openqa.grid.web.servlet.console;

import org.openqa.grid.internal.TestSlot;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -30,11 +31,7 @@ class SlotsLines {

public void add(TestSlot slot) {
MiniCapability c = new MiniCapability(slot);
List<TestSlot> l = slots.get(c);
if (l == null) {
l = new ArrayList<>();
slots.put(c, l);
}
List<TestSlot> l = slots.computeIfAbsent(c, k -> new ArrayList<>());
l.add(slot);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.openqa.grid.selenium.node.FirefoxMutator;
import org.openqa.grid.shared.GridNodeServer;
import org.openqa.grid.web.servlet.DisplayHelpServlet;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.grid.web.servlet.console.ConsoleServlet;
import org.openqa.selenium.ImmutableCapabilities;
import org.openqa.selenium.remote.server.jmx.JMXHelper;
import org.openqa.selenium.remote.server.jmx.ManagedService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.junit.runners.JUnit4;
import org.openqa.grid.internal.DefaultGridRegistry;
import org.openqa.grid.internal.GridRegistry;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.grid.web.servlet.console.ConsoleServlet;
import org.openqa.testing.FakeHttpServletResponse;
import org.seleniumhq.jetty9.server.handler.ContextHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.grid.web.servlet.console.ConsoleServlet;
import org.openqa.testing.FakeHttpServletResponse;
import org.seleniumhq.jetty9.server.handler.ContextHandler;

Expand Down

0 comments on commit c640d73

Please sign in to comment.