Skip to content

Commit

Permalink
[MNOE-1280] Cleared instances cache to refresh apps & products
Browse files Browse the repository at this point in the history
  • Loading branch information
RidaAhmad committed Aug 28, 2018
1 parent 9885086 commit 6de8b5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/views/provisioning/confirm.controller.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
angular.module 'mnoEnterpriseAngular'
.controller('ProvisioningConfirmCtrl', ($scope, $state, $stateParams, $log, MnoeOrganizations, MnoeProvisioning, MnoeAppInstances, MnoeConfig, ProvisioningHelper, schemaForm, toastr) ->
.controller('ProvisioningConfirmCtrl', ($scope, $state, $stateParams, $log, MnoeOrganizations, MnoeProvisioning, MnoeAppInstances, MnoeConfig, ProvisioningHelper, schemaForm, toastr, MnoeProductInstances) ->

vm = this

Expand Down Expand Up @@ -29,6 +29,11 @@ angular.module 'mnoEnterpriseAngular'
vm.schema = schema
)

clearInstancesCache = ->
MnoeAppInstances.emptyAppInstances()
MnoeProductInstances.emptyProductInstances()
MnoeProductInstances.clearCache()

vm.editOrder = (reload = true) ->
switch $stateParams.editAction.toLowerCase()
when 'change', 'provision', null
Expand Down Expand Up @@ -77,6 +82,7 @@ angular.module 'mnoEnterpriseAngular'
MnoeProvisioning.refreshCartSubscriptions()
$state.go("home.subscriptions", {subType: 'cart'})
else
clearInstancesCache()
# Reload dock apps
MnoeAppInstances.getAppInstances().then(
(response) ->
Expand Down

0 comments on commit 6de8b5b

Please sign in to comment.