From 0a55b98164cdbf7f5c6d8791f1aece69f26f037a Mon Sep 17 00:00:00 2001 From: Bogdan Kostov Date: Sat, 23 Dec 2023 19:45:06 +0100 Subject: [PATCH] [Update] Change the url used to fetch entity lists for the dashboard - related to changes in server feature/use-entity-summary-for-dashboard --- src/services/failureModesTableService.tsx | 3 ++- src/services/faultTreeService.tsx | 2 +- src/services/systemService.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/failureModesTableService.tsx b/src/services/failureModesTableService.tsx index d10f4b90..621e77b1 100644 --- a/src/services/failureModesTableService.tsx +++ b/src/services/failureModesTableService.tsx @@ -17,7 +17,7 @@ import {handleServerError} from "@services/utils/responseUtils"; export const findAll = async (): Promise => { try { const response = await axiosClient.get( - '/failureModesTable', + '/failureModesTable/summaries', { headers: authHeaders() } @@ -133,6 +133,7 @@ export const createAggregate = async (table: CreateFailureModesTable): Promise, rpnsMap: Map): FailureModesRow[] => { + // this transformation does not follow the FMEA generation rules established in issues/46 return Array.from(eventPathsMap).map(([key, path]) => { const rpn = rpnsMap.get(key) return { diff --git a/src/services/faultTreeService.tsx b/src/services/faultTreeService.tsx index f5d708ee..ece59294 100644 --- a/src/services/faultTreeService.tsx +++ b/src/services/faultTreeService.tsx @@ -15,7 +15,7 @@ import {handleServerError} from "@services/utils/responseUtils"; export const findAll = async (): Promise => { try { const response = await axiosClient.get( - '/faultTrees', + '/faultTrees/summaries', { headers: authHeaders() } diff --git a/src/services/systemService.tsx b/src/services/systemService.tsx index ad9b8afe..58717c28 100644 --- a/src/services/systemService.tsx +++ b/src/services/systemService.tsx @@ -11,7 +11,7 @@ import { FailureMode } from "@models/failureModeModel"; export const findAll = async (): Promise => { try { const response = await axiosClient.get( - '/systems', + '/systems/summaries', { headers: authHeaders() }