mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-02 04:56:31 +08:00
parent
ffadc6721b
commit
e8059d3676
5 changed files with 19 additions and 6 deletions
|
|
@ -16,7 +16,7 @@
|
|||
<template #rightToolBar>
|
||||
<TableSearch @search="search()" v-model:searchName="searchName" />
|
||||
<TableRefresh @search="search()" />
|
||||
<TableSetting title="container-refresh" @search="search()" />
|
||||
<TableSetting title="container-refresh" @search="refresh()" />
|
||||
</template>
|
||||
<template #main>
|
||||
<el-row v-if="data.length > 0 || isOnCreate" :gutter="20" class="row-box">
|
||||
|
|
@ -475,6 +475,20 @@ const loadTableHeight = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const refresh = async () => {
|
||||
if (!isActive.value || !isExist.value) {
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
info: searchName.value,
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
};
|
||||
await searchCompose(params).then((res) => {
|
||||
data.value = res.data.items || [];
|
||||
});
|
||||
};
|
||||
|
||||
const search = async (withRefreshDetail?: boolean) => {
|
||||
if (!isActive.value || !isExist.value) {
|
||||
return;
|
||||
|
|
@ -484,7 +498,6 @@ const search = async (withRefreshDetail?: boolean) => {
|
|||
page: 1,
|
||||
pageSize: 100,
|
||||
};
|
||||
isOnCreate.value = false;
|
||||
loading.value = true;
|
||||
await searchCompose(params)
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -649,7 +649,7 @@ const onTerminal = (row: any) => {
|
|||
};
|
||||
|
||||
const onInspect = async (row: any) => {
|
||||
const res = await inspect({ id: row.containerID, type: 'container' });
|
||||
const res = await inspect({ id: row.containerID, type: 'container', detail: '' });
|
||||
containerInspectRef.value!.acceptParams({ data: res.data, ports: row.ports });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ const changePinned = (row: any, isPinned: boolean) => {
|
|||
};
|
||||
|
||||
const onInspect = async (id: string) => {
|
||||
const res = await inspect({ id: id, type: 'image' });
|
||||
const res = await inspect({ id: id, type: 'image', detail: '' });
|
||||
let detailInfo = JSON.stringify(JSON.parse(res.data), null, 2);
|
||||
let param = {
|
||||
header: i18n.global.t('commons.button.view'),
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ const batchDelete = async (row: Container.NetworkInfo | null) => {
|
|||
};
|
||||
|
||||
const onInspect = async (id: string) => {
|
||||
const res = await inspect({ id: id, type: 'network' });
|
||||
const res = await inspect({ id: id, type: 'network', detail: '' });
|
||||
let networkData = JSON.parse(res.data);
|
||||
detailDrawerRef.value!.acceptParams({ data: networkData });
|
||||
};
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ const search = async () => {
|
|||
};
|
||||
|
||||
const onInspect = async (id: string) => {
|
||||
const res = await inspect({ id: id, type: 'volume' });
|
||||
const res = await inspect({ id: id, type: 'volume', detail: '' });
|
||||
let detailInfo = JSON.stringify(JSON.parse(res.data), null, 2);
|
||||
let param = {
|
||||
header: i18n.global.t('commons.button.view'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue