mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-03 12:49:23 -06:00
Added 'Count Rows' option to the partition sub tables. Fixes #5282
This commit is contained in:
1 parent
233736897d
commit
5198a881b7
3 files changed
+12
-3
No files matched your search
+6
-2
@@ -88,8 +88,12 @@ function(
|
||||
applies: ['object', 'context'], callback: 'detach_partition',
|
||||
priority: 2, label: gettext('Detach Partition'),
|
||||
icon: 'fa fa-remove',
|
||||
},
|
||||
]);
|
||||
},{
|
||||
name: 'count_table_rows', node: 'partition', module: pgBrowser.Nodes['table'],
|
||||
applies: ['object', 'context'], callback: 'count_table_rows',
|
||||
category: 'Count', priority: 2, label: gettext('Count Rows'),
|
||||
enable: true,
|
||||
}]);
|
||||
},
|
||||
generate_url: function(item, type, d, with_id, info) {
|
||||
if (_.indexOf([
|
||||
|
||||
+5
-1
@@ -251,9 +251,13 @@ define('pgadmin.node.table', [
|
||||
if (!d)
|
||||
return false;
|
||||
|
||||
/* Set the type to table so that partition module can call this func */
|
||||
let newD = {
|
||||
...d, _type: this.type,
|
||||
};
|
||||
// Fetch the total rows of a table
|
||||
$.ajax({
|
||||
url: obj.generate_url(i, 'count_rows' , d, true),
|
||||
url: obj.generate_url(i, 'count_rows' , newD, true),
|
||||
type:'GET',
|
||||
})
|
||||
.done(function(res) {
|
||||
|
||||
Reference in new issue
Block a user