fix(host): 主机列表页设为只读

Remove add/edit/delete buttons and auth attributes from host list page. Hosts are auto-registered via heartbeat, manual CRUD is meaningless. Keep only setMaster operation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
augushong
2026-05-26 18:28:50 +08:00
parent e558a97e91
commit b7094eee8a
2 changed files with 3 additions and 9 deletions

View File

@@ -2,12 +2,8 @@
<div class="layuimini-main">
<table id="currentTable" class="layui-table layui-hide"
data-auth-index="{:auth('system.host/index')}"
data-auth-add="{:auth('system.host/add')}"
data-auth-edit="{:auth('system.host/edit')}"
data-auth-delete="{:auth('system.host/delete')}"
data-auth-export="{:auth('system.host/export')}"
data-auth-modify="{:auth('system.host/modify')}"
data-auth-set-master="{:auth('system.host/setMaster')}"
data-auth-modify="{:auth('system.host/modify')}"
lay-filter="currentTable">
</table>
</div>

View File

@@ -21,8 +21,7 @@ $(function(){
{field: 'disk_free', title: '磁盘可用空间'},
{field: 'disk_total', title: '磁盘总空间'},
{field: 'create_time', title: '首次运行时间'},
{width: 300, title: '操作', templet: ua.table.tool, operat: [
'edit',
{width: 200, title: '操作', templet: ua.table.tool, operat: [
[{
text: '设为主节点',
url: init.set_master_url,
@@ -36,8 +35,7 @@ $(function(){
_if: function(data) {
return data.status == 1 && data.is_master != 1;
}
}],
'delete'
}]
], fixed:'right'},
]],