From dd6172d541fecba03eaf1e7544ce8e8d828fb3b7 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 09:56:34 +0200 Subject: [PATCH 01/14] Correction requirement.txt, faute de frappe Flask --- python-api/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-api/requirements.txt b/python-api/requirements.txt index b6f3435..8e4cbd6 100644 --- a/python-api/requirements.txt +++ b/python-api/requirements.txt @@ -1,2 +1,2 @@ # BUG 1 — Le nom du paquet ci-dessous est incorrect. Lisez attentivement. -flaskk==3.0.0 +flask==3.0.0 From 198136d531e576abf1d8deaea53abb6a07c1d6c2 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 10:03:34 +0200 Subject: [PATCH 02/14] Correction app.py --- python-api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-api/app.py b/python-api/app.py index 2505f77..0767e8d 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -15,7 +15,7 @@ # ------------------------------------------------------- # BUG 2 — Il manque un caractère essentiel à la fin de cette ligne -def parse_logs(filepath) +def parse_logs(filepath): erreurs = [] warnings = [] infos = [] From 1e726a94291dd421632cd1b2a16a54f848e6df6b Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 10:21:24 +0200 Subject: [PATCH 03/14] Correction app.py --- python-api/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-api/app.py b/python-api/app.py index 0767e8d..feece2e 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -28,7 +28,7 @@ def parse_logs(filepath): # BUG 3 — Le nom de la variable utilisée ici ne correspond pas # à celle déclarée plus haut dans cette fonction if "ERROR" in line: - errors.append(line) + erreurs.append(line) elif "WARNING" in line: warnings.append(line) elif "INFO" in line: @@ -47,7 +47,7 @@ def parse_logs(filepath): def get_logs(): # BUG 4 — La variable passée en argument n'est définie nulle part # Quel fichier de logs doit-on analyser ? - result = parse_logs(log_file) + result = parse_logs(config["log_file"]) return jsonify(result), 200 From 423498278cb174bc44ad315e385bf62f135f320b Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 10:23:05 +0200 Subject: [PATCH 04/14] =?UTF-8?q?Correction=20config.json,=20num=C3=A9ro?= =?UTF-8?q?=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index b18c09b..c62f739 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "promotion": "DevSecOps Azure — Simplon", "apprenants": [], "api": { - "port": 50001, + "port": 5000, "host": "localhost", "route": "/api/logs", "log_file": "server.log" From cddbd3f4db962c6fde9ac7ee839d69bdfe99e776 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 10:55:36 +0200 Subject: [PATCH 05/14] Correction app.py, correction chemin vers variable log_file --- python-api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-api/app.py b/python-api/app.py index feece2e..6c0f153 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -47,7 +47,7 @@ def parse_logs(filepath): def get_logs(): # BUG 4 — La variable passée en argument n'est définie nulle part # Quel fichier de logs doit-on analyser ? - result = parse_logs(config["log_file"]) + result = parse_logs(config["api"]["log_file"]) return jsonify(result), 200 From 4b396fcd3e3587c789653fb04aa756838d9ac3d4 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:03:40 +0200 Subject: [PATCH 06/14] Nettoyage commentaires inutiles app.py --- python-api/app.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python-api/app.py b/python-api/app.py index 6c0f153..6f2157a 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -14,7 +14,6 @@ # le nombre d'erreurs, warnings et infos détectés. # ------------------------------------------------------- -# BUG 2 — Il manque un caractère essentiel à la fin de cette ligne def parse_logs(filepath): erreurs = [] warnings = [] @@ -25,8 +24,6 @@ def parse_logs(filepath): line = line.strip() if not line: continue - # BUG 3 — Le nom de la variable utilisée ici ne correspond pas - # à celle déclarée plus haut dans cette fonction if "ERROR" in line: erreurs.append(line) elif "WARNING" in line: @@ -45,13 +42,9 @@ def parse_logs(filepath): @app.route("/api/logs", methods=["GET"]) def get_logs(): - # BUG 4 — La variable passée en argument n'est définie nulle part - # Quel fichier de logs doit-on analyser ? result = parse_logs(config["api"]["log_file"]) return jsonify(result), 200 if __name__ == "__main__": - # Le port est chargé depuis config.json - # BUG 5 — Le port est défini dans config.json — est-il correct ? app.run(debug=True, port=config["api"]["port"]) From 32720fca4837760c5a56281569cdf3c0ccc465b1 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:09:43 +0200 Subject: [PATCH 07/14] =?UTF-8?q?Correction=20package.json,=20correction?= =?UTF-8?q?=20nom=20d=C3=A9pendance=20axios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node-client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-client/package.json b/node-client/package.json index ea94ac5..84280d9 100644 --- a/node-client/package.json +++ b/node-client/package.json @@ -7,6 +7,6 @@ "start": "node app.js" }, "dependencies": { - "axioss": "^1.6.0" + "axios": "^1.6.0" } } From 90d3ad73e41f88afd3a295ce330becf5d79aa41a Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:10:41 +0200 Subject: [PATCH 08/14] Ajout package-lock.json --- node-client/package-lock.json | 346 ++++++++++++++++++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 node-client/package-lock.json diff --git a/node-client/package-lock.json b/node-client/package-lock.json new file mode 100644 index 0000000..6fc99fe --- /dev/null +++ b/node-client/package-lock.json @@ -0,0 +1,346 @@ +{ + "name": "log-analyser-client", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "log-analyser-client", + "version": "1.0.0", + "dependencies": { + "axios": "^1.6.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz", + "integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + } + } +} From 75b8c57cb43b213cb1cf50fadca16415be956a94 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:24:39 +0200 Subject: [PATCH 09/14] =?UTF-8?q?Cr=C3=A9ation=20et=20mise=20=C3=A0=20jour?= =?UTF-8?q?=20.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 9a687c7..b35d8a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Ignore node_modules and dependency directories +node_modules/ + # Local .terraform directories .terraform/ From d9c86c0f6a670ac42e914560b3e295b12342337a Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:35:52 +0200 Subject: [PATCH 10/14] =?UTF-8?q?Correction=20:=20importation=20d=E2=80=99?= =?UTF-8?q?axios=20et=20utilisation=20de=20response.data=20dans=20node-cli?= =?UTF-8?q?ent/app.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node-client/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-client/app.js b/node-client/app.js index 6fbf5cf..85879ca 100644 --- a/node-client/app.js +++ b/node-client/app.js @@ -9,11 +9,11 @@ const config = require(path.join(__dirname, '..', 'config.json')); const API_URL = `http://${config.api.host}:${config.api.port}${config.api.route}`; // BUG 6 — Le nom du module importé ici est incorrect -const axioss = require('axioss'); +const axios = require('axios'); async function getLogs() { try { - const response = await axioss.get(API_URL); + const response = await axios.get(API_URL); // BUG 7 — La propriété pour accéder au corps de la réponse avec axios // ne s'appelle pas .body — cherchez dans la doc axios comment From d9e98947e06978122d989d7d819088a81bc40564 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:52:03 +0200 Subject: [PATCH 11/14] Correction : utilisation de response.data dans app.js --- node-client/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-client/app.js b/node-client/app.js index 85879ca..df15b0e 100644 --- a/node-client/app.js +++ b/node-client/app.js @@ -18,7 +18,7 @@ async function getLogs() { // BUG 7 — La propriété pour accéder au corps de la réponse avec axios // ne s'appelle pas .body — cherchez dans la doc axios comment // accéder aux données de la réponse - const data = response.body; + const data = response.data; console.log('\n========================================'); console.log(' RAPPORT D\'ANALYSE DES LOGS AZURE '); From 0b948db0a8f354362edc2a5d1ba8937ca06f3239 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:55:09 +0200 Subject: [PATCH 12/14] Nettoyage commentaires inutiles app.js --- node-client/app.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/node-client/app.js b/node-client/app.js index df15b0e..52e4a58 100644 --- a/node-client/app.js +++ b/node-client/app.js @@ -3,21 +3,15 @@ const path = require('path'); -// Configuration partagée chargée depuis config.json (à la racine du projet) -// BUG 5 (suite) — Si l'API Python ne répond pas, vérifiez le port dans config.json const config = require(path.join(__dirname, '..', 'config.json')); const API_URL = `http://${config.api.host}:${config.api.port}${config.api.route}`; -// BUG 6 — Le nom du module importé ici est incorrect const axios = require('axios'); async function getLogs() { try { const response = await axios.get(API_URL); - // BUG 7 — La propriété pour accéder au corps de la réponse avec axios - // ne s'appelle pas .body — cherchez dans la doc axios comment - // accéder aux données de la réponse const data = response.data; console.log('\n========================================'); From 5ecfeb3ec8dfc310edfae37cecd295dd6b3cb522 Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 11:56:57 +0200 Subject: [PATCH 13/14] Nettoyage commentaire inutile requirements.txt --- python-api/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/python-api/requirements.txt b/python-api/requirements.txt index 8e4cbd6..5bd19d3 100644 --- a/python-api/requirements.txt +++ b/python-api/requirements.txt @@ -1,2 +1 @@ -# BUG 1 — Le nom du paquet ci-dessous est incorrect. Lisez attentivement. flask==3.0.0 From 4bba8b0833c153800ae2ae0d35ab5f5718e1a9ac Mon Sep 17 00:00:00 2001 From: Thomas Enjalbert Date: Thu, 21 May 2026 16:54:21 +0200 Subject: [PATCH 14/14] =?UTF-8?q?Correction=20des=20noms=20de=20variables?= =?UTF-8?q?=20dans=20la=20fonction=20parse=5Flogs=20pour=20assurer=20la=20?= =?UTF-8?q?coh=C3=A9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python-api/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-api/app.py b/python-api/app.py index d499881..049ee71 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -32,10 +32,10 @@ def parse_logs(filepath): infos.append(line) return { - "error_count": len(errors), + "error_count": len(erreurs), "warning_count": len(warnings), "info_count": len(infos), - "errors": errors, + "errors": erreurs, "warnings": warnings }