mirror of
https://github.com/grafana/grafana.git
synced 2024-12-30 10:47:30 -06:00
Prometheus: Update healthcheck text message (#67401)
* the healthcheck is used outside the config save&test so change text message * fix e2e test
This commit is contained in:
parent
dac709b347
commit
f70efed2cb
@ -4,7 +4,7 @@ const dataSourceName = 'PromExemplar';
|
||||
const addDataSource = () => {
|
||||
e2e.flows.addDataSource({
|
||||
type: 'Prometheus',
|
||||
expectedAlertMessage: 'saved',
|
||||
expectedAlertMessage: 'Prometheus',
|
||||
name: dataSourceName,
|
||||
form: () => {
|
||||
e2e.components.DataSource.Prometheus.configPage.exemplarsAddButton().click();
|
||||
|
@ -64,15 +64,15 @@ func healthcheck(ctx context.Context, req *backend.CheckHealthRequest, i *instan
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return getHealthCheckMessage(logger, "Your configuration has been saved but there is an error.", err)
|
||||
return getHealthCheckMessage(logger, "There was an error returned querying the Prometheus API.", err)
|
||||
}
|
||||
|
||||
if resp.Responses[refID].Error != nil {
|
||||
return getHealthCheckMessage(logger, "Your configuration has been saved but there is an error.",
|
||||
return getHealthCheckMessage(logger, "There was an error returned querying the Prometheus API.",
|
||||
errors.New(resp.Responses[refID].Error.Error()))
|
||||
}
|
||||
|
||||
return getHealthCheckMessage(logger, "Successfully saved the configuration and queried the Prometheus API.", nil)
|
||||
return getHealthCheckMessage(logger, "Successfully queried the Prometheus API.", nil)
|
||||
}
|
||||
|
||||
func getHealthCheckMessage(logger log.Logger, message string, err error) (*backend.CheckHealthResult, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user