Implemented some feedback reported under #20868#note-11

This commit is contained in:
Francesco Mangiacrapa 2021-03-29 15:11:45 +02:00
parent 5ebfb47db1
commit b4bfc08cfa
6 changed files with 19 additions and 19 deletions

View File

@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
[#19568] Unify and extend the tags allowed values
[#20828] Revisited title size and format
[#20868] Redesigned the "Manage Resources" user experience
[##21068] Add Resources facility: only HTTPS URLs must be allowed
## [v1.6.2] - 2021-02-08

View File

@ -277,9 +277,9 @@ public class CreateDatasetForm extends Composite{
List<String> listOfSteps = null;
if(isWorkspaceRequest) {
listOfSteps = Arrays.asList("Insert Base Information","Select Item Resources", "Insert Profile Information and Publish");
listOfSteps = Arrays.asList("Edit Common Metadata","Select Item Resources", "Edit Item Specific Metadata & Publish");
}else {
listOfSteps = Arrays.asList("Insert Base Information", "Insert Profile Information and Publish");
listOfSteps = Arrays.asList("Edit Common Metadata", "Edit Item Specific Metadata & Publish");
}
this.wizCreator = new WizardCreator(listOfSteps);
@ -1419,7 +1419,7 @@ public class CreateDatasetForm extends Composite{
}
};
t.schedule(10000);
t.schedule(15000);
}
}

View File

@ -88,7 +88,13 @@ public class AddResourceToDataset extends Composite{
showAlert("Url and name fields cannot be empty", AlertType.ERROR);
return;
}
//THE URL must be HTTPS, see #21068
if(!(resourceNameTextBox.getText().toLowerCase().startsWith("https://"))){
showAlert("The URL must be HTTPS and starts with \"https://\" (e.g. https://your-resource.com)", AlertType.ERROR);
return;
}
// collect data and build up the bean

View File

@ -63,7 +63,7 @@
URL:
</b:ControlLabel>
<b:Controls>
<b:TextBox alternateSize="LARGE" placeholder="http://example.com/image.jpg"
<b:TextBox alternateSize="LARGE" placeholder="https://example.com/image.jpg"
b:id="url" title="Product's title" ui:field="resourceUrlTextBox" />
</b:Controls>
</b:ControlGroup>

View File

@ -65,7 +65,6 @@
/* WIZARD-CREATOR CLASSES */
.wizard-creator {
width: 100%;
border-spacing: 6px;
border-collapse: separate;
display: table;
}

View File

@ -388,11 +388,6 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
// get the list of resources and convert to ResourceBean
List<ResourceBean> resources = null;
ResourceElementBean resourcesToAdd = toCreate.getResourceRoot();
// we need to copy such resource in the .catalogue area of the user's ws
// if(resourcesToAdd != null){
// resources = WorkspaceUtils.copyResourcesToUserCatalogueArea(toCreate.getId(), userName, toCreate);
// }
//converting to resources to be added
if(resourcesToAdd != null){
@ -404,6 +399,13 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
String scope = getScopeFromOrgName(organizationNameOrId);
DataCatalogue utils = getCatalogue(scope);
if (!isWithinPortal()) {
logger.debug("Should be added:");
for (String key : customFields.keySet()) {
logger.debug("Custom field with key: "+key+", value: "+customFields.get(key));
}
}
String datasetId = utils.createCkanDatasetMultipleCustomFields(userName,
title,
null,
@ -422,15 +424,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
true,
true);
/**
* OLD CODE
String userApiKey = utils.getApiKeyFromUsername(userName);
String datasetId = utils.createCKanDatasetMultipleCustomFields
(userApiKey, title, null, organizationNameOrId, author, authorMail, maintainer,
maintainerMail, version, description, licenseId, listOfTags, customFields, resources, setPublic);
*/
if(datasetId != null){
logger.info("Dataset created!");