From 31ab05b138b0758431f9bc6c56459fe21a4663e4 Mon Sep 17 00:00:00 2001 From: vedfordev Date: Wed, 4 Dec 2024 20:48:31 +0530 Subject: [PATCH] (#34) | updates after production run --- reportingSystem/superset/assets/RoleUpgrade.js | 4 ++++ .../assets/role_permission_upgrade.sql | 2 +- .../superset_db_sqllite_to_postgres.md | 18 +++++++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/reportingSystem/superset/assets/RoleUpgrade.js b/reportingSystem/superset/assets/RoleUpgrade.js index 70ddbf3..28a6a65 100644 --- a/reportingSystem/superset/assets/RoleUpgrade.js +++ b/reportingSystem/superset/assets/RoleUpgrade.js @@ -8,6 +8,10 @@ const baseurl = ""; // provide url let auth_token = null; +const username = ""; // admin user + +const password = ""; + const login = async () => { diff --git a/reportingSystem/superset/assets/role_permission_upgrade.sql b/reportingSystem/superset/assets/role_permission_upgrade.sql index b209e31..6e4145f 100644 --- a/reportingSystem/superset/assets/role_permission_upgrade.sql +++ b/reportingSystem/superset/assets/role_permission_upgrade.sql @@ -16,7 +16,7 @@ where role.id not in( join ab_view_menu avm on apv.view_menu_id = avm.id join ab_permission_view_role apvr on apv.id = apvr.permission_view_id where p.name = 'can_recent_activity' and avm.name = 'Superset' - )and (role.name not in ('Public', 'granter', 'sql_lab') or (role.name ilike '%gam%' )); + )and (role.name not in ('Public', 'granter', 'sql_lab')) or (role.name ilike '%gam%' ); -- role ids : [17, 18, 20, 22, 23, 24, 26, 27, 29, 38, 39, 25, 44] diff --git a/reportingSystem/superset_db_sqllite_to_postgres.md b/reportingSystem/superset_db_sqllite_to_postgres.md index 5b44442..33e8f4e 100644 --- a/reportingSystem/superset_db_sqllite_to_postgres.md +++ b/reportingSystem/superset_db_sqllite_to_postgres.md @@ -121,18 +121,22 @@ docker run -d -p 8088:8088 \ -v /var/log/superset:/app/superset_home \ 118388513628.dkr.ecr.ap-south-1.amazonaws.com/avniproject/reporting-superset:4.0.1 -docker logs -f superset_4.0.1 +docker logs -f avnisuperset_4.0.1 -tail -f /var/log/superset/superset.log +tail -f /var/log/superset/superset.log + +docker exec -it -u root avnisuperset_4.0.1 bash +superset db upgrade +superset db init ``` 5. important commands for docker container ```shell -docker logs -f superset_4.0.1 -docker exec -it -u root superset_4.0.1 bash -docker start superset_4.0.1 -docker stop superset_4.0.1 -docker restart superset_4.0.1 +docker logs -f avnisuperset_4.0.1 +docker exec -it -u root avnisuperset_4.0.1 bash +docker start avnisuperset_4.0.1 +docker stop avnisuperset_4.0.1 +docker restart avnisuperset_4.0.1 docker inspect avnisuperset_4.0.1 ```