Prior to this commit, we only supported web requests but from now on, in order to support CLI, we will support api requests as well.
26 lines
608 B
Ruby
26 lines
608 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Clover
|
|
hash_branch(:project_prefix, "kubernetes-cluster") do |r|
|
|
r.get true do
|
|
kubernetes_cluster_list
|
|
end
|
|
|
|
r.web do
|
|
r.post true do
|
|
check_visible_location
|
|
kubernetes_cluster_post(typecast_params.nonempty_str("name"))
|
|
end
|
|
|
|
r.get "create" do
|
|
authorize("KubernetesCluster:create", @project.id)
|
|
|
|
@has_valid_payment_method = @project.has_valid_payment_method?
|
|
@option_tree, @option_parents = generate_kubernetes_cluster_options
|
|
|
|
view "kubernetes-cluster/create"
|
|
end
|
|
end
|
|
end
|
|
end
|