This repository was archived by the owner on Jun 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ const actions = {
134134 . query ( 'queryServices' )
135135 . params ( params )
136136 . then ( ( res : AxiosResponse ) => {
137- context . commit ( types . SET_PROFILE_ERRORS , { msg : 'serviceErrors ' , desc : res . data . errors || '' } ) ;
137+ context . commit ( types . SET_PROFILE_ERRORS , { msg : 'serviceProfileErrors ' , desc : res . data . errors || '' } ) ;
138138 if ( res . data . errors ) {
139139 return context . commit ( types . SET_SERVICES , [ ] ) ;
140140 }
Original file line number Diff line number Diff line change @@ -580,7 +580,7 @@ const actions: ActionTree<State, any> = {
580580 . query ( 'queryServices' )
581581 . params ( params )
582582 . then ( ( res : AxiosResponse ) => {
583- context . commit ( types . SET_TOPO_ERRORS , { msg : 'serviceErrors ' , desc : res . data . errors } ) ;
583+ context . commit ( types . SET_TOPO_ERRORS , { msg : 'serviceTopoErrors ' , desc : res . data . errors } ) ;
584584 if ( res . data . errors ) {
585585 return [ ] ;
586586 }
@@ -773,7 +773,7 @@ const actions: ActionTree<State, any> = {
773773 return ;
774774 }
775775 const topo = res . data . data ;
776- const calls = [ ] as any ;
776+ let calls = [ ] as any ;
777777 let nodes = [ ] as any ;
778778 for ( const key of Object . keys ( topo ) ) {
779779 calls . push ( ...topo [ key ] . calls ) ;
@@ -792,6 +792,13 @@ const actions: ActionTree<State, any> = {
792792 }
793793 return prev ;
794794 } , [ ] ) ;
795+ calls = calls . reduce ( ( prev : Call [ ] , next : Call ) => {
796+ if ( ! obj [ next . id ] ) {
797+ obj [ next . id ] = true ;
798+ prev . push ( next ) ;
799+ }
800+ return prev ;
801+ } , [ ] ) ;
795802 const queryVariables = [ '$duration: Duration!' ] ;
796803 const fragments = calls
797804 . map ( ( call : Call & EndpointDependencyConidition , index : number ) => {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ const actions: ActionTree<State, any> = {
145145 . query ( 'queryServices' )
146146 . params ( params )
147147 . then ( ( res : AxiosResponse ) => {
148- context . commit ( types . SET_TRACE_ERRORS , { msg : 'serviceError ' , desc : res . data . errors || '' } ) ;
148+ context . commit ( types . SET_TRACE_ERRORS , { msg : 'serviceTraceError ' , desc : res . data . errors || '' } ) ;
149149 if ( res . data . errors ) {
150150 context . commit ( types . SET_SERVICES , [ ] ) ;
151151 return ;
You can’t perform that action at this time.
0 commit comments