mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issue where 'backend_type' column is exist for database server version greater than 10.
Issue is regression of RM #2597.
This commit is contained in:
parent
b1ad89fb4a
commit
401e13ca65
@ -132,7 +132,7 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr,
|
||||
type: 'text', editable: true, disabled: true,
|
||||
group: gettext('Details'),
|
||||
visible: function(m) {
|
||||
return m.get('version') >= 100000;
|
||||
return this.version >= 100000;
|
||||
}
|
||||
},{
|
||||
id: 'query_start', label: gettext('Query started at'),
|
||||
@ -644,14 +644,17 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr,
|
||||
}]);
|
||||
}
|
||||
|
||||
var newActiveQueryDetailsModel = new ActiveQueryDetailsModel(
|
||||
{'version': version}
|
||||
);
|
||||
var newActiveQueryDetailsModel = new ActiveQueryDetailsModel();
|
||||
|
||||
var subNodeFieldsModel = Backform.generateViewSchema(
|
||||
null, newActiveQueryDetailsModel, 'create', null, null, true
|
||||
);
|
||||
|
||||
// Add version to each field
|
||||
_.each(subNodeFieldsModel[0].fields, function(obj) {
|
||||
obj['version'] = version;
|
||||
});
|
||||
|
||||
// Add cancel active query button
|
||||
server_activity_columns.unshift({
|
||||
name: "pg-backform-expand", label: "",
|
||||
@ -978,14 +981,18 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr,
|
||||
}]);
|
||||
}
|
||||
|
||||
var newActiveQueryDetailsModel = new ActiveQueryDetailsModel(
|
||||
{'version': version}
|
||||
);
|
||||
var newActiveQueryDetailsModel = new ActiveQueryDetailsModel();
|
||||
|
||||
var subNodeFieldsModel = Backform.generateViewSchema(
|
||||
null, newActiveQueryDetailsModel, 'create', null, null, true
|
||||
);
|
||||
|
||||
// Add version to each field
|
||||
_.each(subNodeFieldsModel[0].fields, function(obj) {
|
||||
obj['version'] = version;
|
||||
});
|
||||
|
||||
|
||||
// Add cancel active query button
|
||||
database_activity_columns.unshift({
|
||||
name: "pg-backform-expand", label: "",
|
||||
|
@ -0,0 +1,19 @@
|
||||
SELECT
|
||||
pid,
|
||||
datname,
|
||||
usename,
|
||||
application_name,
|
||||
client_addr,
|
||||
to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
|
||||
state,
|
||||
wait_event_type || ': ' || wait_event AS wait_event,
|
||||
pg_blocking_pids(pid) AS blocking_pids,
|
||||
query,
|
||||
to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
|
||||
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
|
||||
backend_type
|
||||
FROM
|
||||
pg_stat_activity
|
||||
{% if did %}WHERE
|
||||
datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
|
||||
ORDER BY pid
|
@ -10,8 +10,7 @@ SELECT
|
||||
pg_blocking_pids(pid) AS blocking_pids,
|
||||
query,
|
||||
to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
|
||||
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
|
||||
backend_type
|
||||
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start
|
||||
FROM
|
||||
pg_stat_activity
|
||||
{% if did %}WHERE
|
||||
|
Loading…
Reference in New Issue
Block a user