fix: fix the zun-ui

1. supplement the task_state of zun containers

2. add search filters to action logs

3. fix the name filter in zun services

Change-Id: I1638b3150059225b582a6e2a14e66b022934033b
This commit is contained in:
xusongfu 2023-02-15 15:00:08 +08:00
parent 974427c3d8
commit 01ea21d118
6 changed files with 38 additions and 3 deletions

View File

@ -435,11 +435,14 @@
"Container Format": "Container Format",
"Container Killing": "Container Killing",
"Container Name": "Container Name",
"Container Pausing": "Container Pausing",
"Container Rebooting": "Container Rebooting",
"Container Rebuilding": "Container Rebuilding",
"Container Restarting": "Container Restarting",
"Container Starting": "Container Starting",
"Container Status": "Container Status",
"Container Stopping": "Container Stopping",
"Container Unpausing": "Container Unpausing",
"Container Version": "Container Version",
"Containers": "Containers",
"Containers CPU": "Containers CPU",
@ -1164,6 +1167,7 @@
"Image Info": "Image Info",
"Image Name": "Image Name",
"Image Pending Upload": "Image Pending Upload",
"Image Pulling": "Image Pulling",
"Image Size": "Image Size",
"Image Snapshot Pending": "Image Snapshot Pending",
"Image Uploading": "Image Uploading",
@ -1528,7 +1532,9 @@
"Netherlands": "Netherlands",
"Netherlands Antilles": "Netherlands Antilles",
"Network": "Network",
"Network Attaching": "Network Attaching",
"Network Config": "Network Config",
"Network Detaching": "Network Detaching",
"Network Detail": "Network Detail",
"Network Driver": "Network Driver",
"Network Dropped Packets": "Network Dropped Packets",
@ -2061,6 +2067,8 @@
"Security Group Rule": "Security Group Rule",
"Security Group Rules": "Security Group Rules",
"Security Groups": "Security Groups",
"Security Groups Adding": "Security Groups Adding",
"Security Groups Removing": "Security Groups Removing",
"Security Info": "Security Info",
"Segmentation ID": "Segmentation ID",
"Segmentation Id": "Segmentation Id",

View File

@ -435,11 +435,14 @@
"Container Format": "容器格式",
"Container Killing": "容器终止中",
"Container Name": "容器名称",
"Container Pausing": "容器暂停中",
"Container Rebooting": "容器重启中",
"Container Rebuilding": "容器重建中",
"Container Restarting": "容器重启中",
"Container Starting": "容器启动中",
"Container Status": "容器状态",
"Container Stopping": "容器关闭中",
"Container Unpausing": "容器恢复中",
"Container Version": "容器版本",
"Containers": "容器",
"Containers CPU": "容器 CPU",
@ -1164,6 +1167,7 @@
"Image Info": "镜像信息",
"Image Name": "镜像名称",
"Image Pending Upload": "镜像待上传",
"Image Pulling": "镜像拉取中",
"Image Size": "镜像大小",
"Image Snapshot Pending": "镜像快照等待上传",
"Image Uploading": "镜像上传中",
@ -1528,7 +1532,9 @@
"Netherlands": "荷兰",
"Netherlands Antilles": "荷兰安的列斯群岛",
"Network": "网络",
"Network Attaching": "网络绑定中",
"Network Config": "网络配置",
"Network Detaching": "网络解绑中",
"Network Detail": "网络详情",
"Network Driver": "网络驱动程序",
"Network Dropped Packets": "网络丢包率",
@ -2061,6 +2067,8 @@
"Security Group Rule": "安全组规则",
"Security Group Rules": "安全组规则",
"Security Groups": "安全组",
"Security Groups Adding": "安全组绑定中",
"Security Groups Removing": "安全组移除中",
"Security Info": "安全信息",
"Segmentation ID": "段ID",
"Segmentation Id": "分段ID",

View File

@ -28,7 +28,7 @@ export class Resize extends ModalAction {
static title = t('Resize Cluster');
policy = 'cluster:resize';
static policy = 'cluster:resize';
static get modalSize() {
return 'middle';

View File

@ -15,7 +15,8 @@
import Base from 'containers/List';
import { inject, observer } from 'mobx-react';
import { ActionsLogStore } from 'src/stores/zun/action-log';
import { actionColumn } from 'resources/zun/actions';
import { actionColumn, actionMap } from 'resources/zun/actions';
import { getOptions } from 'utils';
export class ActionLogs extends Base {
init() {
@ -31,6 +32,16 @@ export class ActionLogs extends Base {
}
getColumns = () => actionColumn(this);
get searchFilters() {
return [
{
label: t('Operation Name'),
name: 'action',
options: getOptions(actionMap),
},
];
}
}
export default inject('rootStore')(observer(ActionLogs));

View File

@ -84,7 +84,7 @@ export class Services extends Base {
return [
{
label: t('Name'),
name: 'name',
name: 'binary',
},
{
label: t('Service State'),

View File

@ -34,6 +34,14 @@ export const containerTaskStatus = {
container_deleting: t('Container Deleting'),
container_rebuilding: t('Container Rebuilding'),
container_killing: t('Container Killing'),
container_pausing: t('Container Pausing'),
container_unpausing: t('Container Unpausing'),
container_restarting: t('Container Restarting'),
image_pulling: t('Image Pulling'),
sg_adding: t('Security Groups Adding'),
sg_removing: t('Security Groups Removing'),
network_attaching: t('Network Attaching'),
network_detaching: t('Network Detaching'),
};
const states = {