1) Ensure that the Authentication Source in the drop-down of the UserManagement dialog aligns with the entries specified for AUTHENTICATION_SOURCES in the configuration file. #6950
2) Fixed an issue where the pgAdmin page went blank when clicking the delete button in the User Management dialog. #6989pull/6999/head
parent
338bb64a55
commit
85255b65b1
|
@ -31,4 +31,6 @@ Bug fixes
|
|||
| `Issue #6803 <https://github.com/pgadmin-org/pgadmin4/issues/6803>`_ - Fixed an issue where reading process logs throws an error when DATA_DIR is moved to a networked drive.
|
||||
| `Issue #6887 <https://github.com/pgadmin-org/pgadmin4/issues/6887>`_ - Fixed an issue where syntax error was not highlighting in query tool.
|
||||
| `Issue #6921 <https://github.com/pgadmin-org/pgadmin4/issues/6921>`_ - Fixed an issue where on entering full screen, the option label is not changed to 'Exit Full Screen' in desktop mode.
|
||||
| `Issue #6950 <https://github.com/pgadmin-org/pgadmin4/issues/6950>`_ - Ensure that the Authentication Source in the drop-down of the UserManagement dialog aligns with the entries specified for AUTHENTICATION_SOURCES in the configuration file.
|
||||
| `Issue #6958 <https://github.com/pgadmin-org/pgadmin4/issues/6958>`_ - Reverse engineer serial columns when generating ERD for database/table.
|
||||
| `Issue #6989 <https://github.com/pgadmin-org/pgadmin4/issues/6989>`_ - Fixed an issue where the pgAdmin page went blank when clicking the delete button in the User Management dialog.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
SELECT
|
||||
indexrelname AS {{ conn|qtIdent(_('Index name')) }},
|
||||
pg_catalog.pg_relation_size(indexrelid) AS {{ conn|qtIdent(_('Size')) }},
|
||||
idx_scan AS {{ conn|qtIdent(_('Index scans')) }},
|
||||
idx_tup_read AS {{ conn|qtIdent(_('Index tuples read')) }},
|
||||
idx_tup_fetch AS {{ conn|qtIdent(_('Index tuples fetched')) }},
|
||||
pg_catalog.pg_relation_size(indexrelid) AS {{ conn|qtIdent(_('Size')) }}
|
||||
idx_tup_fetch AS {{ conn|qtIdent(_('Index tuples fetched')) }}
|
||||
FROM
|
||||
pg_catalog.pg_stat_all_indexes stat
|
||||
JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
SELECT
|
||||
st.relname AS {{ conn|qtIdent(_('Table name')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }},
|
||||
n_tup_ins AS {{ conn|qtIdent(_('Tuples inserted')) }},
|
||||
n_tup_upd AS {{ conn|qtIdent(_('Tuples updated')) }},
|
||||
n_tup_del AS {{ conn|qtIdent(_('Tuples deleted')) }},
|
||||
|
@ -13,13 +19,7 @@ SELECT
|
|||
vacuum_count AS {{ conn|qtIdent(_('Vacuum counter')) }},
|
||||
autovacuum_count AS {{ conn|qtIdent(_('Autovacuum counter')) }},
|
||||
analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }}
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }}
|
||||
FROM
|
||||
pg_catalog.pg_stat_all_tables st
|
||||
JOIN
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
SELECT
|
||||
st.relname AS {{ conn|qtIdent(_('View Name')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }},
|
||||
n_tup_ins AS {{ conn|qtIdent(_('Tuples inserted')) }},
|
||||
n_tup_upd AS {{ conn|qtIdent(_('Tuples updated')) }},
|
||||
n_tup_del AS {{ conn|qtIdent(_('Tuples deleted')) }},
|
||||
|
@ -13,13 +19,7 @@ SELECT
|
|||
vacuum_count AS {{ conn|qtIdent(_('Vacuum counter')) }},
|
||||
autovacuum_count AS {{ conn|qtIdent(_('Autovacuum counter')) }},
|
||||
analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }}
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }}
|
||||
FROM
|
||||
pg_catalog.pg_stat_all_tables st
|
||||
JOIN
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
SELECT
|
||||
st.relname AS {{ conn|qtIdent(_('View Name')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }},
|
||||
n_tup_ins AS {{ conn|qtIdent(_('Tuples inserted')) }},
|
||||
n_tup_upd AS {{ conn|qtIdent(_('Tuples updated')) }},
|
||||
n_tup_del AS {{ conn|qtIdent(_('Tuples deleted')) }},
|
||||
|
@ -13,13 +19,7 @@ SELECT
|
|||
vacuum_count AS {{ conn|qtIdent(_('Vacuum counter')) }},
|
||||
autovacuum_count AS {{ conn|qtIdent(_('Autovacuum counter')) }},
|
||||
analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
|
||||
pg_catalog.pg_relation_size(st.relid)
|
||||
+ CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
|
||||
+ COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
|
||||
FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Total Size')) }}
|
||||
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }}
|
||||
FROM
|
||||
pg_catalog.pg_stat_all_tables st
|
||||
JOIN
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
SELECT
|
||||
{% if not did %}db.datname AS {{ conn|qtIdent(_('Database')) }}, {% endif %}
|
||||
pg_catalog.pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }},
|
||||
numbackends AS {{ conn|qtIdent(_('Backends')) }},
|
||||
xact_commit AS {{ conn|qtIdent(_('Xact committed')) }},
|
||||
xact_rollback AS {{ conn|qtIdent(_('Xact rolled back')) }},
|
||||
|
@ -9,8 +10,7 @@ SELECT
|
|||
tup_fetched AS {{ conn|qtIdent(_('Tuples fetched')) }},
|
||||
tup_inserted AS {{ conn|qtIdent(_('Tuples inserted')) }},
|
||||
tup_updated AS {{ conn|qtIdent(_('Tuples updated')) }},
|
||||
tup_deleted AS {{ conn|qtIdent(_('Tuples deleted')) }},
|
||||
pg_catalog.pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
|
||||
tup_deleted AS {{ conn|qtIdent(_('Tuples deleted')) }}
|
||||
FROM
|
||||
pg_catalog.pg_stat_database db
|
||||
WHERE {% if did %}
|
||||
|
|
|
@ -20,6 +20,7 @@ import current_user from 'pgadmin.user_management.current_user';
|
|||
import { isEmptyString } from '../../../../static/js/validators';
|
||||
import { showChangeOwnership } from '../../../../static/js/Dialogs/index';
|
||||
import { BROWSER_PANELS } from '../../../../browser/static/js/constants';
|
||||
import _ from 'lodash';
|
||||
|
||||
class UserManagementCollection extends BaseUISchema {
|
||||
constructor(authSources, roleOptions) {
|
||||
|
@ -57,8 +58,20 @@ class UserManagementCollection extends BaseUISchema {
|
|||
let obj = this;
|
||||
return [
|
||||
{
|
||||
id: 'auth_source', label: gettext('Authentication source'), cell: 'select',
|
||||
options: obj.authSources, minWidth: 110, width: 110,
|
||||
id: 'auth_source', label: gettext('Authentication source'),
|
||||
cell: (state)=> {
|
||||
return {
|
||||
cell: 'select',
|
||||
options: ()=> {
|
||||
if (obj.isNew(state)) {
|
||||
return Promise.resolve(obj.authSources.filter((s)=> current_user['auth_sources'].includes(s.value)));
|
||||
}
|
||||
return Promise.resolve(obj.authSources);
|
||||
},
|
||||
optionsReloadBasis: obj.isNew(state)
|
||||
};
|
||||
},
|
||||
minWidth: 110, width: 110,
|
||||
controlProps: {
|
||||
allowClear: false,
|
||||
openOnEnter: false,
|
||||
|
@ -242,6 +255,10 @@ class UserManagementSchema extends BaseUISchema {
|
|||
return row['id'] != current_user['id'];
|
||||
},
|
||||
onDelete: (row, deleteRow)=> {
|
||||
if (_.isUndefined(row['id'])) {
|
||||
deleteRow();
|
||||
return;
|
||||
}
|
||||
let deletedUser = {'id': row['id'], 'name': !isEmptyString(row['email']) ? row['email'] : row['username']};
|
||||
api.get(url_for('user_management.shared_servers', {'uid': row['id']}))
|
||||
.then((res)=>{
|
||||
|
@ -259,14 +276,14 @@ class UserManagementSchema extends BaseUISchema {
|
|||
);
|
||||
})
|
||||
.catch((err)=>{
|
||||
pgAdmin.Browser.notifier.error(err);
|
||||
pgAdmin.Browser.notifier.error(parseApiError(err));
|
||||
});
|
||||
} else {
|
||||
obj.deleteUser(deleteRow);
|
||||
}
|
||||
})
|
||||
.catch((err)=>{
|
||||
pgAdmin.Browser.notifier.error(err);
|
||||
pgAdmin.Browser.notifier.error(parseApiError(err));
|
||||
obj.deleteUser(deleteRow);
|
||||
});
|
||||
},
|
||||
|
@ -413,5 +430,5 @@ export function showUserManagement() {
|
|||
onClose={()=>{pgAdmin.Browser.docker.close(panelId);}}
|
||||
/>
|
||||
)
|
||||
}, pgAdmin.Browser.stdW.md, pgAdmin.Browser.stdH.md);
|
||||
}, pgAdmin.Browser.stdW.lg, pgAdmin.Browser.stdH.md);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class UserManagement {
|
|||
|
||||
// This is a callback function to show 2FA dialog.
|
||||
show_mfa(url) {
|
||||
showUrlDialog(gettext('Authentication'), url, 'mfa.html', 1200, 680);
|
||||
showUrlDialog(gettext('Authentication'), url, 'mfa.html', 1000, 600);
|
||||
}
|
||||
|
||||
// This is a callback function to show user management dialog.
|
||||
|
|
Loading…
Reference in New Issue