Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
8c0d7ae0
提交
8c0d7ae0
authored
4月 05, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 集群设置
上级
9a9a1a1c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
23 行增加
和
10 行删除
+23
-10
KettleController.java
.../java/io/dataease/controller/engine/KettleController.java
+2
-2
KettleService.java
...c/main/java/io/dataease/service/kettle/KettleService.java
+9
-3
kettle.js
frontend/src/api/system/kettle.js
+1
-1
ClusterModeSetting.vue
frontend/src/views/system/SysParam/ClusterModeSetting.vue
+10
-3
KettleSetting.vue
frontend/src/views/system/SysParam/KettleSetting.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/controller/engine/KettleController.java
浏览文件 @
8c0d7ae0
...
@@ -43,8 +43,8 @@ public class KettleController {
...
@@ -43,8 +43,8 @@ public class KettleController {
@ApiIgnore
@ApiIgnore
@PostMapping
(
"validate"
)
@PostMapping
(
"validate"
)
public
void
validate
(
@RequestBody
KettleDTO
kettleDTO
)
throws
Exception
{
public
ResultHolder
validate
(
@RequestBody
KettleDTO
kettleDTO
)
throws
Exception
{
kettleService
.
validate
(
kettleDTO
);
return
kettleService
.
validate
(
kettleDTO
);
}
}
@RequiresPermissions
(
"sysparam:read"
)
@RequiresPermissions
(
"sysparam:read"
)
...
...
backend/src/main/java/io/dataease/service/kettle/KettleService.java
浏览文件 @
8c0d7ae0
...
@@ -60,12 +60,18 @@ public class KettleService {
...
@@ -60,12 +60,18 @@ public class KettleService {
deEngineMapper
.
deleteByPrimaryKey
(
id
);
deEngineMapper
.
deleteByPrimaryKey
(
id
);
}
}
public
void
validate
(
KettleDTO
kettleDTO
)
throws
Exception
{
public
ResultHolder
validate
(
KettleDTO
kettleDTO
)
throws
Exception
{
HttpClientConfig
httpClientConfig
=
new
HttpClientConfig
();
HttpClientConfig
httpClientConfig
=
new
HttpClientConfig
();
String
authValue
=
"Basic "
+
Base64
.
getUrlEncoder
().
encodeToString
((
kettleDTO
.
getUser
()
String
authValue
=
"Basic "
+
Base64
.
getUrlEncoder
().
encodeToString
((
kettleDTO
.
getUser
()
+
":"
+
kettleDTO
.
getPasswd
()).
getBytes
());
+
":"
+
kettleDTO
.
getPasswd
()).
getBytes
());
httpClientConfig
.
addHeader
(
"Authorization"
,
authValue
);
httpClientConfig
.
addHeader
(
"Authorization"
,
authValue
);
String
response
=
HttpClientUtil
.
get
(
"http://"
+
kettleDTO
.
getCarte
()
+
":"
+
kettleDTO
.
getPort
()
+
"/kettle/status/"
,
httpClientConfig
);
try
{
String
response
=
HttpClientUtil
.
get
(
"http://"
+
kettleDTO
.
getCarte
()
+
":"
+
kettleDTO
.
getPort
()
+
"/kettle/status/"
,
httpClientConfig
);
return
ResultHolder
.
error
(
"Kettle is valid."
);
}
catch
(
Exception
e
){
return
ResultHolder
.
error
(
"Kettle is invalid: "
+
e
.
getMessage
());
}
}
}
public
ResultHolder
validate
(
String
id
)
{
public
ResultHolder
validate
(
String
id
)
{
...
@@ -116,7 +122,7 @@ public class KettleService {
...
@@ -116,7 +122,7 @@ public class KettleService {
remoteSlaveServer
.
setHostname
(
kettleDTO
.
getCarte
());
remoteSlaveServer
.
setHostname
(
kettleDTO
.
getCarte
());
remoteSlaveServer
.
setPort
(
kettleDTO
.
getPort
());
remoteSlaveServer
.
setPort
(
kettleDTO
.
getPort
());
remoteSlaveServer
.
setUsername
(
kettleDTO
.
getUser
());
remoteSlaveServer
.
setUsername
(
kettleDTO
.
getUser
());
remoteSlaveServer
.
setP
ort
(
kettleDTO
.
getPasswd
());
remoteSlaveServer
.
setP
assword
(
kettleDTO
.
getPasswd
());
}
}
return
remoteSlaveServer
;
return
remoteSlaveServer
;
}
}
...
...
frontend/src/api/system/kettle.js
浏览文件 @
8c0d7ae0
...
@@ -31,7 +31,7 @@ export function save(data) {
...
@@ -31,7 +31,7 @@ export function save(data) {
export
function
deleteKettle
(
id
)
{
export
function
deleteKettle
(
id
)
{
return
request
({
return
request
({
url
:
'/delete/'
+
id
,
url
:
'/
kettle/
delete/'
+
id
,
method
:
'delete'
,
method
:
'delete'
,
loading
:
true
loading
:
true
})
})
...
...
frontend/src/views/system/SysParam/ClusterModeSetting.vue
浏览文件 @
8c0d7ae0
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col>
<el-col>
<el-form-item
:label=
"$t('datasource.http_port')"
prop=
"configuration.
p
ort"
>
<el-form-item
:label=
"$t('datasource.http_port')"
prop=
"configuration.
httpP
ort"
>
<el-input
v-model=
"form.configuration.httpPort"
autocomplete=
"off"
type=
"number"
min=
"0"
/>
<el-input
v-model=
"form.configuration.httpPort"
autocomplete=
"off"
type=
"number"
min=
"0"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -156,6 +156,13 @@ export default {
...
@@ -156,6 +156,13 @@ export default {
trigger
:
[
'change'
,
'blur'
]
trigger
:
[
'change'
,
'blur'
]
}
}
],
],
'configuration.httpPort'
:
[
{
required
:
true
,
message
:
this
.
$t
(
'datasource.please_input_port'
),
trigger
:
[
'change'
,
'blur'
]
}
],
'configuration.dataBase'
:
[
'configuration.dataBase'
:
[
{
{
required
:
true
,
required
:
true
,
...
@@ -212,7 +219,7 @@ export default {
...
@@ -212,7 +219,7 @@ export default {
this
.
show
=
false
this
.
show
=
false
},
},
save
()
{
save
()
{
if
(
this
.
form
.
configuration
.
dataSourceType
===
'jdbc'
&&
this
.
form
.
configuration
.
port
<=
0
)
{
if
(
this
.
form
.
configuration
.
dataSourceType
===
'jdbc'
&&
(
this
.
form
.
configuration
.
port
<=
0
||
this
.
form
.
configuration
.
httpPort
<=
0
)
)
{
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
return
return
}
}
...
@@ -256,7 +263,7 @@ export default {
...
@@ -256,7 +263,7 @@ export default {
this
.
$message
.
error
(
i18n
.
t
(
'datasource.please_choose_schema'
))
this
.
$message
.
error
(
i18n
.
t
(
'datasource.please_choose_schema'
))
return
return
}
}
if
(
this
.
form
.
configuration
.
dataSourceType
===
'jdbc'
&&
this
.
form
.
configuration
.
port
<=
0
)
{
if
(
this
.
form
.
configuration
.
dataSourceType
===
'jdbc'
&&
(
this
.
form
.
configuration
.
port
<=
0
||
this
.
form
.
configuration
.
httpPort
<=
0
)
)
{
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
return
return
}
}
...
...
frontend/src/views/system/SysParam/KettleSetting.vue
浏览文件 @
8c0d7ae0
...
@@ -118,7 +118,7 @@ export default {
...
@@ -118,7 +118,7 @@ export default {
}],
}],
'configuration.passwd'
:
[{
'configuration.passwd'
:
[{
required
:
true
,
required
:
true
,
message
:
this
.
$t
(
'
d
commons.required'
),
message
:
this
.
$t
(
'commons.required'
),
trigger
:
'blur'
trigger
:
'blur'
}]
}]
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论