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

Add location id to the SA result #2473

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dfc1053
SA results: add locationId and handle the SLD opening.
AAJELLAL Dec 31, 2024
1fbf605
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
AAJELLAL Dec 31, 2024
28d6076
Merge branch 'main' into add-locationId-to-sa-result
souissimai Jan 6, 2025
940552a
SA results: change column names
AAJELLAL Jan 8, 2025
ed65b6f
fix style
AAJELLAL Jan 13, 2025
d2a620e
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
AAJELLAL Jan 13, 2025
99fea90
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Jan 27, 2025
5e439f3
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Jan 27, 2025
b28b9cb
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Jan 28, 2025
8cb13aa
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Jan 30, 2025
db04101
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Feb 18, 2025
46118b5
Add locationId column.
AAJELLAL Feb 24, 2025
6dbdd26
Some cleanup.
AAJELLAL Feb 24, 2025
8bfd551
Merge branch 'add-locationId-to-sa-result' of https://github.com/grid…
AAJELLAL Feb 24, 2025
df3d822
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
AAJELLAL Feb 24, 2025
95cfa9c
Merge branch 'main' into add-locationId-to-sa-result
AAJELLAL Feb 24, 2025
09b0c9d
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
AAJELLAL Feb 25, 2025
c446320
Merge branch 'add-locationId-to-sa-result' of https://github.com/grid…
AAJELLAL Feb 25, 2025
67fc4bc
Merge branch 'main' of https://github.com/gridsuite/gridstudy-app int…
Feb 26, 2025
c8a4d25
Merge branch 'main' into add-locationId-to-sa-result
AAJELLAL Feb 26, 2025
69d4bbd
Merge branch 'main' into add-locationId-to-sa-result
AAJELLAL Feb 26, 2025
0eb1371
Merge branch 'main' into add-locationId-to-sa-result
souissimai Feb 26, 2025
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 @@ -30,6 +30,7 @@ export const SecurityAnalysisResultN: FunctionComponent<SecurityAnalysisResultNP
const { limitViolation, subjectId } = preContingencyResult;
return {
subjectId: subjectId,
locationId: limitViolation?.locationId,
limitType: intl.formatMessage({
id: limitViolation?.limitType,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export const flattenNmKResultsContingencies = (intl: IntlShape, result: Constrai
const { limitViolation = {} as LimitViolation, subjectId } = constraint || {};

rows.push({
subjectId,
subjectId: subjectId,
locationId: limitViolation.locationId,
limitType: limitViolation.limitType
? intl.formatMessage({
id: limitViolation.limitType,
Expand Down Expand Up @@ -122,6 +123,7 @@ export const flattenNmKResultsConstraints = (intl: IntlShape, result: Contingenc
limit: limitViolation.limit,
value: limitViolation.value,
loading: limitViolation.loading,
locationId: limitViolation.locationId,
linkedElementId: subjectId,
});
});
Expand Down Expand Up @@ -150,8 +152,8 @@ export const securityAnalysisTableNColumnsDefinition = (
return [
makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'Equipment' }),
colId: 'subjectId',
field: 'subjectId',
colId: 'locationId',
field: 'locationId',
context: {
sortParams,
filterComponent: CustomAggridComparatorFilter,
Expand Down Expand Up @@ -368,6 +370,22 @@ export const securityAnalysisTableNmKContingenciesColumnsDefinition = (
},
},
}),
makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'Bus' }),
colId: 'locationId',
field: 'locationId',
context: {
sortParams: { ...sortParams, isChildren: true },
filterComponent: CustomAggridComparatorFilter,
filterComponentParams: {
filterParams: {
dataType: FILTER_DATA_TYPES.TEXT,
comparators: [FILTER_TEXT_COMPARATORS.STARTS_WITH, FILTER_TEXT_COMPARATORS.CONTAINS],
...filterParams,
},
},
},
}),
makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'ViolationType' }),
colId: 'limitType',
Expand All @@ -385,6 +403,7 @@ export const securityAnalysisTableNmKContingenciesColumnsDefinition = (
},
},
}),

makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'LimitName' }),
colId: 'limitName',
Expand Down Expand Up @@ -572,6 +591,22 @@ export const securityAnalysisTableNmKConstraintsColumnsDefinition = (
},
},
}),
makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'Bus' }),
colId: 'locationId',
field: 'locationId',
context: {
sortParams: { ...sortParams, isChildren: true },
filterComponent: CustomAggridComparatorFilter,
filterComponentParams: {
filterParams: {
dataType: FILTER_DATA_TYPES.TEXT,
comparators: [FILTER_TEXT_COMPARATORS.STARTS_WITH, FILTER_TEXT_COMPARATORS.CONTAINS],
...filterParams,
},
},
},
}),
makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'ViolationType' }),
colId: 'limitType',
Expand All @@ -589,6 +624,7 @@ export const securityAnalysisTableNmKConstraintsColumnsDefinition = (
},
},
}),

makeAgGridCustomHeaderColumn({
headerName: intl.formatMessage({ id: 'LimitName' }),
colId: 'limitName',
Expand Down Expand Up @@ -835,6 +871,7 @@ export const useFetchFiltersEnums = () => {

export const FROM_COLUMN_TO_FIELD_N: Record<string, string> = {
subjectId: 'subjectLimitViolation.subjectId',
locationId: 'locationId',
status: 'result.status',
limitType: 'limitType',
limitName: 'limitName',
Expand All @@ -847,6 +884,7 @@ export const FROM_COLUMN_TO_FIELD_N: Record<string, string> = {

export const FROM_COLUMN_TO_FIELD_NMK_CONTINGENCIES: Record<string, string> = {
subjectId: 'contingencyLimitViolations.subjectLimitViolation.subjectId',
locationId: 'contingencyLimitViolations.locationId',
contingencyId: 'contingencyId',
status: 'status',
limitType: 'contingencyLimitViolations.limitType',
Expand All @@ -860,6 +898,7 @@ export const FROM_COLUMN_TO_FIELD_NMK_CONTINGENCIES: Record<string, string> = {

export const FROM_COLUMN_TO_FIELD_NMK_LIMIT_VIOLATIONS: Record<string, string> = {
subjectId: 'subjectId',
locationId: 'contingencyLimitViolations.locationId',
contingencyId: 'contingencyLimitViolations.contingency.contingencyId',
status: 'contingencyLimitViolations.contingency.status',
limitType: 'contingencyLimitViolations.limitType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const SecurityAnalysisTable: FunctionComponent<SecurityAnalysisResultProp
(state: AppState) => state.computingStatus[ComputingType.SECURITY_ANALYSIS]
);
const rowsToShow = getRows(rows, securityAnalysisStatus);

const overlayNoRowsTemplate = getNoRowsMessage(
resultStatusMessages,
rows,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface LimitViolation {
loading?: number;
side?: string;
value?: number;
locationId?: string;
}

interface Element {
Expand All @@ -41,6 +42,7 @@ export interface Contingency {

export interface SecurityAnalysisNmkTableRow {
subjectId?: string;
locationId?: string;
acceptableDuration?: number | null;
status?: string;
contingencyEquipmentsIds?: (string | undefined)[];
Expand All @@ -61,7 +63,7 @@ export interface Constraint {
}

export interface ContingenciesFromConstraintItem {
subjectId: string;
subjectId?: string;
contingencies?: Contingency[];
}

Expand Down
1 change: 0 additions & 1 deletion src/components/study-pane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const StudyPane = ({ studyUuid, currentNode, currentRootNetworkUuid, ...props })
const { openDiagramView } = useDiagram();

const disabled = !isNodeBuilt(currentNode);

function openVoltageLevelDiagram(vlId) {
// TODO code factorization for displaying a VL via a hook
if (vlId) {
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@

"LimitType": "Limit type",
"ViolationType": "Violation type",
"Bus": "Bus",
"LimitSide": "Side",
"LimitName": "Limit name",
"LimitNameCurrentViolation": "Limit name",
Expand Down
1 change: 1 addition & 0 deletions src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@

"LimitType": "Type de limite",
"ViolationType": "Type de contrainte",
"Bus": "Noeud électrique",
"LimitSide": "Côté",
"LimitName": "Nom du seuil",
"Limit_name": "Seuil",
Expand Down
Loading