From 6aeb6fbcaa4f9cfac6e2c1114af07f89ff45b6f8 Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Fri, 5 May 2023 19:22:01 +0200 Subject: [PATCH 01/18] Dynamic simulation - TapChangerBlocking model for automaton --- src/components/1-atoms/Autocomplete.jsx | 8 +- src/components/3-organisms/Automaton.jsx | 83 ++++------------- src/components/3-organisms/Rule.jsx | 4 +- .../CurrentLimitAutomatonProperties.jsx | 86 ++++++++++++++++++ .../CurrentLimitAutomatonPropertiesStyle.js | 27 ++++++ .../TapChangerBlockingProperties.jsx | 59 ++++++++++++ .../TapChangerBlockingPropertiesStyle.js | 27 ++++++ src/constants/equipmentDefinition.js | 58 +++++++++--- src/containers/AutomatonContainer.jsx | 9 +- src/containers/MappingContainer.jsx | 4 +- src/redux/slices/Mapping.js | 91 ++++++++++++++++++- src/redux/slices/Network.js | 26 ++++-- src/utils/automata.js | 4 +- src/utils/optionsBuilders.js | 8 +- 14 files changed, 389 insertions(+), 105 deletions(-) create mode 100644 src/components/3-organisms/automaton/CurrentLimitAutomatonProperties.jsx create mode 100644 src/components/3-organisms/automaton/CurrentLimitAutomatonPropertiesStyle.js create mode 100644 src/components/3-organisms/automaton/TapChangerBlockingProperties.jsx create mode 100644 src/components/3-organisms/automaton/TapChangerBlockingPropertiesStyle.js diff --git a/src/components/1-atoms/Autocomplete.jsx b/src/components/1-atoms/Autocomplete.jsx index 063b3fe..a1cf816 100644 --- a/src/components/1-atoms/Autocomplete.jsx +++ b/src/components/1-atoms/Autocomplete.jsx @@ -142,17 +142,17 @@ const Autocomplete = (props) => { }; const renderOption = (props, option) => ( -
  • +
  • {highlightOptions.find((elem) => elem.value === option.value) ? ( - {option.label} + {option.label ?? option} ) : ( - option.label + option.label ?? option )}
  • ); @@ -167,7 +167,7 @@ const Autocomplete = (props) => { onChange={onValueChange} onInputChange={onInputChange} options={options} - getOptionLabel={(option) => option?.label ?? ''} + getOptionLabel={(option) => option?.label ?? option} autoHighlight={!isFree} renderOption={renderOption} className={classes.inputWidth} diff --git a/src/components/3-organisms/Automaton.jsx b/src/components/3-organisms/Automaton.jsx index dcdd0a2..94b52f9 100644 --- a/src/components/3-organisms/Automaton.jsx +++ b/src/components/3-organisms/Automaton.jsx @@ -11,11 +11,17 @@ import Select from '../1-atoms/Select'; import { CopyButton, DeleteButton } from '../1-atoms/buttons'; import { Grid, Paper, Typography } from '@mui/material'; import { getAutomatonFamiliesOptions } from '../../utils/optionsBuilders'; -import Autocomplete from '../1-atoms/Autocomplete'; import { useStyles } from './AutomatonStyle'; -import { getAutomatonProperty } from '../../utils/automata'; import ModelSelect from '../2-molecules/ModelSelect'; import { SetType } from '../../constants/models'; +import CurrentLimitAutomatonProperties from './automaton/CurrentLimitAutomatonProperties'; +import { AutomatonModels } from '../../constants/equipmentDefinition'; +import TapChangerBlockingProperties from './automaton/TapChangerBlockingProperties'; + +const AutomatonModelPropertiesComponents = { + [AutomatonModels.CURRENT_LIMIT_AUTOMATON]: CurrentLimitAutomatonProperties, + [AutomatonModels.TAP_CHANGER_BLOCKING]: TapChangerBlockingProperties, +}; const Automaton = (props) => { const { @@ -41,13 +47,13 @@ const Automaton = (props) => { const deleteAutomatonLabel = 'Delete automaton'; const copyAutomatonLabel = 'Copy automaton'; const familyLabel = 'Of Family'; - const watchedElementLabel = 'On equipment'; - const propertiesLabel = 'Additional properties'; const onChangeProperty = (propertyName) => (propertyValue) => { changeProperty({ name: propertyName, value: propertyValue }); }; + const PropertiesComponent = AutomatonModelPropertiesComponents[model]; + return ( @@ -78,66 +84,17 @@ const Automaton = (props) => { /> - - - {`${watchedElementLabel} :`} - - - - - - {properties.length > 0 && ( - - - {`${propertiesLabel} :`} - - + {PropertiesComponent && ( + )} - {properties.map((property) => { - const modelProperty = getAutomatonProperty( - family, - property.name - ); - return ( - - - - {`${property.name} :`} - - - 0 - ) - } - value={property.value} - onChange={onChangeProperty(property.name)} - options={modelProperty?.values} - type={ - modelProperty?.type === 'number' - ? 'number' - : undefined - } - error={property.value === ''} - ignoreReset={ - !( - modelProperty?.values && - modelProperty?.values?.length > 0 - ) - } - /> - - - ); - })} { { {`${isAbsoluteLabel} :`} - + { {`${setLabel} :`} - + { error={family === ''} /> + ({ }, }), label: { - textAlign: 'right', + textAlign: 'left', marginTop: '12px', '& .MuiTypography-root': { fontWeight: 'bold', }, }, - value: { - margin: '8px', - '& .MuiFormControl-root .MuiInput-root': { - minHeight: '2em', - '& .MuiSelect-root': { - paddingTop: 0, - paddingBottom: 0, - }, - }, + select: { + textAlign: 'right', }, - select: {}, })); diff --git a/src/components/3-organisms/automaton/AutomatonProperties.js b/src/components/3-organisms/automaton/AutomatonProperties.js index 7f69f1a..ef180f1 100644 --- a/src/components/3-organisms/automaton/AutomatonProperties.js +++ b/src/components/3-organisms/automaton/AutomatonProperties.js @@ -7,13 +7,12 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Grid, Typography } from '@mui/material'; +import { Divider, Grid, Paper, Typography } from '@mui/material'; import Autocomplete from '../../1-atoms/Autocomplete'; import { useStyles } from './AutomatonPropertiesStyle'; import { + getAutomatonPropertiesByModel, getPossibleOptionsForProperty, - getAutomatonPropertiesByModelThenGroup, - UNKNOWN_GROUP, } from '../../../utils/automata'; const AutomatonProperties = ({ @@ -23,56 +22,34 @@ const AutomatonProperties = ({ }) => { const classes = useStyles(); - const propertiesByGroup = getAutomatonPropertiesByModelThenGroup( - automaton?.model - ); - const groupNames = Object.keys(propertiesByGroup); + const automatonProperties = + getAutomatonPropertiesByModel(automaton?.model) ?? {}; + const propertyNames = Object.keys(automatonProperties); return ( - <> - {groupNames.map((groupName) => { - const propertiesInGroup = propertiesByGroup[groupName]; - const propertyNames = Object.keys(propertiesInGroup); - return ( -
    - {groupName !== UNKNOWN_GROUP && ( - - - {`${groupName} :`} - - - )} - {propertyNames.map((propertyName) => { - const propertyDefinition = - propertiesInGroup[propertyName]; - const propertyValue = automaton[propertyName]; - const options = - propertyDefinition?.values ?? - (propertyDefinition?.mapping && - getPossibleOptionsForProperty( - propertyDefinition?.mapping, - networkPropertyValues - )) ?? - []; + propertyNames?.length > 0 && ( + + {propertyNames.map((propertyName, index) => { + const propertyDefinition = + automatonProperties[propertyName]; + const propertyValue = automaton[propertyName]; + const options = + propertyDefinition?.values ?? + (propertyDefinition?.mapping && + getPossibleOptionsForProperty( + propertyDefinition?.mapping, + networkPropertyValues + )) ?? + []; - return ( - - + return ( + + + + {`${propertyDefinition.label} :`} - + 0) @@ -80,6 +57,7 @@ const AutomatonProperties = ({ isMultiple={ propertyDefinition.multiple } + adaptiveWidth={false} value={ propertyValue ?? (propertyDefinition.multiple @@ -104,15 +82,26 @@ const AutomatonProperties = ({ ignoreReset={ !(options && options.length > 0) } + fixedWidth /> - ); - })} -
    - ); - })} - + {index !== propertyNames.length - 1 && ( + + + + )} +
    + +
    + ); + })} +
    + ) ); }; diff --git a/src/components/3-organisms/automaton/AutomatonPropertiesStyle.js b/src/components/3-organisms/automaton/AutomatonPropertiesStyle.js index 886f868..181f427 100644 --- a/src/components/3-organisms/automaton/AutomatonPropertiesStyle.js +++ b/src/components/3-organisms/automaton/AutomatonPropertiesStyle.js @@ -8,14 +8,14 @@ import makeStyles from '@mui/styles/makeStyles'; export const useStyles = makeStyles((theme) => ({ label: { - textAlign: 'right', + textAlign: 'left', marginTop: '12px', '& .MuiTypography-root': { fontWeight: 'bold', }, }, value: { - margin: '8px', + padding: '8px 8px', '& .MuiFormControl-root .MuiInput-root': { minHeight: '2em', '& .MuiSelect-root': { @@ -24,4 +24,7 @@ export const useStyles = makeStyles((theme) => ({ }, }, }, + group: { + backgroundColor: 'rgba(255, 255, 255, 0.16)', + }, })); diff --git a/src/constants/automaton/model/CurrentLimitAutomatonModel.js b/src/constants/automaton/model/CurrentLimitAutomatonModel.js index 002b9f0..5134cc9 100644 --- a/src/constants/automaton/model/CurrentLimitAutomatonModel.js +++ b/src/constants/automaton/model/CurrentLimitAutomatonModel.js @@ -30,7 +30,6 @@ const CurrentLimitAutomatonModel = { label: 'Two', }, ], - group: 'Additional properties', }, }, }; diff --git a/src/utils/automata.js b/src/utils/automata.js index f8b1afd..e91b014 100644 --- a/src/utils/automata.js +++ b/src/utils/automata.js @@ -32,31 +32,3 @@ export const getPossibleOptionsForProperty = ( label: possibleValue, })); }; - -const FIELD_GROUP = 'group'; -export const UNKNOWN_GROUP = 'Unknown Group'; - -/** - * Get automaton property definitions of a model then grouping in an object - * @param model a model's name - * @returns {{}} an object which groups property definitions of a model - */ -export const getAutomatonPropertiesByModelThenGroup = (model) => { - const propertiesDefinition = getAutomatonPropertiesByModel(model) ?? {}; - - // grouping by the 'group' attribute, absence of 'group' attribute means UNKNOWN_GROUP - return Object.entries(propertiesDefinition).reduce( - (result, [key, value]) => { - let groupName = value[FIELD_GROUP]; - if (!groupName) { - groupName = UNKNOWN_GROUP; - } - if (!result[groupName]) { - result[`${groupName}`] = {}; - } - result[`${groupName}`][key] = value; - return result; - }, - {} - ); -}; From db5c0ae32afd432c9ce804196c4cc2a556b1e943 Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Thu, 25 May 2023 14:17:07 +0200 Subject: [PATCH 14/18] Clean also current network id when a selection change occurs on mapping, script, new mapping, rename mapping --- src/components/3-organisms/automaton/AutomatonProperties.js | 3 +-- src/redux/slices/Network.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/3-organisms/automaton/AutomatonProperties.js b/src/components/3-organisms/automaton/AutomatonProperties.js index ef180f1..62a9e04 100644 --- a/src/components/3-organisms/automaton/AutomatonProperties.js +++ b/src/components/3-organisms/automaton/AutomatonProperties.js @@ -44,7 +44,7 @@ const AutomatonProperties = ({ return ( - + {`${propertyDefinition.label} :`} @@ -57,7 +57,6 @@ const AutomatonProperties = ({ isMultiple={ propertyDefinition.multiple } - adaptiveWidth={false} value={ propertyValue ?? (propertyDefinition.multiple diff --git a/src/redux/slices/Network.js b/src/redux/slices/Network.js index e2af7e4..2bb1c43 100644 --- a/src/redux/slices/Network.js +++ b/src/redux/slices/Network.js @@ -96,6 +96,7 @@ export const getNetworkNames = createAsyncThunk( const reducers = { cleanNetwork: (state) => { state.propertyValues = []; + state.currentNetwork = ''; }, }; From c0e0a33a22d1a9dd7fed820a8033549c702920eb Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Thu, 25 May 2023 14:43:20 +0200 Subject: [PATCH 15/18] In automaton, move properties under the group parameter set --- src/components/3-organisms/Automaton.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/3-organisms/Automaton.jsx b/src/components/3-organisms/Automaton.jsx index 57f8bc2..eace755 100644 --- a/src/components/3-organisms/Automaton.jsx +++ b/src/components/3-organisms/Automaton.jsx @@ -75,11 +75,6 @@ const Automaton = (props) => { - { controlledParameters={controlledParameters} isNetworkAttached={isNetworkAttached} /> + ); }; From e55555564540723242c672c1b439187c70e1e9f9 Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Thu, 25 May 2023 17:02:55 +0200 Subject: [PATCH 16/18] Change label 'Rules' => 'Models' and separate ModelSelect into two components: ModelSelect and SetGroupSelect --- src/components/2-molecules/ModelSelect.jsx | 130 ++------------- .../2-molecules/ModelSelectStyle.js | 17 -- src/components/2-molecules/SetGroupSelect.jsx | 149 ++++++++++++++++++ .../2-molecules/SetGroupSelectStyle.js | 24 +++ src/components/3-organisms/Automaton.jsx | 15 +- src/components/3-organisms/Rule.jsx | 13 +- src/components/3-organisms/SetEditor.jsx | 19 ++- src/components/3-organisms/SetGroupEditor.jsx | 6 +- src/containers/MappingContainer.jsx | 8 +- 9 files changed, 225 insertions(+), 156 deletions(-) create mode 100644 src/components/2-molecules/SetGroupSelect.jsx create mode 100644 src/components/2-molecules/SetGroupSelectStyle.js diff --git a/src/components/2-molecules/ModelSelect.jsx b/src/components/2-molecules/ModelSelect.jsx index 2593a48..1eb0fcb 100644 --- a/src/components/2-molecules/ModelSelect.jsx +++ b/src/components/2-molecules/ModelSelect.jsx @@ -1,81 +1,23 @@ -import { Box, Checkbox, Grid, Typography } from '@mui/material'; +/** + * Copyright (c) 2021, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +import { Box, Grid, Typography } from '@mui/material'; import Select from '../1-atoms/Select'; import { getModelsOptions } from '../../utils/optionsBuilders'; import { useStyles } from './ModelSelectStyle'; -import React, { useEffect, useState } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; -import { SetType } from '../../constants/models'; -import { EditButton } from '../1-atoms/buttons'; const modelLabel = 'should be mapped to'; -const setLabel = 'and use parameters group'; -const editGroupLabel = 'Edit the parameters group and/or the parameters sets'; -const simpledEditLabel = - 'Cannot edit sets without enabling parameters management'; -const newGroupLabel = 'Create new group'; -const isAbsoluteLabel = 'All equipments share the same .par file'; - -const parName = (type, name) => - (type === SetType.SUFFIX ? '{id}' : '') + - name + - (type === SetType.PREFIX ? '{id}' : ''); const ModelSelect = (props) => { - const { - model, - models, - changeModel, - setGroup, - groupType, - changeGroup, - editGroup, - controlledParameters = false, - isNetworkAttached, - } = props; - const mappedModel = models.find( - (modelToTest) => modelToTest.name === model - ); - - const groups = mappedModel ? mappedModel.groups : []; - - const foundGroup = mappedModel?.groups.find( - (group) => group.name === setGroup && group.type === groupType - ); - - const [isAbsolute, setIsAbsolute] = useState( - ![SetType.PREFIX, SetType.SUFFIX].includes(groupType) - ); + const { model, models, changeModel } = props; - useEffect(() => { - // Update isAbsolute according to the group type for the rule - if (groupType) { - setIsAbsolute( - ![SetType.PREFIX, SetType.SUFFIX].includes(groupType) - ); - } - }, [groupType]); - - const onAbsoluteChange = () => { - setIsAbsolute(!isAbsolute); - changeGroup({ name: '', type: '' }); - }; - const groupOptions = groups - .filter((group) => - isAbsolute - ? group.type === SetType.FIXED - : group.type !== SetType.FIXED - ) - .map((group) => ({ - label: parName(group.type, group.name), - value: group, - })); - groupOptions.push({ label: newGroupLabel, value: '' }); - - const errorInParams = - controlledParameters && - (foundGroup === undefined || foundGroup.setsNumber === 0); - - const classes = useStyles({ errorInParams }); + const classes = useStyles(); return ( @@ -94,50 +36,6 @@ const ModelSelect = (props) => { /> - - - {`${isAbsoluteLabel} :`} - - - - - - - - {`${setLabel} :`} - - - + + + + + + + + + ); +}; + +SetGroupSelect.propTypes = { + model: PropTypes.string.isRequired, + models: PropTypes.arrayOf(PropTypes.object).isRequired, + setGroup: PropTypes.string.isRequired, + groupType: PropTypes.string.isRequired, + changeGroup: PropTypes.func.isRequired, + editGroup: PropTypes.func.isRequired, + controlledParameters: PropTypes.bool, + isNetworkAttached: PropTypes.bool.isRequired, +}; + +export default SetGroupSelect; diff --git a/src/components/2-molecules/SetGroupSelectStyle.js b/src/components/2-molecules/SetGroupSelectStyle.js new file mode 100644 index 0000000..d4b4b1a --- /dev/null +++ b/src/components/2-molecules/SetGroupSelectStyle.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2023, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +import makeStyles from '@mui/styles/makeStyles'; + +export const useStyles = makeStyles((theme) => ({ + titleSelect: { + textAlign: 'right', + }, + box: {}, + button: ({ errorInParams }) => ({ + justifyContent: 'center', + display: 'flex', + '& .MuiIconButton-root .MuiIconButton-label .MuiSvgIcon-root': { + fontSize: '2em', + pointerEvents: 'auto', + color: errorInParams ? 'red' : 'unset', + }, + }), +})); diff --git a/src/components/3-organisms/Automaton.jsx b/src/components/3-organisms/Automaton.jsx index eace755..2a189c5 100644 --- a/src/components/3-organisms/Automaton.jsx +++ b/src/components/3-organisms/Automaton.jsx @@ -15,6 +15,7 @@ import { useStyles } from './AutomatonStyle'; import ModelSelect from '../2-molecules/ModelSelect'; import { SetType } from '../../constants/models'; import AutomatonProperties from './automaton/AutomatonProperties'; +import SetGroupSelect from '../2-molecules/SetGroupSelect'; const Automaton = (props) => { const { @@ -79,6 +80,15 @@ const Automaton = (props) => { model={model} models={models} changeModel={changeModel} + /> + + { controlledParameters={controlledParameters} isNetworkAttached={isNetworkAttached} /> - ); }; diff --git a/src/components/3-organisms/Rule.jsx b/src/components/3-organisms/Rule.jsx index 8abd566..67af5bb 100644 --- a/src/components/3-organisms/Rule.jsx +++ b/src/components/3-organisms/Rule.jsx @@ -19,6 +19,7 @@ import ErrorIcon from '@mui/icons-material/Error'; import { getRuleEquipmentTypesOptions } from '../../utils/optionsBuilders'; import { useStyles } from './RuleStyle'; import ModelSelect from '../2-molecules/ModelSelect'; +import SetGroupSelect from '../2-molecules/SetGroupSelect'; const Rule = (props) => { const { @@ -57,8 +58,8 @@ const Rule = (props) => { const filterLabel = 'Where'; const addFilterLabel = 'Add filter'; const addFilterGroupLabel = 'Add filter group'; - const deleteRuleLabel = 'Delete rule'; - const copyRuleLabel = 'Copy Rule'; + const deleteRuleLabel = 'Delete model'; + const copyRuleLabel = 'Copy model'; const useBasicModeLabel = 'Use simple filters mode'; const useAdvancedModeLabel = 'Use advanced filters mode'; const unusedFiltersLabel = 'You have unused filter(s)'; @@ -156,10 +157,14 @@ const Rule = (props) => { + { (param) => param.name === definition.name ); return ( - - + + {definition.name} - + { definition.origin !== ParameterOrigin.USER } + sx={{ width: '100%' }} /> - + diff --git a/src/components/3-organisms/SetGroupEditor.jsx b/src/components/3-organisms/SetGroupEditor.jsx index 5e903bf..b2c08ce 100644 --- a/src/components/3-organisms/SetGroupEditor.jsx +++ b/src/components/3-organisms/SetGroupEditor.jsx @@ -30,10 +30,10 @@ const SetGroupEditor = (props) => { return ( <> - + {`${nameLabel} :`} - + { {!isAbsolute && ( - + {`${typeLabel} :`} diff --git a/src/containers/MappingContainer.jsx b/src/containers/MappingContainer.jsx index 7075322..3eddaf6 100644 --- a/src/containers/MappingContainer.jsx +++ b/src/containers/MappingContainer.jsx @@ -49,11 +49,11 @@ import { AutomatonFamily } from '../constants/automatonDefinition'; import { RuleEquipmentTypes } from '../constants/equipmentType'; // TODO intl -const ADD_RULE_LABEL = 'Add a rule'; +const ADD_MODEL_LABEL = 'Add a model'; const CONVERT_LABEL = 'Convert to script'; const SAVE_LABEL = 'Save Mapping'; const ATTACH_LABEL = 'Attach a Network'; -const RULES_TITLE = 'Rules'; +const MODELS_TITLE = 'Models'; const AUTOMATA_TITLE = 'Automata'; const ADD_AUTOMATON_LABEL = 'Add an automaton'; const CONTROLLED_PARAMETERS_LABEL = 'Manage model parameters'; @@ -201,7 +201,7 @@ const MappingContainer = () => { }> - {RULES_TITLE} + {MODELS_TITLE} @@ -216,7 +216,7 @@ const MappingContainer = () => { From bde0667f78fe62cd592966882d03938ecf42d1ad Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Thu, 25 May 2023 17:45:40 +0200 Subject: [PATCH 17/18] Align delete and copy filter icons to the right --- src/components/3-organisms/Filter.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/3-organisms/Filter.jsx b/src/components/3-organisms/Filter.jsx index ac5fc21..04d8f2d 100644 --- a/src/components/3-organisms/Filter.jsx +++ b/src/components/3-organisms/Filter.jsx @@ -125,8 +125,14 @@ const Filter = (props) => { - - + + Date: Fri, 16 Jun 2023 17:40:59 +0200 Subject: [PATCH 18/18] TapChangerBlocking to TapChangerBlockingAutomaton --- src/constants/automaton/index.js | 6 +++--- ...BlockingModel.js => TapChangerBlockingAutomatonModel.js} | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/constants/automaton/model/{TapChangerBlockingModel.js => TapChangerBlockingAutomatonModel.js} (89%) diff --git a/src/constants/automaton/index.js b/src/constants/automaton/index.js index 20bd78f..9b8d3a5 100644 --- a/src/constants/automaton/index.js +++ b/src/constants/automaton/index.js @@ -5,13 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import TapChangerBlockingModel from './model/TapChangerBlockingModel'; +import TapChangerBlockingAutomatonModel from './model/TapChangerBlockingAutomatonModel'; import CurrentLimitAutomatonModel from './model/CurrentLimitAutomatonModel'; export const CommonAutomatonModelGroupPlugins = [ { - id: 'TapChangerBlockingModel', - model: TapChangerBlockingModel, + id: 'TapChangerBlockingAutomatonModel', + model: TapChangerBlockingAutomatonModel, }, { id: 'CurrentLimitAutomatonModel', diff --git a/src/constants/automaton/model/TapChangerBlockingModel.js b/src/constants/automaton/model/TapChangerBlockingAutomatonModel.js similarity index 89% rename from src/constants/automaton/model/TapChangerBlockingModel.js rename to src/constants/automaton/model/TapChangerBlockingAutomatonModel.js index 3e90a3c..8a4ba2b 100644 --- a/src/constants/automaton/model/TapChangerBlockingModel.js +++ b/src/constants/automaton/model/TapChangerBlockingAutomatonModel.js @@ -7,8 +7,8 @@ import { EquipmentType, PropertyType } from '../../equipmentType'; -const TapChangerBlockingModel = { - TapChangerBlocking: { +const TapChangerBlockingAutomatonModel = { + TapChangerBlockingAutomaton: { name: { type: PropertyType.STRING, label: 'Name', @@ -38,4 +38,4 @@ const TapChangerBlockingModel = { }, }; -export default TapChangerBlockingModel; +export default TapChangerBlockingAutomatonModel;