Sonarqube小部件运行时配置的单选选项
我有一个小部件,假设它看起来像这样:Sonarqube小部件运行时配置的单选选项,sonarqube,Sonarqube,我有一个小部件,假设它看起来像这样: @UserRole(UserRole.USER) @Description("I am a sample widget") @WidgetCategory({"Global"}) @WidgetProperties({ @WidgetProperty(key = "widgetTitle"), @WidgetProperty(key = "mySelect", type = WidgetPropertyType.SINGLE_SELECT_L
@UserRole(UserRole.USER)
@Description("I am a sample widget")
@WidgetCategory({"Global"})
@WidgetProperties({
@WidgetProperty(key = "widgetTitle"),
@WidgetProperty(key = "mySelect", type = WidgetPropertyType.SINGLE_SELECT_LIST, defaultValue = "a",
optional = false, options = {
"a", "b", "c"
})
})
public class MySuperDuperWidget
extends AbstractRubyTemplate
implements RubyRailsWidget
{
这完全有效,我得到了一个下拉列表“a”,“b”和“c”。但如果这些都不是固定的选择呢?我想做一些逻辑(比如对另一台服务器进行rest调用,并找出今天哪些可能的选择是有效的),然后在运行时填充这个下拉列表
我如何才能做到这一点?目前不支持这一点,目前我们还没有支持这一点的计划。解决方法是什么?在普通小部件计划之外滚动您自己的模板?