Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
a9123035
提交
a9123035
authored
8月 27, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 完善数据源失效消息
上级
aac751b0
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
82 行增加
和
12 行删除
+82
-12
DatasourceService.java
...ava/io/dataease/datasource/service/DatasourceService.java
+6
-2
V26__de1.3.sql
backend/src/main/resources/db/migration/V26__de1.3.sql
+8
-0
en.js
frontend/src/lang/en.js
+1
-0
tw.js
frontend/src/lang/tw.js
+1
-0
zh.js
frontend/src/lang/zh.js
+1
-0
DsMain.vue
frontend/src/views/system/datasource/DsMain.vue
+3
-0
DsTree.vue
frontend/src/views/system/datasource/DsTree.vue
+32
-6
index.vue
frontend/src/views/system/datasource/index.vue
+30
-4
没有找到文件。
backend/src/main/java/io/dataease/datasource/service/DatasourceService.java
浏览文件 @
a9123035
...
@@ -272,9 +272,13 @@ public class DatasourceService {
...
@@ -272,9 +272,13 @@ public class DatasourceService {
datasource
.
setStatus
(
"Success"
);
datasource
.
setStatus
(
"Success"
);
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Datasource
temp
=
datasourceMapper
.
selectByPrimaryKey
(
datasource
.
getId
());
datasource
.
setStatus
(
"Error"
);
datasource
.
setStatus
(
"Error"
);
sendWebMsg
(
datasource
);
if
(!
StringUtils
.
equals
(
temp
.
getStatus
(),
"Error"
))
{
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
sendWebMsg
(
datasource
);
datasourceMapper
.
updateByPrimaryKeySelective
(
datasource
);
}
}
}
}
}
...
...
backend/src/main/resources/db/migration/V26__de1.3.sql
0 → 100644
浏览文件 @
a9123035
-- ----------------------------
-- Records of sys_msg_type
-- ----------------------------
BEGIN
;
INSERT
INTO
`sys_msg_type`
VALUES
(
7
,
0
,
'i18n_msg_type_ds_invalid'
,
'datasource'
,
'to-msg-ds'
);
INSERT
INTO
`sys_msg_type`
VALUES
(
8
,
7
,
'i18n_msg_type_ds_invalid'
,
'datasource'
,
'to-msg-ds'
);
COMMIT
;
\ No newline at end of file
frontend/src/lang/en.js
浏览文件 @
a9123035
...
@@ -1361,6 +1361,7 @@ export default {
...
@@ -1361,6 +1361,7 @@ export default {
i18n_msg_type_dataset_sync_success
:
'Dataset synchronization successful'
,
i18n_msg_type_dataset_sync_success
:
'Dataset synchronization successful'
,
i18n_msg_type_dataset_sync_faild
:
'Dataset synchronization failed'
,
i18n_msg_type_dataset_sync_faild
:
'Dataset synchronization failed'
,
i18n_msg_type_all
:
'All type'
,
i18n_msg_type_all
:
'All type'
,
i18n_msg_type_ds_invalid
:
'Datasource invalid'
,
channel_inner_msg
:
'On site news'
channel_inner_msg
:
'On site news'
},
},
denumberrange
:
{
denumberrange
:
{
...
...
frontend/src/lang/tw.js
浏览文件 @
a9123035
...
@@ -1359,6 +1359,7 @@ export default {
...
@@ -1359,6 +1359,7 @@ export default {
i18n_msg_type_dataset_sync
:
'數據集同步'
,
i18n_msg_type_dataset_sync
:
'數據集同步'
,
i18n_msg_type_dataset_sync_success
:
'數據集同步成功'
,
i18n_msg_type_dataset_sync_success
:
'數據集同步成功'
,
i18n_msg_type_dataset_sync_faild
:
'數據集同步失敗'
,
i18n_msg_type_dataset_sync_faild
:
'數據集同步失敗'
,
i18n_msg_type_ds_invalid
:
'數據源失效'
,
i18n_msg_type_all
:
'全部類型'
,
i18n_msg_type_all
:
'全部類型'
,
channel_inner_msg
:
'站內消息'
channel_inner_msg
:
'站內消息'
},
},
...
...
frontend/src/lang/zh.js
浏览文件 @
a9123035
...
@@ -1362,6 +1362,7 @@ export default {
...
@@ -1362,6 +1362,7 @@ export default {
i18n_msg_type_dataset_sync
:
'数据集同步'
,
i18n_msg_type_dataset_sync
:
'数据集同步'
,
i18n_msg_type_dataset_sync_success
:
'数据集同步成功'
,
i18n_msg_type_dataset_sync_success
:
'数据集同步成功'
,
i18n_msg_type_dataset_sync_faild
:
'数据集同步失败'
,
i18n_msg_type_dataset_sync_faild
:
'数据集同步失败'
,
i18n_msg_type_ds_invalid
:
'数据源失效'
,
i18n_msg_type_all
:
'全部类型'
,
i18n_msg_type_all
:
'全部类型'
,
channel_inner_msg
:
'站内消息'
channel_inner_msg
:
'站内消息'
},
},
...
...
frontend/src/views/system/datasource/DsMain.vue
浏览文件 @
a9123035
...
@@ -55,6 +55,9 @@ export default {
...
@@ -55,6 +55,9 @@ export default {
},
},
refreshTree
()
{
refreshTree
()
{
this
.
$refs
.
dsTree
&&
this
.
$refs
.
dsTree
.
queryTreeDatas
()
this
.
$refs
.
dsTree
&&
this
.
$refs
.
dsTree
.
queryTreeDatas
()
},
msg2Current
(
sourceParam
)
{
this
.
$refs
.
dsTree
&&
this
.
$refs
.
dsTree
.
markInvalid
(
sourceParam
)
}
}
}
}
}
}
...
...
frontend/src/views/system/datasource/DsTree.vue
浏览文件 @
a9123035
...
@@ -41,11 +41,11 @@
...
@@ -41,11 +41,11 @@
<svg-icon
icon-class=
"datasource"
class=
"ds-icon-scene"
/>
<svg-icon
icon-class=
"datasource"
class=
"ds-icon-scene"
/>
</span>
</span>
<span
v-if=
"data.status === 'Error'"
>
<span
v-if=
"data.status === 'Error'"
>
<svg-icon
icon-class=
"exclamationmark"
class=
"ds-icon-scene"
/>
<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-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-button
type=
"text"
:style=
"!!data.msgNode ?
{'color': 'red'} : {}"
>
{{
data
.
name
}}
</el-button>
</el-tooltip>
</el-tooltip>
</span>
</span>
<span
v-if=
"data.type === 'folder'"
>
<span
v-if=
"data.type === 'folder'"
>
<i
class=
"el-icon-folder"
/>
<i
class=
"el-icon-folder"
/>
</span>
</span>
...
@@ -129,6 +129,11 @@ export default {
...
@@ -129,6 +129,11 @@ export default {
const
newArr
=
[]
const
newArr
=
[]
for
(
let
index
=
0
;
index
<
array
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
array
.
length
;
index
++
)
{
const
element
=
array
[
index
]
const
element
=
array
[
index
]
if
(
this
.
msgNodeId
)
{
if
(
element
.
id
===
this
.
msgNodeId
)
{
element
.
msgNode
=
true
}
}
if
(
!
(
element
.
type
in
types
))
{
if
(
!
(
element
.
type
in
types
))
{
types
[
element
.
type
]
=
[]
types
[
element
.
type
]
=
[]
// newArr.push(...element, ...{ children: types[element.type] })
// newArr.push(...element, ...{ children: types[element.type] })
...
@@ -147,7 +152,7 @@ export default {
...
@@ -147,7 +152,7 @@ export default {
return
'SQL Server'
return
'SQL Server'
}
else
if
(
type
===
'oracle'
)
{
}
else
if
(
type
===
'oracle'
)
{
return
'Oracle'
return
'Oracle'
}
else
if
(
type
===
'pg'
)
{
}
else
if
(
type
===
'pg'
)
{
return
'PostgreSQL'
return
'PostgreSQL'
}
}
},
},
...
@@ -208,6 +213,21 @@ export default {
...
@@ -208,6 +213,21 @@ export default {
component
,
component
,
componentParam
componentParam
})
})
},
markInvalid
(
msgParam
)
{
const
param
=
JSON
.
parse
(
msgParam
)
const
msgNodeId
=
param
.
id
this
.
msgNodeId
=
msgNodeId
this
.
$nextTick
(()
=>
{
this
.
tData
.
forEach
(
folder
=>
{
const
nodes
=
folder
.
children
nodes
.
forEach
(
node
=>
{
if
(
node
.
id
===
msgNodeId
)
{
node
.
msgNode
=
true
}
})
})
})
}
}
}
}
}
}
...
@@ -303,4 +323,10 @@ export default {
...
@@ -303,4 +323,10 @@ export default {
height
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.msg-node-class
{
color
:
red
;
>>>
i
{
color
:
red
;
}
}
</
style
>
</
style
>
frontend/src/views/system/datasource/index.vue
浏览文件 @
a9123035
<
template
>
<
template
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-main-container>
<de-main-container>
<ds-main
/>
<ds-main
ref=
"dsMain"
/>
</de-main-container>
</de-main-container>
</de-container>
</de-container>
</
template
>
</
template
>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DsMain
from
'./DsMain'
import
DsMain
from
'./DsMain'
import
bus
from
'@/utils/bus'
export
default
{
export
default
{
name
:
'Panel'
,
name
:
'Panel'
,
components
:
{
DeMainContainer
,
DeContainer
,
DsMain
},
components
:
{
DeMainContainer
,
DeContainer
,
DsMain
},
...
@@ -22,10 +22,36 @@ export default {
...
@@ -22,10 +22,36 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
bus
.
$on
(
'to-msg-ds'
,
params
=>
{
this
.
toMsgDs
(
params
)
})
},
created
()
{
this
.
$store
.
dispatch
(
'app/toggleSideBarHide'
,
true
)
const
routerParam
=
this
.
$router
.
currentRoute
.
params
this
.
toMsgDs
(
routerParam
)
},
},
methods
:
{
methods
:
{
toMsgDs
(
routerParam
)
{
if
(
routerParam
!==
null
&&
routerParam
.
msgNotification
)
{
const
panelShareTypeIds
=
[
7
,
8
]
// 说明是从消息通知跳转过来的
if
(
panelShareTypeIds
.
includes
(
routerParam
.
msgType
))
{
// 是数据集同步
if
(
routerParam
.
sourceParam
)
{
try
{
// const msgParam = JSON.parse(routerParam.sourceParam)
// this.param = msgParam.id
// this.component = ViewTable
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dsMain
&&
this
.
$refs
.
dsMain
.
msg2Current
&&
this
.
$refs
.
dsMain
.
msg2Current
(
routerParam
.
sourceParam
)
})
}
catch
(
error
)
{
console
.
error
(
error
)
}
}
}
}
}
}
}
}
}
</
script
>
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论