|
2 | 2 | <div> |
3 | 3 | <RouterMenu /> |
4 | 4 | <LayoutContent :title="'PHP'" v-loading="loading"> |
5 | | - <template #prompt> |
6 | | - <el-alert type="info" :closable="false"> |
7 | | - <template #title> |
8 | | - <span>{{ $t('runtime.systemRestartHelper') }}</span> |
9 | | - </template> |
10 | | - </el-alert> |
11 | | - </template> |
| 5 | + <template #prompt></template> |
12 | 6 | <template #leftToolBar> |
13 | 7 | <el-button type="primary" @click="openCreate"> |
14 | 8 | {{ $t('runtime.create') }} |
|
22 | 16 | {{ $t('container.cleanBuildCache') }} |
23 | 17 | </el-button> |
24 | 18 | </template> |
| 19 | + <template #rightToolBar> |
| 20 | + <TableRefresh @search="search()" /> |
| 21 | + <TableSetting title="php-runtime-refresh" @search="search()" /> |
| 22 | + </template> |
25 | 23 | <template #main> |
26 | 24 | <ComplexTable :pagination-config="paginationConfig" :data="items" @search="search()" :heightDiff="350"> |
27 | 25 | <el-table-column |
|
101 | 99 | <Log ref="logRef" @close="search" :heightDiff="280" /> |
102 | 100 | <Extensions ref="extensionsRef" @close="search" /> |
103 | 101 | <AppResources ref="checkRef" @close="search" /> |
104 | | - <ExtManagement ref="extManagementRef" @close="search" /> |
| 102 | + <ExtManagement ref="extManagementRef" /> |
105 | 103 | <ComposeLogs ref="composeLogRef" /> |
106 | 104 | <Config ref="configRef" /> |
107 | 105 | <Supervisor ref="supervisorRef" /> |
108 | 106 | </div> |
109 | 107 | </template> |
110 | 108 |
|
111 | 109 | <script setup lang="ts"> |
112 | | -import { onMounted, onUnmounted, reactive, ref } from 'vue'; |
| 110 | +import { onMounted, reactive, ref } from 'vue'; |
113 | 111 | import { Runtime } from '@/api/interface/runtime'; |
114 | 112 | import { DeleteRuntime, OperateRuntime, RuntimeDeleteCheck, SearchRuntimes } from '@/api/modules/runtime'; |
115 | 113 | import { dateFormat } from '@/utils/util'; |
@@ -146,7 +144,6 @@ let req = reactive<Runtime.RuntimeReq>({ |
146 | 144 | pageSize: 40, |
147 | 145 | type: 'php', |
148 | 146 | }); |
149 | | -let timer: NodeJS.Timer | null = null; |
150 | 147 | const opRef = ref(); |
151 | 148 | const logRef = ref(); |
152 | 149 | const extensionsRef = ref(); |
@@ -265,7 +262,7 @@ const openLog = (row: Runtime.RuntimeDTO) => { |
265 | 262 | if (row.status == 'Running') { |
266 | 263 | composeLogRef.value.acceptParams({ compose: row.path + '/docker-compose.yml', resource: row.name }); |
267 | 264 | } else { |
268 | | - logRef.value.acceptParams({ id: row.id, type: 'php', tail: row.status == 'building', heightDiff: 220 }); |
| 265 | + logRef.value.acceptParams({ id: row.id, type: 'php', tail: row.status == 'Building', heightDiff: 220 }); |
269 | 266 | } |
270 | 267 | }; |
271 | 268 |
|
@@ -348,14 +345,6 @@ const onOpenBuildCache = () => { |
348 | 345 |
|
349 | 346 | onMounted(() => { |
350 | 347 | search(); |
351 | | - timer = setInterval(() => { |
352 | | - search(); |
353 | | - }, 10000 * 1); |
354 | | -}); |
355 | | -
|
356 | | -onUnmounted(() => { |
357 | | - clearInterval(Number(timer)); |
358 | | - timer = null; |
359 | 348 | }); |
360 | 349 | </script> |
361 | 350 |
|
|
0 commit comments