Skip to main content
Version: v3

Table

Table extension points in Rancher Dashboard.

addTableHook

(Rancher version v2.14.0)

This method adds a hook to a ResourceTable element-based table on the UI. This allows to react to table events like changing page, sorting or filtering.

Method:

plugin.addTableHook(where: String, when: LocationConfig, action: TableAction);

Arguments

where string parameter admissible values for this method:

KeyTypeDescription
TableLocation.RESOURCEStringLocation for a table on a Resource List View page

when Object admissible values:

LocationConfig as described above for the LocationConfig object.

TableLocation.RESOURCE action

action config object. Admissible parameters for the action with 'TableLocation.RESOURCE' are:

KeyTypeDescription
tableHookStringCallback function when a table action like changing page, sorting or filtering is triggered

Usage example for 'TableLocation.RESOURCE':

plugin.addTableHook(
TableLocation.RESOURCE,
{ resource: ['pod'] },
{
tableHook: (arg: any) => {
console.error('TABLE HOOK TRIGGERED', arg);
}
}
);