New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggested fixes to pr 290 #299
Conversation
…of sensors Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I feel is not necessary, otherwise approved.
One more thought is that the assets overview can become a bit slow when we load all sensors for all assets (and in the end, just count them). But for now that should be okay. The real slowness we need to tackle (with caching) is when beliefs come into play. |
…o suggested-fixes-to-pr-290
Signed-off-by: F.N. Claessen <felix@seita.nl>
* add a new method to specify an auth context (by callable) and discuss steps forward for use cases not covered yet by auth policy * add ACL for GenericAsset * added /dev/generic_assets API, CRUD uses it (passing manual testing) * fix asset icon in asset view * remove verbs from /api/dev/generic_assets API routes (HTTP method already defines what happens) * make CRUD UI tests (mocking the asset API) work * auth policy: change 'create' to 'create-children' permission (removing the need for issue#200); fix modelling problem if several distinct principal formulations exist for one permission * separate fresh tests from others; only generate copies of generic assets when we don't already have them (distinguish by name); re-add old asset tests; * add missing mock in another ui test * add unique contraints: on GenericAssetType.name & on GenericAssets for name+account_id * improve explanation of our authorization policy implementation * update changelog * improve changelog, also mention temporary API location * comments next to test cases Signed-off-by: Nicolas Höning <nicolas@seita.nl> * create_user function hashes the password -e Signed-off-by: Nicolas Höning <nicolas@seita.nl> * more informative validation errror Signed-off-by: Nicolas Höning <nicolas@seita.nl> * allow creation of public Assets in UI Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Fix display of owning account Signed-off-by: Nicolas Höning <nicolas@seita.nl> * better changelog docs Signed-off-by: Nicolas Höning <nicolas@seita.nl> * list sensors on asset page Signed-off-by: Nicolas Höning <nicolas@seita.nl> * do not fail getting latest state if capacity_in_mw is not in attributes Signed-off-by: Nicolas Höning <nicolas@seita.nl> * better default for capacity_in_mw Signed-off-by: Nicolas Höning <nicolas@seita.nl> * use id in the dict, for sensors lookup Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Suggested fixes to pr 290 (#299) Remove the entity addresses from the generic asset listing, and list the number of sensors instead. * grammar Signed-off-by: F.N. Claessen <felix@seita.nl> * Update generic asset listing, replacing entity addresses with number of sensors Signed-off-by: F.N. Claessen <felix@seita.nl> * Avoid crashing on formatting None values Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix wrong variable name Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix incorrect type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * Partly revert cefe320 Signed-off-by: F.N. Claessen <felix@seita.nl> * small improvement on locating ea addresses Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Describe current state of transition Signed-off-by: Nicolas Höning <nicolas@seita.nl> * deprecation notice in old-style asset API documentation Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Fix type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * Update documentation Signed-off-by: F.N. Claessen <felix@seita.nl> * Update v2.0 connection entity addresses in documentation Signed-off-by: F.N. Claessen <felix@seita.nl> * Correct quickrefs in v2.0 documentation Signed-off-by: F.N. Claessen <felix@seita.nl> * Update other v2.0 sensor entity addresses in documentation Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix entity address dates corresponding to older previous domain name Signed-off-by: F.N. Claessen <felix@seita.nl> * Adapt more occurrences of older dates in entity addresses, and switch to fm1 scheme. Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com> Co-authored-by: F.N. Claessen <felix@seita.nl>
This sub-PR removes the entity addresses from the generic asset listing, and lists the number of sensors instead.