Skip to content

Commit

Permalink
bugfix wrong refactor in load Historic
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Dec 6, 2023
1 parent 79003e6 commit d4525bc
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 108 deletions.
191 changes: 97 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,195 +128,198 @@ runtime.html?screenName=screen2
<!--
Placeholder for next versions:
### __WORK IN PROGRESS__
-->
-->
### __WORK IN PROGRESS__
- fix broken load historic

### 0.18.10 (2023-12-06)
- load historic only when previous load is finished

- load historic only when previous load is finished

### 0.18.9 (2023-12-05)
- fix tooltips

- fix tooltips

### 0.18.8 (2023-12-05)
- lazy remove the title

- lazy remove the title

### 0.18.7 (2023-12-05)
- better fix for monaco

- better fix for monaco

### 0.18.6 (2023-12-05)
- fix for monaco bug
- title removed

- title removed

### 0.18.5 (2023-12-05)
- code completition for base custom webcomponent
- object property type

- object property type

### 0.18.4 (2023-12-03)
- better text for historic bindings cancel

- better text for historic bindings cancel

### 0.18.3 (2023-12-03)
- fix reload in dynamics editor

- fix reload in dynamics editor

### 0.18.2 (2023-12-03)
- ui for historic binding
- fixes in refactor view

- fixes in refactor view

### 0.18.1 (2023-12-03)
- fixes in refactor service

- fixes in refactor service

### 0.18.0 (2023-12-01)
- tooltip in solution explorer
- npm upgrade of designer
- refactor view for bindings and scripts

- refactor view for bindings and scripts

### 0.17.0 (2023-11-29)
- remove 2 uneeded files
- designer update

- designer update

### 0.16.6 (2023-11-28)
- check for invalid propertynames
- move properties

- move properties

### 0.16.5 (2023-11-27)
- copy screen and custom controls

- copy screen and custom controls

### 0.16.4 (2023-11-27)
- fix usage of webui in windows

- fix usage of webui in windows

### 0.16.3 (2023-11-24)
- extra style for font declarations, they are not allowed in shadow dom

- extra style for font declarations, they are not allowed in shadow dom

### 0.16.2 (2023-11-23)
- fix remove script command

- fix remove script command

### 0.16.1 (2023-11-23)
- additional file dnd

- additional file dnd

### 0.16.0 (2023-11-23)
- add additional files node and upload

- add additional files node and upload

### 0.15.1 (2023-11-22)
- export as xml (screens & controls)
- binding historic with reload
- fix dialog

- fix dialog

### 0.15.0 (2023-11-19)
- uncloseable dialog
- css properties for dialog
- binding to historic data

- binding to historic data

### 0.14.1 (2023-11-12)
- dialog centered

- dialog centered

### 0.14.0 (2023-11-12)
- add simple dialog

- add simple dialog

### 0.13.1 (2023-11-11)
- two way bindings with expressions

- two way bindings with expressions

### 0.13.0 (2023-11-09)
- fix upercase screen names in runtime
- raster in designer is now adjustable
- copy object nodes now copies complete string
- context menu to directly edit custom element
- fix handler path in script
- uiChangedView now workin
- error when importing invalid file (for example html instead of json)

- error when importing invalid file (for example html instead of json)

### 0.12.3 (2023-09-20)
- after eval removal, functions need a return

- after eval removal, functions need a return

### 0.12.2 (2023-09-20)
- events names for 2way bindings need a editor

- events names for 2way bindings need a editor

### 0.12.1 (2023-09-20)
- two way for indirect bindings

- two way for indirect bindings

### 0.12.0 (2023-09-20)
- support indirect bindings via {...} in signals (like in vis)

- support indirect bindings via {...} in signals (like in vis)

### 0.11.2 (2023-09-17)
- check npm package name

- check npm package name

### 0.11.1 (2023-09-16)
- fix build on windows

- fix build on windows

### 0.11.0 (2023-09-11)
- dragdrop fixes
- screen/control size fixes
- connected/disconnected callbacks

- connected/disconnected callbacks

### 0.10.0 (2023-09-10)
- new script commands
- bugfix with bindings and empty events
- select exported function in javascript
- bugfix in save of screens
- typescript in scripts
- started work on translateable runtime

- started work on translateable runtime

### 0.9.0 (2023-09-06)
- signal selector in properties
- screen selector in properties
- new screen had style in scripts
- indirect value/property acces from scripts via editor
- list multiple undo entries (on hold of undo)

- list multiple undo entries (on hold of undo)

### 0.8.0 (2023-09-03)
- update designer to add and fix some commands
- move screen/control scripts out of html code
- add a javascript editor view
- bugfix when states where null after a fresh install
- designer addons do now work again
- docking framework updated, cause of bugs with undocking

- docking framework updated, cause of bugs with undocking

### 0.7.0 (2023-09-01)
- screens and controls have now settings (width, height, useGlobalStyle)

- screens and controls have now settings (width, height, useGlobalStyle)

### 0.6.0 (2023-09-01)
- removed many uneeded files from installation

- removed many uneeded files from installation

### 0.5.1 (2023-09-01)
- show version in ui

- show version in ui

### 0.5.0 (2023-09-01)
- signal as property type
- removed svg-image control
- shorter custom control tag name
- better dynamics editor
- dock ui fixes
- control ui from backend (switch view, reload)

- control ui from backend (switch view, reload)

### 0.4.0 (2023-08-30)
- remove uneeded files from upload
- remove icons into extra iobroker packages
- support icon adapters
- rename screens & controls

- rename screens & controls

### 0.3.0 (2023-08-29)
- default value for custom properties
- open screens only once
- property bindings default one way

- property bindings default one way

### 0.2.3 (2023-08-28)
- rework how custom controls are initalized

- rework how custom controls are initalized

### 0.2.2 (2023-08-28)
- better support & fixes of custom elements
- enum properties in custom controls
- sample custom controls

- sample custom controls

### 0.2.1 (2023-08-28)
- null ref fix in bindings

- null ref fix in bindings

### 0.2.0 (2023-08-28)
- Import/Export of Screens/Images/Controls
- Define your own Controls directly in webui
- Drag/Drop of Icons/Images to Properties
- Drag/Drop of objects to Bindings-Editor Signalname
- Basic functionality of CustomControls

- Basic functionality of CustomControls

### 0.1.0 (2023-08-27)
- initial public release

- initial public release

## License
The MIT License (MIT)

Copyright (c) 2023 jogibear9988 <[email protected]>
Copyright (c) 2023 jogibear9988 <[email protected]>
11 changes: 5 additions & 6 deletions src/frontend/helper/IobrokerWebuiBindingsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,11 @@ export class IobrokerWebuiBindingsHelper {
if (binding[1].historic) {
if (binding[1].historic.reloadInterval) {
let myTimer = { timerId: <any>-1 };
function loadHistoric() {
() => iobrokerHandler.connection.getHistoryEx(s, binding[1].historic).then(x => {
IobrokerWebuiBindingsHelper.handleValueChanged(element, binding, x?.values, valuesObject, i);
if (myTimer.timerId !== null)
myTimer.timerId = setTimeout(loadHistoric, binding[1].historic.reloadInterval);
})
async function loadHistoric() {
const res = await iobrokerHandler.connection.getHistoryEx(s, binding[1].historic);
IobrokerWebuiBindingsHelper.handleValueChanged(element, binding, res?.values, valuesObject, i);
if (myTimer.timerId !== null)
myTimer.timerId = setTimeout(loadHistoric, binding[1].historic.reloadInterval);
}
loadHistoric();
unsubscribeList.push(() => {
Expand Down
11 changes: 5 additions & 6 deletions www/dist/frontend/helper/IobrokerWebuiBindingsHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,11 @@ export class IobrokerWebuiBindingsHelper {
if (binding[1].historic) {
if (binding[1].historic.reloadInterval) {
let myTimer = { timerId: -1 };
function loadHistoric() {
() => iobrokerHandler.connection.getHistoryEx(s, binding[1].historic).then(x => {
IobrokerWebuiBindingsHelper.handleValueChanged(element, binding, x?.values, valuesObject, i);
if (myTimer.timerId !== null)
myTimer.timerId = setTimeout(loadHistoric, binding[1].historic.reloadInterval);
});
async function loadHistoric() {
const res = await iobrokerHandler.connection.getHistoryEx(s, binding[1].historic);
IobrokerWebuiBindingsHelper.handleValueChanged(element, binding, res?.values, valuesObject, i);
if (myTimer.timerId !== null)
myTimer.timerId = setTimeout(loadHistoric, binding[1].historic.reloadInterval);
}
loadHistoric();
unsubscribeList.push(() => {
Expand Down
4 changes: 2 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@
webui
</div>
<div style="font-size: 10px;">
version: 0.18.9
version: 0.18.10
</div>
<div style="font-size: 10px;">
hash: d355952
hash: 79003e6
</div>
<span class="title">Version</span>
</div>
Expand Down

0 comments on commit d4525bc

Please sign in to comment.