Objects

API

class ObjectInjector(frontend)

Deals with objects

Arguments
  • frontend (*) –

ObjectInjector.addCreator(c)

Identical to a menu item, it is displayed in a special object creation menu

Arguments
  • c (*) – The creator to add

ObjectInjector.addRoute(r)

Adds a route to objects. It automatically takes /object/:objectid/{r.path}. If the route works only on a specific object type, it is recommended to prefix it with the type, ie: r.path = /timeseries/…

Arguments
  • r (*) –

ObjectInjector.get(oid)

Returns a promise that gets the given object

Arguments
  • oid (*) – Object ID to get

ObjectInjector.setType(c)

Adds or overwrites an object type. It is passed a dictionary of things to set.

Arguments
  • c (*) –