Skip to content

Commit

Permalink
Remove handling for 'CHANGED' discovery event
Browse files Browse the repository at this point in the history
Cryostat backend never emits the 'CHANGED' event type anymore, instead emitting a LOST-FOUND sequence in any scenario where a target modification is detected
  • Loading branch information
andrewazores committed Jun 3, 2021
1 parent 42a29f1 commit e09522e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/app/TargetSelect/TargetSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ export const TargetSelect: React.FunctionComponent<TargetSelectProps> = (props)
selectNone();
}
break;
case 'CHANGED':
setTargets(old => {
const filtered = _.filter(old, t => t.connectUrl !== evt.serviceRef.connectUrl);
const updated =_.unionBy(filtered, [evt.serviceRef], t => t.connectUrl);
onSelect(undefined, _.find(updated, t => t.connectUrl === selected.connectUrl), false);
return updated;
});
break;
default:
notifications.danger(`Bad ${NOTIFICATION_CATEGORY} message received`, `Unknown event type ${evt.kind}`);
break;
Expand Down Expand Up @@ -198,6 +190,6 @@ export const TargetSelect: React.FunctionComponent<TargetSelectProps> = (props)
}

interface TargetDiscoveryEvent {
kind: 'LOST' | 'FOUND' | 'CHANGED';
kind: 'LOST' | 'FOUND';
serviceRef: Target;
}

0 comments on commit e09522e

Please sign in to comment.