Sorta fixed the home jsp.

Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/19528636
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/19528636
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/19528636

Branch: refs/heads/0.2-dev
Commit: 19528636e2b24e6b0949c9f1a4c4d6e76d1747a0
Parents: d9cf26f
Author: Aaron McCurry <[email protected]>
Authored: Wed Feb 27 19:52:21 2013 -0500
Committer: Aaron McCurry <[email protected]>
Committed: Wed Feb 27 19:52:21 2013 -0500

----------------------------------------------------------------------
 src/blur-gui/src/main/webapp/home.jsp |   50 ++++-----------------------
 1 files changed, 8 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/19528636/src/blur-gui/src/main/webapp/home.jsp
----------------------------------------------------------------------
diff --git a/src/blur-gui/src/main/webapp/home.jsp 
b/src/blur-gui/src/main/webapp/home.jsp
index c61d2d6..c92e604 100644
--- a/src/blur-gui/src/main/webapp/home.jsp
+++ b/src/blur-gui/src/main/webapp/home.jsp
@@ -27,35 +27,23 @@
 <%@ include file="functions.jsp" %>
 <%!
 
-       public String tableLink(String tableName, String clusterName) {
-               return "<a 
href='table.jsp?tableName="+tableName+"&clusterName="+clusterName+"' 
title='view details for " + tableName + "'>" + tableName + "</a>";
+       public String tableLink(String tableName) {
+               return "<a href='table.jsp?tableName="+tableName+"' title='view 
details for " + tableName + "'>" + tableName + "</a>";
        }
        
        public String getTables(Iface client) throws Exception {
                String ret = "";
-               List<String> clusters = client.shardClusterList();
-               for (String cluster : clusters) {
-                       //tables: _ tableName : enabled
-                       List<String> tables = 
client.tableListByCluster(cluster);
+                       List<String> tables = client.tableList();
                        for (String table : tables) {
                                try {
                                        TableDescriptor td = 
client.describe(table);
-                                       ret += row(cluster, 
tableLink(table,cluster), td.shardCount+"", td.isEnabled?"yes":"no");
+                                       ret += row(tableLink(table), 
td.getShardCount()+"", td.isEnabled()?"yes":"no");
                                } catch (BlurException e) {
                                        ret += row(3, "<font color=FF0000>Error 
describing table: "
                                                        + table + "</font>");
                                }
                        }
-               }
-               return ret;
-       }
-
-       public String getClusters(Iface client) throws Exception {
-               String ret = "";
-               List<String> clusters = client.shardClusterList();
-               for (String cluster : clusters) {
-                       ret += row(cluster, 
shardListLink(cluster,client.shardServerList(cluster).size()+""), 
getClusterEnabled(client, cluster));
-               }
+               
                return ret;
        }
 
@@ -74,26 +62,13 @@
                }*/
        }
 
-       public String getClusterEnabled(Iface client, String cluster)
+       public String getClusterEnabled(Iface client)
                        throws Exception {
-               return client.isInSafeMode(cluster) ? "Safe Mode On"
+               return client.isInSafeMode() ? "Safe Mode On"
                                : "Yes";
        }
 
-       public String getControllers(Iface client) throws Exception {
-               String ret = "";
-               List<String> con = client.controllerServerList();
-
-               for (String c : con) {
-                       String[] split = c.split(":");
-                       int base = 
Integer.parseInt(System.getProperty("blur.base.controller.port"));
-                       int offset = Integer.parseInt(split[1])-base;
-                       int baseShardPort = 
Integer.parseInt(System.getProperty("baseGuiControllerPort"));
-                       ret += row("<a href='http://"; + split[0] + ":" + 
(baseShardPort + offset) + "'>" + c + "</a>","Yes");
-               }
-               
-               return ret;
-       }%>
+%>
 <%
        String hostName = request.getServerName() + ":" + 
System.getProperty("blur.gui.servicing.port");
 
@@ -111,15 +86,6 @@
        <h1>
                Blur <%=System.getProperty("blur.gui.mode") %> '<%=hostName%>'
        </h1>
-       <br />
-       <h2>Controllers</h2>
-       <%=table(getControllers(client),"Name","Online") %>
-       <hr />
-       <br />
-       <h2>Clusters</h2>
-       <%=table(getClusters(client),"Cluster Name","Shard Servers","Enabled") 
%>
-       <hr />
-       <br />
        <h2>Tables</h2>
        <%=table(getTables(client),"Cluster Name","Table 
Name","Shards","Enabled")%>
        <hr />

Reply via email to