Updates to the status pages.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/c3376d82 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/c3376d82 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/c3376d82 Branch: refs/heads/apache-blur-0.2 Commit: c3376d8256ba2497ad958cf0bcbaa6f3d891b94a Parents: 2905d33 Author: Aaron McCurry <[email protected]> Authored: Sat Nov 30 10:57:07 2013 -0500 Committer: Aaron McCurry <[email protected]> Committed: Sat Nov 30 10:57:07 2013 -0500 ---------------------------------------------------------------------- .../java/org/apache/blur/utils/BlurUtil.java | 7 + blur-gui/src/main/webapp/config.html | 66 + blur-gui/src/main/webapp/css/bootstrap.min.css | 8 +- blur-gui/src/main/webapp/css/bs-docs.css | 951 +++++ blur-gui/src/main/webapp/index2.html | 98 + blur-gui/src/main/webapp/js/Blur.js | 3906 ++++++++++++------ blur-gui/src/main/webapp/js/Blur_types.js | 1815 ++++---- blur-gui/src/main/webapp/metrics.html | 93 + blur-gui/src/main/webapp/traces.html | 0 9 files changed, 4860 insertions(+), 2084 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c3376d82/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java index 18f4102..1e004bf 100644 --- a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java +++ b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java @@ -955,6 +955,13 @@ public class BlurUtil { } } BlurServerContext context = getServerContext(controller); + if (context == null) { + try { + return method.invoke(iface, args); + } catch (InvocationTargetException e) { + throw e.getTargetException(); + } + } String rootTraceId = context.getTraceRootId(); if (rootTraceId != null) { Trace.setupTrace(rootTraceId, context.getTraceRequestId()); http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c3376d82/blur-gui/src/main/webapp/config.html ---------------------------------------------------------------------- diff --git a/blur-gui/src/main/webapp/config.html b/blur-gui/src/main/webapp/config.html new file mode 100644 index 0000000..c8afbe8 --- /dev/null +++ b/blur-gui/src/main/webapp/config.html @@ -0,0 +1,66 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> +<head> +<title>Blur - Config</title> +<meta charset="utf-8"> +<link href="css/bootstrap.min.css" rel="stylesheet"> +<link href="css/bs-docs.css" rel="stylesheet" media="screen"> +</head> + +<script src="js/jquery-1.9.1.min.js"></script> +<script src="js/thrift.js"></script> +<script src="js/Blur.js"></script> +<script src="js/Blur_types.js"></script> +<script> +function displayPage() { + var transport = new Thrift.Transport("/blur"); + var protocol = new Thrift.Protocol(transport); + var client = new BlurClient(protocol); + + try { + var config = client.configuration(); + var body = $("#page_body"); + var keys = Object.keys(config).sort(); + body.append("<h1>Shard Server</h1>"); + body.append("<h2>Configuration</h2>"); + var s = "<table border=1 class=\"table-bordered table-striped table-condensed\"><tr><th>Name</th><th>Value</th></tr>"; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + s += "<tr><td>"+key+"</td><td>"+config[key]+"</td></tr>"; + } + body.append(s + "</table>"); + } catch(ouch){ +alert (ouch); + } +} +$(window).bind("load", displayPage); +</script> +<body> + <table class="table-bordered table-condensed"> + <tr><th><a href="index.html">Home</a> | + <a href="config.html">Configuration</a> | + <a href="metrics.html">Metrics</a> | + <a href="traces.html">Traces</a></th></tr> + <tr><td id="page_body"></td></tr> + </table> + + +</body> +</html>
