Files
ubicloud/views/private-location/index.erb
Furkan Sahin 7d97b5cf68 Private Location management experience with UI
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.
2025-03-23 16:28:05 +01:00

34 lines
1.0 KiB
Plaintext

<% @page_title = "AWS Regions" %>
<%== part(
"components/page_header",
right_items: (!@locations.empty? && has_project_permission("Location:create")) ? [
part("components/button", text: "Create AWS Region", link: "#{@project_data[:path]}/private-location/create")
] : []
) %>
<div class="grid gap-6">
<%== part(
"components/table_card",
headers: ["Name", "AWS Region"],
rows: @locations.map do |l|
[
[
[l.ui_name, {link: @project_data[:path] + l.path}],
[l.name]
],
{ id: "region-#{l.id}" }
]
end,
empty_state: {
icon: "hero-map-pin",
title: "No AWS Regions",
description: "You don't have permission to create AWS Regions.",
}.merge(has_project_permission("Location:create") ? {
description: "Get started by creating a new AWS Region.",
button_link: "#{@project_data[:path]}/private-location/create",
button_title: "Create AWS Region"
} : {})
) %>
</div>