@@ -423,7 +423,7 @@ export class FBANBRestQueryRenderer {
423
423
console . log ( `FBANBRestQueryRenderer.executeCell()... cell.metadata=${ JSON . stringify ( cell . metadata ) } ` )
424
424
if (
425
425
cell . kind === vscode . NotebookCellKind . Code &&
426
- ( cell . document . languageId === 'javascript' || cell . document . languageId === 'fbJsonPath' ) &&
426
+ [ 'jsonc' , 'json' , 'javascript' , 'fbJsonPath' ] . includes ( cell . document . languageId ) &&
427
427
cell . metadata &&
428
428
cell . metadata . fbUidMembers &&
429
429
Array . isArray ( cell . metadata . fbUidMembers )
@@ -625,6 +625,22 @@ export class FBANBRestQueryRenderer {
625
625
)
626
626
exec . end ( true )
627
627
}
628
+ } else if (
629
+ fbUidMembers [ fbUidMembers . length - 1 ] . endsWith ( ':query' ) ||
630
+ fbUidMembers [ fbUidMembers . length - 1 ] . endsWith ( ':report' )
631
+ ) {
632
+ const filter = JSON5 . parse ( cell . document . getText ( ) )
633
+ appendMarkdown ( exec , [ { summary : 'querying filter:' , texts : [ ...codeBlock ( JSON . stringify ( filter , undefined , 2 ) , 'json' ) ] } ] )
634
+ const filterRq : RQ = {
635
+ path : 'ext:mbehr1.dlt-logs/get/docs/0/filters?' , // todo get from cell data!
636
+ commands : [
637
+ {
638
+ cmd : 'query' ,
639
+ param : JSON . stringify ( filter ) ,
640
+ } ,
641
+ ] ,
642
+ }
643
+ FBANBRestQueryRenderer . execRestQuery ( editorProvider , exec , docData , filterRq , '' , '' )
628
644
} else {
629
645
exec . end ( false )
630
646
}
@@ -659,6 +675,7 @@ export class FBANBRestQueryRenderer {
659
675
660
676
appendMarkdown ( exec , [
661
677
{
678
+ open : jsonPath . length === 0 && convFunction . length === 0 ,
662
679
summary : `received ${ resJson . data . length } messages${
663
680
resJson . data . length > msgs . length ? `. Unfold to see first ${ msgs . length } ` : resJson . data . length > 0 ? ':' : ''
664
681
} `,
0 commit comments