hunk.code_window:       Notifications.success('Stack successfully deployed');
         ResourceControlService.applyResourceControl('stack', stackName, userId, accessControlData, [])
         .then(function success() {
           $state.go('docker.stacks');
         })
         .catch(function error(err) {
           Notifications.error('Failure', err, 'Unable to apply resource control on the stack');
         });
       })
       .catch(function error(err) {
         Notifications.warning('Deployment error', err.err.data.err);
       })
       .finally(function final() {
  
hunk.labels: keep replace replace replace replace replace replace replace keep keep keep keep keep
hunk.after_edit:       $state.go('docker.stacks');
  
hunk.file_path: app/docker/views/templates/templatesController.js
hunk.type: replace
file: angular.module('portainer')
  .constant('API_ENDPOINT_AUTH', 'api/auth')
  .constant('API_ENDPOINT_DOCKERHUB', 'api/dockerhub')
  .constant('API_ENDPOINT_ENDPOINTS', 'api/endpoints')
  .constant('API_ENDPOINT_REGISTRIES', 'api/registries')
  .constant('API_ENDPOINT_RESOURCE_CONTROLS', 'api/resource_controls')
  .constant('API_ENDPOINT_SETTINGS', 'api/settings')
  .constant('API_ENDPOINT_STATUS', 'api/status')
  .constant('API_ENDPOINT_USERS', 'api/users')
  .constant('API_ENDPOINT_TEAMS', 'api/teams')
  .constant('API_ENDPOINT_TEAM_MEMBERSHIPS', 'api/team_memberships')
  .constant('API_ENDPOINT_TEMPLATES', 'api/templates')
  .constant('DEFAULT_TEMPLATES_URL', 'https://raw.githubusercontent.com/portainer/templates/master/templates.json')
  .constant('PAGINATION_MAX_ITEMS', 10)
  .constant('APPLICATION_CACHE_VALIDITY', 3600);
  