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

[MainUI] Script Editor: Block runRule and save while rule is running (or uninitialized) #1613

Merged
merged 2 commits into from Dec 30, 2022

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Dec 29, 2022

Description

  • Fixes blocking of the run rule command while rule is RUNNING or UNINITIALIZED. This was already implemented, but nor working.
  • Additionally blocks save rule while a rule is RUNNING to avoid problems with automation engines like JS Scripting (GraalJS)
  • Shows toast messages when run rule or save rule is blocked and explains why it is blocked

Note: Block means that a click on the button does not execute the action, the button is still visible and looks normal.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Saving a currently running rule can lead to problems with automation engines like JS Scripting (GraalJS).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 requested a review from a team as a code owner December 29, 2022 00:21
@relativeci
Copy link

relativeci bot commented Dec 29, 2022

Job #666: Bundle Size — 15.96MiB (+0.17%).

0f52ce4(current) vs a36c931 main#665(baseline)

Metrics (2 changes)
                 Current
Job #666
     Baseline
Job #665
Initial JS 1.73MiB 1.73MiB
Initial CSS 608.52KiB 608.52KiB
Cache Invalidation 90.46% 90.47%
Chunks 218 218
Assets 688 688
Modules 2007 2007
Duplicate Modules 108 108
Duplicate Code 1.8%(+1.12%) 1.78%
Packages 133 133
Duplicate Packages 15 15
Total size by type (2 changes)
                 Current
Job #666
     Baseline
Job #665
CSS 856.56KiB 856.56KiB
Fonts 1.08MiB 1.08MiB
HTML 1.23KiB 1.23KiB
IMG 140.74KiB 140.74KiB
JS 9.03MiB (+0.55%) 8.98MiB
Media 295.6KiB 295.6KiB
Other 4.59MiB (-0.47%) 4.61MiB

View job #666 reportView main branch activity

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

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

LGTM, that conditional message could be a minor hurdle when (if) we finally implement l10n for the admin screens but for now it's okay!

@ghys ghys merged commit 2f5bb5c into openhab:main Dec 30, 2022
@ghys ghys added enhancement New feature or request main ui Main UI labels Dec 30, 2022
@ghys ghys added this to the 4.0 milestone Dec 30, 2022
@florian-h05
Copy link
Contributor Author

Yes, you are probably right but then we can introduce two different messages or something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants