Browse Source

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

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

36
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,24 +84,22 @@ 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-button class="self-start" @click="loadAudits">
<div class="flex items-center gap-2">
<MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" />
Reload
</div>
</a-button>
<a-table class="w-full" :data-source="audits ?? []" :columns="columns" :pagination="false" :loading="isLoading" /> <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-pagination
<a-button class="self-start" @click="loadAudits"> v-model:current="currentPage"
<div class="flex items-center gap-2"> :page-size="currentLimit"
<MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" /> :total="totalRows"
Reload show-less-items
</div> @change="loadAudits"
</a-button> />
<a-pagination
v-model:current="currentPage"
:page-size="currentLimit"
:total="totalRows"
show-less-items
@change="loadAudits"
/>
</div>
</div> </div>
</template> </template>

Loading…
Cancel
Save