Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an "unarchive" button on archived dashboards #982

Closed
jeffwidman opened this issue Apr 12, 2016 · 5 comments · Fixed by #4697
Closed

Add an "unarchive" button on archived dashboards #982

jeffwidman opened this issue Apr 12, 2016 · 5 comments · Fixed by #4697

Comments

@jeffwidman
Copy link
Contributor

If someone accidentally clicks "archive", it'd be nice to be able to undo that from the UI

@benmanns
Copy link
Contributor

For people who find this by Googling, here's how I un-archive via updating the DB:

UPDATE dashboards
SET is_archived = false
WHERE slug = 'mycooldashboard';

@gclsoft
Copy link

gclsoft commented Mar 10, 2018

@benmanns How to update the postgress DB in the docker?

root@ubuntu:/home/g/redash# docker exec -it -u 0 b1a2f4fb93e8  bash
bash-4.3# top
Mem: 2909540K used, 140736K free, 22432K shrd, 350008K buff, 936752K cached
CPU:   0% usr   0% sys   0% nic 100% idle   0% io   0% irq   0% sirq
Load average: 0.08 0.11 0.24 2/463 66
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
   29     1 postgres S     165m   5%   1   0% postgres: postgres postgres 172.19.0.5(33074) idle
   26     1 postgres S     165m   5%   0   0% postgres: postgres postgres 172.19.0.5(33056) idle
   28     1 postgres S     162m   5%   1   0% postgres: postgres postgres 172.19.0.5(33070) idle
   27     1 postgres S     162m   5%   0   0% postgres: postgres postgres 172.19.0.5(33066) idle
   55     1 postgres S     161m   5%   0   0% postgres: postgres postgres 172.19.0.4(33380) idle
   56     1 postgres S     161m   5%   1   0% postgres: postgres postgres 172.19.0.4(33390) idle
   21     1 postgres S     161m   5%   0   0% postgres: autovacuum launcher process   
    1     0 postgres S     160m   5%   0   0% postgres
   19     1 postgres S     160m   5%   0   0% postgres: writer process   
   18     1 postgres S     160m   5%   0   0% postgres: checkpointer process   
   20     1 postgres S     160m   5%   1   0% postgres: wal writer process   
   22     1 postgres S    19664   1%   1   0% postgres: stats collector process   
   61     0 root     S     6212   0%   0   0% bash
   66    61 root     R     1532   0%   0   0% top
bash-4.3# psql
psql: FATAL:  role "root" does not exist
bash-4.3# exit
exit
root@ubuntu:/home/g/redash# docker exec -it -u 0 b1a2f4fb93e8  bash
bash-4.3# sudo psql
bash: sudo: command not found
bash-4.3# psql
psql: FATAL:  role "root" does not exist
bash-4.3# postgres
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.
bash-4.3# 

@gclsoft
Copy link

gclsoft commented Mar 10, 2018

root@ubuntu:/home/g/redash# docker exec -it  b1a2f4fb93e8  bash
bash-4.3# psql
psql: FATAL:  role "root" does not exist
bash-4.3# postgress
bash: postgress: command not found
bash-4.3# postgres
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.

@RichardLitt
Copy link

@gclsoft That does not look like it is related to this issue. Again, please refer this kind of issue to the forum. Thank you!

@jakelodge
Copy link

For anyone looking for a solution that's not yet running the latest version, the below workaound seems to do it:

curl -X POST '<baseUrl>/api/queries/<accidentallyArchivedQueryId>?api_key=<userApiKey>' -H 'Accept: application/json' -d '{"is_archived":false}'

Would advise calling and storing GET result first as a backup, since we're POSTing (PATCHing not allowed).
Tested with v10.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants