Skip to content

feat: resource view registries for developer tables and pages - #49

Open
roncodes wants to merge 1 commit into
mainfrom
feature/resource-view-registries
Open

roncodes wants to merge 1 commit into
mainfrom
feature/resource-view-registries

Conversation

@roncodes

Copy link
Copy Markdown
Member

Extensions can add columns, row actions, bulk actions and toolbar buttons to developer tables through developers:table:<resource>:<slot>. They can add header buttons and menu items to the detail pages through developers:details:<resource>:<slot>.

Resources: api-key, webhook, event, log, socket.

Changes

  • Index pages: api-keys, webhooks, events, logs and sockets move to Layout::Resource::Tabular. The api-keys test-mode toggle and key picker use its <:header> block.
  • Detail pages: the webhook, event, log and socket pages build their header buttons in controller getters (BaseController.detailsActionButtons), so registered buttons merge in.
  • Stable ids on built-in items; index query params include registered filter params; registries declared in extension.js.
  • Fix: events and logs passed a permission string to @searchDisabled. A string is always truthy, so search was always disabled; it now uses (cannot …).

Depends on

Merge only after both are published. Before merging, bump @fleetbase/ember-core to ^0.3.25 and @fleetbase/ember-ui to ^0.4.5, and refresh the lockfile. Until then this branch builds against the old APIs and will not run.

Naming and API reference: docs/resource-view-registries.md in ember-core.

Testing

Lint and template-lint pass for the changed files. extension.js still fails lint on an unused getWidgetById, which is already the case on main. No tests were run locally. All five list pages changed layout, so give them a click-through.

Extensions can add columns, row actions, bulk actions and toolbar buttons
through developers:table:<resource>:<slot>, and header buttons and menu items
to the detail pages through developers:details:<resource>:<slot>.

- api-keys, webhooks, events, logs and sockets move to
  Layout::Resource::Tabular; the test-mode controls use its header block
- webhook, event, log and socket pages render header buttons from controller
  getters so registered ones merge in
- events and logs passed a permission string to @searchDisabled, which is
  always truthy, so search was always disabled; it now checks the permission
- stable ids on built-in items, query params include registered filters

Requires @fleetbase/ember-core 0.3.25 and @fleetbase/ember-ui 0.4.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant