File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
component/flows/detail-page Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " web-ui" ,
3- "version" : " 0.4.2 " ,
3+ "version" : " 0.4.3 " ,
44 "private" : true ,
55 "license" : " Apache-2.0" ,
66 "dependencies" : {
Original file line number Diff line number Diff line change @@ -12,12 +12,13 @@ export const UPDATE_COMPONENT_ERROR = 'UPDATE_COMPONENT_ERROR';
1212export const CREATE_COMPONENT = 'CREATE_COMPONENT' ;
1313export const DELETE_COMPONENT = 'DELETE_COMPONENT' ;
1414
15- export const getComponents = ( ) => async ( dispatch ) => {
15+ export const getComponents = ( pageSize ) => async ( dispatch ) => {
1616 try {
1717 const result = await axios ( {
1818 method : 'get' ,
1919 url : `${ conf . endpoints . component } /components` ,
2020 withCredentials : true ,
21+ ...( pageSize ? { params : { 'page[size]' : pageSize } } : { } ) ,
2122 } ) ;
2223
2324 dispatch ( {
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ class FlowDetails extends React.PureComponent {
141141 constructor ( props ) {
142142 super ( props ) ;
143143 props . getFlows ( ) ;
144- props . getComponents ( ) ;
144+ props . getComponents ( 100 ) ;
145145 props . getSecrets ( ) ;
146146 this . state = {
147147 position : '' ,
@@ -592,7 +592,10 @@ class FlowDetails extends React.PureComponent {
592592 const newEdge = { ...edge , target : this . state . editNodeName } ;
593593
594594 const { nodes } = this . state . flow . graph ;
595- const { edges } = this . state . flow . graph ;
595+ let { edges } = this . state . flow . graph ;
596+ if ( edges . length === 1 && ! edges [ 0 ] . hasOwnProperty ( 'target' ) ) {
597+ edges = [ ] ;
598+ }
596599 const indexNode = nodes . findIndex ( ( item ) => item . id === selNode . id ) ;
597600 const newNodes = nodes . filter ( ( item ) => item . id !== selNode . id ) ;
598601 newNodes . splice ( indexNode , 0 , node ) ;
You can’t perform that action at this time.
0 commit comments