Skip to content

Commit

Permalink
Merge pull request #506 from agrare/remove_unsupported_alerts_tab
Browse files Browse the repository at this point in the history
The prometheus_alerts endpoint is no longer supported

(cherry picked from commit c604c2a)
  • Loading branch information
Fryguy committed Sep 28, 2023
1 parent 96f5b5f commit 44b619b
Showing 1 changed file with 0 additions and 122 deletions.
122 changes: 0 additions & 122 deletions app/models/manageiq/providers/kubernetes/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,128 +334,6 @@ def self.params_for_create
}
]
},
{
:component => 'tab-item',
:id => 'alerts-tab',
:name => 'alerts-tab',
:title => _('Alerts'),
:fields => [
{
:component => 'protocol-selector',
:id => 'alerts_selection',
:name => 'alerts_selection',
:skipSubmit => true,
:initialValue => 'none',
:label => _('Type'),
:options => [
{
:label => _('Disabled'),
:value => 'none',
},
{
:label => _('Prometheus'),
:value => 'prometheus_alerts',
:pivot => 'endpoints.prometheus_alerts.hostname',
},
],
},
{
:component => 'validate-provider-credentials',
:id => "authentications.prometheus_alerts.valid",
:name => "authentications.prometheus_alerts.valid",
:skipSubmit => true,
:isRequired => true,
:validationDependencies => ['type', "alerts_selection", "authentications.bearer.auth_key"],
:condition => {
:when => "alerts_selection",
:is => 'prometheus_alerts',
},
:fields => [
{
:component => "select",
:id => "endpoints.prometheus_alerts.security_protocol",
:name => "endpoints.prometheus_alerts.security_protocol",
:label => _("Security Protocol"),
:isRequired => true,
:initialValue => 'ssl-with-validation',
:validate => [{:type => "required"}],
:options => [
{
:label => _("SSL"),
:value => "ssl-with-validation"
},
{
:label => _("SSL trusting custom CA"),
:value => "ssl-with-validation-custom-ca"
},
{
:label => _("SSL without validation"),
:value => "ssl-without-validation"
},
]
},
{
:component => "text-field",
:id => "endpoints.prometheus_alerts.hostname",
:name => "endpoints.prometheus_alerts.hostname",
:label => _("Hostname (or IPv4 or IPv6 address)"),
:isRequired => true,
:validate => [{:type => "required"}],
:inputAddon => {
:after => {
:fields => [
{
:component => 'input-addon-button-group',
:id => 'detect-prometheus_alerts-group',
:name => 'detect-prometheus_alerts-group',
:fields => [
{
:component => 'detect-button',
:id => 'detect-prometheus_alerts-button',
:name => 'detect-prometheus_alerts-button',
:label => _('Detect'),
:dependencies => [
'endpoints.default.hostname',
'endpoints.default.port',
'endpoints.default.security_protocol',
'endpoints.default.certificate_authority',
'authentications.bearer.auth_key',
],
:target => 'endpoints.prometheus_alerts',
},
],
}
],
},
},
},
{
:component => "text-field",
:id => "endpoints.prometheus_alerts.port",
:name => "endpoints.prometheus_alerts.port",
:label => _("API Port"),
:type => "number",
:initialValue => 443,
:isRequired => true,
:validate => [{:type => "required"}],
},
{
:component => "textarea",
:id => "endpoints.prometheus_alerts.certificate_authority",
:name => "endpoints.prometheus_alerts.certificate_authority",
:label => _("Trusted CA Certificates"),
:rows => 10,
:isRequired => true,
:validate => [{:type => "required"}],
:condition => {
:when => 'endpoints.prometheus_alerts.security_protocol',
:is => 'ssl-with-validation-custom-ca',
},
},
]
}
]
},
{
:component => 'tab-item',
:id => 'virtualization-tab',
Expand Down

0 comments on commit 44b619b

Please sign in to comment.