Skip to content
Snippets Groups Projects
Commit 1163d002 authored by BOUTELDJA Wassim's avatar BOUTELDJA Wassim
Browse files

Last commiy

parent 94e5b369
Branches
No related tags found
1 merge request!22Add the pod of the bdd
Pipeline #48820 passed
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1747237494908" clover="3.2.0">
<project timestamp="1747237494909" name="All files">
<coverage generated="1747472943532" clover="3.2.0">
<project timestamp="1747472943532" name="All files">
<metrics statements="41" coveredstatements="41" conditionals="0" coveredconditionals="0" methods="8" coveredmethods="8" elements="49" coveredelements="49" complexity="0" loc="41" ncloc="41" packages="2" files="3" classes="3"/>
<package name="src">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
......
......@@ -116,7 +116,7 @@
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="prettify.js"></script>
<script>
......
......@@ -103,7 +103,7 @@ module.exports = pool;
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="../prettify.js"></script>
<script>
......
......@@ -101,7 +101,7 @@
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="../prettify.js"></script>
<script>
......
......@@ -116,7 +116,7 @@
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="../../prettify.js"></script>
<script>
......
......@@ -163,7 +163,7 @@ module.exports = router;</pre></td></tr></table></pre>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="../../prettify.js"></script>
<script>
......
......@@ -145,7 +145,7 @@ module.exports = router;</pre></td></tr></table></pre>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2025-05-14T15:44:53.324Z
at 2025-05-17T09:09:03.520Z
</div>
<script src="../../prettify.js"></script>
<script>
......
......@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React BEt</title>
<title>Vite + React 4455</title>
</head>
<body>
<div id="root"></div>
......
import { useEffect, useState } from 'react';
import TodoList from './TodoList';
const API_BASE_URL ='http://139.124.86.137:32001/api';
function App() {
const [lists, setLists] = useState([]);
const [selectedListId, setSelectedListId] = useState(null);
......@@ -9,20 +11,20 @@ function App() {
const [editedName, setEditedName] = useState('');
useEffect(() => {
fetch('/api/lists')
fetch(`${API_BASE_URL}/lists`)
.then(res => res.json())
.then(data => setLists(data));
}, []);
const refreshLists = () => {
fetch('/api/lists')
fetch(`${API_BASE_URL}/lists`)
.then(res => res.json())
.then(data => setLists(data));
};
const addList = async () => {
if (!newListName.trim()) return;
const res = await fetch('/api/lists', {
const res = await fetch(`${API_BASE_URL}/lists`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: newListName }),
......@@ -33,13 +35,13 @@ function App() {
};
const deleteList = async (id) => {
await fetch(`/api/lists/${id}`, { method: 'DELETE' });
await fetch(`${API_BASE_URL}/lists/${id}`, { method: 'DELETE' });
if (selectedListId === id) setSelectedListId(null);
refreshLists();
};
const updateList = async (id) => {
await fetch(`/api/lists/${id}`, {
await fetch(`${API_BASE_URL}/lists/${id}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: editedName }),
......@@ -51,7 +53,7 @@ function App() {
return (
<div className="app-container">
<div className="card">
<h1>📝 Mes listes</h1>
<h1>📝 Mes listes Test </h1>
<div className="form-row">
<input
......
......@@ -3,14 +3,6 @@ import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': {
target: 'http://backend:3001',
changeOrigin: true,
secure: false,
},
},
},
});
apiVersion: v1
kind: Service
metadata:
name: mariadb-service
name: mariadb
spec:
selector:
app: mariadb
......
......@@ -16,6 +16,7 @@ spec:
spec:
containers:
- name: frontend
image: etulab.univ-amu.fr:5005/b21214780/polytechrenduezzinebouteldja/frontend:1.0
image: etulab.univ-amu.fr:5005/b21214780/polytechrenduezzinebouteldja/frontend:1.2
ports:
- containerPort: 5173
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment