hunk.code_window:       Notifications.success('Stack successfully deployed');
         return ResourceControlService.applyResourceControl('stack', name, 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/stacks/create/createStackController.js
hunk.type: replace
file: <div>
    <label for="image_name" class="col-sm-1 control-label text-left">Name</label>
    <div class="col-sm-11 col-md-6">
      <input type="text" class="form-control" uib-typeahead="image for image in $ctrl.availableImages | filter:$viewValue | limitTo:5"
        ng-model="$ctrl.image" id="image_name" placeholder="e.g. myImage:myTag">
    </div>
    <label for="image_registry" class="col-sm-2 col-md-1 margin-sm-top control-label text-left">
      Registry
    </label>
    <div class="col-sm-10 col-md-4 margin-sm-top">
      <select ng-options="registry as registry.Name for registry in $ctrl.availableRegistries" ng-model="$ctrl.registry" id="image_registry"
        class="form-control"></select>
    </div>
  </div>