Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
224 stars 73 forks source link

[Feature request] Add result from direct method call #495

Closed rtheil-growlink closed 2 years ago

rtheil-growlink commented 2 years ago

Doing firmware development for devices using Azure IoT. Working on implementing direct method calls. I prefer IoT Explorer because the Direct method screen doesn't delete the method name or payload after invoking. This means I can send the same command over and over again until the firmware does what I want. Azure portal wipes these fields on every invoke. What's missing is the result from a direct method call, as seen here: image

I'd like to see the result from the direct method call in its own readonly text box below the "Response timeout in seconds" slider, like it is in the Azure web portal. image

Right now the problem is that the result only shows in a pop up notification in the corner then disappears. Can't copy or examine the response body, especially when large. Often I take that response and drop it in jsonlint.com to look at the data. image

YingXue commented 2 years ago

Hi @rtheil-growlink We did tackle issue a while back, and the decision we made is giving users a 'Notification Center'. If you go back to home, you should be able to locate it - the third item in left nav. We didn't provide a link in short messages, but if your response is super long, we will show a cropped message and inform you that the full message is in the 'Notification Center' to make it more accessible.

rtheil-growlink commented 2 years ago

Thanks for that info. Here's why that doesn't work well:

I choose an iot hub, go to devices, search for a device, click that device, click direct method, enter my direct method details, and click invoke. I then get a notification, it disappears, I need to copy the text from the response. So I click home, click notification center, choose the notification, then copy my text. Now I need to call that direct method again. So I choose an iot hub, go to devices, search for a device, click that device, click direct method, enter my direct method details, and click invoke.

The problem here is the constant repeating of the process to get to the direct method, or other, screen in order to get the notification I need to copy the response from. Having to go to notifications is time consuming.

rtheil-growlink commented 2 years ago

This one really shouldn't be closed, as the "workaround" isn't really helpful at all, and is far too time consuming to be useful for development purposes.

YingXue commented 2 years ago

Relates to #514

YingXue commented 2 years ago

Thanks for that info. Here's why that doesn't work well:

I choose an iot hub, go to devices, search for a device, click that device, click direct method, enter my direct method details, and click invoke. I then get a notification, it disappears, I need to copy the text from the response. So I click home, click notification center, choose the notification, then copy my text. Now I need to call that direct method again. So I choose an iot hub, go to devices, search for a device, click that device, click direct method, enter my direct method details, and click invoke.

The problem here is the constant repeating of the process to get to the direct method, or other, screen in order to get the notification I need to copy the response from. Having to go to notifications is time consuming.

Oh I forgot to point out one thing that could make your life easier before the next release (which is btw coming early next week where we added a copy button next to the response), and that is there is a 'go back' button on top of the notification center's page, which directly take you back to where you came from, and in your case the 'direct method' page. image

rtheil-growlink commented 2 years ago

Oh, interesting. I have never noticed that. Not sure, based on its position, if I would have realized it's to go back to where I was. Will watch for that in my next tests.

YingXue commented 2 years ago

Releasing https://github.com/Azure/azure-iot-explorer/releases/tag/v0.14.11 which adds copy button on both places and fix scroll bar to the notificaiton center.