diff --git a/editoast/migrations/20240926-113351_ngraph_nodes/down.sql b/editoast/migrations/20240926-113351_macro_nodes/down.sql similarity index 100% rename from editoast/migrations/20240926-113351_ngraph_nodes/down.sql rename to editoast/migrations/20240926-113351_macro_nodes/down.sql diff --git a/editoast/migrations/20240926-113351_ngraph_nodes/up.sql b/editoast/migrations/20240926-113351_macro_nodes/up.sql similarity index 72% rename from editoast/migrations/20240926-113351_ngraph_nodes/up.sql rename to editoast/migrations/20240926-113351_macro_nodes/up.sql index f4a9e6a475d..c28c748f0f0 100644 --- a/editoast/migrations/20240926-113351_ngraph_nodes/up.sql +++ b/editoast/migrations/20240926-113351_macro_nodes/up.sql @@ -1,14 +1,14 @@ CREATE TABLE IF NOT EXISTS macro_node ( id int8 PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, scenario_id int8 NOT NULL, - position_x float8 NOT NULL, - position_y float8 NOT NULL, + position_x float8 NOT NULL, + position_y float8 NOT NULL, full_name varchar(255), connection_time int8 NOT NULL DEFAULT 0, - labels text[] NOT NULL, + labels text[] NOT NULL, trigram varchar(25), path_item_key varchar(255) NOT NULL, - UNIQUE (scenario_id, path_item_key) , + UNIQUE (scenario_id, path_item_key), CONSTRAINT fk_scenario FOREIGN KEY(scenario_id) REFERENCES scenario(id) diff --git a/editoast/openapi.yaml b/editoast/openapi.yaml index 77873cebc8d..62ac9a2acea 100644 --- a/editoast/openapi.yaml +++ b/editoast/openapi.yaml @@ -1867,7 +1867,6 @@ paths: get: tags: - scenarios - - nge summary: Get macro node list by scneario id parameters: - name: project_id @@ -1922,7 +1921,6 @@ paths: post: tags: - scenarios - - nge parameters: - name: project_id in: path @@ -1960,7 +1958,6 @@ paths: get: tags: - scenarios - - nge parameters: - name: project_id in: path @@ -2003,7 +2000,6 @@ paths: put: tags: - scenarios - - nge parameters: - name: project_id in: path @@ -2052,7 +2048,6 @@ paths: delete: tags: - scenarios - - ngraph parameters: - name: project_id in: path diff --git a/editoast/src/views/scenario/macro_nodes.rs b/editoast/src/views/scenario/macro_nodes.rs index 74ed790630e..48b4797ebe6 100644 --- a/editoast/src/views/scenario/macro_nodes.rs +++ b/editoast/src/views/scenario/macro_nodes.rs @@ -120,7 +120,7 @@ pub struct MacroNodeListResponse { /// Get macro node list by scneario id #[utoipa::path( get, path = "", - tag = "scenarios, nge", + tag = "scenarios", params(ProjectIdParam, StudyIdParam, ScenarioIdParam, PaginationQueryParam), responses( (status = 200, body = MacroNodeListResponse, description = "List of macro nodes for the requested scenario"), @@ -164,7 +164,7 @@ async fn list( #[utoipa::path( post, path = "", - tag = "scenarios, nge", + tag = "scenarios", request_body = MacroNodeForm, params(ProjectIdParam, StudyIdParam, ScenarioIdParam), responses( @@ -222,7 +222,7 @@ async fn create( #[utoipa::path( get, path = "", - tag = "scenarios, nge", + tag = "scenarios", params(ProjectIdParam, StudyIdParam, ScenarioIdParam, MacroNodeIdParam), responses( (status = 200, body = MacroNodeResponse, description = "The requested Macro node"), @@ -259,7 +259,7 @@ async fn get( #[utoipa::path( put, path = "", - tag = "scenarios, nge", + tag = "scenarios", params(ProjectIdParam, StudyIdParam, ScenarioIdParam, MacroNodeIdParam), request_body = MacroNodeForm, responses( @@ -326,7 +326,7 @@ async fn update( #[utoipa::path( delete, path = "", - tag = "scenarios, ngraph", + tag = "scenarios", params(ProjectIdParam, StudyIdParam, ScenarioIdParam, MacroNodeIdParam), responses( (status = 204, description = "The macro node was deleted successfully"), diff --git a/front/src/common/api/generatedEditoastApi.ts b/front/src/common/api/generatedEditoastApi.ts index 029c732a56e..7eccdcb4d34 100644 --- a/front/src/common/api/generatedEditoastApi.ts +++ b/front/src/common/api/generatedEditoastApi.ts @@ -11,8 +11,6 @@ export const addTagTypes = [ 'projects', 'studies', 'scenarios', - 'nge', - 'ngraph', 'rolling_stock_livery', 'search', 'speed_limit_tags', @@ -556,7 +554,7 @@ const injectedRtkApi = api url: `/projects/${queryArg.projectId}/studies/${queryArg.studyId}/scenarios/${queryArg.scenarioId}/macro_nodes`, params: { page: queryArg.page, page_size: queryArg.pageSize }, }), - providesTags: ['scenarios', 'nge'], + providesTags: ['scenarios'], }), postProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodes: build.mutation< PostProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesApiResponse, @@ -567,7 +565,7 @@ const injectedRtkApi = api method: 'POST', body: queryArg.macroNodeForm, }), - invalidatesTags: ['scenarios', 'nge'], + invalidatesTags: ['scenarios'], }), getProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeId: build.query< GetProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeIdApiResponse, @@ -576,7 +574,7 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/projects/${queryArg.projectId}/studies/${queryArg.studyId}/scenarios/${queryArg.scenarioId}/macro_nodes/${queryArg.nodeId}`, }), - providesTags: ['scenarios', 'nge'], + providesTags: ['scenarios'], }), putProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeId: build.mutation< PutProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeIdApiResponse, @@ -587,7 +585,7 @@ const injectedRtkApi = api method: 'PUT', body: queryArg.macroNodeForm, }), - invalidatesTags: ['scenarios', 'nge'], + invalidatesTags: ['scenarios'], }), deleteProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeId: build.mutation< DeleteProjectsByProjectIdStudiesAndStudyIdScenariosScenarioIdMacroNodesNodeIdApiResponse, @@ -597,7 +595,7 @@ const injectedRtkApi = api url: `/projects/${queryArg.projectId}/studies/${queryArg.studyId}/scenarios/${queryArg.scenarioId}/macro_nodes/${queryArg.nodeId}`, method: 'DELETE', }), - invalidatesTags: ['scenarios', 'ngraph'], + invalidatesTags: ['scenarios'], }), postRollingStock: build.mutation({ query: (queryArg) => ({