update
This commit is contained in:
parent
91f2f409d6
commit
34f60011a3
3 changed files with 90 additions and 15 deletions
|
|
@ -56,12 +56,13 @@
|
|||
<th>URL</th>
|
||||
<th>Categoría</th>
|
||||
<th>País</th>
|
||||
<th>Activo</th>
|
||||
<th style="min-width: 80px;">Estado</th>
|
||||
<th style="min-width: 60px;">Fallos</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for id, nombre, descripcion, url, categoria_id, pais_id, activo, cat_nom, pais_nom in feeds %}
|
||||
{% for id, nombre, descripcion, url, categoria_id, pais_id, activo, fallos, cat_nom, pais_nom in feeds %}
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ nombre }}</strong>
|
||||
|
|
@ -72,15 +73,33 @@
|
|||
<td><a href="{{ url }}" target="_blank">{{ url }}</a></td>
|
||||
<td>{{ cat_nom or 'N/A' }}</td>
|
||||
<td>{{ pais_nom or 'N/A' }}</td>
|
||||
<td>{{ 'Sí' if activo else 'No' }}</td>
|
||||
<td>
|
||||
{% if not activo %}
|
||||
<span class="badge-ko" title="Inactivo: {{ fallos }} fallos">KO</span>
|
||||
{% elif fallos > 0 %}
|
||||
<span class="badge-warn" title="{{ fallos }} fallos recientes">⚠️</span>
|
||||
{% else %}
|
||||
<span class="badge-ok">OK</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if fallos > 0 %}
|
||||
<span style="color:orange;">{{ fallos }}</span>
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="actions">
|
||||
<a href="/edit/{{ id }}">Editar</a> |
|
||||
<a href="/delete/{{ id }}" onclick="return confirm('¿Seguro que quieres eliminar este feed?');">Eliminar</a>
|
||||
{% if not activo %}
|
||||
| <a href="/reactivar_feed/{{ id }}" style="color:#198754;" title="Reactivar feed">Reactivar</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">No hay feeds aún.</td>
|
||||
<td colspan="7">No hay feeds aún.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
@ -101,7 +120,7 @@
|
|||
optionNA.textContent = '— N/A —';
|
||||
selectPais.appendChild(optionNA);
|
||||
paises.forEach(([id, nombre, contId]) => {
|
||||
if (!continenteId || contId == continenteId) {
|
||||
if (!continenteId || contId == continenteId || contId == Number(continenteId)) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = id;
|
||||
opt.textContent = nombre;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue