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