Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-platform-ui
Commits
bc1221ee
Commit
bc1221ee
authored
Aug 27, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对象转数组做个兼容
parent
26bb2da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
EnvDetail.vue
src/views/docker/EnvDetail.vue
+27
-17
No files found.
src/views/docker/EnvDetail.vue
View file @
bc1221ee
...
@@ -399,24 +399,30 @@ export default {
...
@@ -399,24 +399,30 @@ export default {
// 将数组转成对象存储
// 将数组转成对象存储
this
.
FormatTabledata
=
{}
this
.
FormatTabledata
=
{}
original
.
forEach
((
item
,
index
)
=>
{
original
.
forEach
((
item
,
index
)
=>
{
if
(
Object
.
keys
(
this
.
FormatTabledata
).
indexOf
(
item
.
labels
.
type
)
>
-
1
)
{
if
(
item
!==
null
)
{
this
.
FormatTabledata
[
item
.
labels
.
type
].
push
(
item
)
if
(
}
else
{
Object
.
keys
(
this
.
FormatTabledata
).
indexOf
(
item
.
labels
.
type
)
>
-
1
this
.
FormatTabledata
[
item
.
labels
.
type
]
=
[]
)
{
this
.
FormatTabledata
[
item
.
labels
.
type
].
push
(
item
)
this
.
FormatTabledata
[
item
.
labels
.
type
].
push
(
item
)
}
else
{
this
.
FormatTabledata
[
item
.
labels
.
type
]
=
[]
this
.
FormatTabledata
[
item
.
labels
.
type
].
push
(
item
)
}
}
}
})
})
},
},
// 获取服务列表
// 获取服务列表
getServiceList
()
{
getServiceList
()
{
const
tLoading
=
this
.
$loading
.
service
(
this
.
loadingOptions
)
const
tLoading
=
this
.
$loading
.
service
(
this
.
loadingOptions
)
getServiceList
({
namespace
:
this
.
namespace
}).
then
((
resp
)
=>
{
getServiceList
({
namespace
:
this
.
namespace
})
const
serviceList
=
resp
.
data
.
data
.
then
((
resp
)
=>
{
this
.
array2Object
(
serviceList
)
const
serviceList
=
resp
.
data
.
data
tLoading
.
close
()
this
.
array2Object
(
serviceList
)
}).
catch
(()
=>
{
tLoading
.
close
()
tLoading
.
close
()
})
})
.
catch
(()
=>
{
tLoading
.
close
()
})
},
},
// 刷新,重新获取服务列表
// 刷新,重新获取服务列表
refresh
()
{
refresh
()
{
...
@@ -486,11 +492,15 @@ export default {
...
@@ -486,11 +492,15 @@ export default {
},
},
// 清空redis
// 清空redis
clearRedis
()
{
clearRedis
()
{
this
.
$confirm
(
`此操作将清空
${
this
.
namespace
}
环境所有Redis缓存, 是否继续?`
,
'
提示
'
,
{
this
.
$confirm
(
confirmButtonText
:
'
确定
'
,
`此操作将清空
${
this
.
namespace
}
环境所有Redis缓存, 是否继续?`
,
cancelButtonText
:
'
取消
'
,
'
提示
'
,
type
:
'
warning
'
{
}).
then
(()
=>
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
var
formdata
=
new
FormData
()
var
formdata
=
new
FormData
()
formdata
.
set
(
'
namespace
'
,
this
.
namespace
)
formdata
.
set
(
'
namespace
'
,
this
.
namespace
)
flushRedis
(
formdata
).
then
((
resp
)
=>
{
flushRedis
(
formdata
).
then
((
resp
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment