Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit fb1d30d

Browse files
saarschweidsschweid
andauthored
fix most of right panel (#248)
Co-authored-by: sschweid <sschweid@paloaltonetworks.com>
1 parent 8a2acd9 commit fb1d30d

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/main/kotlin/com/bridgecrew/ui/rightPanel/dictionaryDetails/DictionaryExtraInfoPanel.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,15 @@ abstract class DictionaryExtraInfoPanel : JPanel() {
6767
valueLabel.toolTipText = valueAsString
6868
add(valueLabel, valueConstraints)
6969
}
70+
71+
// Add a stub panel to push the dictionary to the top
72+
val constraints = GridBagConstraints().apply {
73+
weighty = 1.0
74+
anchor = GridBagConstraints.SOUTH
75+
fill = GridBagConstraints.VERTICAL
76+
}
77+
val emptyPanel = JPanel()
78+
emptyPanel.background = UIUtil.getEditorPaneBackground()
79+
add(emptyPanel, constraints)
7080
}
7181
}

src/main/kotlin/com/bridgecrew/ui/rightPanel/extraInfoPanel/CheckovExtraInfoPanel.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.bridgecrew.ui.rightPanel.extraInfoPanel
33
import com.bridgecrew.results.BaseCheckovResult
44
import com.bridgecrew.ui.CodeDiffPanel
55
import com.intellij.util.ui.UIUtil
6-
import java.awt.Dimension
76
import javax.swing.*
87

98
open class CheckovExtraInfoPanel(val result: BaseCheckovResult): JPanel() {
@@ -13,12 +12,6 @@ open class CheckovExtraInfoPanel(val result: BaseCheckovResult): JPanel() {
1312
background = UIUtil.getEditorPaneBackground()
1413
}
1514

16-
fun setDimensions(){
17-
if(result.fixDefinition == null) {
18-
add(Box.Filler(Dimension(0,0), Dimension(0, 0), Dimension(0, Short.MAX_VALUE.toInt())))
19-
}
20-
}
21-
2215
fun addCodeDiffPanel(){
2316
if(result.fixDefinition != null){
2417
add(CodeDiffPanel(result, true))

src/main/kotlin/com/bridgecrew/ui/rightPanel/extraInfoPanel/IacExtraInfoPanel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ class IacExtraInfoPanel(result: BaseCheckovResult): CheckovExtraInfoPanel(result
99
initLayout()
1010
add(IacDictionaryPanel(result))
1111
addCodeDiffPanel()
12-
setDimensions()
1312
}
1413
}

src/main/kotlin/com/bridgecrew/ui/rightPanel/extraInfoPanel/LicenseExtraInfoPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import com.bridgecrew.results.LicenseCheckovResult
44
import com.bridgecrew.ui.rightPanel.dictionaryDetails.LicenseDictionaryPanel
55

66
class LicenseExtraInfoPanel(result: LicenseCheckovResult) : CheckovExtraInfoPanel(result) {
7+
78
init {
89
initLayout()
910
add(LicenseDictionaryPanel(result))
1011
addCodeDiffPanel()
11-
setDimensions()
1212
}
1313
}

src/main/kotlin/com/bridgecrew/ui/rightPanel/extraInfoPanel/SecretsExtraInfoPanel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ class SecretsExtraInfoPanel(result: SecretsCheckovResult) : CheckovExtraInfoPane
99
initLayout()
1010
add(SecretsDictionaryPanel(result))
1111
addCodeDiffPanel()
12-
setDimensions()
1312
}
1413
}

src/main/kotlin/com/bridgecrew/ui/rightPanel/extraInfoPanel/VulnerabilitiesExtraInfoPanel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ class VulnerabilitiesExtraInfoPanel(result: VulnerabilityCheckovResult): Checkov
99
initLayout()
1010
add(VulnerabilitiesDictionaryPanel(result))
1111
addCodeDiffPanel()
12-
setDimensions()
1312
}
1413
}

0 commit comments

Comments
 (0)