Compare commits

..

10 Commits

Author SHA1 Message Date
AlixMetivier
a3caf052bf Merge branch 'maintenance/8.0' of https://github.com/Talend/tcommon-studio-se into tuj/SPL33 2022-09-22 09:38:30 +02:00
AlixMetivier
a03f8297e3 do not merge - convenient build to create TUJs 2022-09-22 09:23:07 +02:00
zyuan-talend
b684d299f4 fix(TUP-36519):"Detect and update all jobs" does not update all jobs. (#5596) 2022-09-22 12:55:26 +08:00
sbliu
c6b22629fd feat(TUP-36340) fix problem that still show missing orai18n jar . (#5616) 2022-09-22 09:58:42 +08:00
kjwang
355d94e5de Fix TUP-36723 can not list project when use old way to fetch from token (#5613) (#5621)
Fix TUP-36723 can not list project when use old way to fetch from token
https://jira.talendforge.org/browse/TUP-36723
2022-09-22 09:54:16 +08:00
kjwang
6318fb8131 kjwang/Fix TUP-36721 Only display SSO page for Talend Studio (#5611) (#5620)
kjwang/Fix TUP-36721 Only display SSO page for Talend Studio
https://jira.talendforge.org/browse/TUP-36721
2022-09-22 09:35:49 +08:00
kjwang
a490fe61ab Fix: TUP-36714 Improve the code for SSO feature (#5608) (#5612)
* Fix: TUP-36714 Improve the code for SSO feature
https://jira.talendforge.org/browse/TUP-36714
2022-09-21 13:03:39 +08:00
zshen-talend
2b6fe49b09 fix(TDQ-19700):snowflake type don't should show on the combo list of DB (#5605)
* fix(TDQ-19700):snowflake type don't should show on the combo list of DB
wizard

* fix(TDQ-19700): second time switch context failed when schema is empty
2022-09-20 12:23:27 +08:00
kjwang
351bf44095 Temp commit (#5271)
TUP-32606 Support SSO on Studio
https://jira.talendforge.org/browse/TUP-32606
2022-09-16 15:06:03 +08:00
jiezhang-tlnd
5bab4f7de2 Add localized files (#5598) (#5600)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-16 10:23:48 +08:00
7 changed files with 43 additions and 47 deletions

View File

@@ -225,7 +225,7 @@ public class DuplicateAction extends AContextualAction {
// update the property of the node repository object
// sourceNode.getObject().setProperty(updatedProperty);
String initNameValue = "Copy_of_" + item.getProperty().getDisplayName(); //$NON-NLS-1$
String initNameValue = "SPL33x_" + item.getProperty().getDisplayName(); //$NON-NLS-1$
CopyObjectAction copyObjectAction = CopyObjectAction.getInstance();

View File

@@ -222,6 +222,32 @@ public class ContextUtils {
}
return parameterType;
}
// TUP-36519:For possible duplicate internalid scenario(TUP-36667) after several times' renaming in joblet. Loop all and find the nearest
// one.
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem, String paraName) {
if (contextType == null || uuId == null) {
return null;
}
ContextParameterType parameterType = null;
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
String paramId = null;
if (isFromContextItem) {
paramId = ResourceHelper.getUUID(param);
} else {
paramId = param.getInternalId();
}
if (uuId.equals(paramId)) {
parameterType = param;
if (paraName != null && StringUtils.equals(paraName, param.getName())) {
break;
}
}
}
return parameterType;
}
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem) {
@@ -846,7 +872,7 @@ public class ContextUtils {
if (item != null) {
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
paramLink.getId(), item instanceof ContextItem);
paramLink.getId(), item instanceof ContextItem, contextParameterType.getName());
if (repoContextParam != null
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
@@ -915,7 +941,7 @@ public class ContextUtils {
if (item != null) {
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
parameterLink.getId(), item instanceof ContextItem);
parameterLink.getId(), item instanceof ContextItem, parameterType.getName());
if (repoParameterType != null
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
renamedMap.put(repoParameterType.getName(), parameterType.getName());
@@ -975,7 +1001,7 @@ public class ContextUtils {
ContextParameterType contextParameterType = null;
if (paramLink != null && paramLink.getId() != null && contextType != null) {
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
contextItem instanceof ContextItem);
contextItem instanceof ContextItem, paramName);
}
if (contextParameterType != null) {// Compare use UUID
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {

View File

@@ -16,10 +16,7 @@ public class SparkBatchMetadataTalendTypeFilter extends SparkMetadataTalendTypeF
"tFileInputParquet",
"tFileOutputParquet",
"tJDBCInput",
"tJDBCOutput",
"tLogRow",
"tSqlRow",
"tFileInputDelimited"
"tJDBCOutput", "tLogRow", "tSqlRow"
);
public SparkBatchMetadataTalendTypeFilter(INode node) {

View File

@@ -359,7 +359,9 @@ public abstract class RepositoryUpdateManager {
List<UpdateResult> checkedResults = null;
if (parameter == null) { // update all job
checkedResults = filterSpecialCheckedResult(results);
// TUP-36519: comment out the filter for only opening job
// checkedResults = filterSpecialCheckedResult(results);
checkedResults = results;
} else { // filter
checkedResults = filterCheckedResult(results);
}

View File

@@ -983,6 +983,7 @@ DatabaseForm.helpInfo.installDriverLink.label=Installer un pilote
DatabaseForm.redshift.driverVersion=Version du pilote
DatabaseForm.redshift.driverVersion.tip=S\u00E9lectionnez un pilote Redshift
DatabaseForm.redshift.useStringAdditionParam=Utiliser un param\u00E8tre de cha\u00EEne de caract\u00E8res
DatabaseForm.supportnls=Support de NLS
DatabaseTableFilterForm.allSynonyms=Tous les synonymes
DatabaseTableFilterForm.edit=Modifier...
DatabaseTableFilterForm.editFilterName=Modifier le nom du filtre

View File

@@ -145,16 +145,16 @@ public class SSOClientUtil {
String dataCenter = TMCRepositoryUtil.getDefaultDataCenter();
StringBuffer urlSB = new StringBuffer();
urlSB.append(TMCRepositoryUtil.getBaseLoginURL(dataCenter)).append("?");
urlSB.append("client_id=").append(URLEncoder.encode(clientID, StandardCharsets.UTF_8.name())).append("&");
urlSB.append("client_id=").append(clientID).append("&");
urlSB.append("redirect_uri=")
.append(URLEncoder.encode(TMCRepositoryUtil.getRedirectURL(dataCenter), StandardCharsets.UTF_8.name()))
.append("&");
urlSB.append("scope=").append(URLEncoder.encode("openid refreshToken", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("response_type=").append(URLEncoder.encode("code", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("code_challenge_method=").append(URLEncoder.encode("S256", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("code_challenge=").append(URLEncoder.encode(codeChallenge, StandardCharsets.UTF_8.name())).append("&");
String state = String.valueOf(callbackPort) + SSOUtil.STATE_PARAM_SEPARATOR + TMCRepositoryUtil.getDefaultDataCenter();
urlSB.append("state=").append(URLEncoder.encode(state, StandardCharsets.UTF_8.name()));
urlSB.append("scope=openid refreshToken&");
urlSB.append("response_type=code&");
urlSB.append("code_challenge_method=S256&");
urlSB.append("code_challenge=").append(codeChallenge).append("&");
urlSB.append("state=").append(callbackPort).append(SSOUtil.STATE_PARAM_SEPARATOR)
.append(TMCRepositoryUtil.getDefaultDataCenter());
return urlSB.toString();
}

View File

@@ -12,16 +12,8 @@
// ============================================================================
package org.talend.signon.util;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
public class TMCRepositoryUtil {
private static Logger LOGGER = Logger.getLogger(TMCRepositoryUtil.class);
public static final String REPOSITORY_CLOUD_US_ID = "cloud_us"; //$NON-NLS-1$
public static final String REPOSITORY_CLOUD_EU_ID = "cloud_eu"; //$NON-NLS-1$
@@ -53,10 +45,6 @@ public class TMCRepositoryUtil {
public static final String SUCCESS_REDIRECT_URL = "https://iam.%s.cloud.talend.com/idp/login-sso-success"; //$NON-NLS-1$
public static final String ONLINE_HELP_URL = "https://document-link.us.cloud.talend.com/ts_ug_launch-studio?version=%s&lang=%s&env=prd";
public static final String ORG_TALEND_WORKSPACE_PREF_NODE = "org.eclipse.ui.ide"; //$NON-NLS-1$
public static final String ORG_TALEND_RECENT_DATA_CENTERR = "org.talend.recent.datacenter";
public static String getBaseLoginURL(String dataCenter) {
if (dataCenter == null) {
@@ -67,29 +55,11 @@ public class TMCRepositoryUtil {
public static String getDefaultDataCenter() {
String defaultDataCenter = "us";
if (getRecentDataCenter() != null) {
defaultDataCenter = getRecentDataCenter();
}
if (System.getProperty(SSOClientUtil.DATA_CENTER_KEY) != null) {
defaultDataCenter = System.getProperty(SSOClientUtil.DATA_CENTER_KEY);
}
return defaultDataCenter;
}
public static void saveRecentDataCenter(String dataCenter) {
Preferences node = new ConfigurationScope().getNode(ORG_TALEND_WORKSPACE_PREF_NODE);
node.put(ORG_TALEND_RECENT_DATA_CENTERR, dataCenter);
try {
node.flush();
} catch (BackingStoreException e) {
LOGGER.error("failed to store workspace location in preferences :", e); //$NON-NLS-1$
}
}
public static String getRecentDataCenter() {
Preferences node = new ConfigurationScope().getNode(ORG_TALEND_WORKSPACE_PREF_NODE);
return node.get(ORG_TALEND_RECENT_DATA_CENTERR, null);
}
public static String getCloudAdminURL(String dataCenter) {
return String.format(ADMIN_URL, dataCenter);