Skip to content

[#188045959] Sampler changes to use attr and collection IDs to send data to CODAP#144

Open
eireland wants to merge 1 commit intomasterfrom
188045959-translated-sampler-bug-fix
Open

[#188045959] Sampler changes to use attr and collection IDs to send data to CODAP#144
eireland wants to merge 1 commit intomasterfrom
188045959-translated-sampler-bug-fix

Conversation

@eireland
Copy link
Contributor

Changes sending data to CODAP using attr IDs and collection IDs which may have been changed.

Make names less mutable. Only changes the title prop when user changes variable name.

… may have been changed.

Make names less mutable. Only changes the title prop when user changes variable name.
@eireland eireland requested a review from lublagg September 12, 2024 22:59
const attrKey = _this.findKeyById(id);
// update the device name if the user has changed it in the codap table
if (attrKey === "output" && _this.attrMap["output"].name !== attrName) {
if (attrKey === "output" && _this.attrMap.items["output"].name !== attrName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this check if _this.attrMap.items["output"].title is not equal to attrName (since the title property changes but not the name property?

if (getDatasetResult && !getDatasetResult.success) {
if (deviceName && deviceName !== _this.attrMap.items["output"].name) {
_this.deviceName = deviceName;
_this.attrMap.items["output"].name = deviceName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here about checking title vs name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, nevermind. I see we would be creating the new attribute with the new deviceName.

I do wonder if it would be better to always keep the name of this attribute 'output' and only change the title to the deviceName, though.

attrs: [{name: deviceName,title: deviceName}]
name: _this.collectionMap.items.name,
parent: _this.collectionMap.samples.id,
attrs: [{title: deviceName}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this attr have a name property also?

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

Successfully merging this pull request may close these issues.

2 participants