As workaround for decreasing loading in the UI on unread
notifications fetching we can mark all notifications as read.
For such purposes we add NotificationsMarkAllHandler
Change-Id: I2e6a0daaf8712ab3064df728a8fb463ef805aa06
Partial-Bug: #1657348
For calculation of notifications statuses we made requests in the UI
and fetch all notifications data and process them on the UI side.
We want to replace a polling of the whole notification collection by
a polling of unread notifications number. This dramatically decrease
Fuel UI load in case of a big amount of notifications.
Change-Id: I8f83d4e2d7f58beaf06c489b2264ccb69f9927ce
Partial-Bug: #1657348
Decorator content does too many different actions, so
let's split it into 3 decorators: @handle_errors,
@validate and @serialize. We can skip calling @serialize
in many places, because those methods just raise some
http error.
Also I've changed return value of all handlers from
serialized json (string) to python's structures, lists
and dicts. So It's become possible to implement different
serializers and I've added support for YAML output.
Change-Id: Ia3da3bd809bcca923d53666eca54def78c995f65
Closes-Bug: #1606211
- errors are now returned as tracebacks, not HTML
- added schema checking based on the handler type and validator
- content_json decorator rewritten completely
- common JSON types
- creation of nodes with non-number ID is now forbidden according to scheme
Implements: blueprint nailgun-api-requests-responses-validation
Change-Id: Icf49bb534ccb19872402b66532ef44418bd66a53