mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
🚨 — Improve djlint test and fix its warnings/errors
This commit is contained in:
parent
024fd4c911
commit
76bd10108d
8 changed files with 20 additions and 20 deletions
2
Makefile
2
Makefile
|
@ -21,7 +21,7 @@ cog: ## Run cog, to integrate the CLI options to the docs.
|
||||||
tests: venv ## Run the tests
|
tests: venv ## Run the tests
|
||||||
venv/bin/pytest
|
venv/bin/pytest
|
||||||
djlint: venv ## Format the templates
|
djlint: venv ## Format the templates
|
||||||
venv/bin/djlint --ignore=H030,H031,H006 --lint argos/server/templates/*html
|
venv/bin/djlint --ignore=H030,H031,H006 --profile jinja --lint argos/server/templates/*html
|
||||||
pylint: venv ## Runs pylint on the code
|
pylint: venv ## Runs pylint on the code
|
||||||
venv/bin/pylint argos
|
venv/bin/pylint argos
|
||||||
lint: djlint pylint
|
lint: djlint pylint
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>Agents</h2>{% endblock %}
|
{% block title %}<h2>Agents</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<table role="grid">
|
<table role="grid">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -17,4 +17,4 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -52,11 +52,11 @@
|
||||||
<main class="container">
|
<main class="container">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% endblock %}
|
{% endblock title %}
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="text-center">
|
<footer class="text-center">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>{{ domain }}</h2>{% endblock %}
|
{% block title %}<h2>{{ domain }}</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="domains" class="frame">
|
<div id="domains" class="frame">
|
||||||
<table id="domains-list" role="grid">
|
<table id="domains-list" role="grid">
|
||||||
|
@ -25,9 +25,9 @@
|
||||||
href="{{ url_for('get_result_view', result_id=task.last_result.id) }}">
|
href="{{ url_for('get_result_view', result_id=task.last_result.id) }}">
|
||||||
{% if task.status == "success" %}
|
{% if task.status == "success" %}
|
||||||
✅ Success
|
✅ Success
|
||||||
{% elif task.status == "error"%}
|
{% elif task.status == "error" %}
|
||||||
⚠ Error
|
⚠ Error
|
||||||
{% elif task.status == "failure"%}
|
{% elif task.status == "failure" %}
|
||||||
❌ Failure
|
❌ Failure
|
||||||
{% elif task.status == "unknown" %}
|
{% elif task.status == "unknown" %}
|
||||||
❔ Unknown
|
❔ Unknown
|
||||||
|
@ -43,4 +43,4 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>Tasks list</h2>{% endblock %}
|
{% block title %}<h2>Tasks list</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="domains" class="frame">
|
<div id="domains" class="frame">
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{{ domains | length}} domains,
|
{{ domains | length }} domains,
|
||||||
{{ total_task_count }} tasks,
|
{{ total_task_count }} tasks,
|
||||||
<a href="{{ url_for('get_agents_view') }}">
|
<a href="{{ url_for('get_agents_view') }}">
|
||||||
{{ agents | length }} agent{{ 's' if agents | length > 1 }}
|
{{ agents | length }} agent{{ 's' if agents | length > 1 }}
|
||||||
|
@ -45,9 +45,9 @@
|
||||||
<td class="status highlight">
|
<td class="status highlight">
|
||||||
{% if status == "ok" %}
|
{% if status == "ok" %}
|
||||||
✅ OK
|
✅ OK
|
||||||
{% elif status == "warning"%}
|
{% elif status == "warning" %}
|
||||||
⚠️ Warning
|
⚠️ Warning
|
||||||
{% elif status == "critical"%}
|
{% elif status == "critical" %}
|
||||||
❌ Critical
|
❌ Critical
|
||||||
{% elif status == "unknown" %}
|
{% elif status == "unknown" %}
|
||||||
❔ Unknown
|
❔ Unknown
|
||||||
|
@ -76,4 +76,4 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>Dashboard</h2>{% endblock %}
|
{% block title %}<h2>Dashboard</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="domains" class="frame">
|
<div id="domains" class="frame">
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
@ -69,4 +69,4 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>{{ result }}</h2>{% endblock %}
|
{% block title %}<h2>{{ result }}</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Task</dt>
|
<dt>Task</dt>
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
<dt>Context</dt>
|
<dt>Context</dt>
|
||||||
<dd>{{ result.context }}</dd>
|
<dd>{{ result.context }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}<h2>{{ task }}</h2>{% endblock %}
|
{% block title %}<h2>{{ task }}</h2>{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<code>{{ description }}</code>
|
<code>{{ description }}</code>
|
||||||
<table role="grid">
|
<table role="grid">
|
||||||
|
@ -23,4 +23,4 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in a new issue