mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-10 03:30:53 +08:00
feat: 进程守护状态增加信息列 (#1873)
This commit is contained in:
parent
075ae253a1
commit
0c4400d6f7
6 changed files with 37 additions and 6 deletions
|
|
@ -37,4 +37,5 @@ type ProcessStatus struct {
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
PID string `json:"PID"`
|
PID string `json:"PID"`
|
||||||
Uptime string `json:"uptime"`
|
Uptime string `json:"uptime"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -540,6 +540,8 @@ func getProcessStatus(config *response.SupervisorProcessConfig) error {
|
||||||
if fields[1] == "RUNNING" {
|
if fields[1] == "RUNNING" {
|
||||||
status.PID = strings.TrimSuffix(fields[3], ",")
|
status.PID = strings.TrimSuffix(fields[3], ",")
|
||||||
status.Uptime = fields[5]
|
status.Uptime = fields[5]
|
||||||
|
} else {
|
||||||
|
status.Msg = strings.Join(fields[2:], " ")
|
||||||
}
|
}
|
||||||
config.Status = append(config.Status, status)
|
config.Status = append(config.Status, status)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1682,6 +1682,7 @@ const message = {
|
||||||
serviceNameHelper: 'Currently only supports the Supervisor service managed by systemctl',
|
serviceNameHelper: 'Currently only supports the Supervisor service managed by systemctl',
|
||||||
restartHelper:
|
restartHelper:
|
||||||
'Initialization will restart the service, causing all the original daemon processes to close',
|
'Initialization will restart the service, causing all the original daemon processes to close',
|
||||||
|
msg: 'Message',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1594,6 +1594,7 @@ const message = {
|
||||||
initHelper: '尚未初始化 Supervisor ,請先初始化',
|
initHelper: '尚未初始化 Supervisor ,請先初始化',
|
||||||
serviceNameHelper: '當前僅支持 systemctl 管理的 Supervisor 服務',
|
serviceNameHelper: '當前僅支持 systemctl 管理的 Supervisor 服務',
|
||||||
restartHelper: '初始化會重啟服務,導致原有的守護進程全部關閉',
|
restartHelper: '初始化會重啟服務,導致原有的守護進程全部關閉',
|
||||||
|
msg: '信息',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1596,6 +1596,7 @@ const message = {
|
||||||
initHelper: '尚未初始化 Supervisor ,请先初始化',
|
initHelper: '尚未初始化 Supervisor ,请先初始化',
|
||||||
serviceNameHelper: '当前仅支持 systemctl 管理的 Supervisor 服务',
|
serviceNameHelper: '当前仅支持 systemctl 管理的 Supervisor 服务',
|
||||||
restartHelper: '初始化会重启服务,导致原有的守护进程全部关闭',
|
restartHelper: '初始化会重启服务,导致原有的守护进程全部关闭',
|
||||||
|
msg: '信息',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,18 @@
|
||||||
<template #main v-if="showTable">
|
<template #main v-if="showTable">
|
||||||
<ComplexTable :data="data" :class="{ mask: !supervisorStatus.isRunning }">
|
<ComplexTable :data="data" :class="{ mask: !supervisorStatus.isRunning }">
|
||||||
<el-table-column :label="$t('commons.table.name')" fix prop="name" width="150px"></el-table-column>
|
<el-table-column :label="$t('commons.table.name')" fix prop="name" width="150px"></el-table-column>
|
||||||
<el-table-column :label="$t('tool.supervisor.command')" prop="command"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column :label="$t('tool.supervisor.dir')" prop="dir"></el-table-column>
|
:label="$t('tool.supervisor.command')"
|
||||||
|
prop="command"
|
||||||
|
fix
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('tool.supervisor.dir')"
|
||||||
|
prop="dir"
|
||||||
|
fix
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
<el-table-column :label="$t('tool.supervisor.user')" prop="user" width="100px"></el-table-column>
|
<el-table-column :label="$t('tool.supervisor.user')" prop="user" width="100px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('tool.supervisor.numprocs')"
|
:label="$t('tool.supervisor.numprocs')"
|
||||||
|
|
@ -45,11 +55,26 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="name"
|
property="name"
|
||||||
:label="$t('commons.table.name')"
|
:label="$t('commons.table.name')"
|
||||||
width="300"
|
fix
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
property="status"
|
||||||
|
:label="$t('commons.table.status')"
|
||||||
|
width="100px"
|
||||||
|
/>
|
||||||
|
<el-table-column property="PID" label="PID" width="100px" />
|
||||||
|
<el-table-column
|
||||||
|
property="uptime"
|
||||||
|
:label="$t('tool.supervisor.uptime')"
|
||||||
|
width="100px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
property="msg"
|
||||||
|
:label="$t('tool.supervisor.msg')"
|
||||||
|
fix
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column property="status" :label="$t('commons.table.status')" />
|
|
||||||
<el-table-column property="PID" label="PID" />
|
|
||||||
<el-table-column property="uptime" :label="$t('tool.supervisor.uptime')" />
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue