diff --git a/Frontend/Frontend/settings.py b/Frontend/Frontend/settings.py index 933bc67..ce8cd23 100644 --- a/Frontend/Frontend/settings.py +++ b/Frontend/Frontend/settings.py @@ -48,6 +48,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'app.apps.AppConfig', + 'datetimepicker', ] MIDDLEWARE = [ diff --git a/Frontend/Frontend/urls.py b/Frontend/Frontend/urls.py index e776a1b..03c6536 100644 --- a/Frontend/Frontend/urls.py +++ b/Frontend/Frontend/urls.py @@ -19,7 +19,10 @@ from app.views import profile, home, checkTests, checkTestInfo, editProfile, updateProfile, \ createUser, userCreation, validateUser, saveUser, rankUp, listUsers, editUser, processUser, \ - searchUser, networkStatus, processNode, searchTest, calendar, registerTest, checkTestInfoAdmin, checkTestsAdmin, searchTestAdmin + searchUser, networkStatus, processNode, searchTest, calendar, registerTest, checkTestInfoAdmin, \ + checkTestsAdmin, searchTestAdmin, createAcessPoint, processAP, registerTestSave + + urlpatterns = [ path('admin/', admin.site.urls), @@ -46,6 +49,9 @@ path('create/user/validate/save/', saveUser, name="savepassword"), path('network/status/', networkStatus, name="networkstatus"), path('network/status/', processNode, name="nodestatus"), + path('network/create/AP', createAcessPoint, name="createap"), + path('network/create/AP/save', processAP, name="saveap"), path('calendar/', calendar, name='calendar'), - path('calendar/test', registerTest, name='registertest') + path('calendar/test', registerTest, name='registertest'), + path('calendar/test/save', registerTestSave, name='registertestsave') ] diff --git a/Frontend/app/forms.py b/Frontend/app/forms.py new file mode 100644 index 0000000..99c495b --- /dev/null +++ b/Frontend/app/forms.py @@ -0,0 +1,4 @@ +from django import forms + + + diff --git a/Frontend/app/templates/calendar/calendar.html b/Frontend/app/templates/calendar/calendar.html index e00eb0f..7eeb4ad 100644 --- a/Frontend/app/templates/calendar/calendar.html +++ b/Frontend/app/templates/calendar/calendar.html @@ -11,47 +11,21 @@


- Register Test -
+
diff --git a/Frontend/app/templates/calendar/registerTest.html b/Frontend/app/templates/calendar/registerTest.html index 8bdab66..f642fb4 100644 --- a/Frontend/app/templates/calendar/registerTest.html +++ b/Frontend/app/templates/calendar/registerTest.html @@ -1,9 +1,14 @@ {% extends 'structure/layout.html' %} -{% block headers %} -{% endblock %} - {% block content %} + + {% if messages %} + {% for message in messages %} + {% if message.tags %} + {% endif %} + {% endfor %} + {% endif %} +
+ placeholder="Nome" class="form-control input-lg" value="{{ name }}" required>
@@ -23,10 +28,7 @@
- - +
@@ -34,10 +36,7 @@
- - +
@@ -50,13 +49,4 @@ - - - - - {% endblock %} \ No newline at end of file diff --git a/Frontend/app/templates/network/create/AP.html b/Frontend/app/templates/network/create/AP.html new file mode 100644 index 0000000..7ec5428 --- /dev/null +++ b/Frontend/app/templates/network/create/AP.html @@ -0,0 +1,93 @@ +{% extends 'structure/layout.html' %} + +{% block content %} +
+
+
+ {% csrf_token %} +
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/Frontend/app/templates/network/nodeInfo.html b/Frontend/app/templates/network/nodeInfo.html index 1e2c6f0..c812019 100644 --- a/Frontend/app/templates/network/nodeInfo.html +++ b/Frontend/app/templates/network/nodeInfo.html @@ -14,6 +14,13 @@ {% endblock %} {% block content %} + {% if messages %} + {% for message in messages %} + {% if message.tags %} + {% endif %} + {% endfor %} + {% endif %} +

{{ hostname }} - Information


@@ -27,11 +34,16 @@

{{ hostname }} - Information

Netmask Peer MAC - {% if i.ip == '127.0.0.1' %} {% else %} - Abrir Terminal{% endif %} + {% if access == 1 %} + {% if i.ip == '127.0.0.1' %} {% else %} + {% if role == 1 %} + Abrir Terminal + {% else %} {% endif %} + {% endif %} + {% endif %} @@ -51,6 +63,30 @@

{{ hostname }} - Information

{% endfor %} - + {% if ongoing == 1 %} + {% if access == 1 %} + {% if isAdmin == 1 %} +
OBS: there is on ongoing test. you can interact with this node using your admin + permissions.
+ {% endif %} + {% else %} + {% if role == 0 %} +
OBS: there is on ongoing test! you can't interact with this node because you + are a beginner.
+ {% endif %} + {% endif %} + {% else %} + {% if isAdmin == 1 %} +
OBS: there is on ongoing test you can interact with this node using your admin + permissions.
+ {% else %} +
OBS: there is no on ongoing test! +
+
To interact with this node please book an experience.
+ {% endif %} + {% endif %} + {% if access == 1 %} + Create Access Point + {% endif %}
{% endblock %} \ No newline at end of file diff --git a/Frontend/app/templates/structure/layout.html b/Frontend/app/templates/structure/layout.html index 81c9ec8..6ad25b3 100644 --- a/Frontend/app/templates/structure/layout.html +++ b/Frontend/app/templates/structure/layout.html @@ -38,12 +38,13 @@ {% if request.resolver_match.url_name == 'search' %} class="nav-item active" {% else %} class="nav-item" {% endif %}> {% if request.user.is_authenticated %} -