Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mentat-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
mentat-test
Commits
54865745
Commit
54865745
authored
2 years ago
by
Rajmund Hruška
Browse files
Options
Downloads
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/sphinx/_doclib/hawat_plugin_reports.rst
+1
-1
1 addition, 1 deletion
doc/sphinx/_doclib/hawat_plugin_reports.rst
lib/hawat/blueprints/reports/__init__.py
+12
-0
12 additions, 0 deletions
lib/hawat/blueprints/reports/__init__.py
with
13 additions
and
1 deletion
doc/sphinx/_doclib/hawat_plugin_reports.rst
+
1
−
1
View file @
54865745
...
...
@@ -10,7 +10,7 @@ This pluggable module provides access to periodical event reports.
Provided endpoints
--------------------------------------------------------------------------------
``/api/
even
ts/dashboard``
``/api/
repor
ts/dashboard``
* *Reference:* :ref:`section-hawat-plugin-reports-webapi-dashboard`
...
...
This diff is collapsed.
Click to expand it.
lib/hawat/blueprints/reports/__init__.py
+
12
−
0
View file @
54865745
...
...
@@ -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
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment