ubicloud/views/postgres/show.erb
Jeremy Evans 01200e1ebb Move pg delete_perm from show page to settings page
It is only used on the settings page. Also, make it a local variable
instead of an instance variable.
2025-09-18 02:56:28 +09:00

31 lines
924 B
Text

<% @edit_perm = has_permission?("Postgres:edit", @pg)
@page_title = @pg.name
tabs = [
["Overview", "overview", "hero-squares-plus"],
["Connection", "connection", "plug-disconnected"],
["Metrics", "charts", "hero-chart-pie"],
["Networking", "networking", "hero-globe-alt"]
]
unless @pg.read_replica?
tabs.push(
["Resize", "resize", "hero-arrow-top-right-on-square"],
["High Availability", "high-availability", "hero-square-2-stack-modified"],
["Read Replica", "read-replica", "read-replica"],
["Backup/Restore", "backup-restore", "hero-cloud-arrow-up"]
)
end
tabs.push(
["Configuration", "config", "hero-document-text"],
["Settings", "settings", "hero-cog-8-tooth"]
) %>
<%== part("object/show",
object: @pg,
tabs:,
type: "postgres",
breadcrumb_label: "PostgreSQL Databases",
right_header: part("components/pg_state_label", state: @pg.display_state, extra_class: "text-md")
) %>