File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,6 @@ export default class SqlSeries {
148148
149149 this . series . forEach ( ( row ) => {
150150 const t = this . formatTimeValue ( row [ this . timeKey ] ) ;
151- let metricKey : string | null = null ;
152-
153- if ( this . labelKeys . length ) {
154- metricKey = this . labelKeys . map ( ( name ) => row [ name ] ) . join ( ', ' ) ;
155- }
156151
157152 if ( lastTimeStamp < t ) {
158153 Object . values < any [ ] > ( metrics ) . forEach ( ( dataPoints ) => {
@@ -163,11 +158,16 @@ export default class SqlSeries {
163158 lastTimeStamp = t ;
164159 }
165160
161+ let index = 0 ;
162+
166163 Object . entries ( row ) . forEach ( ( [ key , val ] ) => {
167164 if ( this . timeKey === key || this . labelKeys . includes ( key ) || ! this . dataKeys . includes ( key ) ) {
168165 return ;
169166 }
170167
168+ const metricKey = row [ this . labelKeys [ index ] ] ;
169+ index ++ ;
170+
171171 if ( Array . isArray ( val ) ) {
172172 val . forEach ( ( arr ) => {
173173 this . pushDatapoint ( metrics , t , arr [ 0 ] , arr [ 1 ] ) ;
You can’t perform that action at this time.
0 commit comments