Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rainbond Ui
Commits
991d344c
Unverified
Commit
991d344c
authored
3 years ago
by
Power
Committed by
GitHub
3 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #847 from zsl1549/ThirdParty
Fix the Third Party button
parents
bc3e1e24
5ed223a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/Component/index.js
+7
-17
src/pages/Component/index.js
with
7 additions
and
17 deletions
+7
-17
src/pages/Component/index.js
+
7
-
17
View file @
991d344c
...
...
@@ -908,11 +908,6 @@ class Main extends PureComponent {
appPermissions
:
{
isEdit
:
isAppEdit
}
}
=
this
.
props
;
const
{
status
,
groupDetail
,
loadingDetail
}
=
this
.
state
;
// Temporary logic that all third party components need to be implemented can be turned off.
let
canStop
=
isStop
;
if
(
appDetail
.
is_third
&&
appDetail
.
endpoints_type
!==
'
kubernetes
'
)
{
canStop
=
false
;
}
const
isHelm
=
groupDetail
&&
groupDetail
.
app_type
&&
groupDetail
.
app_type
===
'
helm
'
;
return
(
...
...
@@ -954,7 +949,7 @@ class Main extends PureComponent {
)}
{
!
appDetail
.
is_third
&&
isRestart
&&
<
Divider
type
=
"
vertical
"
/>
}
{
can
Stop
&&
!
appStatusUtil
.
canStart
(
status
)
?
(
{
is
Stop
&&
!
appStatusUtil
.
canStart
(
status
)
?
(
<
span
>
<
a
style
=
{{
...
...
@@ -972,7 +967,7 @@ class Main extends PureComponent {
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
/span
>
)
:
can
Stop
&&
)
:
is
Stop
&&
status
&&
status
.
status
&&
status
.
status
===
'
upgrade
'
?
(
...
...
@@ -1071,12 +1066,13 @@ class Main extends PureComponent {
groupDetail
}
=
this
.
state
;
const
{
getFieldDecorator
}
=
form
;
const
upDataText
=
isShowThirdParty
?
'
更新
'
:
'
更新(滚动)
'
;
const
codeObj
=
{
start
:
'
启动
'
,
restart
:
'
重启
'
,
stop
:
'
关闭
'
,
deploy
:
'
构建
'
,
rolling
:
'
更新(滚动)
'
rolling
:
upDataText
};
if
(
!
appDetail
.
service
)
{
return
null
;
...
...
@@ -1099,14 +1095,9 @@ class Main extends PureComponent {
if
(
!
status
.
status
)
{
return
null
;
}
let
canStart
=
isStart
;
if
(
appDetail
.
is_third
&&
appDetail
.
endpoints_type
!==
'
kubernetes
'
)
{
canStart
=
false
;
}
const
action
=
(
<
div
>
{
can
Start
&&
!
appStatusUtil
.
canStop
(
status
)
&&
(
{
is
Start
&&
!
appStatusUtil
.
canStop
(
status
)
&&
(
<
Button
disabled
=
{
!
appStatusUtil
.
canStart
(
status
)}
onClick
=
{()
=>
{
...
...
@@ -1166,8 +1157,7 @@ class Main extends PureComponent {
{
status
.
status
===
'
undeploy
'
||
status
.
status
===
'
closed
'
||
status
.
status
===
'
stopping
'
||
isShowThirdParty
status
.
status
===
'
stopping
'
?
''
:
isUpdate
&&
(
<
Button
...
...
@@ -1175,7 +1165,7 @@ class Main extends PureComponent {
this
.
handleOpenHelpfulHints
(
'
rolling
'
);
}}
>
更新
(
滚动
)
{
upDataText
}
<
/Button
>
)}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help