breezy-airplane-74201
07/24/2025, 5:17 PMsortableTable
and would like to implement both TableAction
and RowActions
. Specifically, I’d like to add a delete button in the table header that deletes all selected rows, and also have a row-level delete action. Could you please share some guidance or examples on how to implement this effectively?
2. For the <LabeledInput />
component, I want to pass an async validation function as a rule prop, similar to how we pass regular (sync) rules. What’s the proper way to do this?
3. I’m using <YamlEditor />
inside <Tab />
, and the tabs are rendered in a loop within the <Tabbed />
component. Each tab has its own YamlEditor
, but only the first editor displays its content by default. The other editors remain blank until I click inside them. Any ideas on how to fix this? (I’ve also attached an image for clarity.)
Thanks in advance for your help—really appreciate the support!busy-ability-54059
07/24/2025, 5:29 PMSortableTable
. Use these props: :table-actions="true"
and
:row-actions="true"
The rest is on the extension docs: https://extensions.rancher.io/extensions/next/api/actions#actionlocationtable-options
2. I don’t think it’s possible. I think the rules
prop is for a very specific usage. You’ll probably need to do it on the page you are using it with the @update:value
prop. You’ll need to build around it I think.
If you want to use what we have for rules, you can check multiple examples like https://github.com/rancher/dashboard/blob/master/pkg/aks/components/Config.vue#L981 and dive into those functions
3. Needs investigation. Can you share the information contained in the array previewFiles
so that I can try to replicate when I have some spare time? I don’t need a ton of entries. Just 3 or something (a simpler version of the array, but that still reproes the problem you’ve been having. You can DM me of you wantbreezy-airplane-74201
07/25/2025, 4:32 AMpreview
file,
const previewFiles = ref<
Array<{ key: string; filename: string; data: string }>
>([]);
where data is in yaml format like this,
'version: "1.0"\napp:\n name: demo-app\n environment: production\n features:\n login: true\n signup: true\n analytics: false\ndatabase:\n type: postgres\n host: localhost\n port: 5432\nusers:\n - name: Alice\n role: admin\n - name: Bob\n role: editor\n'
breezy-airplane-74201
07/25/2025, 5:46 AMplugin.addAction
should be used. Since I don’t have something like { resource: ['<http://catalog.cattle.io|catalog.cattle.io>.clusterrepo'] }
, I’m not sure if—or how—I can access the plugin
instance directly from a Vue 3 component. Ideally, I’d like to keep everything self-contained within the Vue 3 component.
What I’m aiming for is:
• For bulk/table actions, I’d like to place some custom buttons in the top-left/top-right of the table header that perform actions based on the currently selected rows (with access to their context).
• For inline/row actions, I’d like to use the three-dot menu to provide actions specific to each row, again with full row context.
Is this kind of approach feasible in a custom page?busy-ability-54059
07/25/2025, 8:13 AMplugin
object accessible which is the index.ts/index.js
file of your extension, much like https://github.com/rancher/ui-plugin-examples/blob/main/pkg/extensions-api-demo/index.ts#L76-L104
As for the the second parameter called when
in the docs, as per https://extensions.rancher.io/extensions/next/api/actions#addaction, it’s based on the LocationConfig object , which accepts many different params. One you could use for your custom page is the path
. Check the others in the docs. The better you narrow it down, the least likely you’ll get unwanted side-effectsbreezy-airplane-74201
07/25/2025, 10:17 AMbusy-ability-54059
07/25/2025, 4:48 PMLocationConfig
might be wrong on your code… I did:
// TABLE ACTIONS - ROW ACTION
plugin.addAction(
ActionLocation.TABLE,
{ path: { urlPath: '/c/_/auth/management.cattle.io.user', exact: false } },
{
label: 'some-extension-action',
invoke(opts: ActionOpts, values: any[]) {
console.log('table action executed 1', this, opts, values); // eslint-disable-line no-console
}
}
);
// TABLE ACTIONS - ROW + BULKABLE
plugin.addAction(
ActionLocation.TABLE,
{ path: { urlPath: '/c/_/auth/management.cattle.io.user', exact: false } },
{
label: 'some-bulkable-action',
multiple: true,
invoke(opts: ActionOpts, values: any[]) {
console.log('table action executed 2', this); // eslint-disable-line no-console
console.log(opts); // eslint-disable-line no-console
console.log(values); // eslint-disable-line no-console
},
}
);
Targeting a table inside the user details - Global Permissions
tab and it worked fine…. I did it in a way to NOT use resource
or anything…. just path with exact: false
(this works on my side because I hacked that sortableTable to have the :table-actions="true"
and
:row-actions="true
)
Try different variations of itbreezy-airplane-74201
07/28/2025, 4:35 AM{
name: `c-cluster-${YOUR_PRODUCT_NAME}-${CUSTOM_PAGE_NAME2}`,
path: `/c/:cluster/${YOUR_PRODUCT_NAME}/${CUSTOM_PAGE_NAME2}`,
component: Overview,
meta: { product: YOUR_PRODUCT_NAME },
},
busy-ability-54059
07/28/2025, 8:45 AM/${YOUR_PRODUCT_NAME}/${CUSTOM_PAGE_NAME2}
exact: false }]`breezy-airplane-74201
07/28/2025, 9:33 AMbusy-ability-54059
07/28/2025, 1:52 PMResource
so that it can work like https://github.com/rancher/dashboard/blob/master/shell/models/management.cattle.io.cluster.js#L32 (just an example, since SteveModel
extends Resource
from other classes, but the bare minimum is Resource
class)
this needs a bit of thought…. I don’t have an easy fix right nowbreezy-airplane-74201
07/28/2025, 1:58 PMbreezy-airplane-74201
07/29/2025, 11:55 AMbusy-ability-54059
07/29/2025, 1:35 PMspoofedType
that we use in a couple of places in Rancher UI. It’s at the “same” level as configureType ( “pure” resource page ) or virtualType (custom page), but instead of creating a “pure” resource page it creates a fake resource. It’s useful in a couple of scenario, especially the ones where you need a list of some sort to be a resource and have an associated model, which is exactly what is needed here.
We don’t advertise this in our docs as it’s a quite complex and advanced usecase, which also makes it difficult to explain.
It’s nearly there, but I still can’t quite figure out what’s missing on the test that I did (i’ll include the extension code in a zip). It’s still not getting the model
for this spoofed type and therefore not triggering the extension table actions.
All of this is based on the work in a built-in extension for Harvester Manager , where we define a spoofed type for HCI.CLUSTER
https://github.com/rancher/dashboard/blob/master/pkg/harvester-manager/config/harvester-manager.js#L130-L173, we have an associated model and then we render a custom list view (which can be anything, basically, as it’s a Vue page) which in theory should be targetable by the table actions extension point.
Maybe you can continue the work by cloning https://github.com/rancher/dashboard, adding the extension inside the zip to the pkg
folder https://github.com/rancher/dashboard/tree/master/pkg + running the Dashboard locally.
FYI @stocky-account-63046breezy-airplane-74201
08/15/2025, 11:59 AMstocky-account-63046
08/18/2025, 7:53 AMgrowls
(kicked off by store action growl/..
), however are moving away from them to use the new Notifications
centre (currently kicked off by store action notifications/..
) introduced in 2.12.0. i don't think we ever officially externalised growls and we haven't yet formalised the API for the notification centre, so both areas are liable to change