From a5de0a92d880dbdbc1fd8c64dab27f189fa55282 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 30 Oct 2024 12:34:14 +0100 Subject: [PATCH 1/2] add ev eraseserver template --- evidence/templates/ev_eraseserver.html | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 evidence/templates/ev_eraseserver.html diff --git a/evidence/templates/ev_eraseserver.html b/evidence/templates/ev_eraseserver.html new file mode 100644 index 0000000..db7faaf --- /dev/null +++ b/evidence/templates/ev_eraseserver.html @@ -0,0 +1,61 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+
+

{{ object.id }}

+
+
+ +
+
+ +
+
+
+ +
+ + {% load django_bootstrap5 %} +
+
+ {% csrf_token %} + {% if form.errors %} + + {% endif %} + {% bootstrap_form form %} +
+ +
+
+
+
+
+{% endblock %} From 2636e80ece8122da9df58ca9670bf7a72eccff8e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 30 Oct 2024 15:17:15 +0100 Subject: [PATCH 2/2] error in build but not lock the flow --- evidence/management/commands/up_snapshots.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/evidence/management/commands/up_snapshots.py b/evidence/management/commands/up_snapshots.py index 3cb12fa..4f38288 100644 --- a/evidence/management/commands/up_snapshots.py +++ b/evidence/management/commands/up_snapshots.py @@ -1,12 +1,15 @@ - import os import json +import logging from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from evidence.parse import Build +logger = logging.getLogger('django') + + User = get_user_model() @@ -47,4 +50,8 @@ class Command(BaseCommand): def parsing(self): for s in self.snapshots: - self.devices.append(Build(s, self.user)) + try: + self.devices.append(Build(s, self.user)) + except Exception as err: + logger.exception(err) +