@@ -54,7 +54,7 @@ class PrometheusService < MonitoringService
...
@@ -54,7 +54,7 @@ class PrometheusService < MonitoringService
end
end
deffields
deffields
result=[
[
{
{
type: 'checkbox',
type: 'checkbox',
name: 'manual_configuration',
name: 'manual_configuration',
...
@@ -67,30 +67,23 @@ class PrometheusService < MonitoringService
...
@@ -67,30 +67,23 @@ class PrometheusService < MonitoringService
title: 'API URL',
title: 'API URL',
placeholder: s_('PrometheusService|Prometheus API Base URL, like http://prometheus.example.com/'),
placeholder: s_('PrometheusService|Prometheus API Base URL, like http://prometheus.example.com/'),
required: true
required: true
},
{
type: 'text',
name: 'google_iap_audience_client_id',
title: 'Google IAP Audience Client ID',
placeholder: s_('PrometheusService|Client ID of the IAP secured resource (looks like IAP_CLIENT_ID.apps.googleusercontent.com)'),
autocomplete: 'off',
required: false
},
{
type: 'textarea',
name: 'google_iap_service_account_json',
title: 'Google IAP Service Account JSON',
placeholder: s_('PrometheusService|Contents of the credentials.json file of your service account, like: { "type": "service_account", "project_id": ... }'),
required: false
}
}
]
]
ifFeature.enabled?(:prometheus_service_iap_auth)
result+=[
{
type: 'text',
name: 'google_iap_audience_client_id',
title: 'Google IAP Audience Client ID',
placeholder: s_('PrometheusService|Client ID of the IAP secured resource (looks like IAP_CLIENT_ID.apps.googleusercontent.com)'),
autocomplete: 'off',
required: false
},
{
type: 'textarea',
name: 'google_iap_service_account_json',
title: 'Google IAP Service Account JSON',
placeholder: s_('PrometheusService|Contents of the credentials.json file of your service account, like: { "type": "service_account", "project_id": ... }'),
required: false
}
]
end
result
end
end
# Check we can connect to the Prometheus API
# Check we can connect to the Prometheus API
...
@@ -106,7 +99,7 @@ class PrometheusService < MonitoringService
...
@@ -106,7 +99,7 @@ class PrometheusService < MonitoringService