mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat: 启动中的 node.js 运行环境放开编辑、停止等操作 (#2466)
This commit is contained in:
parent
fefb312f50
commit
124d1e8884
@ -128,7 +128,7 @@ const buttons = [
|
||||
operateRuntime('down', row.id);
|
||||
},
|
||||
disabled: function (row: Runtime.Runtime) {
|
||||
return disabledRuntime(row) || row.status === 'stopped';
|
||||
return row.status === 'recreating' || row.status === 'stopped';
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -137,7 +137,7 @@ const buttons = [
|
||||
operateRuntime('up', row.id);
|
||||
},
|
||||
disabled: function (row: Runtime.Runtime) {
|
||||
return disabledRuntime(row) || row.status === 'running';
|
||||
return row.status === 'starting' || row.status === 'recreating' || row.status === 'running';
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -146,7 +146,7 @@ const buttons = [
|
||||
operateRuntime('restart', row.id);
|
||||
},
|
||||
disabled: function (row: Runtime.Runtime) {
|
||||
return disabledRuntime(row);
|
||||
return row.status === 'recreating';
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -155,7 +155,7 @@ const buttons = [
|
||||
openDetail(row);
|
||||
},
|
||||
disabled: function (row: Runtime.Runtime) {
|
||||
return disabledRuntime(row);
|
||||
return row.status === 'recreating';
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -166,10 +166,6 @@ const buttons = [
|
||||
},
|
||||
];
|
||||
|
||||
const disabledRuntime = (row: Runtime.Runtime) => {
|
||||
return row.status === 'starting' || row.status === 'recreating';
|
||||
};
|
||||
|
||||
const search = async () => {
|
||||
req.page = paginationConfig.currentPage;
|
||||
req.pageSize = paginationConfig.pageSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user