@@ -228,9 +228,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
228228 . target ( )
229229 . pipe (
230230 filter ( ( target ) => ! ! target ) ,
231- concatMap ( ( target : Target ) =>
232- context . api . doGet < ActiveRecording [ ] > ( `targets/${ encodeURIComponent ( target . connectUrl ) } /recordings` ) ,
233- ) ,
231+ concatMap ( ( target : Target ) => context . api . getTargetActiveRecordings ( target ) ) ,
234232 first ( ) ,
235233 )
236234 . subscribe ( {
@@ -259,7 +257,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
259257 context . notificationChannel . messages ( NotificationCategory . SnapshotCreated ) ,
260258 ) ,
261259 ] ) . subscribe ( ( [ currentTarget , event ] ) => {
262- if ( currentTarget ?. connectUrl != event . message . target && currentTarget ?. jvmId != event . message . jvmId ) {
260+ if ( currentTarget ?. jvmId != event . message . jvmId ) {
263261 return ;
264262 }
265263 setRecordings ( ( old ) => old . concat ( [ event . message . recording ] ) ) ;
@@ -276,7 +274,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
276274 context . notificationChannel . messages ( NotificationCategory . SnapshotDeleted ) ,
277275 ) ,
278276 ] ) . subscribe ( ( [ currentTarget , event ] ) => {
279- if ( currentTarget ?. connectUrl != event . message . target && currentTarget ?. jvmId != event . message . jvmId ) {
277+ if ( currentTarget ?. jvmId != event . message . jvmId ) {
280278 return ;
281279 }
282280
@@ -292,7 +290,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
292290 context . target . target ( ) ,
293291 context . notificationChannel . messages ( NotificationCategory . ActiveRecordingStopped ) ,
294292 ] ) . subscribe ( ( [ currentTarget , event ] ) => {
295- if ( currentTarget ?. connectUrl != event . message . target && currentTarget ?. jvmId != event . message . jvmId ) {
293+ if ( currentTarget ?. jvmId != event . message . jvmId ) {
296294 return ;
297295 }
298296 setRecordings ( ( old ) => {
@@ -323,7 +321,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
323321 context . target . target ( ) ,
324322 context . notificationChannel . messages ( NotificationCategory . RecordingMetadataUpdated ) ,
325323 ] ) . subscribe ( ( [ currentTarget , event ] ) => {
326- if ( currentTarget ?. connectUrl != event . message . target && currentTarget ?. jvmId != event . message . jvmId ) {
324+ if ( currentTarget ?. jvmId != event . message . jvmId ) {
327325 return ;
328326 }
329327 setRecordings ( ( old ) => {
@@ -391,7 +389,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
391389 filteredRecordings . forEach ( ( r : ActiveRecording ) => {
392390 if ( checkedIndices . includes ( r . id ) ) {
393391 handleRowCheck ( false , r . id ) ;
394- tasks . push ( context . api . archiveRecording ( r . name ) . pipe ( first ( ) ) ) ;
392+ tasks . push ( context . api . archiveRecording ( r . remoteId ) . pipe ( first ( ) ) ) ;
395393 }
396394 } ) ;
397395 addSubscription (
@@ -417,7 +415,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
417415 if ( checkedIndices . includes ( r . id ) ) {
418416 handleRowCheck ( false , r . id ) ;
419417 if ( r . state === RecordingState . RUNNING || r . state === RecordingState . STARTING ) {
420- tasks . push ( context . api . stopRecording ( r . name ) . pipe ( first ( ) ) ) ;
418+ tasks . push ( context . api . stopRecording ( r . remoteId ) . pipe ( first ( ) ) ) ;
421419 }
422420 }
423421 } ) ;
@@ -443,7 +441,7 @@ export const ActiveRecordingsTable: React.FC<ActiveRecordingsTableProps> = (prop
443441 filteredRecordings . forEach ( ( r : ActiveRecording ) => {
444442 if ( checkedIndices . includes ( r . id ) ) {
445443 context . reports . delete ( r ) ;
446- tasks . push ( context . api . deleteRecording ( r . name ) . pipe ( first ( ) ) ) ;
444+ tasks . push ( context . api . deleteRecording ( r . remoteId ) . pipe ( first ( ) ) ) ;
447445 }
448446 } ) ;
449447 addSubscription (
@@ -1011,7 +1009,7 @@ export const ActiveRecordingRow: React.FC<ActiveRecordingRowProps> = ({
10111009 < RecordingActions
10121010 index = { index }
10131011 recording = { recording }
1014- uploadFn = { ( ) => context . api . uploadActiveRecordingToGrafana ( recording . name ) }
1012+ uploadFn = { ( ) => context . api . uploadActiveRecordingToGrafana ( recording . remoteId ) }
10151013 />
10161014 </ Tr >
10171015 ) ;
0 commit comments