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

front: stdcm search path modal cleaner #4721

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"failedRequest": "Request failed",
"gare": "Station, post",
"importTrainSchedule": "Import",
"infraLoading": "Infrastructure is loading...",
"infraLoading": "Infrastructure is loading",
"inverseOD": "Reverse origin/destination",
"launchSimulation": "Start",
"manageVias": "Steps management",
Expand All @@ -60,26 +60,25 @@
"noPowerRestriction": "No power restriction",
"noSpeedLimitByTag": "No composition code",
"noTimetable": "Select a timetable",
"noTrainCompo": "No rolling stock defined...",
"noTrainCompo": "No rolling stock defined",
"origin": "Origin",
"pathfinding": "Path search",
"pathfindingDone": "Pathfinding done.",
"pathfindingError": "An error occurred in pathfinding: {{errorMessage}}.",
"pathfindingInProgress": "Pathfinding in progress...",
"pathfindingInProgress": "Pathfinding in progress",
"pathfindingMissingParams": "Missing parameters for pathfinding: {{missingElements}}.",
"pathfindingMissingParamsSimple": "Missing information for the search",
"pathfindingNoState": "No route search.",
"pathfindingStatus": "Pathfinding state",
"pleaseWait": "Please wait",
"pleaseWait": "Please wait",
"powerRestriction": "Power restriction code",
"restartPathfinding": "Restart search",
"rollingstock": "Rolling stock",
"searchingItinerary": "Search for a train path...",
"simulation": "Simulation",
"spaceSpeedGraphic": "Space-Velocity graph",
"spaceTimeGraphic": "Space-Time graph",
"speedLimitByTag": "Composition code",
"stdcmComputation": "Pathfinding running",
"stdcmComputation": "Search for a train path",
"stdcmNoResults": "No path found",
"stdcmResults": "Results",
"stopSimulation": "Stop",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"failedRequest": "La requête a échoué",
"gare": "Gare, poste",
"importTrainSchedule": "Importation",
"infraLoading": "Infra en cours de chargement...",
"infraLoading": "Infra en cours de chargement",
"inverseOD": "Inverser origine/destination",
"launchSimulation": "Démarrer",
"manageVias": "Gestion des étapes",
Expand All @@ -65,21 +65,20 @@
"pathfinding": "Recherche d’itinéraire",
"pathfindingDone": "Recherche d'itinéraire terminée.",
"pathfindingError": "Erreur dans la recherche d’itinéraire : {{errorMessage}}.",
"pathfindingInProgress": "Recherche d’itinéraire en cours...",
"pathfindingInProgress": "Recherche d’itinéraire en cours",
"pathfindingMissingParams": "Éléments manquants pour la recherche : {{missingElements}}.",
"pathfindingMissingParamsSimple": "Informations manquantes pour la recherche",
"pathfindingNoState": "Aucune recherche itinéraire.",
"pathfindingStatus": "Statut recherche d’itinéraire",
"pleaseWait": "Veuillez patientez",
"pleaseWait": "Veuillez patientez",
"powerRestriction": "Code de restriction de puissance",
"restartPathfinding": "Relancer la recherche",
"rollingstock": "Matériel",
"searchingItinerary": "Recherche de sillon…",
"simulation": "Simulation",
"spaceSpeedGraphic": "Graphique Espace-Vitesse",
"spaceTimeGraphic": "Graphique Espace-Temps",
"speedLimitByTag": "Code de composition",
"stdcmComputation": "Calcul de l'itinéraire",
"stdcmComputation": "Recherche de sillon",
"stdcmNoResults": "Aucun sillon trouvé",
"stdcmResults": "Résultats",
"stopSimulation": "Stopper",
Expand Down
20 changes: 6 additions & 14 deletions front/src/applications/stdcm/views/StdcmRequestModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import ReactModal from 'react-modal';
import createTrain from 'applications/operationalStudies/components/SimulationResults/SpaceTimeChart/createTrain';
import formatStdcmConf from 'applications/stdcm/formatStcmConf';
// Static Data and Assets
import rabbit from 'assets/pictures/rabbit.png';
import { setFailure } from 'reducers/main';
import { STDCM_REQUEST_STATUS } from 'applications/operationalStudies/consts';
import { updateItinerary } from 'reducers/osrdconf';
Expand Down Expand Up @@ -143,28 +142,21 @@ export default function StdcmRequestModal(props) {
<div className="modal-content">
<ModalHeaderSNCF>
<h1>{t('operationalStudies/manageTrainSchedule:stdcmComputation')}</h1>
<button className="btn btn-only-icon close" type="button" onClick={cancelStdcmRequest}>
<i className="icons-close" />
</button>
</ModalHeaderSNCF>
<ModalBodySNCF>
<div className="d-flex flex-column text-center">
{currentStdcmRequestStatus === STDCM_REQUEST_STATUS.pending && (
<>
<img src={rabbit} alt="runnning stdcm" className="w-50" />
<div className="p-1 text-info">
{t('operationalStudies/manageTrainSchedule:searchingItinerary')}
</div>
<div className="p-1 text-info">
<div className="d-flex align-items-center justify-content-center mb-3">
<span className="mr-2">
{t('operationalStudies/manageTrainSchedule:pleaseWait')}
</div>
<Spinner className="p-1" />
</>
</span>
<Spinner />
</div>
)}

<div className="text-center p-1">
<button
className="btn btn-sm btn-primary "
className="btn btn-sm btn-secondary"
type="button"
onClick={cancelStdcmRequest}
>
Expand Down
Binary file removed front/src/assets/pictures/rabbit.png
Binary file not shown.