devaskim
devaskim
1. `self.ctx.datasources` 2. `self.ctx.$scope.title = "Some Title";`
Hm, try to debug by looking into details of `stateController` by `console.log(self.ctx.stateController)`
> it indeed return undefined when i console log If you run the widget in the editor (not in dashboard), there is no `stateController`
Try this ``` self.ctx.dashboard.dashboardTimewindowChanged.subscribe( newTimeWindow => { console.log('Time Window Updated); } ); ```
@vislink Thanks for sharing your solution. I added it to my [awesome-thingsboard](https://github.com/devaskim/awesome-thingsboard) collection
@devdoob Greate work. Sure, will add. Could you share CSS styles as well?
@nicovon24 Try to use [entity queries](https://thingsboard.cloud/swagger-ui/#/entity-query-controller/findEntityDataByQuery). There is counting and finding REST endpoints, also with custom rule nodes you can use this backend Java service directly [but with some limitations](https://github.com/thingsboard/thingsboard/pull/9416#issuecomment-1852007129).
Well, I relies on rule chain and processing on Activity/Inactivity/Entity Create/Entity Deleted/Entity Asssigned/Entity Unassigned events. Once such event occurs, I count up or down corresponding server attribute on customer level....
@nicovon24 Sorry, offtopic questions about design of your widget. 1. Is each card is dashboard state instantiated with different entity or did you implement HTML generation function in widget config?...