Skip to content
Snippets Groups Projects
Commit 54865745 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Merge branch 'hruska-feature-#7578-api-reports' into devel

parents 9a8e75b5 6d85e757
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ This pluggable module provides access to periodical event reports.
Provided endpoints
--------------------------------------------------------------------------------
``/api/events/dashboard``
``/api/reports/dashboard``
* *Reference:* :ref:`section-hawat-plugin-reports-webapi-dashboard`
......
......@@ -456,6 +456,7 @@ class DashboardView(HTMLMixin, AbstractDashboardView): # pylint: disable=locall
"""
View responsible for presenting reporting dashboard in the form of HTML page.
"""
methods = ['GET']
@classmethod
def get_view_name(cls):
......@@ -466,11 +467,22 @@ class APIDashboardView(AJAXMixin, AbstractDashboardView): # pylint: disable=loc
"""
View responsible for presenting reporting dashboard in the form of JSON document.
"""
methods = ['GET','POST']
@classmethod
def get_view_name(cls):
return 'apidashboard'
def process_response_context(self):
super().process_response_context()
# Prevent certain response context keys to appear in final response.
for key in ('items', 'quicksearch_list'):
try:
del self.response_context[key]
except KeyError:
pass
return self.response_context
class DeleteView(HTMLMixin, SQLAlchemyMixin, ItemDeleteView): # pylint: disable=locally-disabled,too-many-ancestors
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment