Compare commits

...

7 Commits

Author SHA1 Message Date
apoltavtsev
e2c332a683 Update DeploymentComposite.java 2020-10-08 17:04:59 +02:00
apoltavtsev
3a5d5ae90e Update DeploymentComposite.java 2020-10-08 16:59:51 +02:00
apoltavtsev
7e1cc002d2 Update DeploymentComposite.java 2020-10-08 16:57:07 +02:00
apoltavtsev
a89bd5eb34 Update DeploymentComposite.java 2020-10-08 16:24:26 +02:00
apoltavtsev
d65b7aedb0 Update DeploymentComposite.java 2020-10-08 16:21:41 +02:00
apoltavtsev
d00d04b6a1 Update JobSettingsView.java 2020-10-08 16:19:39 +02:00
apoltavtsev
34f857d51d fix(TESB-29553) Publishing a route with cTalendJob from Studio and commandline gives different results 2020-10-01 09:49:49 +02:00
2 changed files with 46 additions and 1 deletions

View File

@@ -545,6 +545,10 @@ public class JobSettingsView extends ViewPart implements IJobSettingsView, ISele
.equals(ERepositoryObjectType.getItemType(process.getProperty().getItem()))) {
return false;
}
// child route job
// if (ProcessUtils.isChildRouteProcess(process)) {
// return false;
// }
// test case
if (ProcessUtils.isTestContainer(process)) {
return false;

View File

@@ -121,6 +121,8 @@ public class DeploymentComposite extends AbstractTabComposite {
private boolean isServiceItem;
private boolean isDataServiceJob; // Is ESB SOAP Service Job
private boolean isChildJob;
public DeploymentComposite(Composite parent, int style, TabbedPropertySheetWidgetFactory widgetFactory,
IRepositoryViewObject repositoryViewObject) {
@@ -146,6 +148,7 @@ public class DeploymentComposite extends AbstractTabComposite {
defaultVersion = getDefaultVersion(process.getVersion());
isDataServiceJob = false;
isChildJob = false;
// Disable widgests in case of the job is for ESB data service
if (!process.getComponentsType().equals(ComponentCategory.CATEGORY_4_CAMEL.getName())) {
List<INode> nodes = (List<INode>) process.getGraphicalNodes();
@@ -156,6 +159,14 @@ public class DeploymentComposite extends AbstractTabComposite {
break;
}
}
for (INode node : nodes) {
if ("tRouteInput".equals(node.getComponent().getName())) {
isChildJob = true;
defaultVersion = "";
break;
}
}
}
} else {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
@@ -186,7 +197,7 @@ public class DeploymentComposite extends AbstractTabComposite {
.getLastVersion(isService ? serviceItem.getProperty().getId() : process.getId());
String latestVersion = obj.getVersion();
if (!currentVersion.equals(latestVersion) || isDataServiceJob || isProcessItem || isServiceItem) {
if (!currentVersion.equals(latestVersion) || isDataServiceJob || isChildJob || isProcessItem || isServiceItem) {
groupIdCheckbox.setEnabled(false);
groupIdText.setEnabled(false);
versionCheckbox.setEnabled(false);
@@ -218,6 +229,17 @@ public class DeploymentComposite extends AbstractTabComposite {
widgetFactory.createLabel(messageComposite,
"SOAP data service cannot be published, deployment setting is \naccording to the defined service.");
}
if (isChildJob) {
Composite messageComposite = new Composite(this, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
layout.horizontalSpacing = 10;
layout.verticalSpacing = 10;
messageComposite.setLayout(layout);
messageComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
widgetFactory.createLabel(messageComposite,
"Deployment parameters will be inherited from parent route");
}
Composite composite = new Composite(this, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing = 10;
@@ -304,6 +326,22 @@ public class DeploymentComposite extends AbstractTabComposite {
final Control buildTypeControl = buildTypeCombo.getControl();
buildTypeControl.setVisible(showBuildType);
buildTypeLabel.setVisible(showBuildType);
if (isChildJob) {
groupIdText.setText("");
groupIdCheckbox.setSelection(false);
groupIdText.setEnabled(false);
versionText.setText("");
versionCheckbox.setSelection(false);
versionText.setEnabled(false);
versionText.setToolTipText(""); //$NON-NLS-1$
snapshotCheckbox.setSelection(false);
buildTypeLabel.setVisible(false);
buildTypeCombo.getCCombo().setVisible(false);
}
if (showBuildType) {
Map<String, Object> parameters = new HashMap<String, Object>();
@@ -374,6 +412,9 @@ public class DeploymentComposite extends AbstractTabComposite {
if (!PluginChecker.isTIS()) {
return false;
}
if (isChildJob) {
return false;
}
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put(getObjectType(), getObject());
final BuildType[] validBuildTypes = BuildExportManager.getInstance().getValidBuildTypes(parameters);