Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
4c8e061e
提交
4c8e061e
authored
8月 16, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 定时检测数据源状态信息
上级
6b1abd07
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
230 行增加
和
126 行删除
+230
-126
Datasource.java
...end/src/main/java/io/dataease/base/domain/Datasource.java
+4
-2
DatasourceExample.java
.../main/java/io/dataease/base/domain/DatasourceExample.java
+140
-70
DatasourceMapper.xml
...rc/main/java/io/dataease/base/mapper/DatasourceMapper.xml
+44
-24
ExtDataSourceMapper.xml
.../java/io/dataease/base/mapper/ext/ExtDataSourceMapper.xml
+1
-1
DatasourceService.java
...ava/io/dataease/datasource/service/DatasourceService.java
+23
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+0
-1
generatorConfig.xml
backend/src/main/resources/generatorConfig.xml
+1
-1
DeAsideContainer.vue
frontend/src/components/dataease/DeAsideContainer.vue
+0
-4
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
DsTree.vue
frontend/src/views/system/datasource/DsTree.vue
+11
-20
没有找到文件。
backend/src/main/java/io/dataease/base/domain/Datasource.java
浏览文件 @
4c8e061e
...
...
@@ -13,12 +13,14 @@ public class Datasource implements Serializable {
private
String
type
;
private
String
createBy
;
private
Long
createTime
;
private
Long
updateTime
;
private
String
createBy
;
private
String
status
;
private
String
configuration
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
backend/src/main/java/io/dataease/base/domain/DatasourceExample.java
浏览文件 @
4c8e061e
...
...
@@ -384,76 +384,6 @@ public class DatasourceExample {
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNull
()
{
addCriterion
(
"create_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNotNull
()
{
addCriterion
(
"create_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByEqualTo
(
String
value
)
{
addCriterion
(
"create_by ="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotEqualTo
(
String
value
)
{
addCriterion
(
"create_by <>"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThan
(
String
value
)
{
addCriterion
(
"create_by >"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by >="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThan
(
String
value
)
{
addCriterion
(
"create_by <"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by <="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLike
(
String
value
)
{
addCriterion
(
"create_by like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotLike
(
String
value
)
{
addCriterion
(
"create_by not like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by not in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by not between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
...
...
@@ -573,6 +503,146 @@ public class DatasourceExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNull
()
{
addCriterion
(
"create_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNotNull
()
{
addCriterion
(
"create_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByEqualTo
(
String
value
)
{
addCriterion
(
"create_by ="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotEqualTo
(
String
value
)
{
addCriterion
(
"create_by <>"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThan
(
String
value
)
{
addCriterion
(
"create_by >"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by >="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThan
(
String
value
)
{
addCriterion
(
"create_by <"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by <="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLike
(
String
value
)
{
addCriterion
(
"create_by like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotLike
(
String
value
)
{
addCriterion
(
"create_by not like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by not in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by not between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNull
()
{
addCriterion
(
"`status` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNotNull
()
{
addCriterion
(
"`status` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusEqualTo
(
String
value
)
{
addCriterion
(
"`status` ="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotEqualTo
(
String
value
)
{
addCriterion
(
"`status` <>"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThan
(
String
value
)
{
addCriterion
(
"`status` >"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`status` >="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThan
(
String
value
)
{
addCriterion
(
"`status` <"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`status` <="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLike
(
String
value
)
{
addCriterion
(
"`status` like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotLike
(
String
value
)
{
addCriterion
(
"`status` not like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIn
(
List
<
String
>
values
)
{
addCriterion
(
"`status` in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`status` not in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`status` between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`status` not between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
backend/src/main/java/io/dataease/base/mapper/DatasourceMapper.xml
浏览文件 @
4c8e061e
...
...
@@ -6,9 +6,10 @@
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.Datasource"
>
<result
column=
"configuration"
jdbcType=
"LONGVARCHAR"
property=
"configuration"
/>
...
...
@@ -72,7 +73,7 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, `name`, `desc`, `type`, create_
by, create_time, update_time
id, `name`, `desc`, `type`, create_
time, update_time, create_by, `status`
</sql>
<sql
id=
"Blob_Column_List"
>
configuration
...
...
@@ -127,11 +128,13 @@
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.Datasource"
>
insert into datasource (id, `name`, `desc`,
`type`, create_by, create_time,
update_time, configuration)
`type`, create_time, update_time,
create_by, `status`, configuration
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{updateTime,jdbcType=BIGINT}, #{configuration,jdbcType=LONGVARCHAR})
#{type,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{configuration,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.Datasource"
>
insert into datasource
...
...
@@ -148,15 +151,18 @@
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"status != null"
>
`status`,
</if>
<if
test=
"configuration != null"
>
configuration,
</if>
...
...
@@ -174,15 +180,18 @@
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"configuration != null"
>
#{configuration,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -209,15 +218,18 @@
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=VARCHAR},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if
test=
"record.configuration != null"
>
configuration = #{record.configuration,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -232,9 +244,10 @@
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
configuration = #{record.configuration,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -246,9 +259,10 @@
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
update_time = #{record.updateTime,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -265,15 +279,18 @@
<if
test=
"type != null"
>
`type` = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"configuration != null"
>
configuration = #{configuration,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -285,9 +302,10 @@
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
configuration = #{configuration,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
...
...
@@ -296,9 +314,10 @@
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
update_time = #{updateTime,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSourceMapper.xml
浏览文件 @
4c8e061e
...
...
@@ -24,7 +24,7 @@
</select>
<select
id=
"queryUnion"
resultMap=
"BaseResultMapDTO"
>
select id , name , `desc` ,`type` , configuration ,create_time ,update_time,
select id , name , `desc` ,`type` , configuration ,create_time ,update_time,
status,
get_auths(id,'link',#{userId}) as `privileges`
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'link') cids) t,datasource
<where>
...
...
backend/src/main/java/io/dataease/datasource/service/DatasourceService.java
浏览文件 @
4c8e061e
...
...
@@ -57,6 +57,7 @@ public class DatasourceService {
datasource
.
setCreateBy
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUsername
()));
datasourceMapper
.
insertSelective
(
datasource
);
handleConnectionPool
(
datasource
,
"add"
);
checkAndUpdateDatasourceStatus
(
datasource
);
return
datasource
;
}
...
...
@@ -111,6 +112,7 @@ public class DatasourceService {
datasource
.
setUpdateTime
(
System
.
currentTimeMillis
());
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
handleConnectionPool
(
datasource
,
"edit"
);
checkAndUpdateDatasourceStatus
(
datasource
);
}
public
void
validate
(
Datasource
datasource
)
throws
Exception
{
...
...
@@ -200,4 +202,25 @@ public class DatasourceService {
DEException
.
throwException
(
Translator
.
get
(
"i18n_ds_name_exists"
));
}
}
public
void
updateDatasourceStatus
(){
List
<
Datasource
>
datasources
=
datasourceMapper
.
selectByExampleWithBLOBs
(
new
DatasourceExample
());
datasources
.
forEach
(
datasource
->
{
checkAndUpdateDatasourceStatus
(
datasource
);
});
}
private
void
checkAndUpdateDatasourceStatus
(
Datasource
datasource
){
try
{
DatasourceProvider
datasourceProvider
=
ProviderFactory
.
getProvider
(
datasource
.
getType
());
DatasourceRequest
datasourceRequest
=
new
DatasourceRequest
();
datasourceRequest
.
setDatasource
(
datasource
);
datasourceProvider
.
checkStatus
(
datasourceRequest
);
datasource
.
setStatus
(
"Success"
);
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
}
catch
(
Exception
e
)
{
datasource
.
setStatus
(
"Error"
);
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
}
}
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
4c8e061e
...
...
@@ -1542,7 +1542,6 @@ public class DataSetTableService {
@Resource
private
UtilMapper
utilMapper
;
@QuartzScheduled
(
cron
=
"0 0/3 * * * ?"
)
public
void
updateDatasetTableStatus
()
{
List
<
QrtzSchedulerState
>
qrtzSchedulerStates
=
qrtzSchedulerStateMapper
.
selectByExample
(
null
);
List
<
String
>
activeQrtzInstances
=
qrtzSchedulerStates
.
stream
().
filter
(
qrtzSchedulerState
->
qrtzSchedulerState
.
getLastCheckinTime
()
+
qrtzSchedulerState
.
getCheckinInterval
()
+
1000
>
utilMapper
.
currentTimestamp
()).
map
(
QrtzSchedulerStateKey:
:
getInstanceName
).
collect
(
Collectors
.
toList
());
...
...
backend/src/main/resources/generatorConfig.xml
浏览文件 @
4c8e061e
...
...
@@ -64,7 +64,7 @@
<!--要生成的数据库表 -->
<table
tableName=
"
chart_view
"
/>
<table
tableName=
"
datasource
"
/>
<!-- <table tableName="sys_dict_item"/>-->
<!-- <table tableName="dataset_table_field"/>-->
<!-- <table tableName="v_chart">-->
...
...
frontend/src/components/dataease/DeAsideContainer.vue
浏览文件 @
4c8e061e
...
...
@@ -4,10 +4,6 @@
class=
"ms-aside-container"
:style=
"
{'margin-left': !asideHidden ? 0 : '-' + width}"
>
<!--
<div
v-if=
"enableAsideHidden"
class=
"hiddenBottom"
@
click=
"asideHidden = !asideHidden"
>
-->
<!--
<i
v-if=
"!asideHidden"
class=
"el-icon-arrow-left"
/>
-->
<!--
<i
v-if=
"asideHidden"
class=
"el-icon-arrow-right"
/>
-->
<!--
</div>
-->
<slot
/>
<de-horizontal-drag-bar
v-if=
"showDragBar"
/>
</el-aside>
...
...
frontend/src/lang/en.js
浏览文件 @
4c8e061e
...
...
@@ -1043,7 +1043,8 @@ export default {
oracle_service_name
:
'Service Name'
,
get_schema
:
'Get Schema'
,
schema
:
'Database Schema'
,
please_choose_schema
:
'Please select Schema'
please_choose_schema
:
'Please select Schema'
,
in_valid
:
'Invalid datasource'
},
pblink
:
{
key_pwd
:
'Please enter the password to open the link'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
4c8e061e
...
...
@@ -1043,7 +1043,8 @@ export default {
oracle_service_name
:
'服務名'
,
get_schema
:
'獲取 Schema'
,
schema
:
'數據庫 Schema'
,
please_choose_schema
:
'請選擇數據庫 Schema'
please_choose_schema
:
'請選擇數據庫 Schema'
,
in_valid
:
'無效數據源'
},
pblink
:
{
key_pwd
:
'請輸入密碼打開鏈接'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
4c8e061e
...
...
@@ -1045,7 +1045,8 @@ export default {
get_schema
:
'获取 Schema'
,
schema
:
'数据库 Schema'
,
please_choose_schema
:
'请选择数据库 Schema'
,
edit_datasource_msg
:
'修改数据源信息,可能会导致改数据源下的数据集不可用,确认修改?'
edit_datasource_msg
:
'修改数据源信息,可能会导致改数据源下的数据集不可用,确认修改?'
,
in_valid
:
'无效数据源'
},
pblink
:
{
key_pwd
:
'请输入密码打开链接'
,
...
...
frontend/src/views/system/datasource/DsTree.vue
浏览文件 @
4c8e061e
...
...
@@ -37,13 +37,22 @@
>
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list father">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
v-if=
"data.type !== 'folder'"
>
<span
v-if=
"data.type !== 'folder'
&& data.status !== 'Error'
"
>
<svg-icon
icon-class=
"datasource"
class=
"ds-icon-scene"
/>
</span>
<span
v-if=
"data.status === 'Error'"
>
<svg-icon
icon-class=
"exclamationmark"
class=
"ds-icon-scene"
/>
<el-tooltip
v-if=
"data.status === 'Error'"
style=
"margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
effect=
"dark"
:content=
"$t('datasource.in_valid')"
placement=
"right"
>
<el-button
type=
"text"
>
{{
data
.
name
}}
</el-button>
</el-tooltip>
</span>
<span
v-if=
"data.type === 'folder'"
>
<i
class=
"el-icon-folder"
/>
</span>
<span
style=
"margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
>
{{
data
.
name
}}
</span>
<span
v-if=
" data.status !== 'Error'"
style=
"margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
>
{{
data
.
name
}}
</span>
</span>
<span
class=
"child"
>
<span
v-if=
"data.type ==='folder'"
@
click
.
stop
>
...
...
@@ -67,24 +76,6 @@
@
click=
"_handleDelete(data)"
/>
</span>
<!--
<el-dropdown
trigger=
"click"
size=
"small"
@
command=
"clickFileMore"
>
<span
class=
"el-dropdown-link"
>
<el-button
icon=
"el-icon-more"
type=
"text"
size=
"small"
/>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-edit"
:command=
"beforeClickFile('edit',data,node)"
>
{{
$t
(
'panel.edit'
)
}}
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-delete"
:command=
"beforeClickFile('delete',data,node)"
>
{{
$t
(
'panel.delete'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
-->
</span>
</span>
</span>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论