mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-05 14:23:03 +08:00
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.
32 lines
989 B
Text
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")
|
|
) %>
|