mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-07 15:21:58 +08:00
Currently, herb/formatter has at least 4 bugs the prevent us from switching to it (https://github.com/marcoroth/herb/issues 476, 477, 478, and 479). This includes manual fixes for each issue. herb/formatter also introduces a rubocop violation for the Layout/AssignmentIndentation cop. This disables that cop.
28 lines
1.7 KiB
Text
28 lines
1.7 KiB
Text
<% @page_title = "Create Kubernetes Cluster"
|
|
@has_valid_payment_method = @project.has_valid_payment_method?
|
|
@option_tree, @option_parents = generate_kubernetes_cluster_options %>
|
|
|
|
<%== render("components/billing_warning") %>
|
|
|
|
<%== part(
|
|
"components/page_header",
|
|
breadcrumbs: [
|
|
%w[Projects /project],
|
|
[@project.name, @project.path],
|
|
["Kubernetes Clusters", "#{@project.path}/kubernetes-cluster"],
|
|
%w[Create #]
|
|
]
|
|
) %>
|
|
|
|
<% form_elements = [
|
|
{name: "name", type: "text", label: "Cluster Name", required: "required", placeholder: "Enter cluster name"},
|
|
{name: "location", type: "radio_small_cards", label: "Location", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:location)},
|
|
{name: "version", type: "radio_small_cards", label: "Version", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:version)},
|
|
{name: "cp_nodes", type: "radio_small_cards", label: "Control Plane", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:cp_nodes)},
|
|
{name: "worker_size", type: "radio_small_cards", label: "Worker size", required: "required", content_generator: ContentGenerator::KubernetesCluster.method(:worker_size)},
|
|
{name: "worker_nodes", type: "select", label: "Worker Nodes", required: "required", placeholder: "Select number of worker nodes", content_generator: ContentGenerator::KubernetesCluster.method(:worker_nodes), opening_tag: "<div class='sm:col-span-3'>"},
|
|
]
|
|
|
|
action = "#{@project.path}/kubernetes-cluster" %>
|
|
|
|
<%== part("components/form/resource_creation_form", action:, form_elements:, option_tree: @option_tree, option_parents: @option_parents) %>
|