noc.lib.app.extapplication

Module Contents

class noc.lib.app.extapplication.ExtApplication(*args, **kwargs)

Bases: noc.lib.app.application.Application

menu
icon = icon_application_form
OK = 200
CREATED = 201
DELETED = 204
BAD_REQUEST = 400
FORBIDDEN = 401
NOT_FOUND = 404
CONFLICT = 409
NOT_HERE = 410
TOO_LARGE = 413
INTERNAL_ERROR = 500
NOT_IMPLEMENTED = 501
THROTTLED = 503
ignored_params = ['_dc']
page_param = __page
start_param = __start
limit_param = __limit
sort_param = __sort
format_param = __format
query_param = __query
only_param = __only
in_param = __in
fav_status = fav_status
default_ordering = []
js_app_class
launch_access
apply_bulk_fields(self, data)

Pass data through bulk_field_* handlers to enrich instance_to_dict result :param data: dict or list of dicts :return: dict or list of dicts

deserialize(self, data)
deserialize_form(self, request)
response(self, content='', status=200)
fav_convert(self, item)

Convert favorite item from string to storage format

get_favorite_items(self, user)

Returns a set of user’s favorite items

extra_query(self, q, order)
cleaned_query(self, q)
queryset(self, request, query=None)
instance_to_dict(self, o)
list_data(self, request, formatter)

Returns a list of requested object objects

clean_list_data(self, data)

Finally process list_data result. Override to enrich with additional fields :param data: :return:

api_favorites_app(self, request, action)

Set/reset favorite app status

api_favorites_items(self, request, item, action)

Set/reset favorite items

api_future_status(self, request, f_id)
submit_slow_op(self, request, fn, *args, **kwargs)