Skip to content
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

Merged
merged 7 commits into from Jan 4, 2022

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jan 4, 2022

This sub-PR removes the entity addresses from the generic asset listing, and lists the number of sensors instead.

Signed-off-by: F.N. Claessen <felix@seita.nl>
…of sensors

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x requested a review from nhoening January 4, 2022 09:41
@Flix6x Flix6x self-assigned this Jan 4, 2022
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>
Copy link
Contributor

@nhoening nhoening left a 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.

flexmeasures/ui/crud/assets.py Outdated Show resolved Hide resolved
@nhoening
Copy link
Contributor

nhoening commented Jan 4, 2022

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.

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x merged commit a7f1d7f into issue-247-GenericAsset-CRUD Jan 4, 2022
@Flix6x Flix6x deleted the suggested-fixes-to-pr-290 branch January 4, 2022 11:37
nhoening added a commit that referenced this pull request Jan 5, 2022
* 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>
@Flix6x Flix6x added this to the 0.8.0 milestone Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants