Admin panel

How to manage a database table from the admin panel

How to manage a database table from the admin panel

In TeleportHQ, you can manage any of your database tables from the admin panel, for example a Leads table or a restaurant's Menu table. In the editor's left sidebar, click Plugins → Admin panel, then Manage next to Data the admin panel manages. In the Manage Entities window, pick the table, set its name, sidebar section and columns, and click Add to Admin Panel. TeleportHQ creates a list, a create and an edit page for that table.

Before you start

  • Turn on the admin panel. Otherwise the Manage button is greyed out. See How to turn on the admin panel.
  • Have the table ready in a connected database: the TeleportHQ database, Supabase, PostgreSQL, MySQL, MariaDB, MongoDB, Firestore, Airtable, CockroachDB, TiDB or Turso. If there is none, the window says "No database tables found. Create tables in your data sources first." See How to create database tables (by hand or with AI).

Steps

  1. In the TeleportHQ editor's left sidebar, click Plugins (the four-squares icon above Growth).
  2. Click the Admin panel row. It shows On. Its settings open in a drawer beside the list.
  3. Under Sections, next to Data the admin panel manages, click Manage. The Manage Entities window opens.
The TeleportHQ Admin panel settings drawer with the Admin panel enabled switch on and the Manage button next to Data the admin panel manages highlighted
  1. In Available Tables on the left, find your table. Type in Search tables... if the list is long, for example leads. Tables already in the admin panel are marked Added and can't be picked again.
  2. Click the table. The Configure Entity form opens on the right.
  3. In Entity Label, type the name your team will see in the admin sidebar, for example Customer Leads. TeleportHQ fills in the table's name to start with.
  4. In Sidebar Section, click Custom, Management, Content or Commerce. To make a new section, click + New and type its Section name, for example Sales.
  5. In Columns, tick where each column shows: List, Create and Update. For example, untick Create for a column the site fills in by itself. The ID column (marked PK) is always left out, and at least one column must stay in List.
  6. Click Add to Admin Panel.
The TeleportHQ Manage Entities window with a table picked under Available Tables, the Configure Entity form, and the Add to Admin Panel button highlighted

You can also open Manage Entities from the Pages list: right-click the admin-panel folder, or any page or folder inside it, and click Manage Entities.

Or add a table from the Data Sources panel

  1. In the left sidebar, click Data Sources and open your database.
  2. On the table's row, click ⋯ next to View Data.
  3. Click Add to Admin Panel.

This adds the table right away, named after the table, in the CUSTOM section, with every column. To choose the name, section or columns, use Manage Entities instead.

Check that it worked

  • A message says, for example, ""Customer Leads" has been added to the admin panel with full CRUD operations."
  • The table is marked Added in Available Tables.
  • The admin-panel folder in the Pages list has a new folder for the table, with its list, create and update pages.
  • Publish your site, open the admin panel and find the new item in the sidebar section you chose. See How to open the admin panel on your live site.

Remove a table from the admin panel

  1. Open Manage Entities again.
  2. Next to the table in Available Tables, click × (Remove from admin panel).

The table's admin pages are removed at once, without a confirmation, and a message says ""Customer Leads" has been removed from the admin panel." In the Data Sources panel, the table's ⋯ menu also has Remove from Admin Panel. Either way, the table and its records stay in your database, and you can add it again later.

Troubleshooting

"Admin panel must be enabled before managing entities." The admin panel is off for this project. Turn it on first: see How to turn on the admin panel.

"Table "(name)" is already added to the admin panel." The table is already there. Look for its label in the admin sidebar.

"Admin panel data source is not configured." The admin panel lost its database connection. Check the database in the Data Sources panel.

"Failed to create admin pages for "(label)". Please try again." Something went wrong while building the pages. Try again.

"(table) cannot be removed: only custom entities added from data sources can be removed from the admin panel." Tables that come with a feature, such as users or the store's products, can't be removed. In the Data Sources panel their Remove from Admin Panel is greyed out with "This entity is managed by an activated feature."

Good to know

  • Sync components, at the bottom of the same window, rebuilds the admin Pages screens after you change your components. See How to build your own admin pages from blocks.
  • Rebuilding the admin panel (Regenerate Admin Panel) keeps the tables you added and rebuilds their pages too.
  • Deleting a table that the admin panel uses from your database can turn off the admin panel. TeleportHQ lists the impact before you confirm.
Share

Related Articles

What is the admin panel?

The TeleportHQ admin panel is a back office that TeleportHQ builds for your web app at /admin/dashboard on your published site, where people with the admin role manage users, orders, products, bookings, invoices, blog posts and comments, files, sent emails and your own database tables, and build extra pages from blocks, without opening the editor.

How to turn on the admin panel

In TeleportHQ, you turn on the admin panel from the editor's left sidebar by clicking Plugins, then Admin panel, then the Admin panel enabled switch and Activate Admin Panel; Authentication must be on first, and a checklist shows TeleportHQ building a dashboard plus list, create and edit pages for your data, open only to users with the admin role.

How to create database tables (by hand or with AI)

In TeleportHQ, you create tables from the Add a new table card of your database in the Data Sources panel, either by filling in the Create New Table form or by describing the tables you need in the Create Tables with AI window.

How to open the admin panel on your live site

In TeleportHQ, the admin panel of your published web app is at your site address followed by /admin/dashboard (for example https://mybakery.teleporthq.app/admin/dashboard); the Publish window shows the link under "Admin panel is included", and you sign in with an account whose role is admin, which you can create with Create admin user.

How to build your own admin pages from blocks

In TeleportHQ, your team builds new pages for your live site in the admin panel's Pages section: click + Add New, give the page a Title (the Slug follows), add blocks such as Section, Heading, Text, Image, Button or your own components from the Add blocks tab, set the Status to Published and click Create; the page appears at /pages/your-slug within about 60 seconds, without opening the editor.