Add see runs and see workflows actions (#11131)
On default objects: - Add see workflows On workflows: - Add see all runs (no selection) On workflow runs: - Add see workflows (no selection) - Add see linked workflow (single record selection) - Add see run version (single record selection) On workflows versions - Add see all runs (no selection) - Add see workflows (no selection) - Add see linked workflow (single record selection) - Add see linked runs (single record selection)
This commit is contained in:
@ -17,7 +17,28 @@ export const useCommandMenuCommands = () => {
|
||||
actionMenuEntriesComponentSelector,
|
||||
);
|
||||
|
||||
const navigateCommands = Object.values(COMMAND_MENU_NAVIGATE_COMMANDS);
|
||||
const navigateCommands = actionMenuEntries
|
||||
?.filter(
|
||||
(actionMenuEntry) =>
|
||||
actionMenuEntry.type === ActionMenuEntryType.Navigation,
|
||||
)
|
||||
?.map((actionMenuEntry) => ({
|
||||
id: actionMenuEntry.key,
|
||||
label: i18n._(actionMenuEntry.label),
|
||||
Icon: actionMenuEntry.Icon,
|
||||
onCommandClick: actionMenuEntry.onClick,
|
||||
type: CommandType.Navigate,
|
||||
scope: CommandScope.Global,
|
||||
hotKeys: actionMenuEntry.hotKeys,
|
||||
})) as Command[];
|
||||
|
||||
// TODO: refactor this to use the config
|
||||
const navigateCommandsFromConstants = Object.values(
|
||||
COMMAND_MENU_NAVIGATE_COMMANDS,
|
||||
);
|
||||
const allNavigateCommands = navigateCommands.concat(
|
||||
navigateCommandsFromConstants,
|
||||
);
|
||||
|
||||
const actionRecordSelectionCommands: Command[] = actionMenuEntries
|
||||
?.filter(
|
||||
@ -115,7 +136,7 @@ export const useCommandMenuCommands = () => {
|
||||
}));
|
||||
|
||||
return {
|
||||
navigateCommands,
|
||||
navigateCommands: allNavigateCommands,
|
||||
actionRecordSelectionCommands,
|
||||
actionGlobalCommands,
|
||||
actionObjectCommands,
|
||||
|
||||
Reference in New Issue
Block a user