From c86292dc05d4d9be713b0987d59ab3174a34d405 Mon Sep 17 00:00:00 2001 From: yeudit Date: Wed, 10 Jan 2024 23:20:22 +0200 Subject: [PATCH 01/12] fix typo --- api/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/main.py b/api/main.py index e4500af3..5a79c5de 100644 --- a/api/main.py +++ b/api/main.py @@ -5,7 +5,7 @@ from src.api.tests_api import api as tests_blueprint import src.services.k8s_service as k8s_service import src.services.cadvisor_service as cadvisor_service -from src.enums.environemnt import Environment +from src.enums.environment import Environment from config.settings import load_config from flask_cors import CORS from src.utils.database_manager import DatabaseManager From e3779490bdd0f96556523db5e41d3d0c89b09581 Mon Sep 17 00:00:00 2001 From: yeudit Date: Sun, 4 Feb 2024 15:27:35 +0200 Subject: [PATCH 02/12] add reports folder for static results --- reports/1707053064011.json | 52 ++++++++++++++++++++++++++++++++++++++ reports/1707053090601.json | 52 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 reports/1707053064011.json create mode 100644 reports/1707053090601.json diff --git a/reports/1707053064011.json b/reports/1707053064011.json new file mode 100644 index 00000000..eb2a02ad --- /dev/null +++ b/reports/1707053064011.json @@ -0,0 +1,52 @@ +{ + "id": 1, + "name": "test1", + "description": "test1", + "start_time": "Thu, 14 Dec 2023 15:37:31 GMT", + "end_time": "Thu, 14 Dec 2023 15:38:39 GMT", + "environment_info": { + "codeRelease": "1.1.0", + "cpu": "RELACE_WITH_CPU", + "cpuArchitecture": "RELACE_WITH_CPU_ARCHITECTURE", + "cpuClockSpeed": "RELACE_WITH_CLOCK_SPEED", + "cpuCores": 0, + "nodeSize": "RELACE_WITH_NODE_SIZE", + "operatingSystem": "RELACE_WITH_OPERATING_SYSTEM", + "resourceName": "RELACE_WITH_RESOURCE_NAME" + }, + + "testRuns": [ + { + "algorithm": "bikel1", + "iterations": 200, + "results": { + "averageCPU": 4.1, + "averageMemory": 200 + } + }, + { + "algorithm": "bikel1", + "iterations": 400, + "results": { + "averageCPU": 4.9, + "averageMemory": 150 + } + }, + { + "algorithm": "kyber512", + "iterations": 1000, + "results": { + "averageCPU": 4.5, + "averageMemory": 249 + } + }, + { + "algorithm": "kyber512", + "iterations": 2000, + "results": { + "averageCPU": 0.0, + "averageMemory": 0 + } + } + ] +} \ No newline at end of file diff --git a/reports/1707053090601.json b/reports/1707053090601.json new file mode 100644 index 00000000..1ab9f8dc --- /dev/null +++ b/reports/1707053090601.json @@ -0,0 +1,52 @@ +{ + "id": 1, + "name": "test1", + "description": "test1", + "start_time": "Thu, 15 Dec 2023 15:37:31 GMT", + "end_time": "Thu, 15 Dec 2023 15:38:39 GMT", + "environment_info": { + "codeRelease": "1.1.0", + "cpu": "RELACE_WITH_CPU", + "cpuArchitecture": "RELACE_WITH_CPU_ARCHITECTURE", + "cpuClockSpeed": "RELACE_WITH_CLOCK_SPEED", + "cpuCores": 0, + "nodeSize": "RELACE_WITH_NODE_SIZE", + "operatingSystem": "RELACE_WITH_OPERATING_SYSTEM", + "resourceName": "RELACE_WITH_RESOURCE_NAME" + }, + + "testRuns": [ + { + "algorithm": "bikel1", + "iterations": 200, + "results": { + "averageCPU": 4.0, + "averageMemory": 210 + } + }, + { + "algorithm": "bikel1", + "iterations": 400, + "results": { + "averageCPU": 4.8, + "averageMemory": 125 + } + }, + { + "algorithm": "kyber512", + "iterations": 1000, + "results": { + "averageCPU": 4.3, + "averageMemory": 237 + } + }, + { + "algorithm": "kyber512", + "iterations": 2000, + "results": { + "averageCPU": 0.0, + "averageMemory": 0 + } + } + ] + } \ No newline at end of file From 870445a035e51c30e172a6363de1061451817e6f Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 22:35:10 +0200 Subject: [PATCH 03/12] github-pages - deploy new page to gh-pages --- portal/Dockerfile | 8 ++- portal/package.json | 2 + portal/src/gh-pages/index.tsx | 7 ++ portal/src/gh-pages/reports.tsx | 121 ++++++++++++++++++++++++++++++++ portal/src/routes/Root.jsx | 11 ++- 5 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 portal/src/gh-pages/index.tsx create mode 100644 portal/src/gh-pages/reports.tsx diff --git a/portal/Dockerfile b/portal/Dockerfile index fc64c860..0e7f6b9f 100644 --- a/portal/Dockerfile +++ b/portal/Dockerfile @@ -9,7 +9,13 @@ RUN mkdir /usr/share/nginx/html/qujata COPY . . RUN npm install -g yarn RUN yarn install -RUN yarn build && cp -r build/* /usr/share/nginx/html/qujata && cp build/index.html /usr/share/nginx/html/qujata/index.html.tpl && chmod 755 -R /usr/share/nginx/html/qujata +RUN yarn add env-cmd +RUN if [ "$BUILD_ENV" = "gh-pages" ]; then \ + yarn build:gh-pages; \ + else \ + yarn build; \ + fi \ + && cp -r build/* /usr/share/nginx/html/qujata && cp build/index.html /usr/share/nginx/html/qujata/index.html.tpl && chmod 755 -R /usr/share/nginx/html/qujata COPY nginx.conf /etc/nginx/nginx.conf diff --git a/portal/package.json b/portal/package.json index 025ccd6b..09c506ce 100644 --- a/portal/package.json +++ b/portal/package.json @@ -9,6 +9,7 @@ "chartjs-plugin-annotation": "^3.0.1", "classnames": "^2.3.2", "date-fns": "^3.3.0", + "env-cmd": "^10.1.0", "lodash": "^4.17.21", "react": "^18.2.0", "react-chartjs-2": "3.1.1", @@ -60,6 +61,7 @@ "start:mock:client": "cross-env REACT_SERVER_TARGET=http://localhost:2011 yarn start", "start:mock:server": "cd ./mock-server && yarn serve", "build": "yarn react-scripts build", + "build:gh-pages": "env-cmd -f .env.gh-pages yarn react-scripts build", "build:ci": "yarn react-scripts build", "test": "react-scripts test", "test:coverage": "react-scripts test --coverage --watchAll=false", diff --git a/portal/src/gh-pages/index.tsx b/portal/src/gh-pages/index.tsx new file mode 100644 index 00000000..b95ad1c7 --- /dev/null +++ b/portal/src/gh-pages/index.tsx @@ -0,0 +1,7 @@ +import { Reports } from "./reports"; + +export const GHPages: React.FC = () => ( + +); + +// export default GHPages; \ No newline at end of file diff --git a/portal/src/gh-pages/reports.tsx b/portal/src/gh-pages/reports.tsx new file mode 100644 index 00000000..187b0f1b --- /dev/null +++ b/portal/src/gh-pages/reports.tsx @@ -0,0 +1,121 @@ +// import React, { useState, useEffect } from 'react'; +// interface Report { +// cpu: string; +// revision: number; +// status: string; +// } +// export const Reports: React.FC = () => { + + +// const [data, setData] = useState([]); +// useEffect(() => { +// fetch('https://api.github.com/repos/open-quantum-safe/profiling/contents/perf/aws') +// .then(response => response.json()) +// .then((files: { name: string; download_url: string }[]) => { +// return Promise.all( +// files.map(file => +// fetch(file.download_url) +// .then(response => response.json()) +// .then(json => ({ +// cpu: json.cpu, +// revision: json.revision, +// status: json.status, +// })) +// .catch(err => console.error(err)) +// ) +// ); +// }) +// .then(jsonArray => setData(jsonArray as Report[])) +// .catch(err => console.error(err)); +// }, []); +// return ( +//
+//       {JSON.stringify(data, null, 2)}
+//     
+// ); +// }; + +// import React, { useState, useEffect, ChangeEvent } from "react"; +// import axios from "axios"; +// interface File { +// path: string; +// name: string; +// } +// export const Reports: React.FC = () => { +// const [files, setFiles] = useState([]); +// const [selectedFile, setSelectedFile] = useState(null); +// const [fileContent, setFileContent] = useState(""); +// useEffect(() => { +// // const apiUrl = `https://api.github.com/repos/att/qujata/contents/reports?ref=static-web-page/US63/conditional-main-page`; +// const apiUrl = `https://api.github.com/repos/open-quantum-safe/profiling/contents/perf/aws`; +// axios.get(apiUrl) +// .then(response => { +// setFiles(response.data); +// }) +// .catch(error => console.error("Error fetching files: ", error)); +// }, []); +// const handleFileChange = (e: ChangeEvent) => { +// const value = e.target.value; +// setSelectedFile(value); +// axios.get(`https://api.github.com/repos/att/qujata/contents/${e.target.value}`) +// .then(response => { +// const fileContent = atob(response.data.content); // Decode the base64 content +// setFileContent(fileContent); +// }) +// .catch(error => console.error("Error fetching file content: ", error)); +// }; +// return ( +//
+// {fileContent} +//
+// ); +// } + + +import React, { useState, useEffect, ChangeEvent } from "react"; +interface File { + path: string; + name: string; +} +export const Reports: React.FC = () => { + const [files, setFiles] = useState([]); + const [selectedFile, setSelectedFile] = useState(null); + const [fileContent, setFileContent] = useState(""); + useEffect(() => { + const apiUrl = 'https://api.github.com/repos/att/qujata/contents/reports?ref=static-web-page/US63/conditional-main-page'; + fetch(apiUrl) + .then(response => response.json()) + .then(data => { + setFiles(data); + }) + .catch(error => console.error("Error fetching files: ", error)); + }, []); + const handleFileChange = (e: ChangeEvent) => { + const value = e.target.value; + setSelectedFile(value); + fetch(`https://raw.githubusercontent.com/att/qujata/static-web-page/US63/conditional-main-page/${value}`) + .then(response => response.json()) + .then(data => { + const fileContent = JSON.stringify(data, null, 2); // Decode the base64 content + setFileContent(fileContent); + }) + .catch(error => console.error("Error fetching file content: ", error)); + }; + return ( +
+ {fileContent} +
+ ); +} diff --git a/portal/src/routes/Root.jsx b/portal/src/routes/Root.jsx index c6bf76ca..ff8be53c 100644 --- a/portal/src/routes/Root.jsx +++ b/portal/src/routes/Root.jsx @@ -4,14 +4,21 @@ import { Outlet } from 'react-router-dom'; import { tabs } from '../app/shared/constants/navigation-tabs.const'; import { Spinner, SpinnerSize } from '../app/shared/components/att-spinner'; import { useSpinnerContext } from '../app/shared/context/spinner'; +import { GHPages } from "../gh-pages"; export default function Root() { const { isSpinnerOn } = useSpinnerContext(); + const env = process.env.REACT_APP__ENVIRONMENT; return ( + <> - + {isSpinnerOn && renderSpinner()} - + { + env === 'gh-pages' ? () :() + } + + ); } From 20b7890971a427308e7067532beaf75103bc6d31 Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 23:01:38 +0200 Subject: [PATCH 04/12] add build env to docker build --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6213c8f2..8eeae228 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v2 - name: Build Docker image - run: docker build ./portal --file ./portal/Dockerfile --tag my-website-image + run: docker build ./portal --file ./portal/Dockerfile --build-arg BUILD_ENV=gh-pages --tag my-website-image - name: Run Docker container run: | From a51bc43a4b889ccd117de44b71f4b375664d324c Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 23:12:52 +0200 Subject: [PATCH 05/12] debug yarn build command --- portal/.env.gh-pages | 5 +++++ portal/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 portal/.env.gh-pages diff --git a/portal/.env.gh-pages b/portal/.env.gh-pages new file mode 100644 index 00000000..91d1cc30 --- /dev/null +++ b/portal/.env.gh-pages @@ -0,0 +1,5 @@ +REACT_APP__ENVIRONMENT=gh-page +REACT_APP__BASE_API_URL='' +REACT_APP__DASHBOARD_LINK_HOST=http://localhost:3000 +REACT_APP__PUBLIC_URL='qujata' +PUBLIC_URL='qujata' \ No newline at end of file diff --git a/portal/package.json b/portal/package.json index 09c506ce..03425c3b 100644 --- a/portal/package.json +++ b/portal/package.json @@ -60,7 +60,7 @@ "start:quantum-api": "cross-env REACT_SERVER_TARGET=http://localhost:3010 yarn start", "start:mock:client": "cross-env REACT_SERVER_TARGET=http://localhost:2011 yarn start", "start:mock:server": "cd ./mock-server && yarn serve", - "build": "yarn react-scripts build", + "build": "env-cmd -f .env.gh-pages yarn react-scripts build", "build:gh-pages": "env-cmd -f .env.gh-pages yarn react-scripts build", "build:ci": "yarn react-scripts build", "test": "react-scripts test", From a0e104130b5f6af2ed354ce55630f299527d6288 Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 23:30:57 +0200 Subject: [PATCH 06/12] add environment to env interface --- portal/src/environments/environment.interface.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/portal/src/environments/environment.interface.ts b/portal/src/environments/environment.interface.ts index 346c3a3b..bace8b59 100644 --- a/portal/src/environments/environment.interface.ts +++ b/portal/src/environments/environment.interface.ts @@ -1,4 +1,5 @@ export interface IEnvironment { baseApiUrl: string; dashboardLinkHost: string; + environment: string; } From 068c92c96d87bb17fc7236e72c938a995e0e19ba Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 23:40:22 +0200 Subject: [PATCH 07/12] use Environment instead of process.env --- portal/src/routes/Root.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/portal/src/routes/Root.jsx b/portal/src/routes/Root.jsx index ff8be53c..01f1d61a 100644 --- a/portal/src/routes/Root.jsx +++ b/portal/src/routes/Root.jsx @@ -4,18 +4,18 @@ import { Outlet } from 'react-router-dom'; import { tabs } from '../app/shared/constants/navigation-tabs.const'; import { Spinner, SpinnerSize } from '../app/shared/components/att-spinner'; import { useSpinnerContext } from '../app/shared/context/spinner'; +import { Environment } from '../environments/environment'; import { GHPages } from "../gh-pages"; export default function Root() { const { isSpinnerOn } = useSpinnerContext(); - const env = process.env.REACT_APP__ENVIRONMENT; return ( <> - + {isSpinnerOn && renderSpinner()} { - env === 'gh-pages' ? () :() + Environment.environment === 'gh-pages' ? () :() } From 77fb3d6f23866d6a2254174b4e135cc2f456f6a8 Mon Sep 17 00:00:00 2001 From: yeudit Date: Mon, 5 Feb 2024 23:48:17 +0200 Subject: [PATCH 08/12] fix typo in .env.gh-pages --- portal/.env.gh-pages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal/.env.gh-pages b/portal/.env.gh-pages index 91d1cc30..21763a1c 100644 --- a/portal/.env.gh-pages +++ b/portal/.env.gh-pages @@ -1,4 +1,4 @@ -REACT_APP__ENVIRONMENT=gh-page +REACT_APP__ENVIRONMENT=gh-pages REACT_APP__BASE_API_URL='' REACT_APP__DASHBOARD_LINK_HOST=http://localhost:3000 REACT_APP__PUBLIC_URL='qujata' From 7c3e021d522a1d971aa525957b3320cf22356197 Mon Sep 17 00:00:00 2001 From: yeudit Date: Tue, 6 Feb 2024 14:05:03 +0200 Subject: [PATCH 09/12] pretty json results --- portal/src/gh-pages/reports.tsx | 123 +++++++------------------------- reports/1707053090601.json | 8 +-- 2 files changed, 29 insertions(+), 102 deletions(-) diff --git a/portal/src/gh-pages/reports.tsx b/portal/src/gh-pages/reports.tsx index 187b0f1b..d78df68f 100644 --- a/portal/src/gh-pages/reports.tsx +++ b/portal/src/gh-pages/reports.tsx @@ -1,83 +1,3 @@ -// import React, { useState, useEffect } from 'react'; -// interface Report { -// cpu: string; -// revision: number; -// status: string; -// } -// export const Reports: React.FC = () => { - - -// const [data, setData] = useState([]); -// useEffect(() => { -// fetch('https://api.github.com/repos/open-quantum-safe/profiling/contents/perf/aws') -// .then(response => response.json()) -// .then((files: { name: string; download_url: string }[]) => { -// return Promise.all( -// files.map(file => -// fetch(file.download_url) -// .then(response => response.json()) -// .then(json => ({ -// cpu: json.cpu, -// revision: json.revision, -// status: json.status, -// })) -// .catch(err => console.error(err)) -// ) -// ); -// }) -// .then(jsonArray => setData(jsonArray as Report[])) -// .catch(err => console.error(err)); -// }, []); -// return ( -//
-//       {JSON.stringify(data, null, 2)}
-//     
-// ); -// }; - -// import React, { useState, useEffect, ChangeEvent } from "react"; -// import axios from "axios"; -// interface File { -// path: string; -// name: string; -// } -// export const Reports: React.FC = () => { -// const [files, setFiles] = useState([]); -// const [selectedFile, setSelectedFile] = useState(null); -// const [fileContent, setFileContent] = useState(""); -// useEffect(() => { -// // const apiUrl = `https://api.github.com/repos/att/qujata/contents/reports?ref=static-web-page/US63/conditional-main-page`; -// const apiUrl = `https://api.github.com/repos/open-quantum-safe/profiling/contents/perf/aws`; -// axios.get(apiUrl) -// .then(response => { -// setFiles(response.data); -// }) -// .catch(error => console.error("Error fetching files: ", error)); -// }, []); -// const handleFileChange = (e: ChangeEvent) => { -// const value = e.target.value; -// setSelectedFile(value); -// axios.get(`https://api.github.com/repos/att/qujata/contents/${e.target.value}`) -// .then(response => { -// const fileContent = atob(response.data.content); // Decode the base64 content -// setFileContent(fileContent); -// }) -// .catch(error => console.error("Error fetching file content: ", error)); -// }; -// return ( -//
-// {fileContent} -//
-// ); -// } - - import React, { useState, useEffect, ChangeEvent } from "react"; interface File { path: string; @@ -91,31 +11,38 @@ export const Reports: React.FC = () => { const apiUrl = 'https://api.github.com/repos/att/qujata/contents/reports?ref=static-web-page/US63/conditional-main-page'; fetch(apiUrl) .then(response => response.json()) - .then(data => { + .then((data: File[]) => { setFiles(data); + if (data[0]) { // Check if there are any files + setSelectedFile(data[0].path); // Set the first file as the default selected file + } }) .catch(error => console.error("Error fetching files: ", error)); }, []); + useEffect(() => { + if (selectedFile) { + fetch(`https://raw.githubusercontent.com/att/qujata/static-web-page/US63/conditional-main-page/${selectedFile}`) + .then(response => response.json()) + .then((data: any) => { + const fileContent = JSON.stringify(data, null, 2); // Decode the base64 content + setFileContent(fileContent); + }) + .catch(error => console.error("Error fetching file content: ", error)); + } + }, [selectedFile]); // This useEffect hook is dependent on selectedFile const handleFileChange = (e: ChangeEvent) => { const value = e.target.value; setSelectedFile(value); - fetch(`https://raw.githubusercontent.com/att/qujata/static-web-page/US63/conditional-main-page/${value}`) - .then(response => response.json()) - .then(data => { - const fileContent = JSON.stringify(data, null, 2); // Decode the base64 content - setFileContent(fileContent); - }) - .catch(error => console.error("Error fetching file content: ", error)); }; return ( -
- {fileContent} -
+


+    {fileContent}
+  
); -} +} \ No newline at end of file diff --git a/reports/1707053090601.json b/reports/1707053090601.json index 1ab9f8dc..9a2c730a 100644 --- a/reports/1707053090601.json +++ b/reports/1707053090601.json @@ -1,11 +1,11 @@ { - "id": 1, - "name": "test1", - "description": "test1", + "id": 2, + "name": "test2", + "description": "test2", "start_time": "Thu, 15 Dec 2023 15:37:31 GMT", "end_time": "Thu, 15 Dec 2023 15:38:39 GMT", "environment_info": { - "codeRelease": "1.1.0", + "codeRelease": "1.2.0", "cpu": "RELACE_WITH_CPU", "cpuArchitecture": "RELACE_WITH_CPU_ARCHITECTURE", "cpuClockSpeed": "RELACE_WITH_CLOCK_SPEED", From 7cbb5878d9d8e8abf3e836160eb344e3c445ab5a Mon Sep 17 00:00:00 2001 From: yeudit Date: Tue, 6 Feb 2024 14:16:05 +0200 Subject: [PATCH 10/12] fix Dockerfile --- portal/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portal/Dockerfile b/portal/Dockerfile index 0e7f6b9f..7e158037 100644 --- a/portal/Dockerfile +++ b/portal/Dockerfile @@ -1,6 +1,7 @@ FROM nginx:1.25-alpine3.18 RUN apk --no-cache add --update nodejs npm +ARG BUILD_ENV ## Replace the default nginx index page with our portal RUN rm -rf /usr/share/nginx/html/* @@ -11,7 +12,7 @@ RUN npm install -g yarn RUN yarn install RUN yarn add env-cmd RUN if [ "$BUILD_ENV" = "gh-pages" ]; then \ - yarn build:gh-pages; \ + yarn build:gh-pages; \ else \ yarn build; \ fi \ From b5144cd7f231f3e5860ad5d47223c3154c1646f0 Mon Sep 17 00:00:00 2001 From: yeudit Date: Sun, 18 Feb 2024 11:45:10 +0200 Subject: [PATCH 11/12] fix yarn build command --- portal/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal/package.json b/portal/package.json index 03425c3b..09c506ce 100644 --- a/portal/package.json +++ b/portal/package.json @@ -60,7 +60,7 @@ "start:quantum-api": "cross-env REACT_SERVER_TARGET=http://localhost:3010 yarn start", "start:mock:client": "cross-env REACT_SERVER_TARGET=http://localhost:2011 yarn start", "start:mock:server": "cd ./mock-server && yarn serve", - "build": "env-cmd -f .env.gh-pages yarn react-scripts build", + "build": "yarn react-scripts build", "build:gh-pages": "env-cmd -f .env.gh-pages yarn react-scripts build", "build:ci": "yarn react-scripts build", "test": "react-scripts test", From 7fba7094c2894babf4d84991e6bef79bd0ccc8d3 Mon Sep 17 00:00:00 2001 From: yeudit Date: Sun, 18 Feb 2024 12:02:56 +0200 Subject: [PATCH 12/12] remove branch from code --- portal/src/gh-pages/reports.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portal/src/gh-pages/reports.tsx b/portal/src/gh-pages/reports.tsx index d78df68f..d73d6bbf 100644 --- a/portal/src/gh-pages/reports.tsx +++ b/portal/src/gh-pages/reports.tsx @@ -8,7 +8,7 @@ export const Reports: React.FC = () => { const [selectedFile, setSelectedFile] = useState(null); const [fileContent, setFileContent] = useState(""); useEffect(() => { - const apiUrl = 'https://api.github.com/repos/att/qujata/contents/reports?ref=static-web-page/US63/conditional-main-page'; + const apiUrl = 'https://api.github.com/repos/att/qujata/contents/reports?ref=main'; fetch(apiUrl) .then(response => response.json()) .then((data: File[]) => { @@ -21,7 +21,7 @@ export const Reports: React.FC = () => { }, []); useEffect(() => { if (selectedFile) { - fetch(`https://raw.githubusercontent.com/att/qujata/static-web-page/US63/conditional-main-page/${selectedFile}`) + fetch(`https://raw.githubusercontent.com/att/qujata/main/${selectedFile}`) .then(response => response.json()) .then((data: any) => { const fileContent = JSON.stringify(data, null, 2); // Decode the base64 content