Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37900 - Allow syncing templates through HTTP proxy #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamlazik1
Copy link
Contributor

No description provided.

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 2 times, most recently from 757bb35 to fa2aab3 Compare October 9, 2024 15:46
@lhellebr
Copy link

I've just tested the sweet paths and can confirm API part works.

@lhellebr
Copy link

OK, even WebUI part seems to work. Is my testing wrong or is that expected? My last info was that this should only work in API.

@adamlazik1
Copy link
Contributor Author

@lhellebr What I currently don't like about the web ui is that the the HTTP proxy selection box appears even when you have global proxy or no proxy selected in the proxy policy box. This could potentially confuse the user. I am currently trying to fix that. The behavior where the selection box appears only when the proxy policy is "selected" would be also consistent with for example the one from katello - on the Content -> Products -> Repositories -> New repository page, where they handle HTTP proxies the same way. Unfortunately the front end there uses different technology so I cannot copy the code. I am very close to the solution, though.

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 2 times, most recently from 8f60cd0 to 65c6644 Compare October 18, 2024 16:58
@adamlazik1
Copy link
Contributor Author

Alright, now the proxy id field is displayed only when it's supposed to but I've broken the ui procedure as proxy params are currently not sent to the controller. I also need to figure out how to make translations work on the new fields. On the plus side, username and password for a proxy is now used correctly. I still need to setup config for SSL cert. I'll have to continue on this next week.

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 6 times, most recently from ce66adb to ce1a701 Compare October 23, 2024 16:50
@adamlazik1
Copy link
Contributor Author

Right now everything works if there is at least one proxy to choose but things break in the UI if there is no proxy available. I will have to fix that next week.

Copy link
Member

@asteflova asteflova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a peek at the new settings in the web UI and left a few comments about the things that I expect might be unclear, keeping in mind that whatever is unclear on the UI side would need to be explained in documentation :)

lib/foreman_templates.rb Outdated Show resolved Hide resolved
lib/foreman_templates/engine.rb Outdated Show resolved Hide resolved
app/controllers/ui_template_syncs_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v2/template_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v2/template_controller.rb Outdated Show resolved Hide resolved
@adamlazik1
Copy link
Contributor Author

Fixed the last issue that I found and simplified the code a bit. From the functionality side this should be fully functional. I still need to add tests.

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 3 times, most recently from 8397ca2 to bcbc646 Compare October 30, 2024 12:22
@adamlazik1 adamlazik1 marked this pull request as ready for review October 30, 2024 14:00
@lhellebr
Copy link

@adamlazik1

# hammer -v import-templates  --repo="https://github.com/theforeman/community-templates.git" --organization-ids="36" --branch="develop" --dirname="/partition_tables_templates/" --filter="FreeBSD default fake" --http-proxy-policy="none"
Could not import:
  Error: undefined method `empty?' for nil:NilClass
# hammer  import-templates  --repo="https://github.com/theforeman/community-templates.git" --organization-ids="36" --branch="develop" --dirname="/partition_tables_templates/" --filter="FreeBSD default fake" --http-proxy-policy="none"
Import finished.

@lhellebr
Copy link

lhellebr commented Nov 5, 2024

In WebUI, when syncing with default form values, just specifying branch to develop (and any setting of proxy), on stream, everything passes. With this PR applied, however, I get an empty page (except menu) and an error notification:

Error
Oh no! Something went wrong while submitting the form, the server returned the following error: 

The templates still seem to be applied. foreman-tail doesn't seem to be very useful:

2024-11-05T08:55:13 [I|app|645ea88a] Started POST "/ui_template_syncs/import" for <IP> at 2024-11-05 08:55:13 -0500
2024-11-05T08:55:13 [I|app|645ea88a] Processing by UITemplateSyncsController#import as JSON
2024-11-05T08:55:13 [I|app|645ea88a]   Parameters: {"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1, "ui_template_sync"=>{"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1}}
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
10.39.195.74 - - [05/Nov/2024:08:55:13 -0500] "POST /ui_template_syncs/import HTTP/2.0" 200 57999 "https://<FQDN>/template_syncs" "Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"

==> /var/log/foreman/production.log <==
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

[...]

2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [I|app|645ea88a]   Rendered /usr/share/gems/gems/foreman_templates-10.0.0/app/views/ui_template_syncs/import.json.rabl (Duration: 104.3ms | Allocations: 111180)
2024-11-05T08:55:14 [I|app|645ea88a] Completed 200 OK in 1509ms (Views: 105.0ms | ActiveRecord: 169.0ms | Allocations: 633230)

The messages about template being locked are shown in stream without this PR as well.

@adamlazik1
Copy link
Contributor Author

In WebUI, when syncing with default form values, just specifying branch to develop (and any setting of proxy), on stream, everything passes. With this PR applied, however, I get an empty page (except menu) and an error notification:

Error
Oh no! Something went wrong while submitting the form, the server returned the following error: 

The templates still seem to be applied. foreman-tail doesn't seem to be very useful:

2024-11-05T08:55:13 [I|app|645ea88a] Started POST "/ui_template_syncs/import" for <IP> at 2024-11-05 08:55:13 -0500
2024-11-05T08:55:13 [I|app|645ea88a] Processing by UITemplateSyncsController#import as JSON
2024-11-05T08:55:13 [I|app|645ea88a]   Parameters: {"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1, "ui_template_sync"=>{"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1}}
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
10.39.195.74 - - [05/Nov/2024:08:55:13 -0500] "POST /ui_template_syncs/import HTTP/2.0" 200 57999 "https://<FQDN>/template_syncs" "Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"

==> /var/log/foreman/production.log <==
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

[...]

2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [I|app|645ea88a]   Rendered /usr/share/gems/gems/foreman_templates-10.0.0/app/views/ui_template_syncs/import.json.rabl (Duration: 104.3ms | Allocations: 111180)
2024-11-05T08:55:14 [I|app|645ea88a] Completed 200 OK in 1509ms (Views: 105.0ms | ActiveRecord: 169.0ms | Allocations: 633230)

The messages about template being locked are shown in stream without this PR as well.

I tried this on the master branch and got the same result, it seems that it is unrelated to this PR. I will try to find the cause.

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 4 times, most recently from 1e57bc4 to 6237b86 Compare November 6, 2024 11:56
@adamlazik1
Copy link
Contributor Author

The unit tests here should hopefully be enough. I don't know if I should create any API controller tests because I can't simulate an HTTP proxy and can't think about testing anything else that would make sense. If someone has any ideas, I can add more tests, but until then I consider the added tests sufficient.

@adamlazik1
Copy link
Contributor Author

In WebUI, when syncing with default form values, just specifying branch to develop (and any setting of proxy), on stream, everything passes. With this PR applied, however, I get an empty page (except menu) and an error notification:

Error
Oh no! Something went wrong while submitting the form, the server returned the following error: 

The templates still seem to be applied. foreman-tail doesn't seem to be very useful:

2024-11-05T08:55:13 [I|app|645ea88a] Started POST "/ui_template_syncs/import" for <IP> at 2024-11-05 08:55:13 -0500
2024-11-05T08:55:13 [I|app|645ea88a] Processing by UITemplateSyncsController#import as JSON
2024-11-05T08:55:13 [I|app|645ea88a]   Parameters: {"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1, "ui_template_sync"=>{"repo"=>"https://github.com/theforeman/community-templates.git", "branch"=>"develop", "dirname"=>"/", "filter"=>"", "negate"=>false, "prefix"=>"", "associate"=>"new", "force"=>false, "lock"=>"keep", "http_proxy_policy"=>"global", "http_proxy_id"=>1}}
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
10.39.195.74 - - [05/Nov/2024:08:55:13 -0500] "POST /ui_template_syncs/import HTTP/2.0" 200 57999 "https://<FQDN>/template_syncs" "Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"

==> /var/log/foreman/production.log <==
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:13 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.

[...]

2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [E|app|645ea88a] couldn't save the template because of: Base This template is locked. Please clone it to a new template to customize., This template is locked. Please clone it to a new template to customize.
2024-11-05T08:55:14 [I|app|645ea88a]   Rendered /usr/share/gems/gems/foreman_templates-10.0.0/app/views/ui_template_syncs/import.json.rabl (Duration: 104.3ms | Allocations: 111180)
2024-11-05T08:55:14 [I|app|645ea88a] Completed 200 OK in 1509ms (Views: 105.0ms | ActiveRecord: 169.0ms | Allocations: 633230)

The messages about template being locked are shown in stream without this PR as well.

I tried this on the master branch and got the same result, it seems that it is unrelated to this PR. I will try to find the cause.

#192

@adamlazik1 adamlazik1 force-pushed the sync-templates branch 2 times, most recently from 37ee56c to 8d0d041 Compare November 8, 2024 14:05
@adamlazik1
Copy link
Contributor Author

@asteflova here are the new descriptions on settings and sync page, respectively, based on what we discussed.


image

image

adamlazik1 added a commit to adamlazik1/foreman-ansible-modules that referenced this pull request Nov 11, 2024
adamlazik1 added a commit to adamlazik1/foreman-ansible-modules that referenced this pull request Nov 12, 2024
adamlazik1 added a commit to adamlazik1/foreman-ansible-modules that referenced this pull request Nov 12, 2024
@lhellebr
Copy link

2 More issues (with a few days old version, maybe you fixed it already, let me know)

When I select Use selected HTTP proxy policy and there is no HTTP proxy created, the field to select the proxy doesn't show, instead it says there are no HTTP proxies. Yet, I can still click submit and I get this not really helpful message that wouldn't immediately point me to proxy if I wasn't testing proxy:

Warning! Error submitting data: 404 

In Settings -> Template sync, I can set policy but there is no field to set the chosen proxy if I choose Use selected HTTP proxy

@adamlazik1
Copy link
Contributor Author

@lhellebr

When I select Use selected HTTP proxy policy and there is no HTTP proxy created, the field to select the proxy doesn't show, instead it says there are no HTTP proxies. Yet, I can still click submit and I get this not really helpful message that wouldn't immediately point me to proxy if I wasn't testing proxy:

This should be fixed in the current version, the submit button is not clickable if there is no proxy to select.

In Settings -> Template sync, I can set policy but there is no field to set the chosen proxy if I choose Use selected HTTP proxy

This is intentional, since HTTP proxies are scoped by taxonomies, whereas settings are global. Adding HTTP proxy to settings would mean it would be visible outside of its assigned organizations and locations, which I don't think is correct.

@lhellebr
Copy link

Understood!

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ruby part looks sensible, @MariaAga could you please take a look at the frontend part?

Comment on lines 28 to 39
const descriptionEdits = {
'? ': '?<br>',
'Custom HTTP proxy': '<b>Custom HTTP proxy</b>',
' when syncing templates': '',
};
proxyPolicySetting = proxyPolicySetting.set(
'description',
`${proxyPolicySetting.description.replace(
/\b(\? |Custom HTTP proxy| when syncing templates)\b/g,
match => descriptionEdits[match]
)}`
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the description not to be translated.
N_('Should an HTTP proxy be used for template sync? If you select Custom HTTP proxy, you will be prompted to select one when syncing templates.') - this marks it to be translated in the future, for example in the js code with __(proxyPolicySetting.description).
Maybe it will be better to use the
in lib/foreman_templates/engine.rb but I'm not sure if the description is used anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out.
I removed the description edits, but I have follow-up questions.

  1. In webpack/components/NewTemplateSync/components/SyncSettingFields.js:22:
const modifyDescription = (setting, type) => {
    if (setting.description) {
      let split = setting.description.split('. ');
      if (setting.name === 'repo' && type !== 'export') {
        split = split.slice(0, split.length - 1);
      }

      split = split.join('.<br>');
      return setting.set('description', split);
    }
    return setting;
  };

This piece of code was present here before and it modifies the description in the same way as me. Wouldn't that cause the description to also not be translated?
2. What about strings that are marked for translation in the UI but have no counterpart in the backend, like in webpack/components/NewTemplateSync/components/NewTemplateSyncForm/NewTemplateSyncFormHelpers.js:23?

export const syncFormSchema = (syncType, settingsObj, validationData) => {
  const schema = (settingsObj[syncType].asMutable() || []).reduce(
    (memo, setting) => {
      if (setting.name === 'repo') {
        return {
          ...memo,
          repo: Yup.string()
            .test(
              'repo-format',
              `${__(
                'Invalid repo format, must start with one of: '
              )}${validationData.repo.join(', ')}`,
              ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. yes, I didnt check the code before, but it looks like modifyDescription will not be translated.
  2. We can add new strings in the UI, that mark for translated is used so we can send variables to be translated:
    translate_later = N('string') and then __(translate_later)

Comment on lines +43 to +47
http_proxy_policy: Yup.mixed().test(
'http-proxy-available',
__(
'No HTTP proxies available. Please select a different policy or verify that you have selected the correct organization and location.'
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only visible after clicking "No HTTP proxies available" and also blocks the user form changing from import to export. I think it might be better to not show the option for a custom http proxy is the user doesnt have any (or, more complicated I think, to show the warning and only block submit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants