Skip to content
Permalink
Browse files
Adding error handling for new validations. Fix web ui tests.
  • Loading branch information
effrafax committed Mar 2, 2019
1 parent cc0d8ad commit d4be8968cfb9910f335009e1538292671aa67853
Showing 5 changed files with 16 additions and 8 deletions.
@@ -546,6 +546,7 @@ fileupload.errors.acceptFileTypes=Filetype not allowed
fileupload.errors.maxNumberOfFiles=Max number of files exceeded
fileupload.errors.uploadedBytes=Uploaded bytes exceed file size
fileupload.errors.emptyResult=Empty file upload result
fileupload.errors.Unprocessable_Entity=There were illegal characters in the parameters
fileupload.artifactId=Artifact ID
fileupload.groupId=Groupd ID
fileupload.version=Version
@@ -556,6 +557,9 @@ fileupload.save=Save Files
fileupload.upload.required=You must upload your files first.
fileupload.artifacts.saved=Artifacts for ''{0}:{1}:{2}'', packaged as ''{3}'', with {4} POM Generated, were uploaded and saved on Server side to ''{5}'' repository.
fileupload.deleteAll=Select All
fileupload.malformed.param=The field contains illegal characters.
fileupload.malformed.filename=The filename contains illegal characters.
fileupload.malformed.pomFile=The field pomFile has no boolean value.

#reports
report.title = Reports
@@ -574,6 +574,7 @@
<executions>
<execution>
<id>cleanup-files</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
@@ -47,8 +47,11 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
displayErrorMessage( $.i18n.prop("fileupload.upload.required"));
return;
}
var url="restServices/archivaUiServices/fileUploadService/save/"+this.repositoryId()+"/"+this.groupId()+"/"+this.artifactId();
url+="/"+this.version()+"/"+this.packaging();
var url="restServices/archivaUiServices/fileUploadService/save/"+encodeURI(this.repositoryId())
+"/"+encodeURIComponent(this.groupId())
+"/"+encodeURIComponent(this.artifactId())
+"/"+encodeURIComponent(this.version())
+"/"+encodeURIComponent(this.packaging());
$.log("this.generatePom():'"+this.generatePom()+"'");
if (this.generatePom()==true){
url+="?generatePom=true";
@@ -117,9 +120,9 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
if (!data.formData){
data.formData={};
}
data.formData.pomFile = pomFile;
data.formData.classifier = classifier;
data.formData.packaging = packaging;
data.formData.pomFile = encodeURIComponent(pomFile);
data.formData.classifier = encodeURIComponent(classifier);
data.formData.packaging = encodeURIComponent(packaging);
});
}
});
@@ -284,7 +284,7 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
if (mainContent.find("#"+data.fieldName)){
var message=null;
if (data.errorKey) {
message=$.i18n.prop('data.errorKey');
message=$.i18n.prop(data.errorKey);
} else {
message=data.errorMessage;
}
@@ -653,7 +653,7 @@ <h3>${$.i18n.prop('fileupload.header')}</h3>
{% if (file.error) { %}
<td class="error" colspan="2">
<span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span>
{%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%}
{%=$.i18n.prop('fileupload.errors.'+file.error.replace(/\s+/,'_')) || file.error%}
</td>
{% } else if (o.files.valid && !i) { %}
<td>
@@ -692,7 +692,7 @@ <h3>${$.i18n.prop('fileupload.header')}</h3>
{% if (file.error) { %}
<td class="error" colspan="2">
<span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span>
{%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%}
{%=$.i18n.prop('fileupload.errors.'+file.error.replace(/\s+/,'_')) || file.error%}
</td>
{% } else { %}
<td colspan="2"></td>

0 comments on commit d4be896

Please sign in to comment.