Browse Source

revert(gui-v2): revert audit tab layout and fix var use

pull/2734/head
braks 2 years ago
parent
commit
f5048fe42f
  1. 12
      packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue

12
packages/nc-gui-v2/components/dashboard/settings/AuditTab.vue

@ -35,7 +35,7 @@ async function loadAudits(page: number, limit: number) {
}) })
audits = list audits = list
totalRows = pageInfo.totalRows ?? 0 totalRows = 100
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {
@ -46,7 +46,7 @@ async function loadAudits(page: number, limit: number) {
onMounted(async () => { onMounted(async () => {
if (audits === null) { if (audits === null) {
await loadProject(projectId) await loadProject(projectId)
await loadAudits(page.value, limit.value) await loadAudits(currentPage.value, currentLimit.value)
} }
}) })
@ -84,10 +84,7 @@ const columns = [
</script> </script>
<template> <template>
<div class="flex flex-col items-center gap-4 w-full"> <div class="flex flex-col gap-4 w-full">
<a-table class="w-full" :data-source="audits ?? []" :columns="columns" :pagination="false" :loading="isLoading" />
<div class="flex flex-wrap items-center justify-center gap-4">
<a-button class="self-start" @click="loadAudits"> <a-button class="self-start" @click="loadAudits">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" /> <MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" />
@ -95,6 +92,8 @@ const columns = [
</div> </div>
</a-button> </a-button>
<a-table class="w-full" :data-source="audits ?? []" :columns="columns" :pagination="false" :loading="isLoading" />
<a-pagination <a-pagination
v-model:current="currentPage" v-model:current="currentPage"
:page-size="currentLimit" :page-size="currentLimit"
@ -103,5 +102,4 @@ const columns = [
@change="loadAudits" @change="loadAudits"
/> />
</div> </div>
</div>
</template> </template>

Loading…
Cancel
Save