Skip to content

Commit b4ec840

Browse files
Fix displaying of Endpoint groups #233
1 parent 34df1e0 commit b4ec840

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/digma/intellij/plugin/ui/list/insights/InsightsListCellRenderer.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ class InsightsListCellRenderer : AbstractPanelListCellRenderer() {
102102
val endpoint = routeInfo.shortName
103103
if(routeInfo.schema == HTTP_SCHEMA){
104104
val split =endpoint.split(' ')
105-
return GroupViewModel(asHtml("${spanBold("HTTP")} ${span("${split[0].uppercase()} ${split[1]}")}"), Laf.Icons.Insight.INTERFACE)
105+
val lastElementIndex = split.size - 1
106+
val schemaName = if (split.size < 3) { "HTTP" } else { split[lastElementIndex - 2].uppercase()}
107+
return GroupViewModel(asHtml("${spanBold(schemaName)} ${span("${split[lastElementIndex - 1].uppercase()} ${split[lastElementIndex]}")}"), Laf.Icons.Insight.INTERFACE)
106108
}
107109
if(routeInfo.schema == RPC_SCHEMA){
108110
return GroupViewModel(asHtml(span(endpoint)), Laf.Icons.Insight.INTERFACE)

0 commit comments

Comments
 (0)