Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zsq6662003
nacos
提交
50c37b04
N
nacos
项目概览
zsq6662003
/
nacos
与 Fork 源项目一致
从无法访问的项目Fork
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nacos
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
50c37b04
编写于
4月 08, 2021
作者:
H
haoyann
提交者:
GitHub
4月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused methods (#5256)
上级
d07e8909
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
195 deletion
+1
-195
console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js
...gement/ConfigurationManagement/ConfigurationManagement.js
+1
-195
未找到文件。
console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js
浏览文件 @
50c37b04
...
...
@@ -27,12 +27,10 @@ import {
Form
,
Icon
,
Input
,
Loading
,
Menu
,
Pagination
,
Select
,
Table
,
Grid
,
Upload
,
Message
,
}
from
'
@alifd/next
'
;
...
...
@@ -41,7 +39,7 @@ import RegionGroup from 'components/RegionGroup';
import
ShowCodeing
from
'
components/ShowCodeing
'
;
import
DeleteDialog
from
'
components/DeleteDialog
'
;
import
DashboardCard
from
'
./DashboardCard
'
;
import
{
getParams
,
setParams
,
request
,
aliwareIntl
}
from
'
@/globalLib
'
;
import
{
getParams
,
setParams
,
request
}
from
'
@/globalLib
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
getConfigs
}
from
'
../../../reducers/configuration
'
;
...
...
@@ -162,47 +160,6 @@ class ConfigurationManagement extends React.Component {
this
.
setState
({
isCn
:
localStorage
.
getItem
(
LANGUAGE_KEY
)
===
'
zh-CN
'
});
}
/**
* 获取概览页数据
*/
getContentList
()
{
request
({
url
:
'
com.alibaba.nacos.service.dashlist
'
,
// 以 com.alibaba. 开头最终会转换为真正的url地址
data
:
{},
$data
:
{},
// 替换请求url路径中{}占位符的内容
success
:
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
.
data
.
length
===
0
)
{
this
.
setState
({
hasdash
:
false
,
});
}
else
{
// 前端默认排序
let
sortList
=
[];
for
(
let
j
=
0
,
len
=
res
.
data
.
length
;
j
<
len
;
j
++
)
{
let
item
=
res
.
data
[
j
];
sortList
.
push
({
k
:
item
.
appName
||
''
+
item
.
group
||
''
+
item
.
dataId
||
''
,
v
:
item
,
});
}
sortList
.
sort
(
function
(
a
,
b
)
{
return
a
.
k
.
localeCompare
(
b
.
k
);
});
let
showList
=
[];
for
(
let
j
=
0
,
len
=
sortList
.
length
;
j
<
len
;
j
++
)
{
showList
.
push
(
sortList
[
j
].
v
);
}
this
.
setState
({
hasdash
:
true
,
contentList
:
showList
,
});
}
}
},
});
}
toggleShowQuestionnaire
(
value
)
{
if
(
value
)
{
localStorage
.
setItem
(
'
acm_questionnaire
'
,
1
);
...
...
@@ -332,8 +289,6 @@ class ConfigurationManagement extends React.Component {
});
}
showMore
()
{}
chooseNav
(
record
,
key
)
{
const
self
=
this
;
switch
(
key
)
{
...
...
@@ -398,10 +353,6 @@ class ConfigurationManagement extends React.Component {
});
}
renderLastTime
(
value
,
index
,
record
)
{
return
<
div
>
{
aliwareIntl
.
intlNumberFormat
(
record
.
lastModifiedTime
)}
<
/div>
;
}
showCode
(
record
)
{
this
.
showcode
.
current
.
getInstance
().
openDialog
(
record
);
}
...
...
@@ -470,44 +421,6 @@ class ConfigurationManagement extends React.Component {
this
.
setState
({
pageSize
},
()
=>
this
.
changePage
(
1
));
}
chooseFieldChange
(
fieldValue
)
{
this
.
setState
({
fieldValue
,
});
}
showSelect
(
value
)
{
this
.
setState
({
selectValue
:
value
,
});
if
(
value
.
indexOf
(
'
appName
'
)
!==
-
1
)
{
this
.
setState
({
showAppName
:
true
,
});
}
else
{
this
.
setState
({
showAppName
:
false
,
});
}
if
(
value
.
indexOf
(
'
group
'
)
!==
-
1
)
{
this
.
setState
({
showgroup
:
true
,
});
}
else
{
this
.
setState
({
showgroup
:
false
,
});
}
this
.
chooseFieldChange
(
value
);
}
getAppName
(
value
)
{
this
.
appName
=
value
;
this
.
setState
({
appName
:
value
,
});
}
setAppName
(
value
)
{
this
.
appName
=
value
;
this
.
setState
({
...
...
@@ -539,21 +452,6 @@ class ConfigurationManagement extends React.Component {
this
.
getData
();
}
resetAll
()
{
this
.
dataId
=
''
;
this
.
appName
=
''
;
this
.
group
=
''
;
this
.
setState
({
selectValue
:
[],
dataId
:
''
,
appName
:
''
,
group
:
''
,
showAppName
:
false
,
showgroup
:
false
,
});
this
.
selectAll
();
}
chooseEnv
(
value
)
{
this
.
serverId
=
getParams
(
'
serverId
'
)
||
'
center
'
;
this
.
tenant
=
getParams
(
'
namespace
'
)
||
''
;
// 为当前实例保存tenant参数
...
...
@@ -598,104 +496,12 @@ class ConfigurationManagement extends React.Component {
);
}
goConfigSync
(
record
)
{
this
.
serverId
=
getParams
(
'
serverId
'
)
||
'
center
'
;
this
.
tenant
=
getParams
(
'
namespace
'
)
||
''
;
// 为当前实例保存tenant参数
this
.
props
.
history
.
push
(
`/configsync?serverId=
${
this
.
serverId
||
''
}
&dataId=
${
record
.
dataId
}
&group=
${
record
.
group
}
&namespace=
${
this
.
tenant
}
`
);
}
onSelectChange
(...
args
)
{
const
record
=
[];
args
[
1
].
forEach
(
item
=>
{
if
(
args
[
0
].
indexOf
(
item
.
id
)
>=
0
&&
this
.
state
.
selectedKeys
.
indexOf
(
item
.
id
)
<
0
)
{
record
.
push
(
item
);
}
});
this
.
state
.
selectedRecord
.
forEach
(
item
=>
{
if
(
args
[
0
].
indexOf
(
item
.
id
)
>=
0
)
{
record
.
push
(
item
);
}
});
this
.
setState
({
selectedRecord
:
record
,
selectedKeys
:
args
[
0
],
isCheckAll
:
record
.
length
>
0
&&
record
.
length
===
this
.
state
.
dataSource
.
length
,
});
}
getBatchFailedContent
(
res
)
{
const
{
locale
=
{}
}
=
this
.
props
;
return
(
<
div
>
<
div
style
=
{{
fontSize
:
18
,
color
:
'
#373D41
'
,
overflow
:
'
auto
'
}}
>
{
res
.
message
}
<
/div
>
{
'
data
'
in
res
&&
res
.
data
!=
null
&&
(
<
Collapse
style
=
{{
width
:
'
500px
'
}}
>
{
'
failedItems
'
in
res
.
data
&&
res
.
data
.
failedItems
.
length
>
0
?
(
<
Panel
title
=
{
locale
.
failedEntry
+
res
.
data
.
failedItems
.
length
}
>
<
Table
dataSource
=
{
res
.
data
.
failedItems
}
fixedHeader
>
<
Table
.
Column
title
=
{
'
Data ID
'
}
dataIndex
=
{
'
dataId
'
}
/
>
<
Table
.
Column
title
=
{
'
Group
'
}
dataIndex
=
{
'
group
'
}
/
>
<
/Table
>
<
/Panel
>
)
:
(
<
Panel
style
=
{{
display
:
'
none
'
}}
/
>
)}
{
'
succeededItems
'
in
res
.
data
&&
res
.
data
.
succeededItems
.
length
>
0
?
(
<
Panel
title
=
{
locale
.
successfulEntry
+
res
.
data
.
succeededItems
.
length
}
>
<
Table
dataSource
=
{
res
.
data
.
succeededItems
}
fixedHeader
>
<
Table
.
Column
title
=
{
'
Data ID
'
}
dataIndex
=
{
'
dataId
'
}
/
>
<
Table
.
Column
title
=
{
'
Group
'
}
dataIndex
=
{
'
group
'
}
/
>
<
/Table
>
<
/Panel
>
)
:
(
<
Panel
style
=
{{
display
:
'
none
'
}}
/
>
)}
{
'
unprocessedItems
'
in
res
.
data
&&
res
.
data
.
unprocessedItems
.
length
>
0
?
(
<
Panel
title
=
{
locale
.
unprocessedEntry
+
res
.
data
.
unprocessedItems
.
length
}
>
<
Table
dataSource
=
{
res
.
data
.
unprocessedItems
}
fixedHeader
>
<
Table
.
Column
title
=
{
'
Data ID
'
}
dataIndex
=
{
'
dataId
'
}
/
>
<
Table
.
Column
title
=
{
'
Group
'
}
dataIndex
=
{
'
group
'
}
/
>
<
/Table
>
<
/Panel
>
)
:
(
<
Panel
style
=
{{
display
:
'
none
'
}}
/
>
)}
<
/Collapse
>
)}
<
/div
>
);
}
onClickBatchHandle
()
{
this
.
batchHandle
&&
this
.
batchHandle
.
openDialog
({
serverId
:
this
.
serverId
,
group
:
this
.
group
,
dataId
:
this
.
dataId
,
appName
:
this
.
appName
,
config_tags
:
this
.
state
.
config_tags
||
''
,
pageSize
:
this
.
state
.
pageSize
,
});
}
changeAdvancedQuery
=
()
=>
{
this
.
setState
({
isAdvancedQuery
:
!
this
.
state
.
isAdvancedQuery
,
});
};
checkAllHandle
(
checked
)
{
this
.
setState
({
isCheckAll
:
checked
,
selectedKeys
:
checked
?
this
.
state
.
dataSource
.
map
(
item
=>
item
.
id
)
:
[],
selectedRecord
:
checked
?
this
.
state
.
dataSource
:
[],
});
}
openUri
(
url
,
params
)
{
window
.
open
(
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录