diff --git a/src/main/java/com/rebuild/server/business/charts/RadarChart.java b/src/main/java/com/rebuild/server/business/charts/RadarChart.java index 983a3c818..6ea8fd73c 100644 --- a/src/main/java/com/rebuild/server/business/charts/RadarChart.java +++ b/src/main/java/com/rebuild/server/business/charts/RadarChart.java @@ -48,7 +48,7 @@ public class RadarChart extends ChartData { indicator.add(JSONUtils.toJSONObject( new String[] { "name", "max" }, - new Object[] { item[0], calcMax(item) })); + new Object[] { wrapAxisValue(dim1, item[0]), calcMax(item) })); for (int j = 0; j < nums.length; j++) { Object[] data = seriesRotate.get(nums[j]); diff --git a/src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java b/src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java index 851d86f70..7a00115b6 100644 --- a/src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java +++ b/src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java @@ -1,19 +1,8 @@ /* -rebuild - Building your business-systems freely. -Copyright (C) 2018 devezhao +Copyright (c) REBUILD and its owners. All rights reserved. -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . +rebuild is dual-licensed under commercial and open source licenses (GPLv3). +See LICENSE and COMMERCIAL in the project root for license information. */ package com.rebuild.server.helper; diff --git a/src/main/java/com/rebuild/server/helper/KVStorage.java b/src/main/java/com/rebuild/server/helper/KVStorage.java index ed13638ac..35b29a25f 100644 --- a/src/main/java/com/rebuild/server/helper/KVStorage.java +++ b/src/main/java/com/rebuild/server/helper/KVStorage.java @@ -1,19 +1,8 @@ /* -rebuild - Building your business-systems freely. -Copyright (C) 2018-2019 devezhao +Copyright (c) REBUILD and its owners. All rights reserved. -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . +rebuild is dual-licensed under commercial and open source licenses (GPLv3). +See LICENSE and COMMERCIAL in the project root for license information. */ package com.rebuild.server.helper; @@ -87,7 +76,9 @@ public class KVStorage { * @return */ protected static String getValue(final String key, boolean reload, Object defaultValue) { + String value = null; + if (Application.serversReady()) { value = Application.getCommonCache().get(key); if (value != null && !reload) { @@ -119,6 +110,7 @@ public class KVStorage { Application.getCommonCache().put(key, value); } } + return value; } } diff --git a/src/main/java/com/rebuild/utils/AES.java b/src/main/java/com/rebuild/utils/AES.java index f594734ba..e90e5f068 100644 --- a/src/main/java/com/rebuild/utils/AES.java +++ b/src/main/java/com/rebuild/utils/AES.java @@ -1,19 +1,8 @@ /* -rebuild - Building your business-systems freely. -Copyright (C) 2018 devezhao +Copyright (c) REBUILD and its owners. All rights reserved. -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . +rebuild is dual-licensed under commercial and open source licenses (GPLv3). +See LICENSE and COMMERCIAL in the project root for license information. */ package com.rebuild.utils; @@ -86,7 +75,7 @@ public class AES { try { return decrypt(input); } catch (RebuildException ex) { - Application.LOG.warn("Decrypt error : " + input); + LOG.warn("Decrypting error (Use blank input) : " + input); return StringUtils.EMPTY; } } @@ -110,20 +99,7 @@ public class AES { } return new String(output); } - - /** - * @param input - * @return - */ - public static String decryptNothrow(String input) { - try { - return decrypt(input); - } catch (RebuildException ex) { - LOG.warn("Decrypting error (Use blank input) : " + input); - return StringUtils.EMPTY; - } - } - + /** * 通过 `-Drbpass=KEY` 指定 AES 秘钥 * diff --git a/src/main/webapp/admin/entityhub/field-edit.jsp b/src/main/webapp/admin/entityhub/field-edit.jsp index 3ed0633b8..a7e225f0e 100644 --- a/src/main/webapp/admin/entityhub/field-edit.jsp +++ b/src/main/webapp/admin/entityhub/field-edit.jsp @@ -235,7 +235,7 @@ diff --git a/src/main/webapp/assets/js/charts/charts.jsx b/src/main/webapp/assets/js/charts/charts.jsx index 3da3a3b14..6baf5d639 100644 --- a/src/main/webapp/assets/js/charts/charts.jsx +++ b/src/main/webapp/assets/js/charts/charts.jsx @@ -16,7 +16,7 @@ class BaseChart extends React.Component { render() { const opers = (
- {!this.props.builtin && } + {!this.props.builtin && } this.loadChartData()}> {this.props.editable && ( @@ -560,7 +560,7 @@ class ApprovalList extends BaseChart { {item[2]} - {item[4]} + {item[4]} {item[6]} @@ -643,7 +643,7 @@ class FeedsSchedule extends BaseChart { return - +
{item.scheduleTime}
diff --git a/src/main/webapp/assets/js/feeds/feeds-list.jsx b/src/main/webapp/assets/js/feeds/feeds-list.jsx index c56705895..596a1bb41 100644 --- a/src/main/webapp/assets/js/feeds/feeds-list.jsx +++ b/src/main/webapp/assets/js/feeds/feeds-list.jsx @@ -414,7 +414,7 @@ function __renderRichContent(e) { } {e.relatedRecord &&
} {e.type === 3 &&
diff --git a/src/main/webapp/assets/js/files/files.jsx b/src/main/webapp/assets/js/files/files.jsx index 3c789a28a..9c1e434b3 100644 --- a/src/main/webapp/assets/js/files/files.jsx +++ b/src/main/webapp/assets/js/files/files.jsx @@ -58,7 +58,7 @@ class FilesList extends React.Component { renderExtras(item) { return {item.fileSize} - {item.relatedRecord && $stopEvent(e)} href={`${rb.baseUrl}/app/list-and-view?id=${item.relatedRecord[0]}`}>{item.relatedRecord[1]}} + {item.relatedRecord && $stopEvent(e)} href={`${rb.baseUrl}/app/list-and-view?id=${item.relatedRecord[0]}`}>{item.relatedRecord[1]}} } diff --git a/src/main/webapp/assets/js/notifications.jsx b/src/main/webapp/assets/js/notifications.jsx index 1c47c6fc1..764c10a31 100644 --- a/src/main/webapp/assets/js/notifications.jsx +++ b/src/main/webapp/assets/js/notifications.jsx @@ -41,9 +41,13 @@ class MessageList extends React.Component { {(this.state.page > 1 || msglist.length >= this.state.pageSize) && }
@@ -63,7 +67,8 @@ class MessageList extends React.Component {
{item[2]}
- {append && 查看} + {append + && 查看} } @@ -79,22 +84,14 @@ class MessageList extends React.Component { type: type || this.state.type }, () => { $.get(`/notification/messages?type=${this.state.type}&pageNo=${this.state.page}`, (res) => { - this.setState({ list: res.data || [] }, this.__loadAfter) + this.setState({ list: res.data || [] }, () => { + if (focusItem) setTimeout(() => $gotoSection($('.notification.focus').offset().top - 66), 200) + focusItem = null + }) }) }) } - __loadAfter = () => { - $(this._list).find('.notification-info a') - .attr('target', '_blank') - .addClass('link') - .click('click', (e) => { - if (e && e.stopPropagation) e.stopPropagation() - }) - setTimeout(() => $gotoSection(), 200) - focusItem = null - } - gotoPage(p) { if (p === -1 && this.state.page === 1) return if (p === 1 && (this.state.list || []).length < this.state.pageSize) return @@ -127,7 +124,7 @@ class ApprovalList extends MessageList { page: page || this.state.page }, () => { $.get(`/notification/approvals?pageNo=${this.state.page || 1}`, (res) => { - this.setState({ list: res.data || [] }, this.__loadAfter) + this.setState({ list: res.data || [] }) }) }) }