@@ -13,11 +13,12 @@ import { useTheme } from '@mui/material/styles';
13
13
import LinearProgress from '@mui/material/LinearProgress' ;
14
14
import { SingleLineDiagramViewer , SLDMetadata } from '@powsybl/network-viewer' ;
15
15
import { styles , MAX_HEIGHT_VOLTAGE_LEVEL , MAX_WIDTH_VOLTAGE_LEVEL , NoSvg , MIN_WIDTH , Svg } from '../diagram-common' ;
16
- import { mergeSx , useIntlRef , useSnackMessage } from '@gridsuite/commons-ui' ;
16
+ import { ComputingType , mergeSx , useIntlRef , useSnackMessage } from '@gridsuite/commons-ui' ;
17
17
import { Paper } from '@mui/material' ;
18
18
import DiagramHeader from '../diagram-header' ;
19
19
import { fetchSvg } from '../../../services/study' ;
20
20
import { AppState } from 'redux/reducer' ;
21
+ import RunningStatus from 'components/utils/running-status' ;
21
22
22
23
interface PositionDiagramProps {
23
24
diagramTitle : string ;
@@ -43,6 +44,7 @@ const PositionDiagram = forwardRef((props: PositionDiagramProps, ref: Ref<HTMLDi
43
44
const { svgType, disabled } = props ;
44
45
45
46
const currentNode = useSelector ( ( state : AppState ) => state . currentTreeNode ) ;
47
+ const loadFlowStatus = useSelector ( ( state : AppState ) => state . computingStatus [ ComputingType . LOAD_FLOW ] ) ;
46
48
47
49
const [ loadingState , updateLoadingState ] = useState < boolean > ( false ) ;
48
50
@@ -159,7 +161,10 @@ const PositionDiagram = forwardRef((props: PositionDiagramProps, ref: Ref<HTMLDi
159
161
ref = { ref }
160
162
elevation = { 4 }
161
163
square = { true }
162
- sx = { styles . paperBorders }
164
+ sx = { mergeSx (
165
+ styles . paperBorders ,
166
+ loadFlowStatus !== RunningStatus . SUCCEED ? styles . divDiagramInvalid : undefined
167
+ ) }
163
168
style = { {
164
169
pointerEvents : 'auto' ,
165
170
width : serverWidth ,
0 commit comments