Skip to content

[MNOE-406] Added logic to request for unscoped data when showing dashboard apps#425

Open
MAhsenArif wants to merge 3 commits into
maestrano:1.1from
MAhsenArif:delisted_apps_logo
Open

[MNOE-406] Added logic to request for unscoped data when showing dashboard apps#425
MAhsenArif wants to merge 3 commits into
maestrano:1.1from
MAhsenArif:delisted_apps_logo

Conversation

@MAhsenArif

Copy link
Copy Markdown
Contributor

No description provided.


appInstancesPromise = null
@getAppInstances = ->
@getAppInstances = (force = false) ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The force is here to force unscoping?
In this case, it might more obvious to call it unscoped? And also add a quick comment on both @getAppInstance and @fetchAppInstance

@ouranos ouranos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little style change on the Restangular call

->
_self.appInstancesPromise = MnoeApiSvc.one('organizations', MnoeOrganizations.selectedId).one('/app_instances').get().then(
query = if unscoped == true then '?unscoped=true' else ''
_self.appInstancesPromise = MnoeApiSvc.one('organizations', MnoeOrganizations.selectedId).one('/app_instances' + query).get().then(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For query parameters, you can pass an object to get():

params = if unscoped then {unscoped: true} else {}
xxx.one('/app_instances').get(params)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants