Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webapp interface #57

Merged
merged 111 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
7e4fb4f
Changed order of quality goals
AbelMH1 Feb 23, 2024
34755fb
Corrected cohesion and spelling errors and restructured section 4
AbelMH1 Feb 23, 2024
86442c0
Reestructured some table headings
AbelMH1 Feb 23, 2024
7f0c9b0
Primera version del un ejemplo con una pregunta y añadida un poco de …
alegarman2002 Feb 24, 2024
588cc02
Añadido un contador de tiempo visual
alegarman2002 Feb 24, 2024
ff3891c
Commit antes de una probable explosion
alegarman2002 Feb 24, 2024
3c528d9
Intento numero 1 de aprobar
alegarman2002 Feb 24, 2024
a7d17d1
Merge branch 'documentation_alejandro_liliana' of https://github.com/…
alegarman2002 Feb 24, 2024
47d84be
The arrow direction has been removed and the image insertion has been…
AbelMH1 Feb 24, 2024
0e5b801
first version of the backend for the question stororage microservice
MarcosBarrilVillaverde Feb 24, 2024
a0ad56c
Minor fix dokerfile
MarcosBarrilVillaverde Feb 24, 2024
b8eb199
Added timestampt to stored questions model
MarcosBarrilVillaverde Feb 25, 2024
e7510d0
Added ports, the gateway container and the new relations between comp…
AbelMH1 Feb 25, 2024
cf7530a
Diagrams theme removed in order for them to be more cohesive with the…
AbelMH1 Feb 25, 2024
1855115
Changed the imports of the diagrams for its generating plantUML code.…
AbelMH1 Feb 25, 2024
36dd1b3
Changed the import of the Technical Context diagram for its generatin…
AbelMH1 Feb 25, 2024
fbe030d
Added whitespaces to improve the formatting of the diagram
AbelMH1 Feb 25, 2024
e2e6f3b
Corrección documentación
uo288574 Feb 26, 2024
93e709b
Merge pull request #42 from Arquisoft/documentation_abel
uo283642 Feb 27, 2024
b2941cf
Inicio del prototipo del almacen de preguntas
marco-qg Feb 29, 2024
f2cea66
First version for the question service API
AbelMH1 Mar 1, 2024
bb0e886
Merge remote-tracking branch 'origin/develop' into storeQuestionService
MarcosBarrilVillaverde Mar 1, 2024
494e137
imagen arbol actualizada
uo288574 Mar 1, 2024
b52653e
cambio documentación apartado 10
uo288574 Mar 1, 2024
fc4b0d9
Fixes on structured of the data stored
MarcosBarrilVillaverde Mar 1, 2024
97c355b
Added new mongodb_wiki database container and a container for the que…
AbelMH1 Mar 1, 2024
1fc1f56
Fixed problem with buttons
alegarman2002 Mar 2, 2024
44d032d
Merge branch 'documentation_alejandro_liliana' of https://github.com/…
alegarman2002 Mar 2, 2024
1913b0d
Merge branch 'documentation_alejandro_liliana' into webapp_interface
alegarman2002 Mar 2, 2024
0c4c976
Added function to return the number of questions requested
AbelMH1 Mar 2, 2024
7923846
Merge branch 'service_question_generator' into webapp_interface
alegarman2002 Mar 2, 2024
301be1a
First try to connect to questiongenerator api
alegarman2002 Mar 4, 2024
b76de84
Added the menu with navigation
alegarman2002 Mar 5, 2024
e8417a7
Avance conexión
marco-qg Mar 7, 2024
e71ea92
Unfortunately, light mode
marco-qg Mar 7, 2024
e8e7da7
added commented data for testing purpose
marco-qg Mar 7, 2024
3534e7d
Minor fixes
MarcosBarrilVillaverde Mar 8, 2024
955981c
Merge branch 'storeQuestionService' of https://github.com/Arquisoft/w…
MarcosBarrilVillaverde Mar 8, 2024
d3104ab
Minor fix
MarcosBarrilVillaverde Mar 8, 2024
2a05891
Changed the way the parameters were received and added more mocked qu…
AbelMH1 Mar 9, 2024
472649b
Merge branch 'service_question_generator' into webapp_interface
AbelMH1 Mar 9, 2024
24df8f2
Added Cors dependency to let the webapp temporaly make request to the…
AbelMH1 Mar 9, 2024
48caf3d
Merge branch 'service_question_generator' into webapp_interface
AbelMH1 Mar 9, 2024
3dc210a
Removed unnecesary line
AbelMH1 Mar 9, 2024
67d4aad
Added query params (hardcoded) and fixed question display
AbelMH1 Mar 9, 2024
cac634d
barra de navegación y pie de página
uo288574 Mar 11, 2024
0f1f85a
connection fixed, pending style improvement
marco-qg Mar 12, 2024
7fde766
commented code for testing purposes
marco-qg Mar 12, 2024
2ccfc61
Style done
marco-qg Mar 12, 2024
4396167
change check answers
uo288574 Mar 12, 2024
173845e
Added the logic to do a simple wikidata query
alegarman2002 Mar 13, 2024
0692855
Added the logic in the api to generate random questions based on the …
alegarman2002 Mar 13, 2024
420ef2b
Merge branch 'service_question_generator' into webapp_interface
alegarman2002 Mar 13, 2024
ac5a2a2
Added call to the question store service API for storing the generate…
AbelMH1 Mar 13, 2024
c0e34cc
Update storeQuestionService/store-q-service.js
MarcosBarrilVillaverde Mar 13, 2024
5c2a97c
Update storeQuestionService/store-q-service.js
MarcosBarrilVillaverde Mar 13, 2024
e1b5a7c
Update storeQuestionService/store-q-service.js
MarcosBarrilVillaverde Mar 13, 2024
419cbc7
Update package.json to delete unused dependencies
MarcosBarrilVillaverde Mar 13, 2024
4001c43
Update store-q-model.js to fix convention names
MarcosBarrilVillaverde Mar 13, 2024
62b6aba
Update store-q-service.js to fix changes in data structure
MarcosBarrilVillaverde Mar 13, 2024
edb3449
Update store-q-service.js to fix post functions route
MarcosBarrilVillaverde Mar 13, 2024
06d5a20
Update storeQuestionService/store-q-service.js to delete unecesary li…
MarcosBarrilVillaverde Mar 13, 2024
e7d1108
Update gateway-service.js added error managment to question service
MarcosBarrilVillaverde Mar 13, 2024
b3f302a
Updated the game so we can have unlimited questions
alegarman2002 Mar 13, 2024
eef9653
Update gatewayservice/gateway-service.js fixed new route in questions
MarcosBarrilVillaverde Mar 13, 2024
a015019
Update storeQuestionService/store-q.test.js Added new route in tests
MarcosBarrilVillaverde Mar 13, 2024
e352872
Update storeQuestionService/store-q.test.js
MarcosBarrilVillaverde Mar 13, 2024
de2e940
Update storeQuestionService/store-q.test.js
MarcosBarrilVillaverde Mar 13, 2024
5d22841
Update storeQuestionService/store-q.test.js
MarcosBarrilVillaverde Mar 13, 2024
bab0682
Update storeQuestionService/store-q.test.js Added new route in tests
MarcosBarrilVillaverde Mar 13, 2024
fe390af
Update storeQuestionService/store-q.test.js Added new route in tests
MarcosBarrilVillaverde Mar 13, 2024
933ce9e
Update storeQuestionService/store-q.test.js Added new route in tests
MarcosBarrilVillaverde Mar 13, 2024
9536c6b
Update gatewayservice/gateway-service.js Added new route in tests
MarcosBarrilVillaverde Mar 13, 2024
40f0795
Update store-q.test.js fixed questions format
MarcosBarrilVillaverde Mar 13, 2024
559b223
Fixed problem of dependencies
alegarman2002 Mar 13, 2024
a0c33a7
Fixed problem with login test apparently
alegarman2002 Mar 13, 2024
cc0cf88
Added the login into the inder for navigation
alegarman2002 Mar 13, 2024
c5681f2
Fixed problems witho second part of text at login and problems with a…
alegarman2002 Mar 13, 2024
ecd16b9
Trying to fix error on how we call th context.js
alegarman2002 Mar 13, 2024
6b1ecae
Fixed Login test, tryung to fix app test
alegarman2002 Mar 13, 2024
d7a0a7a
Return to the previous version of app test
alegarman2002 Mar 13, 2024
4ca2be4
Trying to fix the app text with an update on the index
alegarman2002 Mar 13, 2024
df1e22f
Making the test a bit more simple
alegarman2002 Mar 13, 2024
80cbfe1
Trying to fix again the app text pls kill me
alegarman2002 Mar 13, 2024
5d91629
Deleted useless file
marco-qg Mar 13, 2024
d43156c
Eliminated unussed resources for that moment
alegarman2002 Mar 13, 2024
e5b6677
First try in test for firstGame
alegarman2002 Mar 13, 2024
3e40311
Fixed body-parser problem and commented mock question
marco-qg Mar 13, 2024
95b4d1b
added post history/question. It works, i ve tested it.
marco-qg Mar 13, 2024
1ae5550
Update store-q.test.js fixed
MarcosBarrilVillaverde Mar 13, 2024
cd1e826
Desisto de hacer los test de momento
alegarman2002 Mar 13, 2024
85108d2
Booro los archivos
alegarman2002 Mar 13, 2024
998a6ee
Merge pull request #50 from Arquisoft/storeQuestionService
AbelMH1 Mar 13, 2024
3f5e787
removed history post method
marco-qg Mar 13, 2024
0ba8671
Fixed connection
marco-qg Mar 13, 2024
cefa642
Fixed frontend problems due to format change in questions
marco-qg Mar 13, 2024
f10856f
Improved style
marco-qg Mar 13, 2024
8e4c669
Removing console logs
marco-qg Mar 13, 2024
1bd09d5
Merge branch 'storeQuestionService' of https://github.com/Arquisoft/w…
marco-qg Mar 13, 2024
951564a
sonarcloud problem solved (??)
uo288574 Mar 13, 2024
ff89910
sonarcloud problem solved at menu
uo288574 Mar 13, 2024
efeb758
Merge pull request #56 from Arquisoft/storeQuestionService
AbelMH1 Mar 13, 2024
8b0bbf7
Merge branch 'develop' into service_question_generator
AbelMH1 Mar 13, 2024
4f41232
Removed unnecesary mongoose schema and model
AbelMH1 Mar 13, 2024
da7421e
Removed unnecesary console.log
AbelMH1 Mar 13, 2024
6f7a9f8
Merge pull request #52 from Arquisoft/service_question_generator
marco-qg Mar 13, 2024
7ac26cd
Merge branch 'develop' into webapp_interface
AbelMH1 Mar 13, 2024
38ada23
Eliminated the unnecessary files
alegarman2002 Mar 13, 2024
c2bf00b
Merge pull request #55 from Arquisoft/webapp_interface
AbelMH1 Mar 13, 2024
52663cb
First part of adding the button to see the historic questions
alegarman2002 Mar 13, 2024
bfddeec
add button for stored questions
uo288574 Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Commit antes de una probable explosion
alegarman2002 committed Feb 24, 2024
commit ff3891c059c2cee9ef51b684989a2d905fe785a0
23 changes: 10 additions & 13 deletions webapp/src/components/CircularProgressBar.js
Original file line number Diff line number Diff line change
@@ -4,26 +4,23 @@ import React, { useState, useEffect } from 'react';
import { Container, Typography } from '@mui/material';


function CircularProgress() {
const [percentage, setPercentage] = useState(100);
var control = 100

function CircularProgress(initialValue) {
const [percentage, setPercentage] = useState(initialValue);

useEffect(() => {
const intervalId = setInterval(() => {
// Generar un nuevo porcentaje de progreso aleatorio (solo para propósitos de demostración)
control = control - 1
setPercentage(control); // Actualizar el estado con el nuevo porcentaje
}, 100); // Intervalo de 1000 milisegundos (1 segundo)
setPercentage(prevPercentage => prevPercentage - 1); // Actualizar el estado con el nuevo porcentaje
}, 100); // Intervalo de 100 milisegundos (0.1 segundo)

// Limpiar el intervalo cuando el componente se desmonte
return () => clearInterval(intervalId);
}, []); // La dependencia vacía asegura que useEffect solo se ejecute una vez al montar el componente


var listaDevolver = [<CircularProgressbar value={percentage}/>, percentage]
return (
<div style={{ width: '100px' }}>
<CircularProgressbar value={percentage}/>
</div>
listaDevolver
);
}


export default CircularProgress();
export default CircularProgress;
8 changes: 6 additions & 2 deletions webapp/src/components/FirstGame.js
Original file line number Diff line number Diff line change
@@ -23,6 +23,10 @@ const Quiz = () => {
const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);
const [selectedOption, setSelectedOption] = useState(null);
const [isCorrect, setIsCorrect] = useState(null);
const MiComponente = CircularProgress(100);
const MiCircularProgressbar = MiComponente[0];
const MiPercentage = MiComponente[1];


const esperar = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
@@ -81,7 +85,7 @@ const Quiz = () => {
</div>

<div class="progressBar">
<CircularProgress defaultValue="100"/>
{MiCircularProgressbar}
</div>
<div class="allAnswers">
{questions[currentQuestionIndex].options.map((option, index) => (
@@ -108,7 +112,7 @@ const Quiz = () => {
<p>{isCorrect ? '¡Respuesta correcta!' : 'Respuesta incorrecta.'}</p>
)} */}
</Container>
);
);)
};