diff --git a/CHANGELOG.md b/CHANGELOG.md index c9cda7876..83b549726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [2.11.0] ### Changed - If $/snyk.hasAuthenticated transmits an API URL, this is saved in the settings. +- Added a description of custom endpoints to settings dialog. ## [2.10.0] ### Changed diff --git a/src/main/kotlin/io/snyk/plugin/ui/SnykSettingsDialog.kt b/src/main/kotlin/io/snyk/plugin/ui/SnykSettingsDialog.kt index 9fddc5c6b..76ff5a0d3 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/SnykSettingsDialog.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/SnykSettingsDialog.kt @@ -205,7 +205,7 @@ class SnykSettingsDialog( /** General settings ------------------ */ - val generalSettingsPanel = JPanel(UIGridLayoutManager(7, 3, JBUI.emptyInsets(), -1, -1)) + val generalSettingsPanel = JPanel(UIGridLayoutManager(8, 3, JBUI.emptyInsets(), -1, -1)) generalSettingsPanel.border = IdeBorderFactory.createTitledBorder("General settings") rootPanel.add( @@ -320,11 +320,30 @@ class SnykSettingsDialog( ), ) + val endpointDescriptionLabel = + JLabel( + "Sets API endpoint to use for Snyk requests. Useful for custom Snyk setups.
" + + "E.g. https://api.eu.snyk.io.", + ).apply { font = FontUtil.minusOne(this.font) } + + generalSettingsPanel.add( + endpointDescriptionLabel, + baseGridConstraints( + row = 5, + column = 1, + colSpan = 2, + indent = 0, + anchor = UIGridConstraints.ANCHOR_WEST, + fill = UIGridConstraints.FILL_NONE, + hSizePolicy = UIGridConstraints.SIZEPOLICY_CAN_SHRINK or UIGridConstraints.SIZEPOLICY_CAN_GROW, + ), + ) + ignoreUnknownCACheckBox.text = "Ignore unknown CA" generalSettingsPanel.add( ignoreUnknownCACheckBox, baseGridConstraints( - row = 5, + row = 6, column = 1, colSpan = 1, anchor = UIGridConstraints.ANCHOR_WEST, @@ -339,7 +358,7 @@ class SnykSettingsDialog( generalSettingsPanel.add( organizationLabel, baseGridConstraintsAnchorWest( - row = 6, + row = 7, indent = 0, ), ) @@ -347,7 +366,7 @@ class SnykSettingsDialog( generalSettingsPanel.add( organizationTextField, baseGridConstraints( - row = 6, + row = 7, column = 1, colSpan = 1, anchor = UIGridConstraints.ANCHOR_WEST, @@ -368,7 +387,7 @@ class SnykSettingsDialog( generalSettingsPanel.add( organizationContextHelpLabel, baseGridConstraintsAnchorWest( - row = 6, + row = 7, column = 2, indent = 0, fill = UIGridConstraints.FILL_NONE,