Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
7341f899
S
SkyWalking
项目概览
javalover123888
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7341f899
编写于
12月 24, 2015
作者:
Z
zhangxin10
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复授权文件的配置可以根据不同的选项可以支持各种网络环境,目前可以在界面上进行选择
上级
d6f49bc9
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
24 addition
and
11 deletion
+24
-11
skywalking-webui/src/main/java/com/ai/cloud/controller/AuthFileCtl.java
...ui/src/main/java/com/ai/cloud/controller/AuthFileCtl.java
+2
-3
skywalking-webui/src/main/java/com/ai/cloud/dao/impl/AuthConfigMDAO.java
...i/src/main/java/com/ai/cloud/dao/impl/AuthConfigMDAO.java
+4
-4
skywalking-webui/src/main/java/com/ai/cloud/dao/inter/IAuthConfigMDAO.java
...src/main/java/com/ai/cloud/dao/inter/IAuthConfigMDAO.java
+1
-1
skywalking-webui/src/main/java/com/ai/cloud/service/impl/AuthFileSerImpl.java
.../main/java/com/ai/cloud/service/impl/AuthFileSerImpl.java
+2
-2
skywalking-webui/src/main/java/com/ai/cloud/service/inter/IAuthFileSer.java
...rc/main/java/com/ai/cloud/service/inter/IAuthFileSer.java
+1
-1
skywalking-webui/src/main/webapp/ftl/applist.ftl
skywalking-webui/src/main/webapp/ftl/applist.ftl
+14
-0
未找到文件。
skywalking-webui/src/main/java/com/ai/cloud/controller/AuthFileCtl.java
浏览文件 @
7341f899
...
...
@@ -37,10 +37,9 @@ public class AuthFileCtl {
@RequestMapping
(
"/exportAuth/{appCode}"
)
public
void
exportApplicationAuthFile
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
(
"appCode"
)
String
appCode
)
throws
Exception
{
@PathVariable
(
"appCode"
)
String
appCode
,
String
authType
)
throws
Exception
{
HttpSession
session
=
request
.
getSession
();
String
uid
=
(
String
)
session
.
getAttribute
(
"uid"
);
JSONObject
reJson
=
new
JSONObject
();
if
(
StringUtil
.
isBlank
(
uid
))
{
...
...
@@ -56,7 +55,7 @@ public class AuthFileCtl {
java
.
net
.
URLEncoder
.
encode
(
fileName
,
"utf-8"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment;"
+
"filename=\""
+
URLEncoder
.
encode
(
fileName
,
"utf-8"
)
+
"\""
);
Properties
properties
=
authFileSer
.
queryAuthFile
();
Properties
properties
=
authFileSer
.
queryAuthFile
(
authType
);
String
propertyValue
;
for
(
Map
.
Entry
<
Object
,
Object
>
value
:
properties
.
entrySet
())
{
propertyValue
=
String
.
valueOf
(
value
.
getValue
());
...
...
skywalking-webui/src/main/java/com/ai/cloud/dao/impl/AuthConfigMDAO.java
浏览文件 @
7341f899
...
...
@@ -21,14 +21,14 @@ public class AuthConfigMDAO implements IAuthConfigMDAO {
private
static
Logger
logger
=
LogManager
.
getLogger
(
AuthConfigMDAO
.
class
);
@Override
public
Properties
queryAllAuthConfig
()
{
public
Properties
queryAllAuthConfig
(
final
String
authType
)
{
final
Properties
properties
=
new
Properties
();
String
sql
=
"select auth_file_config.key, auth_file_config.value from auth_file_config where auth_file_config.sts = ? "
;
String
sql
=
"select auth_file_config.key, auth_file_config.value
"
+
authType
+
"
from auth_file_config where auth_file_config.sts = ? "
;
final
Object
[]
params
=
new
Object
[]{
"A"
};
jdbcTemplate
.
query
(
sql
,
params
,
new
RowCallbackHandler
()
{
jdbcTemplate
.
query
(
sql
,
params
,
new
RowCallbackHandler
()
{
@Override
public
void
processRow
(
ResultSet
resultSet
)
throws
SQLException
{
properties
.
setProperty
(
resultSet
.
getString
(
"key"
),
resultSet
.
getString
(
"value"
));
properties
.
setProperty
(
resultSet
.
getString
(
"key"
),
resultSet
.
getString
(
"value"
+
authType
));
}
});
return
properties
;
...
...
skywalking-webui/src/main/java/com/ai/cloud/dao/inter/IAuthConfigMDAO.java
浏览文件 @
7341f899
...
...
@@ -3,5 +3,5 @@ package com.ai.cloud.dao.inter;
import
java.util.Properties
;
public
interface
IAuthConfigMDAO
{
Properties
queryAllAuthConfig
();
Properties
queryAllAuthConfig
(
String
authType
);
}
skywalking-webui/src/main/java/com/ai/cloud/service/impl/AuthFileSerImpl.java
浏览文件 @
7341f899
...
...
@@ -14,7 +14,7 @@ public class AuthFileSerImpl implements IAuthFileSer {
private
IAuthConfigMDAO
authConfigMDAO
;
@Override
public
Properties
queryAuthFile
()
{
return
authConfigMDAO
.
queryAllAuthConfig
();
public
Properties
queryAuthFile
(
String
authType
)
{
return
authConfigMDAO
.
queryAllAuthConfig
(
authType
);
}
}
skywalking-webui/src/main/java/com/ai/cloud/service/inter/IAuthFileSer.java
浏览文件 @
7341f899
...
...
@@ -3,5 +3,5 @@ package com.ai.cloud.service.inter;
import
java.util.Properties
;
public
interface
IAuthFileSer
{
Properties
queryAuthFile
();
Properties
queryAuthFile
(
String
authType
);
}
skywalking-webui/src/main/webapp/ftl/applist.ftl
浏览文件 @
7341f899
...
...
@@ -98,6 +98,15 @@
<input
type=
"text"
class=
"form-control"
id=
"exclusiveException"
placeholder=
"java.lang.Exception,java.io.IOException"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"period"
class=
"col-sm-4 control-label"
>
授权文件类型:
</label>
<div
class=
"col-sm-4"
>
<select
class=
"form-control"
id=
"authType"
>
<option
value=
"1"
>
外网
</option>
<option
value=
"0"
>
内网
</option>
</select>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-4 col-sm-4"
>
<input
type=
'hidden'
id=
"authAppCode"
>
...
...
@@ -488,9 +497,14 @@
exclusiveException
.
attr
(
"
type
"
,
"
hidden
"
);
exclusiveException
.
attr
(
"
name
"
,
"
exclusiveException
"
);
exclusiveException
.
attr
(
"
value
"
,
$
(
"
#exclusiveException
"
).
val
());
var
authType
=
$
(
"
<input>
"
);
authType
.
attr
(
"
type
"
,
"
hidden
"
);
authType
.
attr
(
"
name
"
,
"
authType
"
);
authType
.
attr
(
"
value
"
,
$
(
"
#authType
"
).
val
());
$
(
"
#authFiledownLoad
"
).
append
(
form
);
//将表单放置在web中
form
.
append
(
exportData
);
form
.
append
(
exclusiveException
);
form
.
append
(
authType
);
form
.
submit
();
//表单提交
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录