ubicloud/views/postgres/show.erb
Jeremy Evans 16690573ba Abstract postgres show page logic to be reusable by other objects
This combines the postgres/show and postgres/submenu views into
an abstracted object/show view. The postgres/show view now just
renders the object/show view with appropriate arguments.
2025-08-30 01:25:25 +09:00

32 lines
989 B
Text

<% @edit_perm = has_permission?("Postgres:edit", @pg.ubid)
@delete_perm = has_permission?("Postgres:delete", @pg.ubid)
@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")
) %>