Closed andrau closed 10 years ago
We currently manage the title
and rt
attributes but I just reread the code and see a bug on title attribute management.
I just fixed it so this should be ok now.
You could test it on our sandbox : http://54.228.25.31/
Did you test it ? Could I close this issue ?
I guess, it's ok, so I close this issue. :)
Unknown objects / resources are currently listed by number in leshan-ui. It would be nice to honor the title-attribute from RFC6690 / RFC5988 to display more meaningful names.
Suggested fixes in lw-resources-service.js:
/**
add object with the given ID to resource tree if necessary and return it */ var addObject = function(tree, objectDefs, objectId, attributes) { // ...
/**
add instance with the given ID to resource tree if necessary and return it */ var addInstance = function(object, instanceId, attributes) { // ...
// create instance if necessary if (instance == undefined) { instance = { name : (attributes.title!=null ? attributes.title : instanceId), id : instanceId, resources : [] };
/**
add resource with the given ID to resource tree if necessary and return it */ var addResource = function(object, instance, resourceId, attributes) { // ...
// create resource if necessary if (resource == undefined) { // create resource definition var resourcedef = { name : (attributes.title!=null ? attributes.title : resourceId), id : resourceId, operations : "RW" };