File tree Expand file tree Collapse file tree 3 files changed +21
-15
lines changed
karavan-app/src/main/webui/src/designer/route/element
karavan-designer/src/designer/route/element
karavan-space/src/designer/route/element Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ export function DslElementHeader(props: Props) {
139139
140140 function hasElements ( rc : RouteConfigurationDefinition ) : boolean {
141141 return ( rc . interceptFrom !== undefined && rc . interceptFrom . length > 0 )
142- || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143- || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144- || ( rc . onException !== undefined && rc . onException . length > 0 )
145- || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
142+ || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143+ || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144+ || ( rc . onException !== undefined && rc . onException . length > 0 )
145+ || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
146146 }
147147
148148 function getHeaderIconClasses ( ) : string {
@@ -225,7 +225,9 @@ export function DslElementHeader(props: Props) {
225225 } else if ( isKamelet ( ) && step . dslName === 'FromDefinition' && ( step as any ) . uri === 'kamelet:source' ) {
226226 return "Source" ;
227227 } else {
228- return ( step as any ) . description ? ( step as any ) . description : CamelUi . getElementTitle ( props . step ) ;
228+ let description : string = ( step as any ) . description ;
229+ description = description !== undefined && description ?. length > 32 ? description . substring ( 0 , 32 ) . concat ( "..." ) : description ;
230+ return description ? description : CamelUi . getElementTitle ( props . step ) ;
229231 }
230232 }
231233
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ export function DslElementHeader(props: Props) {
139139
140140 function hasElements ( rc : RouteConfigurationDefinition ) : boolean {
141141 return ( rc . interceptFrom !== undefined && rc . interceptFrom . length > 0 )
142- || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143- || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144- || ( rc . onException !== undefined && rc . onException . length > 0 )
145- || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
142+ || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143+ || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144+ || ( rc . onException !== undefined && rc . onException . length > 0 )
145+ || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
146146 }
147147
148148 function getHeaderIconClasses ( ) : string {
@@ -225,7 +225,9 @@ export function DslElementHeader(props: Props) {
225225 } else if ( isKamelet ( ) && step . dslName === 'FromDefinition' && ( step as any ) . uri === 'kamelet:source' ) {
226226 return "Source" ;
227227 } else {
228- return ( step as any ) . description ? ( step as any ) . description : CamelUi . getElementTitle ( props . step ) ;
228+ let description : string = ( step as any ) . description ;
229+ description = description !== undefined && description ?. length > 32 ? description . substring ( 0 , 32 ) . concat ( "..." ) : description ;
230+ return description ? description : CamelUi . getElementTitle ( props . step ) ;
229231 }
230232 }
231233
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ export function DslElementHeader(props: Props) {
139139
140140 function hasElements ( rc : RouteConfigurationDefinition ) : boolean {
141141 return ( rc . interceptFrom !== undefined && rc . interceptFrom . length > 0 )
142- || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143- || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144- || ( rc . onException !== undefined && rc . onException . length > 0 )
145- || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
142+ || ( rc . intercept !== undefined && rc . intercept . length > 0 )
143+ || ( rc . interceptSendToEndpoint !== undefined && rc . interceptSendToEndpoint . length > 0 )
144+ || ( rc . onException !== undefined && rc . onException . length > 0 )
145+ || ( rc . onCompletion !== undefined && rc . onCompletion . length > 0 )
146146 }
147147
148148 function getHeaderIconClasses ( ) : string {
@@ -225,7 +225,9 @@ export function DslElementHeader(props: Props) {
225225 } else if ( isKamelet ( ) && step . dslName === 'FromDefinition' && ( step as any ) . uri === 'kamelet:source' ) {
226226 return "Source" ;
227227 } else {
228- return ( step as any ) . description ? ( step as any ) . description : CamelUi . getElementTitle ( props . step ) ;
228+ let description : string = ( step as any ) . description ;
229+ description = description !== undefined && description ?. length > 32 ? description . substring ( 0 , 32 ) . concat ( "..." ) : description ;
230+ return description ? description : CamelUi . getElementTitle ( props . step ) ;
229231 }
230232 }
231233
You can’t perform that action at this time.
0 commit comments