mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 20:49:03 +08:00
feat: 已安装页面增加定时刷新
This commit is contained in:
parent
31990c7735
commit
20a57cc5ab
@ -32,6 +32,9 @@
|
||||
<el-tag type="error">{{ row.status }}</el-tag>
|
||||
</template>
|
||||
</el-popover>
|
||||
<el-icon v-if="row.status === 'Installing'" class="is-loading">
|
||||
<Loading />
|
||||
</el-icon>
|
||||
<el-tag v-else>{{ row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -87,7 +90,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GetAppInstalled, InstalledOp, SyncInstalledApp, GetAppUpdateVersions } from '@/api/modules/app';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import ComplexTable from '@/components/complex-table/index.vue';
|
||||
import { dateFromat } from '@/utils/util';
|
||||
import i18n from '@/lang';
|
||||
@ -97,6 +100,7 @@ import { App } from '@/api/interface/app';
|
||||
|
||||
let data = ref<any>();
|
||||
let loading = ref(false);
|
||||
let timer: NodeJS.Timer | null = null;
|
||||
const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
@ -245,6 +249,13 @@ const openBackups = (installId: number) => {
|
||||
|
||||
onMounted(() => {
|
||||
search();
|
||||
timer = setInterval(() => {
|
||||
search();
|
||||
}, 1000 * 8);
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
clearInterval(Number(timer));
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -39,9 +39,9 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
// host: '0.0.0.0',
|
||||
// https: false,
|
||||
proxy: {
|
||||
'/1panel': {
|
||||
target: 'http://0.0.0.0:4004',
|
||||
},
|
||||
// '/1panel': {
|
||||
// target: 'http://0.0.0.0:4004',
|
||||
// },
|
||||
'/api/v1': {
|
||||
target: 'http://127.0.0.1:9999',
|
||||
changeOrigin: true,
|
||||
|
Loading…
Reference in New Issue
Block a user