File tree 2 files changed +3
-4
lines changed
packages/common-utils/src
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -472,9 +472,8 @@ export class ClickhouseClient {
472
472
abort_signal ?: AbortSignal ;
473
473
clickhouse_settings ?: Record < string , any > ;
474
474
} ;
475
- } ) {
475
+ } ) : Promise < ResponseJSON < Record < string , string | number > > > {
476
476
config = setChartSelectsAlias ( config ) ;
477
- // TODO: move multi-series logics to common-utils so alerting can use it
478
477
const queries : ChSql [ ] = await Promise . all (
479
478
splitChartConfigs ( config ) . map ( c => renderChartConfig ( c , metadata ) ) ,
480
479
) ;
@@ -545,7 +544,7 @@ export class ClickhouseClient {
545
544
const isRatio =
546
545
config . seriesReturnType === 'ratio' && resultSets . length === 2 ;
547
546
548
- const _resultSet = {
547
+ const _resultSet : ResponseJSON < any > = {
549
548
meta : Array . from ( metaSet . values ( ) ) ,
550
549
data : Array . from ( tsBucketMap . values ( ) ) ,
551
550
} ;
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ async function renderSelectList(
402
402
) ;
403
403
404
404
return isRatio
405
- ? chSql `divide(${ selectsSQL [ 0 ] } , ${ selectsSQL [ 1 ] } )`
405
+ ? [ chSql `divide(${ selectsSQL [ 0 ] } , ${ selectsSQL [ 1 ] } )` ]
406
406
: selectsSQL ;
407
407
}
408
408
You can’t perform that action at this time.
0 commit comments