mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 13:52:06 +08:00
It is only used on the settings page. Also, make it a local variable instead of an instance variable.
31 lines
924 B
Text
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")
|
|
) %>
|