0001-csvdatasource-beautify-endpoints-39032.patch
passerelle/apps/csvdatasource/templates/csvdatasource/csvdatasource_detail.html | ||
---|---|---|
14 | 14 | |
15 | 15 |
{% block endpoints %} |
16 | 16 |
{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='data' as csvdatasource_data_url %} |
17 |
<ul> |
|
18 |
<li>{% trans "Returning all file lines:" %} |
|
19 |
<a href="{{ csvdatasource_data_url }}">{{ csvdatasource_data_url }}</a> |
|
20 |
</li> |
|
21 |
<ul> |
|
22 |
<li>{% trans "Returning lines containing 'abc' in 'text' column (case insensitive):" %} |
|
23 |
<a href="{{ csvdatasource_data_url }}?q=abc">{{ csvdatasource_data_url }}?q=abc</a> |
|
24 |
</li> |
|
25 |
</ul> |
|
26 |
{% for query in object.query_set.all %} |
|
27 |
<li>{{ query.label }}: |
|
28 |
<a href="{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/">{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/</a> |
|
29 |
{% if query.description %}— {{ query.description }}{% endif %} |
|
30 |
</li> |
|
31 |
{% endfor %} |
|
32 |
</ul> |
|
17 |
<li class="get-method"> |
|
18 |
<span class="description">{% trans "Returning all file lines:" %}</span> |
|
19 |
<a class="example-url" href="{{ csvdatasource_data_url }}">{{ csvdatasource_data_url }}</a> |
|
20 |
<span class="method-name">GET</span> |
|
21 |
</li> |
|
22 |
<li class="get-method"> |
|
23 |
<span class="description">{% trans "Returning lines containing 'abc' in 'text' column (case insensitive):" %}</span> |
|
24 |
<a class="example-url" href="{{ csvdatasource_data_url }}?q=abc">{{ csvdatasource_data_url }}?q=abc</a> |
|
25 |
<span class="method-name">GET</span> |
|
26 |
</li> |
|
27 |
{% for query in object.query_set.all %} |
|
28 |
<li class="get-method"><span class="description">{{ query.label }}:</span> |
|
29 |
<a class="example-url" href="{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/">{% url 'generic-endpoint' connector='csvdatasource' slug=object.slug endpoint='query' rest=query.slug %}/</a> |
|
30 |
{% if query.description %}— {{ query.description }}{% endif %} |
|
31 |
<span class="method-name">GET</span> |
|
32 |
</li> |
|
33 |
{% endfor %} |
|
33 | 34 |
{% endblock %} |
34 | 35 | |
35 | 36 |
{% block extra-sections %} |
passerelle/templates/passerelle/manage/service_view.html | ||
---|---|---|
57 | 57 |
</h3> |
58 | 58 |
<div> |
59 | 59 |
{% if object.api_description %}<p>{{object.api_description|safe}}</p>{% endif %} |
60 |
<ul> |
|
60 | 61 |
{% block endpoints %} |
61 |
<ul> |
|
62 | 62 |
{% for endpoint in object.get_endpoints_infos %} |
63 | 63 |
<li class="{{ endpoint.http_method|default:"get" }}-method">{% if endpoint.description %}<span class="description">{{endpoint.description}}{% trans ':' %}</span>{% endif %} |
64 | 64 |
<a href="{{endpoint.example_url}}" class="example-url">{{ site_base_uri }}{{endpoint.example_url_as_html}}</a> |
... | ... | |
93 | 93 |
{% endif %} |
94 | 94 |
</li> |
95 | 95 |
{% endfor %} |
96 |
</ul> |
|
97 | 96 |
{% endblock %} |
97 |
</ul> |
|
98 | 98 |
</div> |
99 | 99 |
</div> |
100 | 100 | |
101 |
- |