Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
616d050
Update @rbv
devezhao Apr 16, 2025
112470a
Merge branch 'master' into develop
devezhao Apr 16, 2025
9aacbe8
Feat ai (#893)
getrebuild Apr 20, 2025
55c9903
feat: AnyRef (#894)
getrebuild Apr 24, 2025
875ba54
Merge branch 'master' into develop
getrebuild Apr 24, 2025
fa4f36c
feat: Batch dl (#899)
getrebuild Apr 26, 2025
9ec5ebf
Update @rbv
getrebuild Apr 26, 2025
5571832
Merge branch 'master' into develop
getrebuild Apr 26, 2025
736fca8
Attach pos (#900)
getrebuild May 5, 2025
d32f5bb
Field valid (#903)
getrebuild May 23, 2025
2e20450
Update @rbv
getrebuild May 23, 2025
9f223a7
Merge branch 'master' into develop
getrebuild May 23, 2025
13dffb6
字段附加过滤条件支持(表单值)变量 (#905)
getrebuild May 25, 2025
4050115
easy action triggers (#906)
getrebuild May 28, 2025
02003cb
Be 4.1a (#907)
getrebuild Jun 12, 2025
1835fed
Update db-upgrade.sql
getrebuild Jun 12, 2025
befb57e
Merge branch 'master' into develop
getrebuild Jun 12, 2025
2b8a96f
fix
getrebuild Jun 12, 2025
457f28f
Be 4.1b (#910)
getrebuild Jun 18, 2025
a8913fd
Update @rbv
getrebuild Jun 18, 2025
55fa7bd
Merge branch 'master' into develop
getrebuild Jun 18, 2025
cefe209
Clean up redundant code and update JavaDoc comments
getrebuild Jun 18, 2025
758fd08
Be 4.1c (#917)
getrebuild Jun 19, 2025
c0167fa
Merge branch 'master' into develop
getrebuild Jun 19, 2025
6a87a92
Merge branch 'master' into develop
getrebuild Jun 25, 2025
7c02035
Update @rbv
getrebuild Jun 25, 2025
c625177
Be 4.1d (#923)
getrebuild Jun 25, 2025
d35c04f
Fix beta1 (#925)
getrebuild Jul 6, 2025
b4b032e
Update @rbv
getrebuild Jul 6, 2025
5ee7c53
Merge branch 'master' into develop
getrebuild Jul 6, 2025
7a624d2
Update dependencies in pom.xml
getrebuild Jul 6, 2025
440af0c
master
getrebuild Jul 11, 2025
db62395
Merge branch 'master' into develop
getrebuild Jul 11, 2025
38ff2d7
Update @rbv
getrebuild Jul 23, 2025
54cf2e6
Merge branch 'master' into develop
getrebuild Jul 23, 2025
34b8028
4.2.0-dev
getrebuild Jul 23, 2025
7963a7f
Keep attachment service (#938)
getrebuild Jul 29, 2025
8c97e7d
Mm not login (#939)
getrebuild Jul 31, 2025
d451ec2
Details form bind (#941)
getrebuild Aug 3, 2025
520b953
Merge branch 'master' into develop
getrebuild Aug 3, 2025
c834c3c
View nav (#942)
getrebuild Aug 4, 2025
44fca92
Conf new and add page on list (#944)
getrebuild Aug 8, 2025
31730c4
Merge branch 'master' into develop
getrebuild Aug 8, 2025
0c43b36
Feat approve editable (#947)
getrebuild Aug 16, 2025
ba52781
Merge branch 'master' into develop
getrebuild Aug 16, 2025
e43d924
Merge branch 'master' into develop
getrebuild Aug 16, 2025
31e8977
Trigger tips (#950)
getrebuild Aug 28, 2025
8fde219
Update @rbv
getrebuild Aug 28, 2025
8dad2cc
Merge branch 'master' into develop
getrebuild Aug 28, 2025
4b32e26
Op relateds (#951)
getrebuild Aug 31, 2025
c780ede
Select2 with pinyin (#952)
getrebuild Sep 3, 2025
dbdf747
Approval att (#953)
getrebuild Sep 6, 2025
0c12882
Feat 4.2 (#955)
getrebuild Sep 12, 2025
2a9d909
Feat 4.2b (#956)
getrebuild Sep 17, 2025
dd1bd14
Update @rbv
getrebuild Sep 17, 2025
9caf0a7
Merge branch 'master' into develop
getrebuild Sep 17, 2025
330f00c
Feat 4.2c (#957)
getrebuild Sep 19, 2025
9e4595b
Trigger fa rand (#958)
getrebuild Sep 19, 2025
8be3c10
Be 4.2a (#959)
getrebuild Sep 23, 2025
67426ea
Be 4.2b (#962)
getrebuild Sep 25, 2025
b92e495
Merge branch 'master' into develop
getrebuild Sep 25, 2025
2cf8a5d
Merge branch 'master' into develop
getrebuild Sep 26, 2025
d370dd5
Be 4.2c (#963)
getrebuild Sep 29, 2025
0126d82
Merge branch 'master' into develop
getrebuild Sep 29, 2025
0c13ba7
Merge branch 'master' into develop
getrebuild Sep 30, 2025
258f5fc
be:4.2d (#964)
getrebuild Oct 10, 2025
2042540
Merge branch 'master' into develop
getrebuild Oct 10, 2025
c556f28
Be 4.2e (#968)
getrebuild Oct 14, 2025
315ae31
Update @rbv
getrebuild Oct 14, 2025
2c515ac
Update @rbv
getrebuild Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .deploy/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function compileJs(m) {
.pipe(babel(BABEL_OPTIONS))
.pipe(
debug({
title: 'Compiled .js : ',
title: 'Compiled .js :',
})
)
.pipe(dest(`${OUT_ROOT}/assets/js`))
Expand All @@ -45,7 +45,7 @@ function compileCss(m) {
.pipe(cleanCSS())
.pipe(
debug({
title: 'Compiled .css : ',
title: 'Compiled .css :',
})
)
.pipe(dest(`${OUT_ROOT}/assets/css`))
Expand Down Expand Up @@ -121,7 +121,7 @@ function compileHtml(m) {
)
.pipe(
debug({
title: 'Compiled .html : ',
title: 'Compiled .html :',
})
)
.pipe(dest(OUT_ROOT))
Expand Down
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module.exports = {
UserSelector: true,
UserShow: true,
DateShow: true,
FileShow: true,
DeleteConfirm: true,
RbFormModal: true,
DlgAssign: true,
Expand Down Expand Up @@ -135,6 +136,7 @@ module.exports = {
$formattedCode: true,
CodeViewport: true,
$clipboard: true,
$clipboard2: true,
$getScript: true,
$sec2Time: true,
$removeHtml: true,
Expand All @@ -159,5 +161,8 @@ module.exports = {
marked: true,
$focus2End: true,
RecordSelectorModal: true,
$fetchMetaInfo: true,
FileRename: true,
$syncGet: true,
},
}
2 changes: 1 addition & 1 deletion @rbv
Submodule @rbv updated from ad8d85 to 53bb02
40 changes: 20 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.rebuild</groupId>
<artifactId>rebuild</artifactId>
<version>4.1.8</version>
<version>4.2.0-dev</version>
<name>rebuild</name>
<description>Building your business-systems freely!</description>
<url>https://getrebuild.com/</url>
Expand Down Expand Up @@ -343,12 +343,12 @@
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>4.4.8</version>
<version>6.2.0</version>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>7.15.1</version>
<version>7.19.0</version>
</dependency>
<dependency>
<groupId>com.github.whvcse</groupId>
Expand All @@ -358,17 +358,17 @@
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>6.6.1</version>
<version>6.8.3</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
<version>1.21.2</version>
</dependency>
<dependency>
<groupId>com.hankcs</groupId>
<artifactId>hanlp</artifactId>
<version>portable-1.8.4</version>
<version>portable-1.8.6</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
Expand Down Expand Up @@ -404,12 +404,12 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.5</version>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.4</version>
<version>4.0.3</version>
<exclusions>
<exclusion>
<artifactId>ehcache</artifactId>
Expand All @@ -429,22 +429,22 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.5</version>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.5</version>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
<version>2.3.232</version>
</dependency>
<dependency>
<groupId>com.googlecode.aviator</groupId>
<artifactId>aviator</artifactId>
<version>5.4.1</version>
<version>5.4.3</version>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
Expand All @@ -464,12 +464,12 @@
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>3.33.0</version>
<version>3.51.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.5</version>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>eu.bitwalker</groupId>
Expand All @@ -490,17 +490,17 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>5.8.36</version>
<version>5.8.40</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-jwt</artifactId>
<version>5.8.36</version>
<version>5.8.40</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.18.0</version>
</dependency>
<!-- Need JDK11+ -->
<!--
Expand All @@ -513,7 +513,7 @@
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>com.getui.push</groupId>
Expand All @@ -535,12 +535,12 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.2</version>
<version>1.28.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/com/rebuild/api/ApiGateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

package com.rebuild.api;

import cn.devezhao.bizz.security.AccessDeniedException;
import cn.devezhao.commons.CalendarUtils;
import cn.devezhao.commons.EncryptUtils;
import cn.devezhao.commons.ObjectUtils;
Expand Down Expand Up @@ -103,7 +104,7 @@ public void api(HttpServletRequest request, HttpServletResponse response) {

if (RRL.overLimitWhenIncremented("ip:" + remoteIp)) {
JSON error = formatFailure("Request frequency exceeded", ApiInvokeException.ERR_FREQUENCY);
log.error("{} : {}", requestId, error.toJSONString());
log.error("ReqId: {}\nReqParams: {}\nRespError: {}", requestId, request.getQueryString(), error.toJSONString());
ServletUtils.writeJson(response, error.toJSONString());
return;
}
Expand Down Expand Up @@ -137,14 +138,21 @@ public void api(HttpServletRequest request, HttpServletResponse response) {
} catch (RepeatedRecordsException ex) {
errorCode = ApiInvokeException.ERR_DATASPEC;
errorMsg = ex.getLocalizedMessage();
errorData40 = ((RepeatedRecordsException) ex).getRepeatedRecords();
errorData40 = ex.getRepeatedRecords();
} catch (AccessDeniedException ex) {
errorCode = ApiInvokeException.ERR_NOPRIV;
errorMsg = ex.getLocalizedMessage();
} catch (Throwable ex) {
errorCode = Controller.CODE_SERV_ERROR;
errorMsg = ThrowableUtils.getRootCause(ex).getLocalizedMessage();
log.error("Server Internal Error ({})", requestId, ex);

String knownError = KnownExceptionConverter.convert2ErrorMsg(ex);
if (knownError != null) errorMsg = "Server Internal Error : " + knownError;
if (knownError == null) {
errorMsg = ThrowableUtils.getRootCause(ex).getLocalizedMessage();
log.error("ReqId: {}\nReqParams: {}\nRespError: {}", requestId, request.getQueryString(), errorMsg, ex);
} else {
errorMsg = knownError;
log.error("ReqId: {}\nReqParams: {}\nRespError: {}", requestId, request.getQueryString(), errorMsg);
}

} finally {
UserContextHolder.clear();
Expand All @@ -158,8 +166,9 @@ public void api(HttpServletRequest request, HttpServletResponse response) {
} catch (Exception ignored) {
}

log.error("{} : {}", requestId, error.toJSONString());
ServletUtils.writeJson(response, error.toJSONString());
errorMsg = error.toJSONString();
log.error("ReqId: {}\nReqParams: {}\nRespError: {}", requestId, request.getQueryString(), errorMsg);
ServletUtils.writeJson(response, errorMsg);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/rebuild/api/ApiInvokeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class ApiInvokeException extends RebuildException {
public static final int ERR_BADPARAMS = 410;
// 违反数据约束
public static final int ERR_DATASPEC = 420;
// 权限不足
public static final int ERR_NOPRIV = 430;

private int errorCode = Controller.CODE_ERROR;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/rebuild/core/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
/**
* Rebuild Version
*/
public static final String VER = "4.1.8";
public static final String VER = "4.2.0-dev";
/**
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
*/
public static final int BUILD = 4010813;
public static final int BUILD = 4020000;

static {
// Driver for DB
Expand Down
54 changes: 28 additions & 26 deletions src/main/java/com/rebuild/core/configuration/NavBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
import com.rebuild.core.support.KVStorage;
import com.rebuild.core.support.License;
import com.rebuild.core.support.general.RecordBuilder;
import com.rebuild.core.support.i18n.I18nUtils;
import com.rebuild.core.support.i18n.Language;
import com.rebuild.utils.AppUtils;
import com.rebuild.utils.CommonsUtils;
import com.rebuild.utils.JSONUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
Expand Down Expand Up @@ -88,11 +90,32 @@ public JSONArray getUserNav(ID user) {
}

/**
* 获取指定用户的制定导航菜单
*
* @param user
* @param useNav
* @return
*/
public JSONArray getUserNav(ID user, String useNav) {
JSONArray navs = getUserNav42(user, useNav);

// v4.2
for (Object item : navs) {
JSONArray s = ((JSONObject) item).getJSONArray("sub");
if (CollectionUtils.isNotEmpty(s)) {
s = (JSONArray) I18nUtils.replaceLP(s, "text");
((JSONObject) item).put("sub", s);
}
}
return (JSONArray) I18nUtils.replaceLP(navs, "text");
}

/**
* @param user
* @param useNav
* @return
*/
private JSONArray getUserNav42(ID user, String useNav) {
ConfigBean config = null;

if (useNav != null) {
Expand All @@ -112,12 +135,10 @@ public JSONArray getUserNav(ID user, String useNav) {
}
}

if (config == null) {
config = getLayoutOfNav(user);
}
if (config == null) config = getLayoutOfNav(user);

if (config == null) {
JSONArray useDefault = replaceLang(NAVS_DEFAULT);
JSONArray useDefault = (JSONArray) JSONUtils.clone(NAVS_DEFAULT);
((JSONObject) useDefault.get(3)).put("sub", buildAvailableProjects(user));
return useDefault;
}
Expand Down Expand Up @@ -244,9 +265,7 @@ private JSONArray buildAvailableProjects(ID user) {

// 管理员显示新建项目入口
if (UserHelper.isAdmin(user)) {
JSONObject add = NAV_PROJECT__ADD.clone();
replaceLang(add);
navsOfProjects.add(add);
navsOfProjects.add(NAV_PROJECT__ADD.clone());
}
return navsOfProjects;
}
Expand Down Expand Up @@ -278,7 +297,7 @@ private JSONArray buildAvailableDashboards(ID user) {
* @param initEntity
*/
public void addInitNavOnInstall(String[] initEntity) {
JSONArray initNav = replaceLang(NAVS_DEFAULT);
JSONArray initNav = (JSONArray) JSONUtils.clone(NAVS_DEFAULT);

for (String e : initEntity) {
EasyEntity entity = EasyMetaFactory.valueOf(e);
Expand Down Expand Up @@ -336,7 +355,7 @@ public List<Object[]> getAllowTopNav(ID user) {
if ((isAdmin && RoleService.ADMIN_ROLE.equals(d[5])) || isShareTo((String) d[1], user)) {
ID useDash = ID.isId(dash) ? ID.valueOf(dash) : null;
String useLabel = StringUtils.defaultIfBlank((String) d[4], Language.L("未命名"));
allow.add(new Object[] { useNav, useDash, useLabel });
allow.add(new Object[]{useNav, useDash, I18nUtils.LP(useLabel)});
break;
}
}
Expand Down Expand Up @@ -512,23 +531,6 @@ static String renderNavItem(JSONObject item, String activeNav) {
return navHtml.toString();
}

private static JSONArray replaceLang(JSONArray items) {
JSONArray clone = (JSONArray) items.clone();
for (Object o : clone) {
replaceLang((JSONObject) o);
}

// TODO 导航条

return clone;
}

// TODO 目前仅处理了默认导航
private static void replaceLang(JSONObject item) {
String text = item.getString("text");
item.put("text", Language.L(text));
}

/**
* 顶部菜单
*
Expand Down
Loading
Loading