Merge pull request #29 from IUTInfoAix-R202-2022/finitions

Finitions
This commit is contained in:
Thomas R 2022-06-07 23:42:42 +02:00 committed by GitHub
commit 917a38d998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 27 additions and 31 deletions

View File

@ -22,7 +22,7 @@ public class AppMain extends Application {
testMode = res!=null&&res.equals("true"); testMode = res!=null&&res.equals("true");
ScreenController.addScreen("Accueil",FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fp/fp.fxml"))); ScreenController.addScreen("Accueil",FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/fenetrePrincipale/fp.fxml")));
//TODO Ajouter les pages d'admin pour l'ajout des usages //TODO Ajouter les pages d'admin pour l'ajout des usages
//ScreenController.addScreen("admin1",pane); //ScreenController.addScreen("admin1",pane);

View File

@ -5,6 +5,7 @@ import de.mkammerer.argon2.Argon2Factory;
public class LocalSecretProvider implements SecretProvider { public class LocalSecretProvider implements SecretProvider {
// Le mot de passe est "azerty"
private final static String ARGON_HASH = "$argon2id$v=19$m=16,t=2,p=1$Tms1dkJYWEZ5OTdJTndVTg$+iBsHiILEshy1JLZsTfZFQ"; private final static String ARGON_HASH = "$argon2id$v=19$m=16,t=2,p=1$Tms1dkJYWEZ5OTdJTndVTg$+iBsHiILEshy1JLZsTfZFQ";
private final static Argon2 argon2 = Argon2Factory.create(Argon2Factory.Argon2Types.ARGON2id); private final static Argon2 argon2 = Argon2Factory.create(Argon2Factory.Argon2Types.ARGON2id);

View File

@ -1,4 +1,4 @@
package fr.univ_amu.iut.admin2; package fr.univ_amu.iut.ui.admin2;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.event.EventHandler; import javafx.event.EventHandler;

View File

@ -1,4 +1,4 @@
package fr.univ_amu.iut.admin2; package fr.univ_amu.iut.ui.admin2;
import javafx.application.Application; import javafx.application.Application;
@ -15,7 +15,7 @@ public class Main extends Application {
@Override @Override
public void start(Stage stage) throws Exception { public void start(Stage stage) throws Exception {
try { try {
AnchorPane root = FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/admin2/admin2.fxml")); AnchorPane root = FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/admin2/admin2.fxml"));
stage.setScene(new Scene(root)); stage.setScene(new Scene(root));
stage.show(); stage.show();
} catch (Exception e) { } catch (Exception e) {

View File

@ -10,7 +10,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?> <?import javafx.scene.text.Text?>
<AnchorPane prefHeight="837.0" prefWidth="1350.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.admin2.Controller"> <AnchorPane prefHeight="837.0" prefWidth="1350.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.ui.admin2.Controller">
<children> <children>
<ScrollPane id="acteurs" layoutX="14.0" layoutY="136.0" prefHeight="234.0" prefWidth="589.0" style="-fx-background-radius: 10;"> <ScrollPane id="acteurs" layoutX="14.0" layoutY="136.0" prefHeight="234.0" prefWidth="589.0" style="-fx-background-radius: 10;">
<content> <content>

View File

@ -1,4 +1,4 @@
package fr.univ_amu.iut.detailResultats; package fr.univ_amu.iut.ui.detailResultats;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;

View File

@ -4,7 +4,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?> <?import javafx.scene.text.*?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1200.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.detailResultats.Controller"> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1200.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.ui.detailResultats.Controller">
<children> <children>
<Text fill="#ff6e40" layoutX="93.0" layoutY="76.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Academie " wrappingWidth="175.0749652342431" AnchorPane.leftAnchor="93.0" AnchorPane.topAnchor="47.0"> <Text fill="#ff6e40" layoutX="93.0" layoutY="76.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Academie " wrappingWidth="175.0749652342431" AnchorPane.leftAnchor="93.0" AnchorPane.topAnchor="47.0">
<font> <font>

View File

@ -1,4 +1,4 @@
package fr.univ_amu.iut.fp; package fr.univ_amu.iut.ui.fenetrePrincipale;
import fr.univ_amu.iut.AppMain; import fr.univ_amu.iut.AppMain;
import fr.univ_amu.iut.Donnees; import fr.univ_amu.iut.Donnees;
@ -186,7 +186,7 @@ public class Controller implements Initializable {
Stage resultats = new Stage(); Stage resultats = new Stage();
try { try {
resultats.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fResultat/FResultat.fxml")))); resultats.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/fenetreResultats/FResultat.fxml"))));
resultats.show(); resultats.show();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -200,7 +200,7 @@ public class Controller implements Initializable {
Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee())); Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee()));
Stage resultats = new Stage(); Stage resultats = new Stage();
try { try {
resultats.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fResultat/FResultat.fxml")))); resultats.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/fenetreResultats/FResultat.fxml"))));
resultats.show(); resultats.show();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -211,7 +211,7 @@ public class Controller implements Initializable {
EventHandler<ActionEvent> loginPrompt = event ->{ EventHandler<ActionEvent> loginPrompt = event ->{
Stage loginWindow = new Stage(); Stage loginWindow = new Stage();
try { try {
loginWindow.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/loginPrompt/Code_accessa.fxml")))); loginWindow.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/loginPrompt/Code_access.fxml"))));
loginWindow.show(); loginWindow.show();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -4,7 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane id="root" prefHeight="860.0" prefWidth="1365.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fp.Controller"> <AnchorPane id="root" prefHeight="860.0" prefWidth="1365.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.ui.fenetrePrincipale.Controller">
<children> <children>
<StackPane id="stackPaneFrance" fx:id="stackPaneFrance" layoutX="43.0" layoutY="92.0" prefHeight="649.0" prefWidth="642.0" style="-fx-background-color: blue;" /> <StackPane id="stackPaneFrance" fx:id="stackPaneFrance" layoutX="43.0" layoutY="92.0" prefHeight="649.0" prefWidth="642.0" style="-fx-background-color: blue;" />
<AnchorPane layoutX="11.0" prefHeight="80.0" prefWidth="1019.0" style="-fx-background-color: #1e3d59#1e3d59;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> <AnchorPane layoutX="11.0" prefHeight="80.0" prefWidth="1019.0" style="-fx-background-color: #1e3d59#1e3d59;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">

View File

@ -1,9 +1,8 @@
package fr.univ_amu.iut.fResultat; package fr.univ_amu.iut.ui.fenetreResultats;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
@ -68,7 +67,7 @@ public class Controller implements Initializable{
Donnees.setUsageSelectione(table.getSelectionModel().getSelectedItem().getUsage()); Donnees.setUsageSelectione(table.getSelectionModel().getSelectedItem().getUsage());
Tab onglet; Tab onglet;
try { try {
onglet = new Tab(Donnees.getUsageSelectione().getNom(),FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/detailResultats/detail.fxml"))); onglet = new Tab(Donnees.getUsageSelectione().getNom(),FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/ui/detailResultats/detail.fxml")));
onglets.getTabs().add(onglet); onglets.getTabs().add(onglet);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -6,7 +6,7 @@
<?import javafx.scene.control.TableView?> <?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<TabPane fx:id="onglets" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fResultat.Controller"> <TabPane fx:id="onglets" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.ui.fenetreResultats.Controller">
<tabs> <tabs>
<Tab text="Resultats"> <Tab text="Resultats">
<content> <content>

View File

@ -1,6 +1,4 @@
package fr.univ_amu.iut.fResultat; package fr.univ_amu.iut.ui.fenetreResultats;
import java.util.List;
import fr.univ_amu.iut.model.Usage; import fr.univ_amu.iut.model.Usage;

View File

@ -6,7 +6,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?> <?import javafx.scene.text.Text?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="321.0" prefWidth="504.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.loginPrompt.Controller"> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="321.0" prefWidth="504.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.ui.loginPrompt.Controller">
<children> <children>
<Text layoutX="171.0" layoutY="125.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Code d'accès" textAlignment="CENTER" wrappingWidth="171.82891845703125"> <Text layoutX="171.0" layoutY="125.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Code d'accès" textAlignment="CENTER" wrappingWidth="171.82891845703125">
<font> <font>

View File

@ -1,6 +1,7 @@
package fr.univ_amu.iut.loginPrompt; package fr.univ_amu.iut.ui.loginPrompt;
import fr.univ_amu.iut.secret.SecretProvider;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;
@ -24,11 +25,12 @@ public class Controller implements Initializable{
public void initialize(URL url, ResourceBundle resourceBundle) { public void initialize(URL url, ResourceBundle resourceBundle) {
EventHandler<ActionEvent> handleLogin = event ->{ EventHandler<ActionEvent> handleLogin = event ->{
// TODO Use SecretProvider if(SecretProvider.getInstance().isSecretValid(password.getText())){
System.out.println(password.getText()); System.out.println("Mot de passe OK !");
}else{
System.out.println("Mot de passe invalide");
}
}; };
log.setOnAction(handleLogin); log.setOnAction(handleLogin);
} }
} }

View File

@ -1,7 +1,7 @@
package fr.univ_amu.iut; package fr.univ_amu.iut;
import fr.univ_amu.iut.fResultat.TableEntry; import fr.univ_amu.iut.ui.fenetrePrincipale.Controller;
import fr.univ_amu.iut.fp.Controller; import fr.univ_amu.iut.ui.fenetreResultats.TableEntry;
import fr.univ_amu.iut.model.Discipline; import fr.univ_amu.iut.model.Discipline;
import fr.univ_amu.iut.model.Niveau; import fr.univ_amu.iut.model.Niveau;
import fr.univ_amu.iut.model.Thematique; import fr.univ_amu.iut.model.Thematique;
@ -9,10 +9,8 @@ import javafx.scene.Node;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.TableView; import javafx.scene.control.TableView;
import javafx.scene.layout.Background;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.Window;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -21,8 +19,6 @@ import org.testfx.framework.junit5.ApplicationExtension;
import org.testfx.framework.junit5.ApplicationTest; import org.testfx.framework.junit5.ApplicationTest;
import org.testfx.framework.junit5.Start; import org.testfx.framework.junit5.Start;
import java.util.Iterator;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ExtendWith(ApplicationExtension.class) @ExtendWith(ApplicationExtension.class)