I need a way to view the results of my SSIS packages (as a recordset)

This code was written while we were migrating a bunch of SSIS packages to a new SQL Server version. It will show you the latest results for each package run. If a package ended in an error state, it will show the latest error that was generated.

You can toggle the code to show only packages in error state, and you can toggle the running packages on/off. Running packages can be included because otherwise, running packages do not show up in this list.