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

Don't save thing when coming back from the Code tab if it hasn't changed #618

Closed
mvalla opened this issue Dec 10, 2020 · 0 comments · Fixed by #823
Closed

Don't save thing when coming back from the Code tab if it hasn't changed #618

mvalla opened this issue Dec 10, 2020 · 0 comments · Fixed by #823
Assignees
Labels
bug Something isn't working main ui Main UI

Comments

@mvalla
Copy link

mvalla commented Dec 10, 2020

The problem

In thing detail page, if I just look to Code tab and then switch back to Thing or Channels tab, the Thing gets destroyed and re-initialized.

Expected behavior

Thing get destroyed/initialized only if its Code definition is changed and saved from Code tab

Steps to reproduce

  1. from MainUI open a Thing detail
  2. go to Code tab
  3. do not change any code, nor click Save
  4. click on Channels tab
    Looking at the log it's clear that the thing is first destroyed then re-created: initialize() is called on thing handler

Your environment

I am on 3.0.0-SNAPSHOT

runtimeInfo:
  version: 3.0.0
  buildString: Unknown Build No.
locale: it_IT
systemInfo:
  configFolder: ----
  userdataFolder: ----
  javaVersion: 11.0.8
  javaVendor: Oracle Corporation
  javaVendorVersion: "18.9"
  osName: Windows 10
  osVersion: "10.0"
  osArchitecture: amd64
  availableProcessors: 4
  freeMemory: 108136160
  totalMemory: 161480704
bindings:
  - astro
  - openwebnet
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1
    prefersColorScheme: light
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: 8
    hardwareConcurrency: 4
    language: it
    languages:
      - it
      - en-GB
      - en
    onLine: true
    platform: Win32
  screen:
    width: 1920
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/87.0.4280.88 Safari/537.36
timestamp: 2020-12-10T23:32:29.715Z
@mvalla mvalla added bug Something isn't working main ui Main UI labels Dec 10, 2020
@ghys ghys changed the title [MainUI] Thing gets initialized after just looking to its code definition Don't save thing when coming back from the Code tab if it hasn't changed Jan 14, 2021
@ghys ghys self-assigned this Jan 18, 2021
ghys added a commit to ghys/openhab-webui that referenced this issue Jan 18, 2021
ghys added a commit to ghys/openhab-webui that referenced this issue Jan 18, 2021
Fixes openhab#618.

Disable editing of config parameters with readOnly enabled.
Fixes openhab#756.

Signed-off-by: Yannick Schaus <[email protected]>
@ghys ghys closed this as completed in #823 Jan 18, 2021
ghys added a commit that referenced this issue Jan 18, 2021
Don't save thing when coming back from the Code tab if it hasn't changed - fixes #618.
Disable editing controls if thing is not editable - fixes #570.
Disable editing of config parameters with readOnly enabled - fixes #756.

Signed-off-by: Yannick Schaus <[email protected]>
ghys added a commit that referenced this issue Jan 18, 2021
Don't save thing when coming back from the Code tab if it hasn't changed - fixes #618.
Disable editing controls if thing is not editable - fixes #570.
Disable editing of config parameters with readOnly enabled - fixes #756.

Signed-off-by: Yannick Schaus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants