I figure on maybe one or two more days of work on this Admin Panel, and then I should be able to get back to work on The Watcher and the legacy app improvement/API migration project.
Thanks for using the Manager!
Corrections and Fixes
- Fixed a bug where users who have not created any survivors would throw an API error when the get_friends() method was called.
- Addressed an issue in User.is_active() that caused false positives.
- Removed some leftover print debugging from a few world.World methods (and replaced it, where appropriate, with CLI debug hooks).
- (Finally!) fixed the bug that caused recent session/user counts to be way off.
- Fixed an obscure bug in Models.get_campaign() that could cause the method to fail and raise an exception when normalizing legacy survivors whose campaign type was undefined (i.e. whose settlement was created in 2015, prior to expansion support).
- Fixed a scope issue in world.py where the refresh_asset() method was updating attributes that should only be in the refresh_all_assets() scope.
- Refactored the top_innovations World asset to a.) work and b.) tally handles and names (for better data including legacy settlements)
- Moved the Admin Panel's user agent popularity contest code to panel.get_user_data() and updated the panel.
- Rewrote the request_broker.py and panel.py code for retrieving user data to include recent data, as well as meta data about recent users; updated the panel to flag active users visually (i.e. with an asterisk, for now).
- Enhanced models.users.get_age() to be able to produce a sentence reflecting a user's age in years and days
- Added get_latest_activity() method to models.users.User class.
- The world daemon now initializes (and normalizes) dead survivors when it runs.
- Adjusted the presentation on the panel to be more efficient with space.
- "Recent User Activity" panel now displays the rules for what's active, versus what's merely recent
- Created utils.get_elapsed_time_since() to be the single source of datecalc within the API
- Implemented a Kill Board view on the new Admin Panel
- Added a count-up timer to the next no-reload data refresh (i.e. API pull)
- API route /world info now renders with the generic API meta info from utils
- Generic API meta info now includes instance admins.
- The world.py query operations for the panel have been optimized:
- update operations are atomic now, and the refresh_asset() method now calls two methods (initialize_asset_dict() and update_asset_dict()) to work on an individual asset
- the do_query() method has been updated to use the atomic asset init/update methods and dump full results to the commandline during CLI debugging
- world assets now support the 'limit' attribute (which simply constrains their results)
- the assets.world.py AssetCollection is now checked when attempting to update an asset_key, and if the key does not exist, we throw a very detailed/specific exception. The same is true of the world.World class methods: if the method corresponding to the key does not exist, we throw a detailed exception.
- queries that fail to run now get their own exception message that logs their specific issue (we still fail gracefully, we just do it with way higher resolution now)
- Cleaned up the latest_settlement output to use pretty strings, eschew timeline, etc. and generally be more suitable for presentation.
- Added the pretty_survivor() method for cleaning up survivor JSON and making it 'shippable' to world.
- The latest_fatality and latest_survivor methods have been refactored for DRYness and to include calls to the pretty_survivor() method.
- Added get_epithets() method to the survivors.Survivor class methods (to rapidly get a pretty string on demand)
- Updated Models.get_campaign() method to be more resilient.
- Enhanced logging in the Models.get_asset() method and made it so that regular failures and failures after the (optional) back off to a name-based lookup log different (and with more detail).
- Added support for -u argument to world.py to update individual warehouse items.