ref 10187: Enhance SAI
https://support.d4science.org/issues/10187 Delete the Create button, only publish button is now available. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@160309 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4bf8783918
commit
2a2eabfce7
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -45,5 +45,5 @@
|
|||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.8.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.9.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="${groupId}.${artifactId}.1-9-0" date="2017-12-13">
|
||||
<Change>Fixed Set Main behavior in case of R [ticket #10523]</Change>
|
||||
<Change>Only publish button is available [ticket #10187]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="${groupId}.${artifactId}.1-8-0" date="2017-11-09">
|
||||
<Change>Updated Tools panel</Change>
|
||||
</Changeset>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>statistical-algorithms-importer</artifactId>
|
||||
<version>1.8.0-SNAPSHOT</version>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
|
||||
|
|
|
@ -275,11 +275,8 @@ public class StatAlgoImporterController {
|
|||
case RESOURCE_GITHUB:
|
||||
showGitHubWizard();
|
||||
break;
|
||||
case SOFTWARE_CREATE:
|
||||
softwareCreateRequest();
|
||||
break;
|
||||
case SOFTWARE_PUBLISH:
|
||||
softwarePublish();
|
||||
softwareCreateRequest();
|
||||
break;
|
||||
case SOFTWARE_REPACKAGE:
|
||||
softwareRepackage();
|
||||
|
@ -360,9 +357,11 @@ public class StatAlgoImporterController {
|
|||
|
||||
private void softwareCreateRequest() {
|
||||
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Warning",
|
||||
"The creation of new software will overwrite the possible"
|
||||
+ " previous version and will require publication again." + " Do you want to proceed anyway?");
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Attention",
|
||||
"The creation of new software will overwrite the possible previous version, moreover"
|
||||
+ " the compiled software will be notified to the Infrastructure Administrators"
|
||||
+ " and will be published in the suggested VREs. The source code will not be shared."
|
||||
+ " Do you confirm the submission?");
|
||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||
|
||||
@Override
|
||||
|
@ -387,10 +386,7 @@ public class StatAlgoImporterController {
|
|||
mb.show();
|
||||
}
|
||||
|
||||
private void softwarePublish() {
|
||||
pm.softwarePublish();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void softwareRepackage() {
|
||||
pm.softwareRepackage();
|
||||
|
|
|
@ -74,7 +74,6 @@ public class MainDataPanel extends SimpleContainer {
|
|||
case SAVE:
|
||||
case START:
|
||||
case UPDATE:
|
||||
case SOFTWARE_CREATED:
|
||||
case SOFTWARE_PUBLISH:
|
||||
case SOFTWARE_REPACKAGE:
|
||||
case ADD_RESOURCE:
|
||||
|
|
|
@ -412,11 +412,10 @@ public class ProjectManager {
|
|||
|
||||
@Override
|
||||
public void onSuccess(Project p) {
|
||||
Log.info("Software Created!");
|
||||
project = p;
|
||||
monitor.hide();
|
||||
fireProjectStatusSoftwareCreatedEvent();
|
||||
UtilsGXT3.info("Create Software", "Software Created!");
|
||||
|
||||
softwarePublish(monitor);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -756,30 +755,12 @@ public class ProjectManager {
|
|||
});
|
||||
}
|
||||
|
||||
public void softwarePublish() {
|
||||
private void softwarePublish(final StatAlgoImporterMonitor monitor) {
|
||||
if (project != null) {
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Attention",
|
||||
"The compiled software will be notified to the Infrastructure Administrators and will be published in the suggested VREs. The source code will not be shared. Do you confirm the submission?");
|
||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||
|
||||
@Override
|
||||
public void onDialogHide(DialogHideEvent event) {
|
||||
switch (event.getHideButton()) {
|
||||
case NO:
|
||||
break;
|
||||
case YES:
|
||||
softwarePublishOnServer();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
mb.setWidth(300);
|
||||
mb.show();
|
||||
|
||||
softwarePublishOnServer(monitor);
|
||||
|
||||
} else {
|
||||
monitor.hide();
|
||||
Log.error("Project not open: " + project);
|
||||
UtilsGXT3.alert("Error", "Project not open!");
|
||||
}
|
||||
|
@ -787,8 +768,7 @@ public class ProjectManager {
|
|||
}
|
||||
|
||||
// TODO
|
||||
private void softwarePublishOnServer() {
|
||||
final StatAlgoImporterMonitor monitor = new StatAlgoImporterMonitor();
|
||||
private void softwarePublishOnServer(final StatAlgoImporterMonitor monitor) {
|
||||
StatAlgoImporterServiceAsync.INSTANCE.publishSoftware(new AsyncCallback<String>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -1040,13 +1020,14 @@ public class ProjectManager {
|
|||
eventBus.fireEvent(projectStatusEvent);
|
||||
}
|
||||
|
||||
/*
|
||||
private void fireProjectStatusSoftwareCreatedEvent() {
|
||||
ProjectStatusEvent projectStatusEvent = new ProjectStatusEvent(ProjectStatusEventType.SOFTWARE_CREATED,
|
||||
project);
|
||||
Log.debug("Project Manager ProjectStatusEvent fire! " + projectStatusEvent);
|
||||
eventBus.fireEvent(projectStatusEvent);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
private void fireProjectStatusSoftwarePublishEvent() {
|
||||
ProjectStatusEvent projectStatusEvent = new ProjectStatusEvent(ProjectStatusEventType.SOFTWARE_PUBLISH,
|
||||
|
|
|
@ -49,7 +49,7 @@ public class HomeToolBar {
|
|||
|
||||
|
||||
//Software
|
||||
private TextButton btnCreateSoftware;
|
||||
//private TextButton btnCreateSoftware;
|
||||
private TextButton btnPublishSoftware;
|
||||
private TextButton btnRepackageSoftware;
|
||||
|
||||
|
@ -211,26 +211,6 @@ public class HomeToolBar {
|
|||
FlexTable softwareLayout = new FlexTable();
|
||||
softwareGroup.add(softwareLayout);
|
||||
|
||||
btnCreateSoftware = new TextButton(msgs.btnCreateSoftwareText(),
|
||||
StatAlgoImporterResources.INSTANCE.algorithm24());
|
||||
btnCreateSoftware.setId("createSoftwareButton");
|
||||
btnCreateSoftware.setScale(ButtonScale.SMALL);
|
||||
btnCreateSoftware.setIconAlign(IconAlign.LEFT);
|
||||
btnCreateSoftware.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
btnCreateSoftware.setToolTip(msgs.btnCreateSoftwareToolTip());
|
||||
btnCreateSoftware.getElement().setMargins(new Margins(0, 4, 0, 0));
|
||||
btnCreateSoftware.disable();
|
||||
btnCreateSoftware.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new StatAlgoImporterRibbonEvent(
|
||||
StatAlgoImporterRibbonType.SOFTWARE_CREATE));
|
||||
}
|
||||
});
|
||||
|
||||
softwareLayout.setWidget(0, 0, btnCreateSoftware);
|
||||
softwareLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
btnPublishSoftware = new TextButton(msgs.btnPublishSoftwareText(),
|
||||
StatAlgoImporterResources.INSTANCE.publish24());
|
||||
btnPublishSoftware.setId("publishSofwareButton");
|
||||
|
@ -248,8 +228,8 @@ public class HomeToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
softwareLayout.setWidget(0, 1, btnPublishSoftware);
|
||||
softwareLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
softwareLayout.setWidget(0, 0, btnPublishSoftware);
|
||||
softwareLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
|
||||
btnRepackageSoftware = new TextButton(msgs.btnRepackageSoftwareText(),
|
||||
|
@ -268,8 +248,8 @@ public class HomeToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
softwareLayout.setWidget(0, 2, btnRepackageSoftware);
|
||||
softwareLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
softwareLayout.setWidget(0, 1, btnRepackageSoftware);
|
||||
softwareLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
|
||||
|
||||
|
@ -417,7 +397,6 @@ public class HomeToolBar {
|
|||
btnSaveProject.disable();
|
||||
btnAddResource.disable();
|
||||
btnGitHubResource.disable();
|
||||
btnCreateSoftware.disable();
|
||||
btnPublishSoftware.disable();
|
||||
btnRepackageSoftware.disable();
|
||||
btnHelp.enable();
|
||||
|
@ -433,7 +412,6 @@ public class HomeToolBar {
|
|||
btnSaveProject.enable();
|
||||
btnAddResource.enable();
|
||||
btnGitHubResource.enable();
|
||||
btnCreateSoftware.enable();
|
||||
btnPublishSoftware.enable();
|
||||
btnRepackageSoftware.enable();
|
||||
btnHelp.enable();
|
||||
|
|
|
@ -124,7 +124,6 @@ public class ExplorerProjectPanel extends ContentPanel {
|
|||
case SAVE:
|
||||
case MAIN_CODE_SET:
|
||||
case BINARY_CODE_SET:
|
||||
case SOFTWARE_CREATED:
|
||||
case SOFTWARE_PUBLISH:
|
||||
case SOFTWARE_REPACKAGE:
|
||||
case EXPLORER_REFRESH:
|
||||
|
|
|
@ -109,7 +109,6 @@ public class InputVariablePanel extends ContentPanel {
|
|||
+ event.toString());
|
||||
switch (event.getProjectStatusEventType()) {
|
||||
case SAVE:
|
||||
case SOFTWARE_CREATED:
|
||||
case SOFTWARE_PUBLISH:
|
||||
case SOFTWARE_REPACKAGE:
|
||||
case START:
|
||||
|
|
|
@ -8,6 +8,6 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type;
|
|||
*/
|
||||
public enum ProjectStatusEventType {
|
||||
START, OPEN, MAIN_CODE_SET, BINARY_CODE_SET, UPDATE,
|
||||
ADD_RESOURCE, DELETE_RESOURCE, DELETE_MAIN_CODE,DELETE_BINARY_CODE, SOFTWARE_CREATED,
|
||||
ADD_RESOURCE, DELETE_RESOURCE, DELETE_MAIN_CODE,DELETE_BINARY_CODE,
|
||||
SOFTWARE_PUBLISH, SOFTWARE_REPACKAGE, EXPLORER_REFRESH, SAVE;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ public enum StatAlgoImporterRibbonType {
|
|||
PROJECT_SAVE,
|
||||
RESOURCE_ADD,
|
||||
RESOURCE_GITHUB,
|
||||
SOFTWARE_CREATE,
|
||||
SOFTWARE_PUBLISH,
|
||||
SOFTWARE_REPACKAGE,
|
||||
HELP;
|
||||
|
|
Loading…
Reference in New Issue