nussknacker
nussknacker copied to clipboard
[NU-1719] Component statistics without restmodel
Describe your changes
Remove the use of restmodel in statistics
Checklist before merge
- [x] Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
- [ ] Code is cleaned from temporary changes and commented out lines
- [ ] Parts of the code that are not easy to understand are documented in the code
- [ ] Changes are covered by automated tests
- [ ] Showcase in dev-application.conf added to demonstrate the feature
- [ ] Documentation added or updated
- [ ] Added entry in Changelog.md describing the change from the perspective of a public distribution user
- [ ] Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
- [ ] Verify that PR will be squashed during merge
Having 2 logics for counting usages can be misleading and error prone so we should use logic that we have currently. I am looking at componentsService now and I wonder if it will be enough to add method:
def getComponentsUsages(implicit user: LoggedUser): Future[Map[DesignerWideComponentId, Long]]
and then:
override def getComponentsUsages(implicit user: LoggedUser): Future[Map[DesignerWideComponentId, Long]] =
getUserAccessibleComponentUsages
but I have to confirm how is matched DesignerWideComponentId and ComponentId
created: #6318 :warning: Be careful! Snapshot changes are not necessarily the cause of the error. Check the logs.