nussknacker icon indicating copy to clipboard operation
nussknacker copied to clipboard

[NU-1719] Component statistics without restmodel

Open ForrestFairy opened this issue 1 year ago • 2 comments

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

ForrestFairy avatar Jun 24 '24 13:06 ForrestFairy

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

lukasz-bigorajski avatar Jun 26 '24 08:06 lukasz-bigorajski

created: #6318 :warning: Be careful! Snapshot changes are not necessarily the cause of the error. Check the logs.

github-actions[bot] avatar Jul 01 '24 11:07 github-actions[bot]