Giter Site home page Giter Site logo

Comments (17)

bartbutenaers avatar bartbutenaers commented on June 11, 2024 1

I will try to find some time tonight to have a look at this issue...

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024 1

Working for me.

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

Please provide a simple test flow to show the problem. Then others will be able to try to replicate it.

from node-red-dashboard.

mworion avatar mworion commented on June 11, 2024

Here the demo flow:

Bildschirmfoto 2024-04-30 um 16 29 30

[
    {
        "id": "aef98b9fd27e4463",
        "type": "inject",
        "z": "3cc4c4a5bf7df696",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "10",
        "payloadType": "num",
        "x": 330,
        "y": 440,
        "wires": [
            [
                "8851a8ed40435f77"
            ]
        ]
    },
    {
        "id": "dd359ad4b081bfc8",
        "type": "inject",
        "z": "3cc4c4a5bf7df696",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "20",
        "payloadType": "num",
        "x": 330,
        "y": 500,
        "wires": [
            [
                "8851a8ed40435f77"
            ]
        ]
    },
    {
        "id": "5e771ba3e007d4e6",
        "type": "inject",
        "z": "3cc4c4a5bf7df696",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "30",
        "payloadType": "num",
        "x": 330,
        "y": 560,
        "wires": [
            [
                "8851a8ed40435f77"
            ]
        ]
    },
    {
        "id": "8851a8ed40435f77",
        "type": "ui-radio-group",
        "z": "3cc4c4a5bf7df696",
        "group": "f9352287a37c685a",
        "name": "",
        "label": "Select Option:",
        "order": 0,
        "width": 0,
        "height": 0,
        "columns": 1,
        "passthru": false,
        "options": [
            {
                "label": "Top 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Top 20",
                "value": 20,
                "type": "num"
            },
            {
                "label": "Top 30",
                "value": 30,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 620,
        "y": 500,
        "wires": [
            [
                "e9aa0920c901d58b"
            ]
        ]
    },
    {
        "id": "e9aa0920c901d58b",
        "type": "debug",
        "z": "3cc4c4a5bf7df696",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 840,
        "y": 500,
        "wires": []
    },
    {
        "id": "f9352287a37c685a",
        "type": "ui-group",
        "name": "ESS Settings Grid",
        "page": "2607af8a108bf1e2",
        "width": "6",
        "height": "3",
        "order": 4,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "2607af8a108bf1e2",
        "type": "ui-page",
        "name": "ESS",
        "ui": "fa623d9b8e82a88f",
        "path": "/page1",
        "icon": "home-lightning-bolt-outline",
        "layout": "grid",
        "theme": "0e8ff20731ab48ca",
        "order": 4,
        "className": "",
        "visible": true,
        "disabled": "false"
    },
    {
        "id": "fa623d9b8e82a88f",
        "type": "ui-base",
        "name": "UI Venus",
        "path": "/dashboard",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "navigationStyle": "icon"
    },
    {
        "id": "0e8ff20731ab48ca",
        "type": "ui-theme",
        "name": "Venus Theme",
        "colors": {
            "surface": "#282828",
            "primary": "#0094ce",
            "bgPage": "#181818",
            "groupBg": "#181818",
            "groupOutline": "#404040"
        },
        "sizes": {
            "pagePadding": "10px",
            "groupGap": "5px",
            "groupBorderRadius": "5px",
            "widgetGap": "10px"
        }
    }
]

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

I can confirm that selecting an option via msg.payload does not work, at least in the posted flow. I cannot vouch for whether it used to work as I have not used that node previously.

@mworion, for the future, if you add lines with tripple backticks before and after the flow then it will be formatted as a code block and a Copy button will be provided making it easier to copy it. In addition if you select Compact on the JSON tab when exporting it then it will be compressed so will not take up large amounts of space here.

from node-red-dashboard.

mworion avatar mworion commented on June 11, 2024

Many thanks for the quick responses and for the hint about the backticks. I had a more complicated flow already working and the issue occurred after the last dashboard update to 1.8.1. From my point of view this might be a topic of the accepted PR.
Michel

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

this might be a topic of the accepted PR

Sorry, I don't understand that statement.

from node-red-dashboard.

mworion avatar mworion commented on June 11, 2024

OK, try to rephrase. I only said, that it worked in the past correctly and the issue arose with the update to v1.8.1 of the dashboard.

from node-red-dashboard.

bartbutenaers avatar bartbutenaers commented on June 11, 2024

Hi, had not much time tonight due to some unexpected family stuff...

I pulled the latest version from this Github repo, because that is the version I will need to start from to implement a fix. But for me it is working fine, which is not what I had expected.

When I view at the commit history, there was only 1 change after version 1.8.1:

image

That change is about the ui gauge widget, so that cannot have solved the issue.

I will install version 1.8.1 tomorrow and try to reproduce the problem.

from node-red-dashboard.

bartbutenaers avatar bartbutenaers commented on June 11, 2024

Ok, I was able to reproduce the problem with the latest Github master branch.
As @mworion mentioned, the issue was indeed introduced via this PR.
I will implement a fix tonight. Now the daily stuff...

from node-red-dashboard.

bartbutenaers avatar bartbutenaers commented on June 11, 2024

I quickly created a pull-request. Did some other tests, which seemed ok to me. But would be nice if anybody could do some more testing, to make sure I haven't introduced other issues. Thanks!

from node-red-dashboard.

bartbutenaers avatar bartbutenaers commented on June 11, 2024

Thanks @colinl for testing. That really helps!!

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

In the docs it says that sending a null msg.payload should clear any selected option. This doesn't appear to work, I don't know if it ever did. It does clear it if sent an empty string, which actually seems more intuitive to me.

from node-red-dashboard.

bartbutenaers avatar bartbutenaers commented on June 11, 2024

@colinl,
I was thinking the same last week. From a developer point of view I completely understand that injecting a null value clears it. However since Node-RED is about low-code, I indeed think an empty string would be more intuitive. Moreover I think using a simple Inject node you even cannot inject a null?

On the other hand different types of values are supported by this ui node, and even mixes are allowed:

image

When no strings are used, a "" value again makes not much sense imho...

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

@joepavitt can you confirm what payload values should clear the selection?

from node-red-dashboard.

joepavitt avatar joepavitt commented on June 11, 2024

Empty string is more sensible in the context of Node-RED as @bartbutenaers has mentioned. I would vote we move to that going forward.

from node-red-dashboard.

colinl avatar colinl commented on June 11, 2024

In that case it is just the docs that need updating. I note that the node has not yet got any help text in the editor.

from node-red-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.