- Added a button to sync ESET data in the hardware detail view. - Introduced a new tab for ESET specifications, displaying relevant device information. - Included ESET UUID and group details in the hardware information section. - Implemented a JavaScript function to handle ESET data synchronization via API. - Updated the ESET import template to improve device listing and inline contact selection. - Enhanced the Nextcloud and locations routers to support customer ID resolution from contacts. - Added utility functions for retrieving customer IDs linked to contacts. - Removed debug information from the service contract wizard for cleaner output.
169 lines
5.5 KiB
HTML
169 lines
5.5 KiB
HTML
{% extends "shared/frontend/base.html" %}
|
|
|
|
{% block title %}ESET Oversigt - Hardware - BMC Hub{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
.page-header {
|
|
margin-bottom: 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.section-card {
|
|
background: var(--bg-card);
|
|
border-radius: 12px;
|
|
border: 1px solid rgba(0,0,0,0.1);
|
|
padding: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 1.2rem;
|
|
font-weight: 700;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.table thead th {
|
|
font-size: 0.85rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.02em;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.badge-severity {
|
|
font-size: 0.75rem;
|
|
padding: 0.35rem 0.6rem;
|
|
border-radius: 999px;
|
|
color: white;
|
|
background: #dc3545;
|
|
}
|
|
|
|
.badge-high {
|
|
background: #fd7e14;
|
|
}
|
|
|
|
.badge-severe {
|
|
background: #6f42c1;
|
|
}
|
|
|
|
.empty-state {
|
|
padding: 1.5rem;
|
|
border: 1px dashed rgba(0,0,0,0.2);
|
|
border-radius: 10px;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
background: var(--bg-body);
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid" style="margin-top: 2rem; max-width: 1400px;">
|
|
<div class="page-header">
|
|
<h1>🛡️ ESET Oversigt</h1>
|
|
<div class="d-flex gap-2">
|
|
<a href="/hardware/eset/import" class="btn btn-outline-secondary">Import</a>
|
|
<a href="/hardware/eset/test" class="btn btn-outline-secondary">ESET Test</a>
|
|
<a href="/hardware" class="btn btn-outline-secondary">Tilbage til hardware</a>
|
|
</div>
|
|
</div>
|
|
{% if current_user %}
|
|
<div class="mb-3 text-muted small">
|
|
Logget ind som {{ current_user.full_name or current_user.username or current_user.email }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="section-card">
|
|
<div class="section-title">🔗 Matchede enheder</div>
|
|
{% if matches %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>Hardware</th>
|
|
<th>Serial</th>
|
|
<th>ESET UUID</th>
|
|
<th>ESET Gruppe</th>
|
|
<th>Kontakt</th>
|
|
<th>Company</th>
|
|
<th>Kunde</th>
|
|
<th>Opdateret</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in matches %}
|
|
<tr>
|
|
<td>
|
|
<a href="/hardware/{{ row.id }}">
|
|
{{ row.brand or '' }} {{ row.model or '' }}
|
|
</a>
|
|
</td>
|
|
<td>{{ row.serial_number or '-' }}</td>
|
|
<td style="max-width: 220px; word-break: break-all;">{{ row.eset_uuid or '-' }}</td>
|
|
<td style="max-width: 220px; word-break: break-all;">{{ row.eset_group or '-' }}</td>
|
|
<td>
|
|
{% if row.contact_id %}
|
|
{{ row.first_name or '' }} {{ row.last_name or '' }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ row.user_company or '-' }}</td>
|
|
<td>{{ row.customer_name or '-' }}</td>
|
|
<td>{{ row.updated_at or '-' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state">Ingen matchede enheder fundet endnu.</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="section-card">
|
|
<div class="section-title">🚨 Kritiske incidents</div>
|
|
{% if incidents %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>Severity</th>
|
|
<th>Status</th>
|
|
<th>Device UUID</th>
|
|
<th>Detected</th>
|
|
<th>Last Seen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for inc in incidents %}
|
|
<tr>
|
|
<td>
|
|
{% set sev = (inc.severity or '')|lower %}
|
|
<span class="badge-severity {% if sev == 'high' %}badge-high{% elif sev == 'severe' %}badge-severe{% endif %}">
|
|
{{ inc.severity or 'critical' }}
|
|
</span>
|
|
</td>
|
|
<td>{{ inc.status or '-' }}</td>
|
|
<td style="max-width: 220px; word-break: break-all;">{{ inc.device_uuid or '-' }}</td>
|
|
<td>{{ inc.detected_at or '-' }}</td>
|
|
<td>{{ inc.last_seen or '-' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state">Ingen kritiske incidents lige nu.</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|