We are adding a new tab under Project Details for listing private locations. We keep it behind a feature flag. The create view simply gets the AWS region, ubicloud region name, access and secret keys. We list the locations and give chance to customer to be able to update the name.
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
<% @page_title = "Create AWS Region" %>
|
|
|
|
<%== part(
|
|
"components/page_header",
|
|
breadcrumbs: [
|
|
%w[Projects project],
|
|
[@project_data[:name], @project_data[:path]],
|
|
["AWS Regions", "#{@project_data[:path]}/private-location"],
|
|
%w[Create #]
|
|
]
|
|
) %>
|
|
|
|
<%
|
|
form_elements = [
|
|
{name: "name", type: "text", label: "Ubicloud Region Name", required: "required", placeholder: "Enter name"},
|
|
{name: "provider_location_name", type: "select", label: "AWS Region Name", required: "required", content_generator: ContentGenerator::PrivateLocation.method(:select_option), opening_tag: "<div class='col-span-6 col-start-1 md:col-end-4 xl:col-end-3'>"},
|
|
{name: "access_key", type: "text", label: "AWS Access Key", required: "required", placeholder: "Enter AWS access key"},
|
|
{name: "secret_key", type: "text", label: "AWS Secret Key", required: "required", placeholder: "Enter AWS secret key"}
|
|
]
|
|
action = "#{@project_data[:path]}/private-location"
|
|
%>
|
|
|
|
<%== part("components/form/resource_creation_form", action:, form_elements:, option_tree: @option_tree, option_parents: @option_parents) %>
|