You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by lstav <gi...@git.apache.org> on 2016/10/28 17:09:08 UTC

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

GitHub user lstav opened a pull request:

    https://github.com/apache/accumulo/pull/175

    Accumulo 1480 Added namespace filtering to tables

    Can now filter namespaces on the table list. 
    
    Back end implementation is done, and I would appreciate the feedback on the Front end. 
    
    Front end can be seen on the "Master Server" and "Tables" pages.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lstav/accumulo ACCUMULO-1480

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/accumulo/pull/175.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #175
    
----
commit 4a4ad69426f5c22f65f3e542ccc3b30e4cd409fa
Author: Luis Tavarez <ze...@outlook.com>
Date:   2016-10-21T19:10:14Z

    ACCUMULO-1480 Added dropdown with namespaces

commit 3ca9d31d9e9083f5837a795fba090310f30f0a74
Author: Luis Tavarez <ze...@outlook.com>
Date:   2016-10-24T20:18:14Z

    ACCUMULO-1480 Added cookie read and write for the namespaces

commit a22a88423675dd433a8c3ac582d60328a4fd821e
Author: Luis Tavarez <ze...@outlook.com>
Date:   2016-10-26T19:09:41Z

    ACCUMULO-1480 Added vertical tabs, fixed filtering code

commit 61ed26fe502a24212c2df15cbf1966f2123ca604
Author: Luis Tavarez <ze...@outlook.com>
Date:   2016-10-28T17:03:41Z

    ACCUMULO-1480 Added horizontal line for Master Server

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

Posted by mikewalch <gi...@git.apache.org>.
Github user mikewalch commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/175#discussion_r85778016
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java ---
    @@ -227,4 +247,25 @@ private static void row(StringBuilder sb, boolean highlight, ArrayList<TableColu
         sb.append("</tr>\n");
       }
     
    +  private static void doDropdownMenu(String redir, String page, String tableName, StringBuilder sb, SortedMap<String,String> namespaces, String namespace) {
    +
    +    String namespaceUrl = String.format("/op?action=namespace&redir=%s&page=%s&table=%s&selected=", redir, page, tableName);
    +
    +    sb.append("<ul id=\"namespaces\">\n");
    +    sb.append("<li><a ").append(namespace.equals("*") ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append("*\">*</a></li>");
    +    for (String key : namespaces.keySet()) {
    +      if (key.equals("")) {
    +        sb.append("<li><a ").append(namespace.equals("-") ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append("-\">-</a></li>");
    --- End diff --
    
    Same as above. `-` is a little confusing.  Could add text describing this option as default tables.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

Posted by mikewalch <gi...@git.apache.org>.
Github user mikewalch commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/175#discussion_r85777514
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java ---
    @@ -143,7 +146,24 @@ public synchronized void generate(HttpServletRequest req, StringBuilder sb) {
           showLegend = showStr != null && Boolean.parseBoolean(showStr);
         }
     
    -    sb.append("<div>\n");
    +    String redir = BasicServlet.currentPage(req);
    +
    +    if (namespaces != null) {
    +      sb.append("<div id=\"filters\">\n");
    +      String namespace = BasicServlet.getCookieValue(req, "namespaceDropdown." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName) + "."
    +          + "selected");
    +      if (namespace == null) {
    +        namespace = "*";
    +      }
    +      sb.append("<div class='left show'><dl>\n");
    +      doDropdownMenu(redir, page, tableName, sb, namespaces, namespace);
    --- End diff --
    
    Could add header to menu like "Table namespaces" or "Namespaces"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by lstav <gi...@git.apache.org>.
Github user lstav commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    Here are screenshots of the Tables Page and the Master Server Page which shows the tables.
    
    Tables Page
    ![tables_page](https://cloud.githubusercontent.com/assets/5274788/20069479/c51fe518-a4ea-11e6-99be-9ebbbf822f72.png)
    
    Master Server Page
    ![master_page](https://cloud.githubusercontent.com/assets/5274788/20069480/c521e30e-a4ea-11e6-95f0-0b4ac8ec1a2e.png)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by lstav <gi...@git.apache.org>.
Github user lstav commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    Pushed a commit to fix the checkstyle error I was getting on the build.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

Posted by mikewalch <gi...@git.apache.org>.
Github user mikewalch commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/175#discussion_r85777738
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java ---
    @@ -227,4 +247,25 @@ private static void row(StringBuilder sb, boolean highlight, ArrayList<TableColu
         sb.append("</tr>\n");
       }
     
    +  private static void doDropdownMenu(String redir, String page, String tableName, StringBuilder sb, SortedMap<String,String> namespaces, String namespace) {
    +
    +    String namespaceUrl = String.format("/op?action=namespace&redir=%s&page=%s&table=%s&selected=", redir, page, tableName);
    +
    +    sb.append("<ul id=\"namespaces\">\n");
    +    sb.append("<li><a ").append(namespace.equals("*") ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append("*\">*</a></li>");
    --- End diff --
    
    `*` is a little confusing on its own.  Could add something about this being all tables


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

Posted by lstav <gi...@git.apache.org>.
Github user lstav commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/175#discussion_r85779419
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java ---
    @@ -143,7 +146,24 @@ public synchronized void generate(HttpServletRequest req, StringBuilder sb) {
           showLegend = showStr != null && Boolean.parseBoolean(showStr);
         }
     
    -    sb.append("<div>\n");
    +    String redir = BasicServlet.currentPage(req);
    +
    +    if (namespaces != null) {
    +      sb.append("<div id=\"filters\">\n");
    +      String namespace = BasicServlet.getCookieValue(req, "namespaceDropdown." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName) + "."
    +          + "selected");
    +      if (namespace == null) {
    +        namespace = "*";
    +      }
    +      sb.append("<div class='left show'><dl>\n");
    +      doDropdownMenu(redir, page, tableName, sb, namespaces, namespace);
    --- End diff --
    
    Will add a header "Namespaces" that uses a different font than the rest of the list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by lstav <gi...@git.apache.org>.
Github user lstav commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by ctubbsii <gi...@git.apache.org>.
Github user ctubbsii commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    Mentioning ACCUMULO-1480 so it links to the JIRA issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request #175: Accumulo 1480 Added namespace filtering to table...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/accumulo/pull/175


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by lstav <gi...@git.apache.org>.
Github user lstav commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    I'm OK if you merge it in now. I'll work on the improvements on top of the changes I made here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo issue #175: Accumulo 1480 Added namespace filtering to tables

Posted by mikewalch <gi...@git.apache.org>.
Github user mikewalch commented on the issue:

    https://github.com/apache/accumulo/pull/175
  
    The changes that you made in response to my review look good.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---