Cleanup the dashboard tables a little for readability

This commit is contained in:
Dave Page 2016-10-14 17:42:29 -07:00
parent faf517e12b
commit d0a9b25c57
5 changed files with 26 additions and 36 deletions

View File

@ -395,7 +395,7 @@ function(r, $, pgAdmin, _, Backbone) {
var server_activity_columns = [{ var server_activity_columns = [{
name: "pid", name: "pid",
label: "{{ _('Process ID') }}", label: "{{ _('PID') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -410,12 +410,12 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
}, { }, {
name: "application_name", name: "application_name",
label: "{{ _('Application name') }}", label: "{{ _('Application') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
name: "client_addr", name: "client_addr",
label: "{{ _('Client address') }}", label: "{{ _('Client') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -441,13 +441,13 @@ function(r, $, pgAdmin, _, Backbone) {
} else { } else {
server_activity_columns = server_activity_columns.concat( server_activity_columns = server_activity_columns.concat(
[{ [{
name: "wait_event_type", name: "wait_event",
label: "{{ _('Wait Event Type') }}", label: "{{ _('Wait Event') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{ },{
name: "wait_event", name: "blocking_pids",
label: "{{ _('Wait Event') }}", label: "{{ _('Blocking PIDs') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}]); }]);
@ -455,7 +455,7 @@ function(r, $, pgAdmin, _, Backbone) {
var server_locks_columns = [{ var server_locks_columns = [{
name: "pid", name: "pid",
label: "{{ _('Process ID') }}", label: "{{ _('PID') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -485,7 +485,7 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
}, { }, {
name: "virtualxid", name: "virtualxid",
label: "{{ _('Virtual XID (target)') }}", label: "{{ _('vXID (target)') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -505,7 +505,7 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
},{ },{
name: "virtualtransaction", name: "virtualtransaction",
label: "{{ _('Virtual XID (owner)') }}", label: "{{ _('vXID (owner)') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{ },{
@ -518,11 +518,6 @@ function(r, $, pgAdmin, _, Backbone) {
label: "{{ _('Granted?') }}", label: "{{ _('Granted?') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{
name: "fastpath",
label: "{{ _('Fast path?') }}",
editable: false,
cell: "string"
}]; }];
var server_prepared_columns = [{ var server_prepared_columns = [{
@ -677,7 +672,7 @@ function(r, $, pgAdmin, _, Backbone) {
var database_activity_columns = [{ var database_activity_columns = [{
name: "pid", name: "pid",
label: "{{ _('Process ID') }}", label: "{{ _('PID') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -687,12 +682,12 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
}, { }, {
name: "application_name", name: "application_name",
label: "{{ _('Application name') }}", label: "{{ _('Application') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
name: "client_addr", name: "client_addr",
label: "{{ _('Client address') }}", label: "{{ _('Client') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -718,13 +713,13 @@ function(r, $, pgAdmin, _, Backbone) {
} else { } else {
database_activity_columns = database_activity_columns.concat( database_activity_columns = database_activity_columns.concat(
[{ [{
name: "wait_event_type", name: "wait_event",
label: "{{ _('Wait Event Type') }}", label: "{{ _('Wait Event') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{ },{
name: "wait_event", name: "blocking_pids",
label: "{{ _('Wait Event') }}", label: "{{ _('Blocking PIDs') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}]); }]);
@ -732,7 +727,7 @@ function(r, $, pgAdmin, _, Backbone) {
var database_locks_columns = [{ var database_locks_columns = [{
name: "pid", name: "pid",
label: "{{ _('Process ID') }}", label: "{{ _('PID') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -757,7 +752,7 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
}, { }, {
name: "virtualxid", name: "virtualxid",
label: "{{ _('Virtual XID (target)') }}", label: "{{ _('vXID (target)') }}",
editable: false, editable: false,
cell: "string" cell: "string"
}, { }, {
@ -777,7 +772,7 @@ function(r, $, pgAdmin, _, Backbone) {
cell: "string" cell: "string"
},{ },{
name: "virtualtransaction", name: "virtualtransaction",
label: "{{ _('Virtual XID (owner)') }}", label: "{{ _('vXID (owner)') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{ },{
@ -790,11 +785,6 @@ function(r, $, pgAdmin, _, Backbone) {
label: "{{ _('Granted?') }}", label: "{{ _('Granted?') }}",
editable: false, editable: false,
cell: "string" cell: "string"
},{
name: "fastpath",
label: "{{ _('Fast path?') }}",
editable: false,
cell: "string"
}]; }];
var database_prepared_columns = [{ var database_prepared_columns = [{

View File

@ -4,7 +4,7 @@ SELECT
usename, usename,
application_name, application_name,
client_addr, client_addr,
backend_start, to_char(backend_start, 'YYYY-MM-DD HH24:MM:SS TZ') AS backend_start,
state, state,
CASE WHEN waiting THEN '{{ _('yes') }}' ELSE '{{ _('no') }}' END AS waiting CASE WHEN waiting THEN '{{ _('yes') }}' ELSE '{{ _('no') }}' END AS waiting
FROM FROM

View File

@ -3,7 +3,7 @@ SELECT
database, database,
owner, owner,
transaction, transaction,
prepared to_char(prepared, 'YYYY-MM-DD HH24:MM:SS TZ') AS prepared
FROM FROM
pg_prepared_xacts pg_prepared_xacts
{% if did %}WHERE {% if did %}WHERE

View File

@ -4,10 +4,10 @@ SELECT
usename, usename,
application_name, application_name,
client_addr, client_addr,
backend_start, to_char(backend_start, 'YYYY-MM-DD HH24:MM:SS TZ') AS backend_start,
state, state,
wait_event_type, wait_event_type || ': ' || wait_event AS wait_event,
wait_event pg_blocking_pids(pid) AS blocking_pids
FROM FROM
pg_stat_activity pg_stat_activity
{% if did %}WHERE {% if did %}WHERE

View File

@ -3,7 +3,7 @@ SELECT
database, database,
owner, owner,
transaction, transaction,
prepared to_char(prepared, 'YYYY-MM-DD HH24:MM:SS TZ') AS prepared
FROM FROM
pg_prepared_xacts pg_prepared_xacts
{% if did %}WHERE {% if did %}WHERE