首页接口重构
This commit is contained in:
@@ -115,25 +115,29 @@
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template #default="{ row }">
|
||||
<div class="action-group">
|
||||
<el-popconfirm
|
||||
v-if="isContainerStopped(row.status)"
|
||||
popper-class="docker-popconfirm"
|
||||
title="确认启动该容器吗?"
|
||||
@confirm="handleDockerAction('start', row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
:icon="VideoPlay"
|
||||
:loading="actionLoadingMap[row.containerId] === 'start'"
|
||||
/>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<template v-else>
|
||||
<el-tooltip content="启动" placement="top" :show-after="200">
|
||||
<el-popconfirm
|
||||
popper-class="docker-popconfirm"
|
||||
title="确认启动该容器吗?"
|
||||
:disabled="!isContainerStopped(row.status)"
|
||||
@confirm="handleDockerAction('start', row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
:icon="VideoPlay"
|
||||
:disabled="!isContainerStopped(row.status)"
|
||||
:loading="actionLoadingMap[row.containerId] === 'start'"
|
||||
/>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="重启" placement="top" :show-after="200">
|
||||
<el-popconfirm
|
||||
popper-class="docker-popconfirm"
|
||||
title="确认重启该容器吗?"
|
||||
:disabled="isContainerStopped(row.status)"
|
||||
@confirm="handleDockerAction('restart', row)"
|
||||
>
|
||||
<template #reference>
|
||||
@@ -141,13 +145,17 @@
|
||||
link
|
||||
type="warning"
|
||||
:icon="RefreshRight"
|
||||
:disabled="isContainerStopped(row.status)"
|
||||
:loading="actionLoadingMap[row.containerId] === 'restart'"
|
||||
/>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="停止" placement="top" :show-after="200">
|
||||
<el-popconfirm
|
||||
popper-class="docker-popconfirm"
|
||||
title="确认停止该容器吗?"
|
||||
:disabled="isContainerStopped(row.status)"
|
||||
@confirm="handleDockerAction('stop', row)"
|
||||
>
|
||||
<template #reference>
|
||||
@@ -155,11 +163,12 @@
|
||||
link
|
||||
type="danger"
|
||||
:icon="SwitchButton"
|
||||
:disabled="isContainerStopped(row.status)"
|
||||
:loading="actionLoadingMap[row.containerId] === 'stop'"
|
||||
/>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="详情" placement="top" :show-after="200">
|
||||
<el-button
|
||||
link
|
||||
|
||||
Reference in New Issue
Block a user