File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const { statusAcronyms } = require('../../domain/enums/StatusAcronyms.js');
2424const { unpackNumberRange } = require ( '../../utilities/rangeUtils.js' ) ;
2525const { splitStringToStringsTrimmed } = require ( '../../utilities/stringUtils.js' ) ;
2626const { setTimeRangeQuery } = require ( '../../utilities/setTimeRangeQuery.js' ) ;
27+ const { environmentSummary } = require ( '../../server/views/environments/summary.js' ) ;
2728
2829/**
2930 * Subquery to select the latest history item for each environment.
@@ -70,10 +71,7 @@ class GetAllEnvironmentsUseCase {
7071 const { filter, page = { } } = query ;
7172 const { limit = ApiConfig . pagination . limit , offset = 0 } = page ;
7273
73- const queryBuilder = dataSource . createQueryBuilder ( true )
74- . orderBy ( 'updatedAt' , 'desc' )
75- . limit ( limit )
76- . offset ( offset ) ;
74+ const queryBuilder = dataSource . createQueryBuilder ( ) . orderBy ( 'updatedAt' , 'desc' ) . limit ( limit ) . offset ( offset ) ;
7775
7876 if ( filter ) {
7977 const {
@@ -193,6 +191,8 @@ class GetAllEnvironmentsUseCase {
193191
194192 queryBuilder . include ( { association : 'runs' } ) ;
195193 queryBuilder . include ( { association : 'historyItems' } ) ;
194+ console . log ( queryBuilder . toImplementation ( ) ) ;
195+
196196 const { count, rows } = await EnvironmentRepository . findAndCountAll ( queryBuilder ) ;
197197 return {
198198 count,
You can’t perform that action at this time.
0 commit comments