From bce175e755800dd74361bc20c21d7030add4bd51 Mon Sep 17 00:00:00 2001 From: Wilson Neto Date: Wed, 11 Sep 2024 14:34:31 -0300 Subject: [PATCH] feat(requests): add build status count GET request script Added a new script to fetch the build status count from the API. This script sends an HTTP GET request to the specified endpoint and includes sample response headers and JSON data for reference. The script will help in monitoring the build status and integrating with other tools for continuous integration and deployment processes. --- backend/kernelCI_app/views/treeDetailsView.py | 2 -- backend/requests/build-status-count-get.sh | 33 +++++++++++++++++++ .../Accordion/BuildAccordionContent.tsx | 2 -- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 backend/requests/build-status-count-get.sh diff --git a/backend/kernelCI_app/views/treeDetailsView.py b/backend/kernelCI_app/views/treeDetailsView.py index a352ab3c..d7b36259 100644 --- a/backend/kernelCI_app/views/treeDetailsView.py +++ b/backend/kernelCI_app/views/treeDetailsView.py @@ -91,6 +91,4 @@ def get(self, request, commit_hash): summary = self.create_summary(records) - print("Summary: ", summary) - return JsonResponse({"builds": records, "summary": summary}, safe=False) diff --git a/backend/requests/build-status-count-get.sh b/backend/requests/build-status-count-get.sh new file mode 100644 index 00000000..b1cf81ea --- /dev/null +++ b/backend/requests/build-status-count-get.sh @@ -0,0 +1,33 @@ +http GET 'http://localhost:8000/api/build/kernelci:kernelci.org:666ce37cab1bab49d17e7074/status-count' +# HTTP/1.1 200 OK +# Content-Length: 625 +# Content-Type: application/json +# Cross-Origin-Opener-Policy: same-origin +# Date: Thu, 25 Jul 2024 17:27:16 GMT +# Referrer-Policy: same-origin +# Server: WSGIServer/0.2 CPython/3.12.0 +# Vary: origin +# X-Content-Type-Options: nosniff +# X-Frame-Options: DENY + +# { +# "_timestamp": "2024-06-30T22:46:03.064Z", +# "architecture": "openrisc", +# "checkout_id": "0dayci:6681dfff2e96c85bf5ad3a7f", +# "command": null, +# "comment": null, +# "compiler": "gcc-13.2.0", +# "config_name": "allnoconfig", +# "config_url": null, +# "duration": null, +# "git_commit_hash": "22a40d14b572deb80c0648557f4bd502d7e83826", +# "git_commit_name": "v6.10-rc6", +# "git_repository_branch": "master", +# "git_repository_url": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git", +# "id": "0dayci:build:6681e0032e96c85bf5ad3a80", +# "log_url": null, +# "misc": null, +# "origin": "0dayci", +# "start_time": "2024-06-30T22:45:23.477Z", +# "valid": true +# } diff --git a/dashboard/src/components/Accordion/BuildAccordionContent.tsx b/dashboard/src/components/Accordion/BuildAccordionContent.tsx index 7ff2bca7..3b629f09 100644 --- a/dashboard/src/components/Accordion/BuildAccordionContent.tsx +++ b/dashboard/src/components/Accordion/BuildAccordionContent.tsx @@ -121,8 +121,6 @@ const AccordionBuildContent = ({ }: IAccordionItems): JSX.Element => { const { treeId } = useParams({ from: '/tree/$treeId/' }); - console.log('oii', accordionData); - //TODO: Fix the typing for not using as const contentData = accordionData as AccordionItemBuilds;