feat: 应用菜单改名概览并作为默认页
This commit is contained in:
1 parent
f2c1a52a2e
commit
95f62256b3
3 files changed
+9
-3
No files matched your search
+2
-2
@@ -69,7 +69,7 @@ function toast(msg, err) {
|
||||
}
|
||||
|
||||
/* ---------------- 路由 ---------------- */
|
||||
const TITLES = { apps: '应用', containers: '运行的容器', stopped: '停止的容器', images: '本地镜像', registry: '镜像仓库', networks: '网络', settings: '告警设置' };
|
||||
const TITLES = { apps: '概览', containers: '运行的容器', stopped: '停止的容器', images: '本地镜像', registry: '镜像仓库', networks: '网络', settings: '告警设置' };
|
||||
const SORTS = {
|
||||
apps: [['severity', '异常优先'], ['cpu', 'CPU 占用'], ['mem', '内存占用'], ['containers', '容器数'], ['name', '名称']],
|
||||
containers: [['cpu', 'CPU 占用'], ['mem', '内存占用'], ['net', '网络速率'], ['io', '磁盘 IO'], ['pids', '进程数'], ['name', '名称']],
|
||||
@@ -329,7 +329,7 @@ async function openApp(key) {
|
||||
</div>
|
||||
<div id="appTabBody"></div>`;
|
||||
|
||||
$('#backBtn').onclick = () => { $('#pageTitle').textContent = '应用'; go('apps'); };
|
||||
$('#backBtn').onclick = () => { $('#pageTitle').textContent = '概览'; go('apps'); };
|
||||
$$('#view [data-app-act]').forEach(b => b.onclick = async () => {
|
||||
const act = b.dataset.appAct;
|
||||
if (act === 'stop' && !confirm('确定停止该应用的全部容器?')) return;
|
||||
|
||||
Reference in new issue
Block a user