Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.web
Commits
cf48331a
Commit
cf48331a
authored
4 years ago
by
Samuel GAIST
Committed by
Flavio TARSETTI
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[databases][templatetags] Pre-commit cleanup
parent
0145bfb7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!350
Cleanup databases
,
!342
Django 3 migration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/databases/templatetags/database_tags.py
+8
-17
8 additions, 17 deletions
beat/web/databases/templatetags/database_tags.py
with
8 additions
and
17 deletions
beat/web/databases/templatetags/database_tags.py
+
8
−
17
View file @
cf48331a
...
...
@@ -28,13 +28,12 @@
from
django
import
template
register
=
template
.
Library
()
@register.inclusion_tag
(
'
databases/panels/table.html
'
,
takes_context
=
True
)
@register.inclusion_tag
(
"
databases/panels/table.html
"
,
takes_context
=
True
)
def
database_table
(
context
,
objects
,
id
):
'''
Composes a database list table
"""
Composes a database list table
This panel primarily exists for user
'
s database list page.
...
...
@@ -44,18 +43,14 @@ def database_table(context, objects, id):
id: The HTML id to set on the generated table. This is handy for the
filter functionality normally available on list pages.
'''
"""
return
dict
(
request
=
context
[
'
request
'
],
objects
=
objects
,
panel_id
=
id
,
)
return
dict
(
request
=
context
[
"
request
"
],
objects
=
objects
,
panel_id
=
id
,)
@register.inclusion_tag
(
'
databases/panels/actions.html
'
,
takes_context
=
True
)
@register.inclusion_tag
(
"
databases/panels/actions.html
"
,
takes_context
=
True
)
def
database_actions
(
context
,
object
,
display_count
):
'''
Composes the action buttons for a particular database
"""
Composes the action buttons for a particular database
This panel primarily exists for showing action buttons for a given
database taking into consideration it is being displayed for a given user.
...
...
@@ -68,9 +63,5 @@ def database_actions(context, object, display_count):
display the number of protocols as a button (useful for the list
view)
'''
return
dict
(
request
=
context
[
'
request
'
],
object
=
object
,
display_count
=
display_count
,
)
"""
return
dict
(
request
=
context
[
"
request
"
],
object
=
object
,
display_count
=
display_count
,)
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