Hi I wanted to move this thread from

Hi, I wanted to move this thread from support to here. We are looking to control the actions that would allow a user to Manage Alerts (for KPI alerts) and "Move to Tab" (while in edit mode). Support suggested that these would be ManageMonitor and "OnContainerMove" however @billsaysthis is telling me that ManageMonitor is not available and OnContainerMove is a callback not an action. Also we have "Action.Remove" in our list of available actions but it is not exposing the "Delete" to remove an visualization from a liveboard while in edit mode. Same user can delete while directly in thoughtspot. Any thoughts on these 3 menu items?
No description
20 Replies
ashish
ashish2y ago
@Duessa H Can you link the support ticket here too ?
bill_da_golfer
@Duessa H ManageMonitor is listed as a valid HostEvent, so you should be able to trigger that action from your code. Have you tried and it isn't working? I was able to get it working in the Developers Playground. I can't find "OnContainerMove" in the docs. Where did you find that one?
Finally, it looks like there's no HostEvent to move to a tab. I think it would be good to have, so I recommend a feature request for this one.
billsaysthis
billsaysthis2y ago
@bill_da_golfer (I'm Duessa's dev on this project) I don't see ManageMonitor in the available choice in the Action enum in types.ts and so I can't add it as a visibleAction for the AppEmbed component.
Duessa H
Duessa HOP2y ago
"onContainerMove" was suggested by support in the ticket.
bill_da_golfer
@billsaysthis ManageMonitor is a HostEvent type that you invoke using embed.trigger(). https://developers.thoughtspot.com/docs/Enumeration_HostEvent#_managemonitor
billsaysthis
billsaysthis2y ago
What do I pass to visibleActions to have this show up in the action menu for users? I don't want to trigger it, I want users to be able to trigger it.
bill_da_golfer
You would have to create a custom action or respond to a different eventtype action to then trigger the host event. Probably a custom action is what you would want.
billsaysthis
billsaysthis2y ago
That doesn't make sense. Why isn't there an action in the Action enum to have this show up in visibleActions??
bill_da_golfer
There is an Action.CreateMonitor and an Action.ManageMonitor.
Note that visible actions only show actions that would normally be in the menu. They don't add actions that wouldn't be in the menu. So if it does show, then you can list it as visible and others would be hidden. There is also a Action.MoveToTab, whose value is "onContainerMove". But don't use the string values, use the enum types.
billsaysthis
billsaysthis2y ago
Action.MoveToTab doesn't show up when I start typing it in my actions array. I don't see it in types.ts either.
bill_da_golfer
I see it in the SDK. https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts / * The Move to Tab** menu action on visualizations in liveboard edit mode. * Allows moving a visualization to a different tab. * * @example *
* disabledActions: [Action.MoveToTab]
*
* disabledActions: [Action.MoveToTab]
*
*/ MoveToTab = 'onContainerMove', I do get the popup to complete in the Playground, but I'm on 9.5, so maybe that's a reason. That said, setting the Action doesn't seem to work.
GitHub
visual-embed-sdk/src/types.ts at main · thoughtspot/visual-embed-sdk
ThoughtSpot Visual Embed SDK. Contribute to thoughtspot/visual-embed-sdk development by creating an account on GitHub.
bill_da_golfer
Note that you have to be in Edit to see that option.
billsaysthis
billsaysthis2y ago
I'm using the React 1.23.3 package, I don't know about 9.5.
Duessa H
Duessa HOP2y ago
Can we also discuss here why the Action.Remove is not causing the Delete menu option to appear? Any update on how to get the Action.Remove and Action.MovetoTab to work?
Sandeep
Sandeep2y ago
@Nirmay @Aditya : Can one of you help here
Aditya
Aditya2y ago
Hi @Duessa H you can use 'onDeleteAnswer' to hide delete menu action and to hide move to tab you can use 'onContainerMove' for now as move to tab and delete has not been added in SDK side. We will update it and in latest version you can use it.
billsaysthis
billsaysthis2y ago
@Aditya Those are both callback props, we need an action to pass to visibleActions prop.
Nirmay
Nirmay2y ago
@billsaysthis what aditya is trying to say is please use , 'onContainerMove' string in visibleActions array, we have added this to our Action enum you will be able to use it when next SDK version is published till then please add 'onContainerMove' to your visibleActions array, also can you try Action.AnswerDelete for viz level Delete? Like visibleActions: [Action.AnswerDelete,'onContainerMove', ...More_Actions_You_Want]
billsaysthis
billsaysthis2y ago
kk

Did you find this page helpful?