Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL deletes nested commands and sub menues in a wrong order #3747

Closed
AKalinich-Luxoft opened this issue Jul 27, 2021 · 1 comment
Closed
Assignees

Comments

@AKalinich-Luxoft
Copy link
Contributor

Bug Report

When some application contains a hierarchy of submenus and commands and mobile app requests to delete the parent node which has child nodes then SDL requests HMI to delete the parent node first, and then recursively deletes all children which is wrong and may confuse HMI if it automatically handles deletion of tree hierarchy on its side as well.

Reproduction Steps
  1. SDL and HMI are started
  2. Mobile device connected
  3. Mobile app is registered and activated
  4. SubMenu item is added
    AddSubMenu("menuID":1, "menuName":"Submenu Name 1")`
  5. Nested submenu items are added (each submenu is nested in the previous submenu)
    Send AddSubMenu(parentID=1, "menuID":2, "menuName":"Submenu Name 2")
    Send AddSubMenu(parentID=2, "menuID":3, "menuName":"Submenu Name 3")
    Send AddSubMenu(parentID=3, "menuID":4, "menuName":"Submenu Name 4")
  6. AddCommand item is added to nested SubMenu
    Send AddCommand("menuParams: { "parentID:4, "menuName":"Item to Add 1", "position":0)
  7. Delete submenu item (item is menu-tree branch)
    Send DeleteSubMenu("menuID":1)
Expected Behavior
RPCClient.js:137 SDL -> HMI {"id":42,"jsonrpc":"2.0","method":"UI.DeleteCommand","params":{"appID":154841458,"cmdID":1}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":42,"result":{"code":0,"method":"UI.DeleteCommand"}}

RPCClient.js:137 SDL -> HMI {"id":43,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":4}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":43,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":44,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":3}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":44,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":45,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":2}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":45,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":41,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":1}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":41,"result":{"code":0,"method":"UI.DeleteSubMenu"}}
Observed Behavior
RPCClient.js:137 SDL -> HMI {"id":41,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":1}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":41,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":42,"jsonrpc":"2.0","method":"UI.DeleteCommand","params":{"appID":154841458,"cmdID":1}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":42,"result":{"code":0,"method":"UI.DeleteCommand"}}

RPCClient.js:137 SDL -> HMI {"id":43,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":4}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":43,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":44,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":3}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":44,"result":{"code":0,"method":"UI.DeleteSubMenu"}}

RPCClient.js:137 SDL -> HMI {"id":45,"jsonrpc":"2.0","method":"UI.DeleteSubMenu","params":{"appID":154841458,"menuID":2}}
RPCClient.js:323 HMI -> SDL {"jsonrpc":"2.0","id":45,"result":{"code":0,"method":"UI.DeleteSubMenu"}}
OS & Version Information
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

No branches or pull requests

2 participants