mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Alerting: UI changes required to support v3 and Auth in Kafka Contact Point (#61123)
This commit is contained in:
parent
b289b8ac6e
commit
d553a016cc
@ -163,6 +163,7 @@ func GetAvailableNotifiers() []*NotifierPlugin {
|
||||
Label: "Kafka REST Proxy",
|
||||
Element: ElementTypeInput,
|
||||
InputType: InputTypeText,
|
||||
Description: "Hint: If you are directly using v3 APIs hosted on a Confluent Kafka Server, you must append /kafka to the URL here. Example: https://localhost:8082/kafka",
|
||||
Placeholder: "http://localhost:8082",
|
||||
PropertyName: "kafkaRestProxy",
|
||||
Required: true,
|
||||
@ -175,6 +176,53 @@ func GetAvailableNotifiers() []*NotifierPlugin {
|
||||
PropertyName: "kafkaTopic",
|
||||
Required: true,
|
||||
},
|
||||
{
|
||||
Label: "Username",
|
||||
Element: ElementTypeInput,
|
||||
InputType: InputTypeText,
|
||||
PropertyName: "username",
|
||||
Required: false,
|
||||
},
|
||||
{
|
||||
Label: "Password",
|
||||
Element: ElementTypeInput,
|
||||
InputType: InputTypePassword,
|
||||
Description: "The password to use when making a call to the Kafka REST Proxy",
|
||||
PropertyName: "password",
|
||||
Required: false,
|
||||
Secure: true,
|
||||
},
|
||||
{
|
||||
Label: "API version",
|
||||
Element: ElementTypeSelect,
|
||||
InputType: InputTypeText,
|
||||
Description: "The API version to use when contacting the Kafka REST Server. By default v2 will be used.",
|
||||
PropertyName: "apiVersion",
|
||||
Required: false,
|
||||
SelectOptions: []SelectOption{
|
||||
{
|
||||
Value: "v2",
|
||||
Label: "v2",
|
||||
},
|
||||
{
|
||||
Value: "v3",
|
||||
Label: "v3",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Cluster ID",
|
||||
Element: ElementTypeInput,
|
||||
InputType: InputTypeText,
|
||||
Description: "v3 APIs require a clusterID to be specified.",
|
||||
Placeholder: "lkc-abcde",
|
||||
PropertyName: "kafkaClusterId",
|
||||
Required: true,
|
||||
ShowWhen: ShowWhen{
|
||||
Field: "apiVersion",
|
||||
Is: "v3",
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Description",
|
||||
Element: ElementTypeInput,
|
||||
|
@ -57,6 +57,8 @@ type SelectOption struct {
|
||||
}
|
||||
|
||||
// ShowWhen holds information about when options are dependant on other options.
|
||||
// Should be used when Element is ElementTypeSelect.
|
||||
// Does not work for ElementTypeCheckbox.
|
||||
type ShowWhen struct {
|
||||
Field string `json:"field"`
|
||||
Is string `json:"is"`
|
||||
|
Loading…
Reference in New Issue
Block a user