Code Monkey home page Code Monkey logo

rebrow's People

Contributors

dependabot-preview[bot] avatar marians avatar stgarf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rebrow's Issues

sort the set data

Since Redis sets are order-less it is natural to sort them before display. This does it:

        val = sorted(r.smembers(key))

User confirmation on key deletion

Hi Marian

rebrow is awesome, inspirational. I have included a port of it in an application called Skyline and just loved your UI layout so much I skinned Skyline's UI based on it. Thanks for the inspiration, I am not good with UI design :)

The one thing I have found useful is the addition of a user confirmation on key deletion. I will not bother you with a pull request, but if you ever make an update, this does prevent rogue clicks just deleteing a key without confirmation.

https://github.com/marians/rebrow/blob/master/templates/keys.html#L45

<td><form method="POST"><input type="hidden" name="action" value="delkey" /><input type="hidden" name="key" value="{{ key }}" /><button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-trash"></span></button></form></td>

to:

<td><form method="POST"><input type="hidden" name="action" value="delkey" /><input type="hidden" name="key" value="{{ key }}" /><button class="btn btn-default" type="submit" onclick="return confirm('Are you sure you want to delete this key? {{ key }}');"><span class="glyphicon glyphicon-trash"></span></button></form></td>

Thanks again, if you would like to see the Marian Steinbach inspired Skyline UI you can see some screenshot here - https://groups.google.com/d/msg/skyline-dev/07txUC3bWc0/muHlLgFcCAAJ

Python3 support

For example

    <td><a href="{{ key|urlsafe_base64 }}/">{{ key }}</a></td>
  File "runserver.py", line 274, in urlsafe_base64_encode
    s = s.encode('utf8')
AttributeError: 'bytes' object has no attribute 'encode'

ascii codec cant decode byte

I am running the rebrow docker image. everything works, but as soon as I want to view a key, I get this error:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/runserver.py", line 239, in key
    duration=time.time()-s)
  File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/app/templates/key.html", line 1, in top-level template code
    {% extends "layout.html" %}
  File "/app/templates/layout.html", line 66, in top-level template code
    {% block body %}{% endblock %}
  File "/app/templates/key.html", line 57, in block "body"
    <li><code>{{ item }}</code></li>
  File "/usr/local/lib/python2.7/site-packages/markupsafe/_native.py", line 22, in escape
    return Markup(text_type(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)

Anyone knows what could be the problem? The key comes from huey, a python-based redis task scheduler.

How to set base uri?

As I see it does not have possibility to set base uri in case of reverse proxy - for Docker containers and SSL termination it can be must have feature.

Can it be somehow setup now (or hijacked)?

Unicode

I am running rebrow in docker marian/rebrow:latest

I have an issue where I am saving records that have emojis and kanji and other extended characters. When I try load a page that displays a value or key, I get this:

[2018-06-24 04:20:39,039] ERROR in app: Exception on /redis:6379/0/keys/KyszTWwwcEhKdXRiZnFaaElZL2l4Z0NGNDBVPQ==/ [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/runserver.py", line 239, in key
    duration=time.time()-s)
  File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/app/templates/key.html", line 1, in top-level template code
    {% extends "layout.html" %}
  File "/app/templates/layout.html", line 66, in top-level template code
    {% block body %}{% endblock %}
  File "/app/templates/key.html", line 86, in block "body"
    <td><code>{{ item[1] }}</code></td>
  File "/usr/local/lib/python2.7/site-packages/markupsafe/_native.py", line 22, in escape
    return Markup(text_type(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 17: ordinal not in range(128)

I switched to base64 encoding the keys, but it still does this on pages that have extended character in values.

zset view should display scores in sorted order

First wanted to thank you for making this project. A tool which allows quick-and-dirty inspection of Redis contents by typing URLs into browser is way overdue.

However, right now the sorted set view does not show the scores. That pretty much defeats the purpose of sorted sets whose whole point is to use these scores for indexing

I made a local fix to display scores (descending order) by replacing zrange line in runserver.py with this:

        val = r.zrange(key, 0, -1, withscores=True, desc=True)

However it would be nice to make this a supported feature in the project - in particular with some sort of a 3-column template for rank, score and value displayed separately

Can't view hash type

Whenever I click on a hash, I get a generic server error. Are hashes not supported?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.