Skip to content

Commit d7a2f76

Browse files
authored
Refactor imports to use common UI fetch functions (#3395)
Signed-off-by: achour94 <[email protected]>
1 parent 325c366 commit d7a2f76

31 files changed

+70
-116
lines changed

src/services/directory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetchJson, getRequestParamFromList } from './utils';
9-
import { ElementAttributes } from '@gridsuite/commons-ui';
8+
import { getRequestParamFromList } from './utils';
9+
import { backendFetchJson, ElementAttributes } from '@gridsuite/commons-ui';
1010
import type { UUID } from 'node:crypto';
1111

1212
const PREFIX_DIRECTORY_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/directory';

src/services/dynamic-security-analysis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetch, backendFetchJson } from './utils';
8+
import { backendFetch, backendFetchJson } from '@gridsuite/commons-ui';
99
import type { UUID } from 'node:crypto';
1010

1111
const PREFIX_DYNAMIC_SECURITY_ANALYSIS_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/dynamic-security-analysis';

src/services/dynamic-simulation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetch, backendFetchJson } from './utils';
8+
import { backendFetch, backendFetchJson } from '@gridsuite/commons-ui';
99
import type { UUID } from 'node:crypto';
1010

1111
const PREFIX_DYNAMIC_SIMULATION_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/dynamic-simulation';

src/services/explore.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
*/
77

88
import { ContingencyList } from './study/contingency-list';
9-
import { backendFetch } from './utils';
109
import type { UUID } from 'node:crypto';
11-
import { ElementType } from '@gridsuite/commons-ui';
10+
import { backendFetch, ElementType } from '@gridsuite/commons-ui';
1211
import { SpreadsheetCollection, SpreadsheetConfig } from 'components/spreadsheet-view/types/spreadsheet.type';
1312

1413
const PREFIX_EXPLORE_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/explore';

src/services/loadflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetchJson } from './utils';
8+
import { backendFetchJson } from '@gridsuite/commons-ui';
99

1010
const PREFIX_LOADFLOW_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/loadflow';
1111

src/services/network-conversion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import type { UUID } from 'node:crypto';
9-
import { backendFetchJson } from './utils';
9+
import { backendFetchJson } from '@gridsuite/commons-ui';
1010

1111
const PREFIX_NETWORK_CONVERSION_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/network-conversion';
1212

src/services/network-modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetch, backendFetchJson } from './utils';
8+
import { backendFetch, backendFetchJson } from '@gridsuite/commons-ui';
99
import type { UUID } from 'node:crypto';
1010
import { LineTypeInfo } from '../components/dialogs/line-types-catalog/line-catalog.type';
1111

src/services/root-network.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import { RootNetworkInfos } from 'components/graph/menus/network-modifications/network-modification-menu.type';
99
import { PREFIX_STUDY_QUERIES, getStudyUrl } from './study';
10-
import { backendFetch, backendFetchJson } from './utils';
10+
import { backendFetch, backendFetchJson } from '@gridsuite/commons-ui';
1111
import type { UUID } from 'node:crypto';
1212

1313
export function fetchRootNetworks(studyUuid: UUID) {

src/services/sensitivity-analysis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { backendFetchJson } from './utils';
8+
import { backendFetchJson } from '@gridsuite/commons-ui';
99

1010
const PREFIX_SENSITIVITY_ANALYSIS_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/sensitivity-analysis';
1111

src/services/short-circuit-analysis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import type { UUID } from 'node:crypto';
9-
import { backendFetch } from './utils';
9+
import { backendFetch } from '@gridsuite/commons-ui';
1010

1111
const PREFIX_SHORT_CIRCUIT_ANALYSIS_SERVER_QUERIES = import.meta.env.VITE_API_GATEWAY + '/shortcircuit';
1212

0 commit comments

Comments
 (0)