Merge branch 'develop' of devezhao.com:getrebuild/rebuild into develop

This commit is contained in:
oahzeved 2020-06-20 13:15:35 +08:00
commit 9af7fdc514
15 changed files with 63 additions and 67 deletions

View file

@ -60,7 +60,6 @@
</webResources>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@ -92,6 +91,7 @@
</execution>
</executions>
</plugin>
-->
<!-- Codecov : `mvn cobertura:cobertura -DskipTests=false -Drbpass=PASSKEY` & `bash <(curl -s https://codecov.io/bash) -t TOKEN` -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
@ -160,7 +160,7 @@
<dependency>
<groupId>com.github.devezhao</groupId>
<artifactId>persist4j</artifactId>
<version>1.4.2</version>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>

View file

@ -164,6 +164,8 @@ public final class Application {
LOG.info("Rebuild Boot successful in " + (System.currentTimeMillis() - startAt) + " ms");
LOG.info("REBUILD AUTHORITY : " + StringUtils.join(License.queryAuthority().values(), " | "));
} catch (Exception ex) {
serversReady = false;
throw ex;

View file

@ -8,10 +8,8 @@ See LICENSE and COMMERCIAL in the project root for license information.
package com.rebuild.server;
import cn.devezhao.commons.CalendarUtils;
import com.alibaba.fastjson.JSONObject;
import com.rebuild.server.helper.AesPreferencesConfigurer;
import com.rebuild.server.helper.ConfigurableItem;
import com.rebuild.server.helper.License;
import com.rebuild.server.helper.SysConfiguration;
import com.rebuild.server.helper.setup.InstallState;
import com.rebuild.server.helper.task.TaskExecutors;
@ -102,11 +100,6 @@ public class ServerListener extends ContextCleanupListener implements InstallSta
context.setAttribute("storageUrl", StringUtils.defaultIfEmpty(SysConfiguration.getStorageUrl(), StringUtils.EMPTY));
context.setAttribute("fileSharable", SysConfiguration.getBool(ConfigurableItem.FileSharable));
context.setAttribute("markWatermark", SysConfiguration.getBool(ConfigurableItem.MarkWatermark));
final JSONObject authority = License.queryAuthority();
LOG.warn("REBUILD AUTHORITY : " + StringUtils.join(authority.values(), " | "));
context.setAttribute("LicenseType",
authority.getString("authType") + " (" + authority.getString("authObject") + ")");
}
/**

View file

@ -84,10 +84,7 @@ public class Axis {
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Axis axis = (Axis) o;
return field.equals(axis.field) &&
calc == axis.calc &&
Objects.equals(parentField, axis.parentField);
return o.hashCode() == hashCode();
}
@Override

View file

@ -16,6 +16,7 @@ import com.qiniu.storage.BucketManager;
import com.qiniu.util.Auth;
import com.rebuild.server.ServerListener;
import com.rebuild.server.helper.ConfigurableItem;
import com.rebuild.server.helper.License;
import com.rebuild.server.helper.QiniuCloud;
import com.rebuild.server.helper.SMSender;
import com.rebuild.server.helper.SysConfiguration;
@ -52,6 +53,11 @@ public class SysConfigurationControll extends BasePageControll {
for (ConfigurableItem item : ConfigurableItem.values()) {
mv.getModel().put(item.name(), SysConfiguration.get(item));
}
JSONObject authority = License.queryAuthority();
mv.getModel().put("LicenseType",
authority.getString("authType") + " (" + authority.getString("authObject") + ")");
return mv;
}

View file

@ -16,7 +16,7 @@
<link rel="stylesheet" type="text/css" href="${baseUrl}/assets/lib/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="${baseUrl}/assets/css/rb-base.css">
<link rel="stylesheet" type="text/css" href="${baseUrl}/assets/css/rb-page.css">
<meta name="rb.commercial" content="${rbv}">
<meta name="rb.rbv" content="${rbv}">
<meta name="rb.env" content="${env}">
<meta name="rb.locale" content="${bundle.locale()}">
<meta name="rb.baseUrl" content="${baseUrl}">

View file

@ -35,7 +35,7 @@
<option value="FILE">文件</option>
<option value="IMAGE">图片</option>
<option value="AVATAR">头像</option>
<option value="BARCODE">条形码</option>
<option value="BARCODE">条形码 (二维码)</option>
<option value="BOOL">布尔 (是/否)</option>
<optgroup label="保留类型" class="bosskey-show">
<option value="STATE">状态</option>
@ -78,7 +78,7 @@
</label>
<label class="custom-control custom-control-sm custom-checkbox custom-control-inline mb-0 hide">
<input class="custom-control-input" type="checkbox" id="add2Layout" checked>
<span class="custom-control-label"> 追加到布局</span>
<span class="custom-control-label"> 追加到当前布局</span>
</label>
</div>
</div>

View file

@ -48,7 +48,7 @@
</td>
</tr>
<tr>
<td>主页地址/域名<p>基础 URL 所有链接将以此作为前缀</p></td>
<td>主页地址/域名<p>所有外部链接将以此作为前缀</p></td>
<td data-id="HomeURL">${HomeURL}</td>
</tr>
<tr>
@ -118,5 +118,10 @@
</div>
<%@ include file="/_include/Foot.jsp"%>
<script src="${baseUrl}/assets/js/admin/syscfg.jsx" type="text/babel"></script>
<script>
$(document).ready(function () {
$('.J_copyright a').addClass('link').attr('target', '_blank')
})
</script>
</body>
</html>

View file

@ -69,10 +69,9 @@
.dd-list .dd-item .dd-action a {
color: #fff;
font-size: 12px;
font-size: 1.23rem;
font-style: normal;
display: inline-block;
padding: 0;
padding-left: 6px;
opacity: 0.8;
}
@ -82,15 +81,16 @@
}
.dd-list .dd-item .dd-action a+a {
margin-left: 1px;
margin-left: 4px;
}
.dd-list .dd-item .dd-action a.icon {
position: absolute;
.dd-list .dd-item .dd-action a .zmdi-unfold-more {
font-size: 1.55rem;
transform: translateY(1px) rotate(90deg);
}
.dd-list .dd-item .dd-action a.icon>.zmdi {
font-size: 16px;
.dd-list .dd-item.w-100 a .zmdi-unfold-more::before {
content: '\f311';
}
.form-preview .dd-item,

View file

@ -6469,16 +6469,6 @@ button.close {
.modal-dialog-centered {
min-height: calc(100% - (1.75rem * 2))
}
.modal-sm {
max-width: 300px
}
}
@media (min-width:992px) {
.modal-lg {
max-width: 700px
}
}
.tooltip {

View file

@ -545,6 +545,11 @@ div.dataTables_wrapper div.dataTables_filter {
margin-left: 280px;
}
.modal-lg,
.modal-lg .modal-content {
max-width: 1000px;
}
.modal-header .close+.close {
margin-left: 6px;
}
@ -1176,13 +1181,13 @@ a {
.data-list .table thead th>div>i.dividing {
width: 10px;
border-right: 2px dotted #aaa;
cursor: e-resize;
cursor: col-resize;
}
i.dividing.ui-draggable-dragging {
border-right-color: #4285f4 !important;
z-index: 7;
cursor: e-resize;
z-index: 8;
cursor: col-resize;
}
.data-list .table thead th>div>i.zmdi {
@ -1552,7 +1557,7 @@ th.column-fixed {
display: inline-block;
padding: 7px 3px;
margin-right: 3px;
color: #666;
color: #a1a1a1;
}
.sortable-box .dd-list .dd3-action a .zmdi {
@ -1561,7 +1566,7 @@ th.column-fixed {
}
.sortable-box .dd-list .dd3-action a:hover .zmdi {
color: #4285f4;
color: gray;
}
.sortable-box .dd-list .dd3-item:hover>.dd3-action,
@ -3002,26 +3007,26 @@ form {
cursor: text;
}
.repeated-table {
.dialog-table {
margin-bottom: 0;
margin-top: -16px;
}
.repeated-table th {
.dialog-table th {
border-top: 0 none;
font-weight: normal !important;
color: #878787;
}
.repeated-table td.actions .icon {
.dialog-table td.actions .icon {
font-size: 1.28rem !important;
}
.repeated-table td.actions .icon:hover {
.dialog-table td.actions .icon:hover {
color: #4c8bf5 !important;
}
.repeated-table tr:last-child td {
.dialog-table tr:last-child td {
border-bottom: 1px solid #dee2e6;
}

View file

@ -14,35 +14,35 @@ class OnlineUserViewer extends RbModalHandler {
render() {
return <RbModal ref={(c) => this._dlg = c} title="在线用户" disposeOnHide={true}>
<table className="table table-hover table-sm mb-0">
<table className="table table-striped table-hover table-sm dialog-table">
<thead>
<tr>
<th width="30%">用户</th>
<th>最近活跃</th>
<th width="80"></th>
<th style={{ minWidth: 150 }}>用户</th>
<th style={{ minWidth: 150 }}>最近活跃</th>
<th width="90"></th>
</tr>
</thead>
<tbody>
{(this.state.users || []).map((item) => {
return (
<tr key={`user-${item.user}`}>
<td className="user-avatar">
<td className="user-avatar cell-detail user-info">
<img src={`${rb.baseUrl}/account/user-avatar/${item.user}`} />
<span>{item.fullName}</span>
<span className="pt-1">{item.fullName}</span>
</td>
<td>
<td className="cell-detail">
<a href="###" className="text-break">{item.activeUrl || '无'}</a>
<p className="text-muted fs-12 m-0">{item.activeTime}</p>
<span className="cell-detail-description">{item.activeTime}</span>
</td>
<td className="text-right">
<button className="btn btn-danger bordered btn-sm" type="button" onClick={() => this._killSession(item.user)}>强退</button>
<td className="actions text-right">
<button className="btn btn-danger btn-sm bordered" type="button" onClick={() => this._killSession(item.user)}>强退</button>
</td>
</tr>
)
})}
</tbody>
</table>
</RbModal >
</RbModal>
}
componentDidMount() {

View file

@ -65,6 +65,7 @@ $(document).ready(function () {
$('#type').change(function () {
parent.RbModal.resize()
$('.J_dt-REFERENCE, .J_dt-CLASSIFICATION, .J_dt-STATE').addClass('hide')
const dt = $(this).val()
$('.J_dt-' + dt).removeClass('hide')
@ -94,8 +95,6 @@ $(document).ready(function () {
}
} else if (dt === 'STATE') {
// NOOP
} else {
$('.J_dt-REFERENCE, .J_dt-CLASSIFICATION, .J_dt-STATE').addClass('hide')
}
})

View file

@ -25,7 +25,7 @@ $(document).ready(function () {
render_item({ fieldName: this.field, fieldLabel: this.label || '', isFull: true }, '.form-preview')
} else if (!field) {
const $item = $(`<div class="dd-item"><div class="dd-handle J_field J_missed"><span class="text-danger">[${this.field.toUpperCase()}] 字段已被删除</span></div></div>`).appendTo('.form-preview')
const $action = $('<div class="dd-action"><a>[移除]</a></div>').appendTo($item.find('.dd-handle'))
const $action = $('<div class="dd-action"><a><i class="zmdi zmdi-close"></i></a></div>').appendTo($item.find('.dd-handle'))
$action.find('a').click(function () {
$item.remove()
check_empty()
@ -122,9 +122,8 @@ const render_item = function (data) {
const action = $('<div class="dd-action"></div>').appendTo(handle)
if (data.displayType) {
$('<span class="ft">' + data.displayType + '</span>').appendTo(item)
$('<a class="rowspan" title="双列">[双]</a>').appendTo(action).click(function () { item.removeClass('w-100') })
$('<a class="rowspan" title="单列">[单]</a>').appendTo(action).click(function () { item.addClass('w-100') })
$('<a title="修改属性">[属性]</a>').appendTo(action).click(function () {
$('<a class="rowspan mr-1" title="单列/双列"><i class="zmdi zmdi-unfold-more"></i></a>').appendTo(action).click(function () { item.toggleClass('w-100') })
$('<a title="修改属性"><i class="zmdi zmdi-edit"></i></a>').appendTo(action).click(function () {
let call = function (nv) {
//
if (nv.fieldLabel) item.find('.dd-handle>span').text(nv.fieldLabel)
@ -143,7 +142,7 @@ const render_item = function (data) {
renderRbcomp(<DlgEditField call={call} {...ov} />)
})
$('<a>[移除]</a>').appendTo(action).click(function () {
$('<a><i class="zmdi zmdi-close"></i></a>').appendTo(action).click(function () {
render_unset(data)
item.remove()
check_empty()
@ -152,7 +151,7 @@ const render_item = function (data) {
if (data.fieldName === DIVIDER_LINE) {
item.addClass('divider')
$('<a title="修改属性">[属性]</a>').appendTo(action).click(function () {
$('<a title="修改属性"><i class="zmdi zmdi-edit"></i></a>').appendTo(action).click(function () {
const call = function (nv) {
item.find('.dd-handle span').text(nv.dividerName || '')
}
@ -160,7 +159,7 @@ const render_item = function (data) {
renderRbcomp(<DlgEditDivider call={call} dividerName={ov || ''} />)
})
$('<a>[移除]</a>').appendTo(action).click(function () {
$('<a><i class="zmdi zmdi-close"></i></a>').appendTo(action).click(function () {
item.remove()
check_empty()
})

View file

@ -1363,8 +1363,8 @@ class ReferenceSearcher extends RbModal {
render() {
return (
<div className="modal rbmodal colored-header colored-header-primary" ref={(c) => this._rbmodal = c}>
<div className="modal-dialog" style={{ maxWidth: 1220 }}>
<div className="modal-content" style={{ maxWidth: 1220 }}>
<div className="modal-dialog modal-lg">
<div className="modal-content">
<div className="modal-header modal-header-colored">
<h3 className="modal-title">{this.props.title || '查询'}</h3>
<button className="close" type="button" onClick={() => this.hide()}><span className="zmdi zmdi-close" /></button>
@ -1475,7 +1475,7 @@ class RepeatedViewer extends RbModalHandler {
render() {
const data = this.props.data
return <RbModal ref={(c) => this._dlg = c} title={`存在 ${this.props.data.length - 1} 条重复记录`} disposeOnHide={true} colored="warning">
<table className="table table-hover table-sm repeated-table">
<table className="table table-striped table-hover table-sm dialog-table">
<thead>
<tr>
{data[0].map((item, idx) => {