bugfix integration with dpp/dlt #50

Merged
pedro merged 12 commits from fix_build into main 2025-02-14 13:36:40 +00:00
3 changed files with 23 additions and 3 deletions
Showing only changes of commit 8edfaa1bc5 - Show all commits

View file

@ -103,6 +103,8 @@
{% include 'tabs/evidences.html' %}
{% include 'tabs/dpps.html' %}
<!-- Add a note popup -->
<div class="modal fade" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteModalLabel" aria-hidden="true">
<div class="modal-dialog">

View file

@ -0,0 +1,18 @@
{% load i18n %}
<div class="tab-pane fade" id="dpps">
<h5 class="card-title">{% trans 'List of dpps' %}</h5>
<div class="list-group col">
{% for d in dpps %}
<div class="list-group-item">
<div class="d-flex w-100 justify-content-between">
<small class="text-muted">{{ d.timestamp }}</small>
<span>{{ d.type }}</span>
</div>
<p class="mb-1">
<a href="{% url 'did:device_web' d.signature %}">{{ d.signature }}</a>
</p>
</div>
{% endfor %}
</div>
</div>

View file

@ -137,15 +137,15 @@ class PublicDeviceWebView(TemplateView):
dev = Build(d.doc, None, check=True)
doc = dev.build.get_doc()
ev = json.dumps(doc)
phid = dev.get_signature(doc)
phid = dev.sign(ev)
dpp = "{}:{}".format(self.pk, phid)
rr = {
'dpp': dpp,
'document': ev,
'algorithm': ALGORITHM,
'manufacturer DPP': '',
'device': dev.device,
'components': dev.components
'device': dev.build.device,
'components': dev.build.components
}
tmpl = dpp_tmpl.copy()