flexmeasures.ui.views.assets.views

Classes

class flexmeasures.ui.views.assets.views.AssetCrudUI

These views help us offer a Jinja2-based UI. If endpoints create/change data, we aim to use the logic and authorization in the actual API, so these views simply call the API functions,and deal with the response.

auditlog(id: str)

/assets/<id>/auditlog

context(id: str, **kwargs)

/assets/<id>/context

create_sensor(id: str)

GET to /assets/<id>/sensors/new

delete_with_data(id: str)

Delete via /assets/delete_with_data/<id>

get(id: str, **kwargs)

/assets/<id>

graphs(id: str, start_time=None, end_time=None)

/assets/<id>/graphs

index(msg='', **kwargs)

GET from /assets

List the user’s assets. For admins, list across all accounts.

owned_by(account_id: str)

/assets/owned_by/<account_id>

post(id: str)

POST to /assets/<id>, where id can be ‘create’ (and thus a new asset is made from POST data) Most of the code deals with creating a user for the asset if no existing is chosen.

properties(id: str)

/assets/<id>/properties

status(id: str)

GET from /assets/<id>/status to show the staleness of the asset’s sensors.