Skip to content

Commit

Permalink
feat(web): list rpm/deb bin artifact content
Browse files Browse the repository at this point in the history
Add list of files in RPM/Deb binary artifact page. An icon illustrates
the type of files (directory, symlinks or regular files). For regular
files, the size is also displayed.

fix #22
  • Loading branch information
rezib committed Jul 15, 2024
1 parent e21164e commit 255392c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- web:
- Report fatbuildr version in footer of fatbuildrweb HTML pages (#108).
- Support file listing and folders browsing in registries (#65).
- List RPM/Deb binary artifacts content (#22).
- api:
- Add _edit-registry_ permission action.
- Possibility to remove artifact from registries with DELETE verb on
Expand Down
26 changes: 26 additions & 0 deletions conf/web/templates/bin.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,31 @@
Source artifact:
<a href="{{ url_for('artifact', instance=instance, fmt=format, distribution=distribution, derivative=derivative, architecture=source.architecture, artifact=source.name, output='html') }}">{{ source.name }}</a> {{ source.architecture }} {{ source.version }}
{% include 'partials/changelog.html.j2' %}

{% if content|length %}
<h2>Content</h2>
<ul class="list-unstyled">
{% for member in content %}
<li>
{% if member.type == 'd' %}
<i class="bi bi-folder"></i>
{% elif member.type == 'l' %}
<i class="bi bi-box-arrow-up-right"></i>
{% elif member.type == 'f' %}
<i class="bi bi-file-earmark"></i>
{% else %}
<i class="bi bi-file-earmark-excel"></i>
{% endif %}
<span class="font-monospace">
<small>{{ member.path }}</small>
</span>
{% if member.type == 'f' %}
<small>({{ member.size | filesizeformat }})</small>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}

<a href="{{ url_for('artifact', instance=instance, fmt=format, distribution=distribution, derivative=derivative, architecture=architecture, artifact=artifact, output='json') }}">JSON</a>
{% endblock %}
1 change: 1 addition & 0 deletions conf/web/templates/layout/base.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<title>Fatbuildr: {% block title %}{% endblock %}</title>
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ url_for('static', filename='font/bootstrap-icons.min.css') }}" rel="stylesheet"/>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon/favicon-32x32.png') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon/favicon-32x32.png') }}" type="image/x-icon">
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='favicon/favicon-16x16.png') }}">
Expand Down

0 comments on commit 255392c

Please sign in to comment.