hunk.code_window: 	if err != nil {
   		return &httperror.HandlerError{http.StatusBadRequest, "Invalid stack identifier route variable", err}
   	}
   	externalStack, _ := request.RetrieveBooleanQueryParameter(r, "external", true)
   	if externalStack {
   		return handler.deleteExternalStack(r, w, stackID)
   	}
   	id, err := strconv.Atoi(stackID)
  
hunk.labels: keep keep keep keep add keep keep keep keep keep
hunk.after_edit: 	log.Printf("External stack value: %v", externalStack)
  
hunk.file_path: api/http/handler/stacks/stack_delete.go
hunk.type: add
file: angular.module('portainer.docker')
  .factory('SecretHelper', [function SecretHelperFactory() {
    'use strict';
    return {
      flattenSecret: function(secret) {
        if (secret) {
          return {
            Id: secret.SecretID,
            Name: secret.SecretName,
            FileName: secret.File.Name,
            Uid: secret.File.UID,
            Gid: secret.File.GID,
            Mode: secret.File.Mode
          };
        }
        return {};
      },
      secretConfig: function(secret) {
        if (secret) {
          return {
            SecretID: secret.Id,
            SecretName: secret.Name,
            File: {
              Name: secret.FileName,
              UID: secret.Uid || '0',
              GID: secret.Gid || '0',
              Mode: secret.Mode || 444
            }
          };
        }
        return {};
      }
    };
  }]);
  