ref 11724: SAI - Update to StorageHUB
https://support.d4science.org/issues/11724 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@173897 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9146a4fe4a
commit
6f3088490b
|
@ -18,6 +18,7 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.client.type.Project
|
|||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.type.WorkAreaEventType;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.utils.UtilsGXT3;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.Constants;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.descriptor.SAIDescriptor;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.exception.StatAlgoImporterSessionExpiredException;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.project.InputData;
|
||||
|
@ -107,15 +108,17 @@ public class ProjectManager {
|
|||
|
||||
};
|
||||
|
||||
final ProjectCreateWizard wizard = new ProjectCreateWizard();
|
||||
wizard.addWizardEventHandler(handler);
|
||||
wizard.setZIndex(XDOM.getTopZIndex());
|
||||
wizard.show();
|
||||
|
||||
if (Constants.DEBUG_MODE) {
|
||||
project = Constants.TEST_PROJECT;
|
||||
fireWorkAreaSetupEvent();
|
||||
} else {
|
||||
final ProjectCreateWizard wizard = new ProjectCreateWizard();
|
||||
wizard.addWizardEventHandler(handler);
|
||||
wizard.setZIndex(XDOM.getTopZIndex());
|
||||
wizard.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void openProject() {
|
||||
WorkspaceExplorerSelectDialog wselectDialog = new WorkspaceExplorerSelectDialog("Select Project Folder", true);
|
||||
|
||||
|
@ -124,8 +127,8 @@ public class ProjectManager {
|
|||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
||||
if (item.getType() == ItemType.FOLDER||item.getType() == ItemType.PRIVATE_FOLDER
|
||||
||item.getType() == ItemType.SHARED_FOLDER||item.getType() == ItemType.VRE_FOLDER) {
|
||||
if (item.getType() == ItemType.FOLDER || item.getType() == ItemType.PRIVATE_FOLDER
|
||||
|| item.getType() == ItemType.SHARED_FOLDER || item.getType() == ItemType.VRE_FOLDER) {
|
||||
openProjectOnServer(item);
|
||||
|
||||
} else {
|
||||
|
@ -205,8 +208,7 @@ public class ProjectManager {
|
|||
public void addResource() {
|
||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||
|
||||
|
||||
|
||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||
|
||||
|
@ -217,8 +219,8 @@ public class ProjectManager {
|
|||
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
if (item.getType() != ItemType.FOLDER&&item.getType() != ItemType.PRIVATE_FOLDER
|
||||
&&item.getType() != ItemType.SHARED_FOLDER&&item.getType() != ItemType.VRE_FOLDER) {
|
||||
if (item.getType() != ItemType.FOLDER && item.getType() != ItemType.PRIVATE_FOLDER
|
||||
&& item.getType() != ItemType.SHARED_FOLDER && item.getType() != ItemType.VRE_FOLDER) {
|
||||
String filename = item.getName();
|
||||
if (filename != null && !filename.isEmpty()) {
|
||||
addResourceToProject(item);
|
||||
|
@ -381,7 +383,7 @@ public class ProjectManager {
|
|||
Log.info("Software Created!");
|
||||
project = p;
|
||||
softwarePublish(monitor);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -439,8 +441,8 @@ public class ProjectManager {
|
|||
}
|
||||
|
||||
private void saveInputDataForMainSet(final InputData inputData, final ItemDescription itemDescription) {
|
||||
final StatAlgoImporterMonitor monitor=new StatAlgoImporterMonitor();
|
||||
|
||||
final StatAlgoImporterMonitor monitor = new StatAlgoImporterMonitor();
|
||||
|
||||
StatAlgoImporterServiceAsync.INSTANCE.saveProject(inputData, new AsyncCallback<Void>() {
|
||||
|
||||
@Override
|
||||
|
@ -467,7 +469,7 @@ public class ProjectManager {
|
|||
});
|
||||
}
|
||||
|
||||
private void setMainCodeOnServer(final ItemDescription itemDescription,final StatAlgoImporterMonitor monitor) {
|
||||
private void setMainCodeOnServer(final ItemDescription itemDescription, final StatAlgoImporterMonitor monitor) {
|
||||
|
||||
Log.debug("Set Main Code: " + itemDescription);
|
||||
StatAlgoImporterServiceAsync.INSTANCE.setMainCode(itemDescription, new AsyncCallback<Project>() {
|
||||
|
@ -537,13 +539,13 @@ public class ProjectManager {
|
|||
}
|
||||
|
||||
private void saveInputDataForBinarySet(final InputData inputData, final ItemDescription itemDescription) {
|
||||
final StatAlgoImporterMonitor monitor=new StatAlgoImporterMonitor();
|
||||
|
||||
final StatAlgoImporterMonitor monitor = new StatAlgoImporterMonitor();
|
||||
|
||||
StatAlgoImporterServiceAsync.INSTANCE.saveProject(inputData, new AsyncCallback<Void>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
setBinaryCodeOnServer(itemDescription,monitor);
|
||||
setBinaryCodeOnServer(itemDescription, monitor);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -617,26 +619,28 @@ public class ProjectManager {
|
|||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete", "Would you like to delete this resource?");
|
||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||
|
||||
@Override
|
||||
public void onDialogHide(DialogHideEvent event) {
|
||||
switch (event.getHideButton()) {
|
||||
case NO:
|
||||
break;
|
||||
case YES:
|
||||
deleteItemOnServer(itemDescription, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@Override
|
||||
public void onDialogHide(DialogHideEvent event) {
|
||||
switch (event.getHideButton()) {
|
||||
case NO:
|
||||
break;
|
||||
case YES:
|
||||
deleteItemOnServer(itemDescription, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
mb.setWidth(300);
|
||||
mb.show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});mb.setWidth(300);mb.show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void deleteItemOnServer(ItemDescription itemDescription, final boolean mainCode) {
|
||||
final StatAlgoImporterMonitor monitor = new StatAlgoImporterMonitor();
|
||||
|
||||
|
@ -723,8 +727,8 @@ public class ProjectManager {
|
|||
|
||||
private void softwarePublish(final StatAlgoImporterMonitor monitor) {
|
||||
if (project != null) {
|
||||
softwarePublishOnServer(monitor);
|
||||
|
||||
softwarePublishOnServer(monitor);
|
||||
|
||||
} else {
|
||||
monitor.hide();
|
||||
Log.error("Project not open: " + project);
|
||||
|
@ -758,12 +762,14 @@ public class ProjectManager {
|
|||
monitor.hide();
|
||||
Log.info(
|
||||
"Publish, the software has been published, but no autodeploy on server is enable so some time is required for installation by administrators!");
|
||||
UtilsGXT3.info("Publish", "The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes by administrators.");
|
||||
UtilsGXT3.info("Publish",
|
||||
"The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes by administrators.");
|
||||
fireProjectStatusSoftwarePublishEvent();
|
||||
}
|
||||
} else {
|
||||
monitor.hide();
|
||||
UtilsGXT3.info("Publish", "The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes by administrators.");
|
||||
UtilsGXT3.info("Publish",
|
||||
"The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes by administrators.");
|
||||
fireProjectStatusSoftwarePublishEvent();
|
||||
}
|
||||
}
|
||||
|
@ -778,67 +784,64 @@ public class ProjectManager {
|
|||
|
||||
@Override
|
||||
public void onMonitor(MonitorDeployOperationEvent event) {
|
||||
StatAlgoImporterServiceAsync.INSTANCE.getDeployOperationStatus(operationId, new AsyncCallback<String>() {
|
||||
StatAlgoImporterServiceAsync.INSTANCE.getDeployOperationStatus(operationId,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
monitorDeployOperation.stop();
|
||||
monitor.hide();
|
||||
if (caught instanceof StatAlgoImporterSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
||||
fireProjectStatusExplorerRefreshEvent();
|
||||
}
|
||||
}
|
||||
public void onFailure(Throwable caught) {
|
||||
monitorDeployOperation.stop();
|
||||
monitor.hide();
|
||||
if (caught instanceof StatAlgoImporterSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
||||
fireProjectStatusExplorerRefreshEvent();
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(String deployOperationStatus) {
|
||||
Log.debug("Deploy Operation Status: " + deployOperationStatus);
|
||||
if(deployOperationStatus==null){
|
||||
monitorDeployOperation.repeat();
|
||||
}
|
||||
|
||||
switch(deployOperationStatus){
|
||||
case "COMPLETED":
|
||||
monitorDeployOperation.stop();
|
||||
monitor.hide();
|
||||
UtilsGXT3.info("Publish", "The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes.");
|
||||
fireProjectStatusSoftwarePublishEvent();
|
||||
break;
|
||||
case "FAILED":
|
||||
monitorDeployOperation.stop();
|
||||
retrieveOperationDeployLogs(operationId, monitor);
|
||||
|
||||
break;
|
||||
case "IN PROGRESS":
|
||||
monitorDeployOperation.repeat();
|
||||
break;
|
||||
default:
|
||||
monitorDeployOperation.repeat();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public void onSuccess(String deployOperationStatus) {
|
||||
Log.debug("Deploy Operation Status: " + deployOperationStatus);
|
||||
if (deployOperationStatus == null) {
|
||||
monitorDeployOperation.repeat();
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
switch (deployOperationStatus) {
|
||||
case "COMPLETED":
|
||||
monitorDeployOperation.stop();
|
||||
monitor.hide();
|
||||
UtilsGXT3.info("Publish",
|
||||
"The software has been published! The Cloud system is being updated. Your process will be available on the DataMiner system within some minutes.");
|
||||
fireProjectStatusSoftwarePublishEvent();
|
||||
break;
|
||||
case "FAILED":
|
||||
monitorDeployOperation.stop();
|
||||
retrieveOperationDeployLogs(operationId, monitor);
|
||||
|
||||
break;
|
||||
case "IN PROGRESS":
|
||||
monitorDeployOperation.repeat();
|
||||
break;
|
||||
default:
|
||||
monitorDeployOperation.repeat();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
monitorDeployOperation.addHandler(handler);
|
||||
monitorDeployOperation.start();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void retrieveOperationDeployLogs(final String operationId, final StatAlgoImporterMonitor monitor) {
|
||||
StatAlgoImporterServiceAsync.INSTANCE.getDeployOperationLogs(operationId, new AsyncCallback<String>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
|
||||
|
||||
monitor.hide();
|
||||
if (caught instanceof StatAlgoImporterSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
|
@ -851,17 +854,14 @@ public class ProjectManager {
|
|||
public void onSuccess(String logs) {
|
||||
Log.debug("Deploy Operation Logs: " + logs);
|
||||
monitor.hide();
|
||||
UtilsGXT3.alert("Error", "Error deploying the algorithm: <a href='"+logs+"'>Logs</a>");
|
||||
UtilsGXT3.alert("Error", "Error deploying the algorithm: <a href='" + logs + "'>Logs</a>");
|
||||
fireProjectStatusExplorerRefreshEvent();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void startProjectManager() {
|
||||
retrieveSAIDescriptor(null);
|
||||
|
@ -987,13 +987,14 @@ public class ProjectManager {
|
|||
}
|
||||
|
||||
/*
|
||||
private void fireProjectStatusSoftwareCreatedEvent() {
|
||||
ProjectStatusEvent projectStatusEvent = new ProjectStatusEvent(ProjectStatusEventType.SOFTWARE_CREATED,
|
||||
project);
|
||||
Log.debug("Project Manager ProjectStatusEvent fire! " + projectStatusEvent);
|
||||
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,
|
||||
|
|
|
@ -73,7 +73,7 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
private GridRowEditing<GlobalVariables> gridGlobalVariableEditing;
|
||||
private TextButton btnAdd;
|
||||
private boolean addStatus;
|
||||
private int seq = 0;
|
||||
private int seqGlobalVariables = 0;
|
||||
private ListStore<DataType> storeComboInputType;
|
||||
private ComboBox<DataType> comboInputType;
|
||||
|
||||
|
@ -150,7 +150,7 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
&& project.getInputData().getListGlobalVariables() != null) {
|
||||
storeGlobalVariable.addAll(project.getInputData()
|
||||
.getListGlobalVariables());
|
||||
seq = project.getInputData().getListGlobalVariables().size();
|
||||
seqGlobalVariables = project.getInputData().getListGlobalVariables().size();
|
||||
}
|
||||
|
||||
final GridSelectionModel<GlobalVariables> sm = new GridSelectionModel<GlobalVariables>();
|
||||
|
@ -281,8 +281,8 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
storeGlobalVariable.addAll(listNewSelected);
|
||||
storeGlobalVariable.commitChanges();
|
||||
|
||||
seq = listNewSelected.size();
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seqGlobalVariables = listNewSelected.size();
|
||||
Log.debug("Current Seq: " + seqGlobalVariables);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -386,8 +386,8 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
|
||||
private void addGlobalVariable(SelectEvent event) {
|
||||
try {
|
||||
seq++;
|
||||
GlobalVariables newGlobalVariable = new GlobalVariables(seq, "",
|
||||
seqGlobalVariables++;
|
||||
GlobalVariables newGlobalVariable = new GlobalVariables(seqGlobalVariables, "",
|
||||
"", "", DataType.STRING);
|
||||
Log.debug("New Global Variable: " + newGlobalVariable);
|
||||
gridGlobalVariableEditing.cancelEditing();
|
||||
|
@ -414,12 +414,12 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
storeGlobalVariable.addAll(project.getInputData()
|
||||
.getListGlobalVariables());
|
||||
storeGlobalVariable.commitChanges();
|
||||
seq = project.getInputData().getListGlobalVariables().size();
|
||||
seqGlobalVariables = project.getInputData().getListGlobalVariables().size();
|
||||
|
||||
} else {
|
||||
storeGlobalVariable.clear();
|
||||
storeGlobalVariable.commitChanges();
|
||||
seq = 0;
|
||||
seqGlobalVariables = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ public class GlobalVariablesPanel extends ContentPanel {
|
|||
public void clearVariables(Project project) {
|
||||
storeGlobalVariable.clear();
|
||||
storeGlobalVariable.commitChanges();
|
||||
seq = 0;
|
||||
seqGlobalVariables = 0;
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
private TextButton btnAddVariable;
|
||||
private TextButton btnAdd;
|
||||
private boolean addStatus;
|
||||
private int seq = 0;
|
||||
private int seqInputOutputVariables = 0;
|
||||
|
||||
interface DataTypeTemplates extends XTemplates {
|
||||
@XTemplate("<span title=\"{value}\">{value}</span>")
|
||||
|
@ -119,13 +119,12 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
|
||||
private void create(Project project) {
|
||||
if (project != null && project.getInputData() != null
|
||||
&& project.getInputData().getListInputOutputVariables() != null
|
||||
&& project.getInputData().getListInputOutputVariables().size() > 0) {
|
||||
seq = project.getInputData().getListInputOutputVariables().size();
|
||||
&& project.getInputData().getListInputOutputVariables() != null) {
|
||||
seqInputOutputVariables = project.getInputData().getListInputOutputVariables().size();
|
||||
} else {
|
||||
seq = 0;
|
||||
seqInputOutputVariables = 0;
|
||||
}
|
||||
Log.debug("List of I/O variables start at: " + seq);
|
||||
Log.debug("List of I/O variables start at: " + seqInputOutputVariables);
|
||||
|
||||
// Grid
|
||||
InputOutputVariablesProperties props = GWT.create(InputOutputVariablesProperties.class);
|
||||
|
@ -315,8 +314,8 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
storeInputOutputVariables.addAll(listNewIOVariables);
|
||||
storeInputOutputVariables.commitChanges();
|
||||
|
||||
seq = listNewIOVariables.size();
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seqInputOutputVariables = listNewIOVariables.size();
|
||||
Log.debug("Current Seq: " + seqInputOutputVariables);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -502,9 +501,9 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
|
||||
public void addNewInputOutputVariables(InputOutputVariables inputOutputVariable) {
|
||||
try {
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seq++;
|
||||
inputOutputVariable.setId(seq);
|
||||
Log.debug("Current Seq: " + seqInputOutputVariables);
|
||||
seqInputOutputVariables++;
|
||||
inputOutputVariable.setId(seqInputOutputVariables);
|
||||
Log.debug("New Input/Output Variable: " + inputOutputVariable);
|
||||
|
||||
storeInputOutputVariables.add(inputOutputVariable);
|
||||
|
@ -522,9 +521,9 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
|
||||
private void addInputOutputVariable(SelectEvent event) {
|
||||
try {
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seq++;
|
||||
InputOutputVariables newInputOutputVariablesVariable = new InputOutputVariables(seq, "", "", "",
|
||||
Log.debug("Current Seq: " + seqInputOutputVariables);
|
||||
seqInputOutputVariables++;
|
||||
InputOutputVariables newInputOutputVariablesVariable = new InputOutputVariables(seqInputOutputVariables, "", "", "",
|
||||
DataType.STRING, IOType.INPUT, "");
|
||||
Log.debug("New Input/Output Variable: " + newInputOutputVariablesVariable);
|
||||
gridInputOutputVariablesEditing.cancelEditing();
|
||||
|
@ -556,12 +555,12 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
storeInputOutputVariables.clear();
|
||||
storeInputOutputVariables.addAll(project.getInputData().getListInputOutputVariables());
|
||||
storeInputOutputVariables.commitChanges();
|
||||
seq = project.getInputData().getListInputOutputVariables().size();
|
||||
seqInputOutputVariables = project.getInputData().getListInputOutputVariables().size();
|
||||
|
||||
} else {
|
||||
storeInputOutputVariables.clear();
|
||||
storeInputOutputVariables.commitChanges();
|
||||
seq = 0;
|
||||
seqInputOutputVariables = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -585,7 +584,7 @@ public class InputOutputVariablesPanel extends ContentPanel {
|
|||
public void clearVariables(Project project) {
|
||||
storeInputOutputVariables.clear();
|
||||
storeInputOutputVariables.commitChanges();
|
||||
seq = 0;
|
||||
seqInputOutputVariables = 0;
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
private GridRowEditing<InterpreterPackageInfo> gridInterpreterPackageInfoEditing;
|
||||
private TextButton btnAdd;
|
||||
private boolean addStatus;
|
||||
private int seq = 0;
|
||||
private int seqInterpreterPackages = 0;
|
||||
private TextField interpreterVersion;
|
||||
|
||||
public InterpreterInfoPanel(Project project, EventBus eventBus) {
|
||||
|
@ -119,9 +119,9 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
&& project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo() != null) {
|
||||
storeInterpreterPackageInfo
|
||||
.addAll(project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo());
|
||||
seq = project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo().size();
|
||||
seqInterpreterPackages = project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo().size();
|
||||
} else {
|
||||
seq = 0;
|
||||
seqInterpreterPackages = 0;
|
||||
}
|
||||
|
||||
final GridSelectionModel<InterpreterPackageInfo> sm = new GridSelectionModel<InterpreterPackageInfo>();
|
||||
|
@ -209,8 +209,8 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
storeInterpreterPackageInfo.addAll(listNewPackages);
|
||||
storeInterpreterPackageInfo.commitChanges();
|
||||
|
||||
seq = listNewPackages.size();
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seqInterpreterPackages = listNewPackages.size();
|
||||
Log.debug("Current Seq: " + seqInterpreterPackages);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -297,9 +297,9 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
|
||||
public void addNewInterpreterPackageInfo(InterpreterPackageInfo interpreterPackageInfo) {
|
||||
try {
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seq++;
|
||||
interpreterPackageInfo.setId(seq);
|
||||
Log.debug("Current Seq: " + seqInterpreterPackages);
|
||||
seqInterpreterPackages++;
|
||||
interpreterPackageInfo.setId(seqInterpreterPackages);
|
||||
Log.debug("New Interpreter Package Info: " + interpreterPackageInfo);
|
||||
storeInterpreterPackageInfo.add(interpreterPackageInfo);
|
||||
storeInterpreterPackageInfo.commitChanges();
|
||||
|
@ -316,9 +316,9 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
|
||||
private void addInterpreterPackageInfo(SelectEvent event) {
|
||||
try {
|
||||
Log.debug("Current Seq: " + seq);
|
||||
seq++;
|
||||
InterpreterPackageInfo newInterpreterPackageInfo = new InterpreterPackageInfo(seq, "", "", "");
|
||||
Log.debug("Current Seq: " + seqInterpreterPackages);
|
||||
seqInterpreterPackages++;
|
||||
InterpreterPackageInfo newInterpreterPackageInfo = new InterpreterPackageInfo(seqInterpreterPackages, "", "", "");
|
||||
Log.debug("New Interpreter Package Info: " + newInterpreterPackageInfo);
|
||||
gridInterpreterPackageInfoEditing.cancelEditing();
|
||||
addStatus = true;
|
||||
|
@ -349,17 +349,17 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
storeInterpreterPackageInfo
|
||||
.addAll(project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo());
|
||||
storeInterpreterPackageInfo.commitChanges();
|
||||
seq = project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo().size();
|
||||
seqInterpreterPackages = project.getInputData().getInterpreterInfo().getInterpreterPackagesInfo().size();
|
||||
} else {
|
||||
storeInterpreterPackageInfo.clear();
|
||||
storeInterpreterPackageInfo.commitChanges();
|
||||
seq = 0;
|
||||
seqInterpreterPackages = 0;
|
||||
}
|
||||
} else {
|
||||
interpreterVersion.clear();
|
||||
storeInterpreterPackageInfo.clear();
|
||||
storeInterpreterPackageInfo.commitChanges();
|
||||
seq = 0;
|
||||
seqInterpreterPackages = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.gcube.portlets.user.statisticalalgorithmsimporter.shared;
|
||||
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.project.Project;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.project.ProjectConfig;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.project.ProjectSupportBashEdit;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
|
@ -17,7 +21,7 @@ public class Constants {
|
|||
public static final String STATISTICAL_ALGORITHMS_IMPORTER_LANG = "SAILang";
|
||||
|
||||
public static final String DEFAULT_USER = "giancarlo.panichi";
|
||||
public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext";
|
||||
public final static String DEFAULT_SCOPE = "/gcube/preprod/preVRE";
|
||||
public final static String DEFAULT_TOKEN = "";
|
||||
public static final String DEFAULT_ROLE = "OrganizationMember";
|
||||
|
||||
|
@ -50,5 +54,10 @@ public class Constants {
|
|||
|
||||
// DataMiner Pool Manager
|
||||
public static final int CLIENT_MONITOR_PERIODMILLIS = 2000;
|
||||
|
||||
|
||||
//
|
||||
public static final Project TEST_PROJECT = new Project(null, new ProjectConfig("", new ProjectSupportBashEdit()));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue