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

Synoptic panel state not loading correctly #2974

Closed
YuaFox opened this issue Jul 31, 2024 · 5 comments
Closed

Synoptic panel state not loading correctly #2974

YuaFox opened this issue Jul 31, 2024 · 5 comments
Assignees
Milestone

Comments

@YuaFox
Copy link
Collaborator

YuaFox commented Jul 31, 2024

Describe the bug
I have the following state:
image

If im in the panel and i change the value to 0, the state color is red.
When i refresh the window it shows as green, it should be red.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the panel
  2. Chnage the value from 1->0
  3. The color is changed to red
  4. Refresh
  5. (Bug) The color is green, should be red

Expected behavior
State should evaluate the condition when loading the page but it always marks it as positive (green color).

Screenshots
State when value changes to 0
image
After refreshing the tab
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser Chrome 126.0.6478.182 (64-bit)
@YuaFox YuaFox self-assigned this Jul 31, 2024
@Limraj Limraj added bug community Community Reported Issues and removed community Community Reported Issues labels Jul 31, 2024
@YuaFox
Copy link
Collaborator Author

YuaFox commented Aug 1, 2024

When the synoptic panel is loaded onPointEnabledUpdate and onPointValueUpdate are executed.
image

onPointEnabledUpdate(enabled) {
    if(enabled) {
       ....
        // This should check what color to use
        this.changeComponentColor(`${this.componentId}`, this.enabledColor); 
    } else {
        ....
    }
},

There's a race between the 2 functions:

  • onPointEnabledUpdate always use the enabled color
  • onPointValueUpdate checks the condition before using enabled/disabled color

onPointEnabledUpdate should check what color to use when enabling

@Limraj
Copy link
Collaborator

Limraj commented Aug 1, 2024

Hi @YuaFox,
Synoptic panels are an interesting solution and are worth investing in. Thanks you.

Propose issue:
#2978 Added ability set value on Synoptic Panel for Data Point settable;

Other issue suggestions:
#2805 Upgrade Node;
#2976 Fixed refresh chart-line and chart-range;

However, if these issues do not suit your preferences, we are open to your further suggestions for improvements.

We also encourage you to report any problems you notice, even if you do not intend to address them.

Regards,
Kamil Jarmusik

@Limraj Limraj added the new UI label Aug 1, 2024
YuaFox added a commit that referenced this issue Aug 2, 2024
- Synoptic State now checks the condition when is enabled
@Limraj
Copy link
Collaborator

Limraj commented Aug 5, 2024

Hi @YuaFox,
we have two more suggestions:
#2955 - You should upgrade the versions according to what dependabot suggests. However, this can be troublesome, mainly due to the lack of backward compatibility, the requirement for a newer Node, etc. So it may not be possible to achieve it in a reasonable time, if there are a lot of problems, we leave it for now;
#2957;

Regards,
Kamil Jarmusik

@YuaFox
Copy link
Collaborator Author

YuaFox commented Aug 5, 2024

Hi @Limraj

These suggestions are interesting and will improve the quality of the code, I will review them and see what I can do.

Another improvement that would be interesting would be some kind of interactivity, e.g. actuation buttons. Combined with node-red many interesting things could be done.

Node-red is a widely used plcs/iot automation software.

https://nodered.org/

@Limraj
Copy link
Collaborator

Limraj commented Aug 5, 2024

@YuaFox, Unfortunately, the constant introduction of revolutions has led us to a place where the new UI is a burden for us. Rather, we try to improve what is there by minimizing the number of changes. However, you can create an issue on this topic(node-red), describe how we can use it, with example, with links to documentation, it will be something for us to consider.

YuaFox added a commit that referenced this issue Aug 21, 2024
- The api shows a datapoint is disabled if datasource is disabled
YuaFox added a commit that referenced this issue Aug 22, 2024
- Datapoint is running moved to DataPointService
YuaFox added a commit that referenced this issue Aug 22, 2024
- Changed isDataPointRunning implementation
YuaFox added a commit that referenced this issue Aug 22, 2024
- Changed DataSourceService yo DataSourceDAO
Limraj added a commit that referenced this issue Aug 24, 2024
…e_not_loading_correctly2

#2974 synoptic panel state not loading correctly
@Limraj Limraj closed this as completed Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants