Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit aace85a

Browse files
committed
新增 更新实例功能
1 parent 9c6e384 commit aace85a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/app/views/Terminal.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,50 +60,49 @@
6060
<template #default>
6161
<div v-loading="busy">
6262
<el-row type="flex" justify="space-between" :gutter="10">
63-
<el-col :lg="24" v-show="instanceInfo.status !== -1">
63+
<el-col :lg="24" v-show="instanceInfo.status === 0">
6464
<el-popconfirm title="确定执行此操作?" @confirm="openInstance">
6565
<template #reference>
6666
<el-button
6767
icon="el-icon-video-play"
68+
type="warning"
6869
style="width: 100%"
6970
size="small"
70-
:disabled="instanceInfo.status != 0"
71+
plain
7172
>
7273
开启实例
7374
</el-button>
7475
</template>
7576
</el-popconfirm>
7677
</el-col>
77-
<el-col :lg="24" v-show="instanceInfo.status !== -1">
78+
<el-col :lg="24" v-show="instanceInfo.status === 3">
7879
<el-popconfirm title="确定执行此操作?" @confirm="stopInstance">
7980
<template #reference>
8081
<el-button
8182
icon="el-icon-video-pause"
8283
style="width: 100%"
8384
size="small"
8485
class="row-mt"
85-
:disabled="instanceInfo.status == 0"
8686
>关闭实例
8787
</el-button>
8888
</template>
8989
</el-popconfirm>
9090
</el-col>
91-
<el-col :lg="24" v-show="instanceInfo.status !== -1">
91+
<el-col :lg="24" v-show="instanceInfo.status === 3">
9292
<el-popconfirm title="确定执行此操作?" @confirm="restartInstance">
9393
<template #reference>
9494
<el-button
9595
icon="el-icon-refresh-right"
9696
style="width: 100%"
9797
size="small"
9898
class="row-mt"
99-
:disabled="instanceInfo.status == 0"
10099
>
101100
重启实例
102101
</el-button>
103102
</template>
104103
</el-popconfirm>
105104
</el-col>
106-
<el-col :lg="24" v-show="instanceInfo.status !== -1">
105+
<el-col :lg="24" v-show="instanceInfo.status > 0">
107106
<el-popconfirm title="确定执行此操作?" @confirm="killInstance">
108107
<template #reference>
109108
<el-button
@@ -113,7 +112,6 @@
113112
style="width: 100%"
114113
size="small"
115114
class="row-mt"
116-
:disabled="instanceInfo.status == 0"
117115
>强制终止实例
118116
</el-button>
119117
</template>
@@ -134,7 +132,10 @@
134132
</template>
135133
</el-popconfirm>
136134
</el-col>
137-
<el-col :lg="24" v-if="instanceInfo.config.updateCommand">
135+
<el-col
136+
:lg="24"
137+
v-show="instanceInfo.config.updateCommand && instanceInfo.status === 0"
138+
>
138139
<el-popconfirm title="确定执行此操作?" @confirm="updateInstace">
139140
<template #reference>
140141
<el-button
@@ -143,7 +144,6 @@
143144
style="width: 100%"
144145
size="small"
145146
class="row-mt"
146-
:disabled="instanceInfo.status !== 0"
147147
>更新/安装实例
148148
</el-button>
149149
</template>

0 commit comments

Comments
 (0)