mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-21 04:44:45 +08:00
system-config
This commit is contained in:
parent
4a332952c1
commit
d9f6eb4fbe
4 changed files with 96 additions and 7 deletions
|
@ -48,11 +48,12 @@ public class SystemConfigurer {
|
|||
* 系统配置项名称
|
||||
*/
|
||||
public static enum ItemName {
|
||||
// 云存储
|
||||
StorageURL, StorageApiKey, StorageApiSecret, StorageBucket,
|
||||
|
||||
// 临时目录
|
||||
TempDirectory,
|
||||
// 云存储
|
||||
StorageURL, StorageApiKey, StorageApiSecret, StorageBucket,
|
||||
// 缓存服务
|
||||
CacheHost, CachePort, CacheUser, CachePassword,
|
||||
}
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(SystemConfigurer.class);
|
||||
|
@ -108,6 +109,26 @@ public class SystemConfigurer {
|
|||
return new String[] { key, secret, bucket };
|
||||
}
|
||||
|
||||
public static String[] getCacheAccount() {
|
||||
String host = getItemFromBoth(ItemName.CacheHost);
|
||||
if (host == null) {
|
||||
return null;
|
||||
}
|
||||
String port = getItemFromBoth(ItemName.CachePort);
|
||||
if (port == null) {
|
||||
return null;
|
||||
}
|
||||
String user = getItemFromBoth(ItemName.CacheUser);
|
||||
// if (user == null) {
|
||||
// return null;
|
||||
// }
|
||||
String password = getItemFromBoth(ItemName.CachePassword);
|
||||
if (password == null) {
|
||||
return null;
|
||||
}
|
||||
return new String[] { host, port, user, password };
|
||||
}
|
||||
|
||||
/*-
|
||||
* 从数据库-配置文件获取
|
||||
*/
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
<div class="left-sidebar-content">
|
||||
<ul class="sidebar-elements">
|
||||
<li class="divider">系统</li>
|
||||
<li class="<%="systems".equals(activeNav) ? "active" : ""%>" id="nav_systems"><a href="${baseUrl}/admin/systems"><i class="icon zmdi zmdi-settings"></i><span>系统信息</span></a></li>
|
||||
<li class="<%="systems".equals(activeNav) ? "active" : ""%>" id="nav_systems"><a href="${baseUrl}/admin/systems"><i class="icon zmdi zmdi-settings"></i><span>通用配置</span></a></li>
|
||||
<!--
|
||||
<li class="<%="system-storage".equals(activeNav) ? "active" : ""%>" id="nav_system-storage"><a href="${baseUrl}/admin/system/storage"><i class="icon zmdi zmdi-cloud-upload"></i><span>云存储配置</span></a></li>
|
||||
<li class="<%="system-cache".equals(activeNav) ? "active" : ""%>" id="nav_system-cache"><a href="${baseUrl}/admin/system/cache"><i class="icon zmdi zmdi-memory"></i><span>缓存服务配置</span></a></li>
|
||||
-->
|
||||
<li class="divider">业务/实体</li>
|
||||
<li class="<%="entities".equals(activeNav) ? "active" : ""%>" id="nav_entities"><a href="${baseUrl}/admin/entities"><i class="icon zmdi zmdi-widgets"></i><span>实体管理</span></a></li>
|
||||
<li class="divider">用户</li>
|
||||
|
|
|
@ -3,20 +3,85 @@
|
|||
<html>
|
||||
<head>
|
||||
<%@ include file="/_include/Head.jsp"%>
|
||||
<title>系统信息</title>
|
||||
<title>通用配置</title>
|
||||
<style type="text/css">
|
||||
a.img-thumbnail{display:inline-block;padding:0.6rem;background-color:#fff;line-height:1;font-size:0;}
|
||||
a.img-thumbnail img{max-height:40px;}
|
||||
h5{background-color:#eee;margin:0;padding:10px;}
|
||||
.table td{padding:9px 10px;}
|
||||
.table td p{margin:0;color:#999;font-weight:normal;font-size:12px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo">
|
||||
<jsp:include page="/_include/NavTop.jsp">
|
||||
<jsp:param value="系统信息" name="pageTitle"/>
|
||||
<jsp:param value="通用配置" name="pageTitle"/>
|
||||
</jsp:include>
|
||||
<jsp:include page="/_include/NavLeftAdmin.jsp">
|
||||
<jsp:param value="systems" name="activeNav"/>
|
||||
</jsp:include>
|
||||
<div class="rb-content">
|
||||
<div class="main-content container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-divider">通用配置</div>
|
||||
<div class="card-body">
|
||||
<h5>通用</h5>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">名称<p>这将完全替换 REBUILD 的品牌名称</p></td>
|
||||
<td>REBUILD</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LOGO</td>
|
||||
<td>
|
||||
<a class="img-thumbnail"><img alt="深色 LOGO" src="../assets/img/logo.png"></a>
|
||||
<a class="img-thumbnail bg-primary"><img alt="浅色 LOGO" src="../assets/img/logo-white.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>主页地址</td>
|
||||
<td><a href="http://getrebuild.com/" class="link" target="_blank">http://getrebuild.com/</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>公开注册</td>
|
||||
<td>否</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h5>安全</h5>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">登录时需要验证码</td>
|
||||
<td>3次以后</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>登录密码安全策略</td>
|
||||
<td>简单</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-divider">REBUILD 版本信息</div>
|
||||
<div class="card-body">
|
||||
<p>REBUILD V1.0.0-SNAPSHOT</p>
|
||||
<ul style="line-height:2">
|
||||
<li><a href="http://getrebuild.com/" target="_blank">帮助文档</a></li>
|
||||
<li><a href="mailto:getrebuild@sina.com?subject=技术支持">技术支持</a></li>
|
||||
<li><a href="mailto:getrebuild@sina.com?subject=定制开发与实施部署">定制开发与实施部署</a></li>
|
||||
<li><a href="https://github.com/getrebuild/rebuild" target="_blank">View on GitHub</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12114,7 +12114,8 @@ canvas {
|
|||
padding: 20px 25px;
|
||||
padding-bottom: 15px;
|
||||
color: #b0b0b0;
|
||||
padding: 16px 25px 0;
|
||||
padding: 18px 25px 0;
|
||||
padding: 15px 25px 0;
|
||||
color: #b0b0b0;
|
||||
line-height: 30px;
|
||||
font-weight: 600;
|
||||
|
|
Loading…
Reference in a new issue