-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically generated by python-semantic-release
- Loading branch information
github-actions
committed
Sep 5, 2023
1 parent
c9d80c5
commit 15979e2
Showing
13 changed files
with
470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{% load static %} | ||
{% load compress %} | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}"> | ||
<title>Entirety - {% block title %}(Title){% endblock %}</title> | ||
|
||
|
||
{% compress css %} | ||
<link type="text/x-scss" href="{% static 'scss/style.scss' %}" rel="stylesheet" media="screen"> | ||
<link type="text/x-scss" href="{% static 'bootstrap-icons/scss/bootstrap-icons.scss' %}" rel="stylesheet" | ||
media="screen"> | ||
{% endcompress %} | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-dark bg-dark sticky-top"> | ||
<div class="container-fluid"> | ||
<div> | ||
<button class="navbar-toggler me-2" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar" | ||
aria-controls="sidebar" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<a class="navbar-brand" href="{% url "home" %}"> | ||
<img src="{% static 'img/n5geh.png' %}" alt="project logo" height="30" | ||
class="d-inline-block align-text-top"> | ||
<img src="{% static 'img/fiware.gif' %}" alt="fiware" height="30" | ||
class="d-inline-block align-text-top"> | ||
{# <img src="{% static 'img/Entirety-logo.png' %}" alt="fiware" height="30"#} | ||
{# class="d-inline-block align-text-top">#} | ||
</a> | ||
</div> | ||
<div class="d-none d-sm-flex"> | ||
{% include 'auth.html' %} | ||
</div> | ||
|
||
</div> | ||
</nav> | ||
|
||
<div class="container-fluid ps-0 d-flex"> | ||
{% include 'sidebar.html' %} | ||
<main class="d-flex flex-column flex-fill ps-4 pe-3 py-3"> | ||
{% include 'messages.html' %} | ||
{% block content %}(no content - should not be here) {% endblock %} | ||
</main> | ||
{% include 'modal.html' %} | ||
{% include 'toast.html' %} | ||
</div> | ||
|
||
|
||
<script src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}" type="text/javascript"></script> | ||
<script src="{% static 'htmx/js/htmx.min.js' %}" type="text/javascript"></script> | ||
|
||
{% compress js %} | ||
<script> | ||
document.body.addEventListener('htmx:configRequest', (event) => { | ||
event.detail.headers['X-CSRFToken'] = '{{ csrf_token }}'; | ||
}) | ||
</script> | ||
<script src="{% static 'js/main.js' %}"></script> | ||
<script src="{% static 'js/dialog.js' %}"></script> | ||
<script src="{% static 'js/toast.js' %}"></script> | ||
<script src="{% static 'js/modal.js' %}"></script> | ||
{% endcompress %} | ||
|
||
{% compress js %} | ||
{% block scripts %} | ||
|
||
{% endblock %} | ||
{% endcompress %} | ||
|
||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
{% load static %} | ||
{% load compress %} | ||
{% load crispy_forms_tags %} | ||
|
||
<div class="accordion mt-3" id="accordionPanelsStayOpenExample"> | ||
{% if basic_info is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingOne"> | ||
<button class="accordion-button" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" | ||
aria-controls="panelsStayOpen-collapseOne"> | ||
<i class="bi bi-info-circle me-2"></i> | ||
Basic Information | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseOne" class="accordion-collapse collapse show" | ||
aria-labelledby="panelsStayOpen-headingOne"> | ||
<div class="accordion-body"> | ||
{% crispy basic_info %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% if attributes is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingTwo"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#panelsStayOpen-collapseTwo" aria-expanded="false" | ||
aria-controls="panelsStayOpen-collapseTwo"> | ||
<i class="bi bi-braces-asterisk me-2"></i> | ||
Attributes | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseTwo" class="accordion-collapse collapse" | ||
aria-labelledby="panelsStayOpen-headingTwo"> | ||
<div class="accordion-body"> | ||
<div class="empty_form d-none"> | ||
{{ attributes.empty_form|crispy }} | ||
</div> | ||
<div class="container d-flex flex-wrap row mb-3"> | ||
<div class="col"> | ||
<button class="add-form btn btn-success rounded-pill btn-sm"><i class="bi bi-plus"></i> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="form-container container d-flex flex-wrap row g-5"> | ||
{% crispy attributes attributes.form.helper %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% if commands is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingThree"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseThree" aria-expanded="false" aria-controls="panelsStayOpen-collapseThree"> | ||
<i class="bi bi-command me-2"></i> | ||
Commands | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseThree" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingThree"> | ||
<div class="accordion-body"> | ||
<div class="empty_form d-none"> | ||
{{ commands.empty_form|crispy }} | ||
</div> | ||
<div class="container d-flex flex-wrap row mb-3"> | ||
<div class="col"> | ||
<button class="add-form btn btn-success rounded-pill btn-sm"><i class="bi bi-plus"></i> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="form-container container d-flex flex-wrap row g-5"> | ||
{% crispy commands commands.form.helper %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% for template_set in template_form_set %} | ||
<div class="container-fluid pb-5"> | ||
<div class="h4"><i class="bi bi-server"></i> {{ template_set.entity_id }}</div> | ||
{% if template_set.subscriptions is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingFour_{{ forloop.counter }}"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#panelsStayOpen-collapseFour_{{ forloop.counter }}" aria-expanded="false" | ||
aria-controls="panelsStayOpen-collapseFour_{{ forloop.counter }}"> | ||
<i class="bi bi-braces-asterisk me-2"></i> | ||
Subscriptions | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseFour_{{ forloop.counter }}" class="accordion-collapse collapse" | ||
aria-labelledby="panelsStayOpen-headingFour_{{ forloop.counter }}"> | ||
<div class="accordion-body"> | ||
<div class="empty_form d-none"> | ||
{{ template_set.subscriptions.empty_form|crispy }} | ||
</div> | ||
<div class="form-container container d-flex flex-wrap row g-5"> | ||
{% crispy template_set.subscriptions template_set.subscriptions.form.helper %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% if template_set.devices is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingFive_{{ forloop.counter }}"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#panelsStayOpen-collapseFive_{{ forloop.counter }}" aria-expanded="false" | ||
aria-controls="panelsStayOpen-collapseFive_{{ forloop.counter }}"> | ||
<i class="bi bi-braces-asterisk me-2"></i> | ||
Devices | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseFive_{{ forloop.counter }}" class="accordion-collapse collapse" | ||
aria-labelledby="panelsStayOpen-headingFive_{{ forloop.counter }}"> | ||
<div class="accordion-body"> | ||
<div class="empty_form d-none"> | ||
{{ template_set.devices.empty_form|crispy }} | ||
</div> | ||
<div class="form-container container d-flex flex-wrap row g-5"> | ||
{% crispy template_set.devices template_set.devices.form.helper %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% if template_set.relationships is not None %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="panelsStayOpen-headingSix_{{ forloop.counter }}"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#panelsStayOpen-collapseSix_{{ forloop.counter }}" aria-expanded="false" | ||
aria-controls="panelsStayOpen-collapseSix_{{ forloop.counter }}"> | ||
<i class="bi bi-braces-asterisk me-2"></i> | ||
Relationships | ||
</button> | ||
</h2> | ||
<div id="panelsStayOpen-collapseSix_{{ forloop.counter }}" class="accordion-collapse collapse" | ||
aria-labelledby="panelsStayOpen-headingSix_{{ forloop.counter }}"> | ||
<div class="accordion-body"> | ||
<div class="empty_form d-none"> | ||
{{ template_set.relationships.empty_form|crispy }} | ||
</div> | ||
<div class="form-container container d-flex flex-wrap row g-5"> | ||
{% crispy template_set.relationships template_set.relationships.form.helper %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
|
||
{% compress js %} | ||
<script src="{% static 'js/accordion.js' %}"></script> | ||
{% endcompress %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% if user.is_authenticated %} | ||
<div class="dropdown"> | ||
<a href="#" | ||
class="d-none d-sm-flex nav-link d-inline-flex justify-content-center align-items-center justify-content-center text-white text-decoration-none dropdown-toggle" | ||
id="dd_user" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<i class="bi bi-person-fill me-1" style="font-size: 1.5rem;"></i> | ||
<span class="d-none d-md-inline mx-1">{{ user.username }}</span> | ||
</a> | ||
<a href="#" class="d-sm-none nav-link py-md-2" | ||
id="dd_user" data-bs-toggle="dropdown" aria-expanded="false" title="User"> | ||
<i class="bi bi-person-fill"></i> | ||
</a> | ||
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-sm-end text-small shadow " aria-labelledby="dd_user"> | ||
<li><a class="dropdown-item" href="{% url 'user' %}">Profile</a></li> | ||
<li> | ||
<hr class="dropdown-divider"> | ||
</li> | ||
<li> | ||
<form action="{% url 'logout' %}" method="post"> | ||
{% csrf_token %} | ||
<input class="dropdown-item" type="submit" value="Logout"> | ||
</form> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
{% else %} | ||
<a href="{% url 'login' %}" | ||
class="d-none d-sm-flex nav-link d-flex justify-content-center align-items-center justify-content-center text-white text-decoration-none"> | ||
<i class="bi bi-person me-md-1" style="font-size: 1.5em"></i> | ||
<span class="d-none d-md-inline mx-1">Login</span> | ||
</a> | ||
<a href="{% url "login" %}" class="d-sm-none nav-link py-md-2" | ||
data-bs-toggle="tooltip" data-bs-placement="right" data-bs-custom-class="d-md-none" | ||
title="Login"> | ||
<i class="bi bi-person"></i> | ||
</a> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<i class="small bi bi-record-fill icon-red"></i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends '_base.html' %} | ||
|
||
{% block title %}Error {{ error_code }}{% endblock %} | ||
|
||
{% block content %} | ||
<div class="d-flex"> | ||
{# TODO: use custom error layout, but hey cats :D #} | ||
<img src="https://http.cat/{{ error_code }}.jpg" class="rounded mx-auto d-block" alt="..."> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<i class="small bi bi-record-fill icon-green"></i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{% extends '_base.html' %} | ||
{% load static %} | ||
|
||
{% block title %}Home{% endblock %} | ||
|
||
{% block page_title %}Entirety{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container page-item"> | ||
<div class="col-md-8"> | ||
<img src="{% static 'img/Entirety-logo.png' %}" alt="fiware" height="30" width="60" | ||
class="d-inline-block align-text-top"> | ||
<span class="h1 color-inherit">The Entirety Tool</span> | ||
<p> | ||
<br> | ||
Entirety is web-based tool developed to facilitate the work with dedicated FIWARE APIs. Entirety is | ||
structured in | ||
different applications (Apps) and projects; Apps are developed to interact with | ||
FIWARE Generic Enablers (GEs), and projects are used to separate the database into independent data spaces. | ||
Entirety is based on Python and the Django framework. For the interaction with FIWARE GEs, | ||
the FIWARE Library for Python (<a href="https://pypi.org/project/filip/">FiLiP</a>) is used. At the moment, FiLiP only supports NGSI-v2, therefore Entirety also only supports NGSI-v2. | ||
Once NGSI-LD is supported by FiLiP, we plan to integrate these features in Entirety as well. | ||
</p> | ||
|
||
<p>Find more details on Github Entirety <a href="https://github.com/N5GEH/n5geh.tools.entirety2#readme">Readme</a> | ||
and more upcoming features on the <a | ||
href="https://github.com/N5GEH/n5geh.tools.entirety2/tree/development/docs/ROADMAP.md">Roadmap</a>. | ||
</p> | ||
|
||
<p></p> | ||
|
||
<h3>Applications</h3> | ||
<p> | ||
Currently, Entirety supports interaction with the following Generic Enablers: | ||
<a href="https://fiware-orion.readthedocs.io/en/master//">Orion</a>, | ||
<a href="https://fiware-iotagent-json.readthedocs.io/en/latest/">IoT Agent-JSON</a>, | ||
and <a href="https://quantumleap.readthedocs.io/en/latest/">QuantumLeap</a>. | ||
Accordingly, the Apps "Entities", "Devices", and "Notifications" are developed to | ||
communicate with these GEs. Which App shall be loaded can be configured in the .env file at startup of Entirety. | ||
</p> | ||
|
||
<h3>Projects</h3> | ||
<p>According to FIWARE's way of separating data for multi-tenancy applications using the HTTP header | ||
"fiware-service", Entirety uses projects that are bound to specific "fiware-service" headers. This way, | ||
projects can only access data that they created and are authorized for. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% if messages %} | ||
<ul class="messages"> | ||
{% for message in messages %} | ||
<div class="alert {{ message.tags }} alert-dismissible" role="alert"> | ||
{{ message }} | ||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> | ||
</div> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- Placeholder for modal --> | ||
<div id="m_general" class="modal fade"> | ||
<div id="dg_general" class="modal-dialog" hx-target="this"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% load crispy_forms_tags %} | ||
|
||
<form hx-post="{{ request.path }}" class="modal-content"> | ||
{% csrf_token %} | ||
<div class="modal-header"> | ||
<h5 class="modal-title">{% block modal_title %}{% endblock %}</h5> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
{% block modal_body %} | ||
{{ form|crispy }} | ||
{% endblock %} | ||
</div> | ||
<div class="modal-footer"> | ||
{% block modal_footer %} | ||
<button type="button" data-bs-dismiss="modal" class="btn btn-secondary">Cancel</button> | ||
<button type="submit" class="btn btn-primary">Confirm</button> | ||
{% endblock %} | ||
</div> | ||
</form> |
Oops, something went wrong.