File tree Expand file tree Collapse file tree 6 files changed +19
-17
lines changed
java/com/cronos/onlinereview/util Expand file tree Collapse file tree 6 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ database.password=1nf0rm1x
12
12
database.INFORMIXSERVER =informixoltp_tcp
13
13
database.locale =en_us.utf8
14
14
15
- # context.security.url - URL for JNDI lookup
15
+ # context.security.url - URL for JNDI lookup
16
16
context.security.url =localhost:11199
17
17
18
18
# # Used by cache.properties
@@ -35,7 +35,7 @@ WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula
35
35
CSF_SERVER_NAME =csf.dev.topcoder.com
36
36
CORP_SERVER_NAME =tc.cloud.topcoder.com/corp
37
37
SOFTWARE_SERVER_NAME =tcs.cloud.topcoder.com
38
- FORUMS_SERVER_NAME =vanilla .topcoder-dev.com
38
+ FORUMS_SERVER_NAME =discussions .topcoder-dev.com
39
39
HOST_URL =localhost:11199
40
40
FORUMS_HOST_URL =jnp://localhost:1199
41
41
CONTEST_HOST_URL =63.118.154.180:10099
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula
15
15
CSF_SERVER_NAME =csf.dev.topcoder.com
16
16
CORP_SERVER_NAME =tc.cloud.topcoder.com/corp
17
17
SOFTWARE_SERVER_NAME =tcs.cloud.topcoder.com
18
- FORUMS_SERVER_NAME =vanilla .topcoder-dev.com
18
+ FORUMS_SERVER_NAME =discussions .topcoder-dev.com
19
19
HOST_URL =localhost:11199
20
20
FORUMS_HOST_URL =localhost:1199
21
21
CONTEST_HOST_URL =63.118.154.180:10099
Original file line number Diff line number Diff line change @@ -1058,7 +1058,7 @@ public class ConfigHelper {
1058
1058
* JWT default expiration time (1 day)
1059
1059
*/
1060
1060
private static final int DEFAULT_EXPIRATION_TIME = 60 * 24 ;
1061
-
1061
+
1062
1062
/**
1063
1063
* New Auth URL for Iframe to refresh the RS256 token
1064
1064
*/
@@ -1691,7 +1691,7 @@ public class ConfigHelper {
1691
1691
} catch (Exception e ) {
1692
1692
preSignedExpTimeMilis = 60 * 60 * 1000 ;
1693
1693
}
1694
-
1694
+
1695
1695
ConfigManager .Property newAuth = cfgMgr .getPropertyObject (ONLINE_REVIEW_CFG_NS , "new_auth" );
1696
1696
newAuthUrl = newAuth .getValue ("new_auth_url" );
1697
1697
@@ -2570,18 +2570,18 @@ public static String getS3BucketDmz() {
2570
2570
public static long getPreSignedExpTimeMilis () {
2571
2571
return preSignedExpTimeMilis ;
2572
2572
}
2573
-
2573
+
2574
2574
/**
2575
- * Get new auth url
2576
- * @return url
2575
+ * Get new auth url
2576
+ * @return url
2577
2577
*/
2578
2578
public static String getNewAuthUrl () {
2579
2579
return newAuthUrl ;
2580
2580
}
2581
2581
2582
2582
/**
2583
2583
* Get challenge by legacy id url
2584
- * @return url
2584
+ * @return url
2585
2585
*/
2586
2586
public static String getChallengeByLegacyIdUrlV5 () {
2587
2587
return challengeByLegacyIdUrlV5 ;
Original file line number Diff line number Diff line change 2095
2095
<Property name =" challenge_by_legacy_id_url_v5" >
2096
2096
<Value >@topcoder_api_base_url_v5@/challenges?legacyId=</Value >
2097
2097
</Property >
2098
- </Config >
2098
+ </Config >
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula
74
74
CSF_SERVER_NAME=csf.dev.topcoder.com
75
75
CORP_SERVER_NAME=www.topcoder-dev.com/corp
76
76
SOFTWARE_SERVER_NAME=local.topcoder-dev.com:8080
77
- FORUMS_SERVER_NAME=vanilla .topcoder-dev.com
77
+ FORUMS_SERVER_NAME=discussions .topcoder-dev.com
78
78
HOST_URL=localhost:1099
79
79
FORUMS_HOST_URL=jnp://localhost:1099
80
80
CONTEST_HOST_URL=63.118.154.180:10099
@@ -115,7 +115,7 @@ DOMAIN_AUTH0 = topcoder-dev.auth0.com
115
115
#CSF_SERVER_NAME=csf.dev.topcoder.com
116
116
#CORP_SERVER_NAME=tc.cloud.topcoder.com/corp
117
117
#SOFTWARE_SERVER_NAME=tcs.cloud.topcoder.com
118
- #FORUMS_SERVER_NAME=vanilla .topcoder-dev.com
118
+ #FORUMS_SERVER_NAME=discussions .topcoder-dev.com
119
119
#HOST_URL=localhost:11199
120
120
#FORUMS_HOST_URL=jnp://localhost:1199
121
121
#CONTEST_HOST_URL=63.118.154.180:10099
Original file line number Diff line number Diff line change 7
7
--%>
8
8
<%@ page contentType =" text/html;charset=UTF-8" %>
9
9
<%@ page language =" java" isELIgnored="false" %>
10
+ <%@ page import =" java.text.DecimalFormat,com.topcoder.onlinereview.component.webcommon.ApplicationServer" %>
10
11
<%@ taglib prefix =" fn" uri =" http://java.sun.com/jsp/jstl/functions" %>
11
12
<%@ taglib prefix =" c" uri =" http://java.sun.com/jsp/jstl/core" %>
12
13
<%@ taglib prefix =" s" uri =" /struts-tags" %>
83
84
<link type =" text/css" rel =" stylesheet" href =" /css/reskin-or/reskin.css" >
84
85
<script type =" text/javascript" >
85
86
function updateForumLink (projectId ) {
86
- return fetch (" https://api.topcoder.com/v5/challenges?legacyId= " + projectId)
87
+ return fetch (" <%= com.cronos.onlinereview.util . ConfigHelper . getChallengeByLegacyIdUrlV5() % > " + projectId)
87
88
.then ((response ) => response .json ())
88
- .then ((data ) => data? .[0 ]? .discussions ? .[0 ]? .url )
89
- .then ((forumLink ) => {
90
- if (forumLink !== undefined ) {
89
+ .then ((data ) => {
90
+ let with_forum = data .filter (item => ' discussions' in item);
91
+ let id = with_forum? .[0 ]? .id ;
92
+ if (id !== undefined ) {
91
93
let forumLinkEl = document .querySelector (' .projectInfo__forumLink' );
92
- return forumLinkEl .href = forumLink ;
94
+ return forumLinkEl .href = " https:// <%= ApplicationServer . FORUMS_SERVER_NAME % > /categories/ " + id ;
93
95
}
94
96
});
95
97
}
You can’t perform that action at this time.
0 commit comments