Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pod status and failedreason, fix app pod and pvc which is not juicefs #1041

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions dashboard-ui-v2/src/components/pv-basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const PVBasic: React.FC<{
<Link
to={`/pvcs/${record.spec?.claimRef?.namespace}/${record.spec?.claimRef?.name}`}
>
{record.spec?.claimRef?.namespace}
{record.spec?.claimRef?.namespace}/{record.spec.claimRef?.name}
</Link>
)
},
Expand Down Expand Up @@ -122,12 +122,10 @@ const PVBasic: React.FC<{
},
{
title: 'volumeHandle',
key: 'volumeHandle',
dataIndex: 'volumeHandle',
dataIndex: ['spec', 'csi', 'volumeHandle'],
},
{
title: <FormattedMessage id="status" />,
key: 'status',
dataIndex: 'status',
valueType: 'select',
render: (_, pv) => {
Expand All @@ -138,8 +136,11 @@ const PVBasic: React.FC<{
},
{
title: <FormattedMessage id="createAt" />,
key: 'time',
dataIndex: 'time',
dataIndex: ['metadata', 'creationTimestamp'],
render: (_, row) =>
new Date(
row.metadata?.creationTimestamp as string,
).toLocaleString(),
},
]}
/>
Expand Down
12 changes: 6 additions & 6 deletions dashboard-ui-v2/src/components/pvc-basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const PVCBasic: React.FC<{
},
{
title: <FormattedMessage id="capacity" />,
dataIndex: ['spec', 'capacity', 'storage'],
dataIndex: ['spec', 'resources', 'requests', 'storage'],
},
{
title: <FormattedMessage id="accessMode" />,
Expand All @@ -92,10 +92,6 @@ const PVCBasic: React.FC<{
?.map((mode) => accessModeMap[mode] || 'Unknown')
.join(','),
},
{
title: <FormattedMessage id="reclaimPolicy" />,
dataIndex: ['spec', 'persistentVolumeReclaimPolicy'],
},
{
title: 'StorageClass',
dataIndex: ['spec', 'storageClassName'],
Expand All @@ -121,7 +117,11 @@ const PVCBasic: React.FC<{
},
{
title: <FormattedMessage id="createAt" />,
dataIndex: 'time',
dataIndex: ['metadata', 'creationTimestamp'],
render: (_, row) =>
new Date(
row.metadata?.creationTimestamp as string,
).toLocaleString(),
},
]}
/>
Expand Down
11 changes: 11 additions & 0 deletions dashboard-ui-v2/src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export default {
nodeErrMsg: 'The node is abnormal, please check the node status.',
containerErrMsg:
'Some container is abnormal. Please click Pod details to view the container status and logs.',
mountPodTerminatingMsg: 'Mount Pod is in terminating and has finalizer, please check the CSI Node logs',
mountPodStickTerminatingMsg: 'Mount Pod is stuck in Terminating, please check whether there is an undisconnected FUSE request on the node',
mountContainUidMsg: 'Mount Pod still contain its uid,please check logs of CSI Node',
podFinalizerMsg: 'There are still finalizers in the Pod. Please check the finalizer\'s status.',
csiNodeNullMsg:
'CSI Node in the node did not start, please check: 1. If it is in sidecar mode, please check whether the namespace has set the required label or check the CSI Controller log to confirm why the sidecar is not injected; 2. If it is in Mount Pod mode, please check Whether CSI Node DaemonSet has been scheduled to this node.',
csiNodeErrMsg:
Expand All @@ -80,11 +84,18 @@ export default {
'No matching PV was found. Please click "PV" to check whether it has been created.',
pvcOfPVNotFoundErrMsg:
'No matching PVC was found. Please click "PVC" to check whether it has been created.',
waitingPVCDeleteMsg: 'Waiting for matching PVC to be deleted. Please click "PVC" for detail.',
waitingVolumeRecycleMsg: 'Waiting for volumes to be recycled.',
volumeRecycleFailedMsg: 'the volumes were failed to be recycled.',
volumeAttributes: 'Volume Attributes',
parameters: 'Parameters',
type: 'Type',
reason: 'Reason',
from: 'From',
message: 'Message',
action: 'Action',
docs: 'Documents',
save: 'Save',
config: 'Configs',
reset: 'Reset',
}
7 changes: 7 additions & 0 deletions dashboard-ui-v2/src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export default {
unScheduledMsg: '未调度成功,请点击 Pod 详情查看调度失败的具体原因。',
nodeErrMsg: '所在节点异常,请检查节点状态。',
containerErrMsg: '有容器启动异常,请点击 Pod 详情查看容器状态及日志。',
mountPodTerminatingMsg: 'Mount Pod 还在 Terminating 状态且存在 finalizer,请检查 CSI Node 日志',
mountPodStickTerminatingMsg: 'Mount Pod 卡在 Terminating 状态,请检查节点上是否存在未断开的 FUSE 请求',
mountContainUidMsg: 'Mount Pod 还记录其 uid,请检查 CSI Node 日志',
podFinalizerMsg: 'Pod 还存在 finalizer 未处理完,请查看 finalizer 状态',
csiNodeNullMsg:
'所在节点 CSI Node 未启动,请检查:1. 若是 sidecar 模式,请查看其所在 namespace 是否打上需要的 label 或查看 CSI Controller 日志以确认为何 sidecar 未注入;2. 若是 Mount Pod 模式,请检查 CSI Node DaemonSet 是否未调度到该节点上。',
csiNodeErrMsg:
Expand All @@ -75,6 +79,9 @@ export default {
'未找到符合 PVC 条件的 PV,请点击「PV」查看其是否被创建。',
pvcOfPVNotFoundErrMsg:
'未找到符合 PV 条件的 PVC,请点击「PVC」查看其是否被创建。',
waitingPVCDeleteMsg: '对应的 PVC 未被删除,请点击「PVC」查看详情。',
waitingVolumeRecycleMsg: '等待管理员回收 volume',
volumeRecycleFailedMsg: 'volume 回收失败',
volumeAttributes: '卷属性',
parameters: '参数',
type: '类型',
Expand Down
4 changes: 2 additions & 2 deletions dashboard-ui-v2/src/pages/sys-pod-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Link } from 'react-router-dom'
import { useSysAppPods } from '@/hooks/use-api'
import { Pod } from '@/types/k8s'
import {
failedReasonOfAppPod,
failedReasonOfMountPod,
getNodeStatusBadge,
getPodStatusBadge,
podStatus,
Expand All @@ -36,7 +36,7 @@ const columns: ProColumns<Pod>[] = [
title: <FormattedMessage id="name" />,
dataIndex: ['metadata', 'name'],
render: (_, pod) => {
const podFailReason = failedReasonOfAppPod(pod) || ''
const podFailReason = failedReasonOfMountPod(pod) || ''
if (podFailReason === '') {
return (
<Link to={`/pods/${pod.metadata?.namespace}/${pod.metadata?.name}`}>
Expand Down
Loading
Loading