zalando / pg_view

Get a detailed, real-time view of your PostgreSQL database and system metrics
https://pypi.python.org/pypi/pg-view
Other
494 stars 49 forks source link

Added --db-filter and --user-filter flags #72

Open kmoppel opened 7 years ago

kmoppel commented 7 years ago

Flags for displaying processes on only desired DBs or users. Input should be Postgres regexes.

kmoppel commented 7 years ago

Useful for test instances with lots of DBs for example. Pretty straightforward patch, security (relying on psycopg2 parameter parsing) shouldn't also be a problem as user anyways has access to the DB for normal queries.

slitsche commented 7 years ago

Hey Kaarel, Travis CI build failed. Could you please have a look at it?

kmoppel commented 7 years ago

Hey Stefan! Ah yes, the linter. Hmm, but seems the failing code lines are actually the old one. And after running "autopep8 -i pg_view.py" I got around 30 other formatting changes..so not sure if I should commit it? Maybe I'm using the wrong tool?

pg_view.py:146:1: E305 expected 2 blank lines after class or function definition, found 1 pg_view.py:3728:1: E305 expected 2 blank lines after class or function definition, found 1 setup.py:20:1: E305 expected 2 blank lines after class or function definition, found 1

a1exsh commented 7 years ago

@kmoppel I find it that often than not that flake8 adds more complaints than it was reporting before. I think we should open a separate PR, then you could update your branch to the recent master.