Skip to content

Commit

Permalink
[UXE-6359] feat: add export to csv button to waf rules tuning page (#…
Browse files Browse the repository at this point in the history
…2194)

* feat: add export to csv button to waf rules tuning page

* fix: change responsive layout
  • Loading branch information
aloisio-m-bastian authored Feb 24, 2025
1 parent 00d9101 commit e9aed79
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/templates/list-table-block/with-selection-behavior.vue
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
}
}
defineExpose({ reload, data })
defineExpose({ reload, data, handleExportTableDataToCSV })
const extractFieldValue = (rowData, field) => {
return rowData[field]
Expand Down
34 changes: 28 additions & 6 deletions src/views/WafRules/ListWafRulesTuning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,30 @@
/>
</div>
</div>
<advancedFilter
v-model:externalFilter="selectedFilter"
v-model:filterAdvanced="selectedFilterAdvanced"
:fieldsInFilter="listFields"
@applyFilter="filterSearch"
/>
<div class="flex flex-col md:flex-row md:items-center gap-2">
<advancedFilter
v-model:externalFilter="selectedFilter"
v-model:filterAdvanced="selectedFilterAdvanced"
:fieldsInFilter="listFields"
@applyFilter="filterSearch"
/>
<PrimeButton
class="md:hidden"
outlined
size="small"
label="Export to CSV"
icon="pi pi-download"
@click="downloadCSV"
/>
<PrimeButton
class="hidden md:flex"
outlined
size="small"
icon="pi pi-download"
v-tooltip.bottom="{ value: 'Export to CSV', showDelay: 200 }"
@click="downloadCSV"
/>
</div>
</div>
<ListTableBlock
v-show="showListTable"
Expand Down Expand Up @@ -347,6 +365,10 @@
filterTuning()
}
const downloadCSV = () => {
listServiceWafTunningRef.value?.handleExportTableDataToCSV()
}
const showToast = (summary, severity) => {
return toast.add({
severity,
Expand Down

0 comments on commit e9aed79

Please sign in to comment.