Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
infra
kiwi
tcmscontrib
Commits
6ca05585
Commit
6ca05585
authored
Nov 25, 2021
by
Nicolas Gelot
Browse files
Bootstrap kiwi plugin
parent
f1e17546
Pipeline
#148313
passed with stage
in 58 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
pyproject.toml
View file @
6ca05585
...
...
@@ -41,3 +41,6 @@ dev = [
[project.urls]
Source
=
"https://gitlab.e.foundation/e/infra/kiwi/tcms_gitlab_efoundation_plugin"
[project.entry-points."kiwitcms.plugins"]
report
=
"tcmscontrib.report"
tcmscontrib/report/__init__.py
0 → 100644
View file @
6ca05585
tcmscontrib/report/menu.py
0 → 100644
View file @
6ca05585
from
django.urls
import
reverse_lazy
# Follows the format of ``tcms.settings.common.MENU_ITEMS``
MENU_ITEMS
=
[
(
"Device report"
,
reverse_lazy
(
"device-report"
)),
]
tcmscontrib/report/templates/report/device.html
0 → 100644
View file @
6ca05585
{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Generate device report" %}{% endblock %}
{% block body_class %}cards-pf{% endblock %}
{% block contents %}
<div
class=
"container-fluid container-cards-pf"
>
<form
class=
"form-horizontal"
method=
"get"
>
{% csrf_token %}
<div
class=
"form-group"
>
<label
class=
"col-md-1 col-lg-1"
for=
"id_product"
>
{% trans "Product" %}
</label>
<div
class=
"col-md-3 col-lg-3"
>
<select
class=
"form-control"
id=
"id_product"
>
<option
value=
""
>
----------
</option>
{% for option in form.product.field.queryset %}
<option
value=
"{{ option.pk }}"
{%
if
form.product.value
|
add:
'0'
==
option.pk
%}
selected
{%
endif
%}
>
{{ option.name }}
</option>
{% endfor %}
</select>
</div>
<label
class=
"col-md-1 col-lg-1"
for=
"id_tag"
>
{% trans "Tag" %}
</label>
<div
class=
"col-md-3 col-lg-3"
>
<input
id=
"id_tag"
type=
"text"
class=
"form-control"
value=
"{{ form.tag.value|default:'' }}"
>
<p
class=
"help-block"
>
{% trans "Separate multiple values with comma (,)" %}
</p>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-md-1 col-lg-1"
>
<button
id=
"btn_search"
type=
"submit"
class=
"btn btn-default btn-lg"
>
{% trans "Search" %}
</button>
</div>
</div>
</form>
{% endblock %}
tcmscontrib/report/urls.py
0 → 100644
View file @
6ca05585
from
django.urls
import
re_path
from
.
import
views
urlpatterns
=
[
re_path
(
r
"^device/$"
,
views
.
DeviceReport
.
as_view
(),
name
=
"device-report"
),
]
tcmscontrib/report/views.py
0 → 100644
View file @
6ca05585
from
tcms.testruns.views
import
SearchTestRunView
class
DeviceReport
(
SearchTestRunView
):
template_name
=
"report/device.html"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment