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

CSV Export for Devices fails for Devices without complete information #3462

Open
iacco opened this issue Nov 24, 2021 · 0 comments
Open

CSV Export for Devices fails for Devices without complete information #3462

iacco opened this issue Nov 24, 2021 · 0 comments

Comments

@iacco
Copy link

iacco commented Nov 24, 2021

Describe the bug
Following a mistake while updating tags on a device, some disconnected devices went in Unknown state.

The "Export to CSV" feature for Devices fails to download the Unknown devices information (which for the most part will be N/A), therefore creating a misalignment between the Console and the CSV.

The mistake which lead to this is a PUT request on /{scopeId}/devices/{deviceId} in order to update the tags: I thought the REST API call worked as a PATCH, and populated only the tagIds field, hence "defaulting" the other properties.
Even though this REST call could be made more user-friendly, actually the behavior is compliant with REST Verbs, so I guess it is not a problem.

To Reproduce
Steps to reproduce the behavior:

  1. Connect a Device and have it listed on the Devices tab of the Console;
  2. Perform a REST PUT on /{scopeId}/devices/{deviceId} updating only the tagIds to clear the device information, in order to get it into "Unknown" state;
  3. Press on "Export to CSV" on the Devices tab;
  4. See error.

Expected behavior
The device is present in the CSV, and its information (basically the ClientID and the Display Name if server defined) is available. Unavaliable information is printed as N/A, same as in the Console.

Screenshots
N/A

Version of Kapua
1.5.3

Type of deployment
[ ] Local Vagrant deployment
[x ] Docker
[ ] Openshift (in its variants)
[ ] Others

Main component affected
[x] Console (Chrome 96.0.4664.45)
[ ] REST API
[ ] Message Broker
[ ] - Others

Additional context
N/A

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

1 participant