@@ -5,7 +5,6 @@ import { Project } from '../projects/project-detail-query'
55import { ReportAttributes } from 'components/ui/Charts/ComposedChart.utils'
66
77export const getReportAttributes = ( org : Organization , project : Project ) : ReportAttributes [ ] => {
8- const isFreePlan = org ?. plan ?. id === 'free'
98 const computeSize = project ?. infra_compute_size || 'medium'
109
1110 return [
@@ -111,8 +110,9 @@ export const getReportAttributes = (org: Organization, project: Project): Report
111110 attributes : [ ] ,
112111 } ,
113112 {
114- id : 'database-connections' ,
115- label : 'Database connections' ,
113+ id : 'pooler-database-connections' ,
114+ label : 'Pooler to Database connections' ,
115+ syncId : 'database-reports' ,
116116 valuePrecision : 0 ,
117117 availableIn : [ 'free' , 'pro' ] ,
118118 hide : false ,
@@ -126,7 +126,7 @@ export const getReportAttributes = (org: Organization, project: Project): Report
126126 {
127127 attribute : 'pg_stat_database_num_backends' ,
128128 provider : 'infra-monitoring' ,
129- label : 'Pooler to database connections' ,
129+ label : 'Database connections' ,
130130 tooltip : 'Number of pooler connections to the database' ,
131131 } ,
132132 ] ,
@@ -379,40 +379,11 @@ export const getReportAttributesV2: (org: Organization, project: Project) => Rep
379379 } ,
380380 {
381381 id : 'client-connections' ,
382- label : 'Database connections' ,
383- valuePrecision : 0 ,
384- availableIn : [ 'team' , 'enterprise' ] ,
385- hide : ! isFreePlan , // [Jordi] Paid plans can see grouped client connections instead, so this chart is not needed for them. See below.
386- showTooltip : true ,
387- showLegend : false ,
388- showMaxValue : true ,
389- hideChartType : false ,
390- showGrid : true ,
391- YAxisProps : { width : 30 } ,
392- defaultChartStyle : 'line' ,
393- attributes : [
394- {
395- attribute : 'pg_stat_database_num_backends' ,
396- provider : 'infra-monitoring' ,
397- label : 'Total connections' ,
398- tooltip : 'Total number of client connections to the database' ,
399- } ,
400- {
401- attribute : 'max_db_connections' ,
402- provider : 'reference-line' ,
403- label : 'Max connections' ,
404- value : getConnectionLimits ( computeSize ) . direct ,
405- tooltip : 'Max available connections for your current compute size' ,
406- isMaxValue : true ,
407- } ,
408- ] ,
409- } ,
410- {
411- id : 'client-connections' ,
412- label : 'Direct Database Client Connections Grouped' ,
382+ label : 'Database Connections' ,
383+ syncId : 'database-reports' ,
413384 valuePrecision : 0 ,
414385 availableIn : [ 'team' , 'enterprise' ] ,
415- hide : isFreePlan , // [Jordi] Paid plans can see grouped client connections instead, so this chart is not needed for them. See above.
386+ hide : false ,
416387 showTooltip : true ,
417388 showLegend : true ,
418389 showMaxValue : true ,
@@ -558,7 +529,6 @@ export const getReportAttributesV2: (org: Organization, project: Project) => Rep
558529 tooltip :
559530 'Disk usage by the write-ahead log. The usage depends on your WAL settings and the amount of data being written to the database' ,
560531 } ,
561-
562532 {
563533 attribute : 'pg_database_size' ,
564534 provider : 'infra-monitoring' ,
0 commit comments