Skip to content

Commit

Permalink
Ignore irrelevant container events
Browse files Browse the repository at this point in the history
These are internal transient states which don't need to reflect in the
UI. They happen quickly in bursts, with a "permanent state" event
following such as "create", "died", or "remove". This helps to reduce
the API calls and thus mitigates out-of-order results; see
containers/podman#19124

Also fix the alphabetical sorting of the remaining events.
  • Loading branch information
martinpitt committed Jul 13, 2023
1 parent aa136d7 commit a1528f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ class Application extends React.Component {
case 'export':
case 'import':
case 'init':
case 'mount':
case 'restart':
case 'sync':
case 'unmount':
case 'wait':
break;
/* The following events need only to update the Container list
Expand All @@ -339,19 +343,15 @@ class Application extends React.Component {
).then(() => this.updateContainer(id, system, event));
break;
case 'checkpoint':
case 'cleanup':
case 'create':
case 'died':
case 'exec_died':
case 'kill':
case 'cleanup':
case 'mount':
case 'pause':
case 'prune':
case 'restart':
case 'restore':
case 'stop':
case 'sync':
case 'unmount':
case 'unpause':
case 'rename': // rename event is available starting podman v4.1; until then the container does not get refreshed after renaming
this.updateContainer(id, system, event);
Expand Down

0 comments on commit a1528f3

Please sign in to comment.