diff --git a/web2/_index.php b/web2/_index.php deleted file mode 100644 index 1c010be..0000000 --- a/web2/_index.php +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - IDPS visualization - - - - - - - - - - - - - - - - - -
-
-

Alertes systemes

-

meilleur outil de surveillance du monde

- Alertes -
-
- -
-
-
-
-

Liste des Attaques

-

veuillez selectionner les filtres de recherche ou parcourez la liste ci-dessous

- - -
- -
- -
- -
- -
- - -
- -
-
- - - - - - - - - - - - - - - - - - -
DateNom alerteAppareil de détectionAdresse sourceNiveau d'alerte
- - - - - -
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/web2/index.html b/web2/index.html index 8233f3f..3311ea1 100644 --- a/web2/index.html +++ b/web2/index.html @@ -12,7 +12,7 @@ - + @@ -29,15 +29,6 @@ type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> -
diff --git a/web2/js/ajax.js b/web2/js/ajax.js index ab9cab2..cc4da6e 100644 --- a/web2/js/ajax.js +++ b/web2/js/ajax.js @@ -8,8 +8,7 @@ // \param url The url with the data. // \param callback The callback to call where the request is successful. // \param data The data associated with the request. -function ajaxRequest(type, url, callback, data = null) -{ +function ajaxRequest(type, url, callback, data = null) { let xhr; // Create XML HTTP request. @@ -20,10 +19,8 @@ function ajaxRequest(type, url, callback, data = null) xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); // Add the onload function. - xhr.onload = () => - { - switch (xhr.status) - { + xhr.onload = () => { + switch (xhr.status) { case 200: case 201: console.log(xhr.responseText); @@ -43,8 +40,7 @@ function ajaxRequest(type, url, callback, data = null) //------------------------------------------------------------------------------ // Display an error message accordingly to an error code. // \param errorCode The error code (HTTP status for example). -function httpErrors(errorCode) -{ +function httpErrors(errorCode) { let messages = { 400: 'Requête incorrecte', @@ -56,12 +52,10 @@ function httpErrors(errorCode) }; // Display error. - if (errorCode in messages) - { + if (errorCode in messages) { $('#errors').html('' + messages[errorCode] + ''); $('#errors').show(); - setTimeout(() => - { + setTimeout(() => { $('#errors').hide(); }, 5000); } diff --git a/web2/php/request.php b/web2/php/request.php index 375b318..2478a4f 100644 --- a/web2/php/request.php +++ b/web2/php/request.php @@ -20,7 +20,7 @@ $request = explode('/', $request); if ($request[1] == 'alertes') { if ($requestMethod == 'GET') { - $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'date_alerte'; + $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'date_alerte'; $order = isset($_GET['order']) && ($_GET['order'] == 'desc') ? 'DESC' : 'ASC'; $filtresArray = [];