UI update for all tables

This commit is contained in:
Pinga 2025-02-17 11:32:54 +02:00
parent c7b4e3c631
commit 9be8b799cc
21 changed files with 217 additions and 168 deletions

View file

@ -57,6 +57,7 @@
<div class="table-responsive">
<div id="applicationTable"></div>
</div>
<div class="card-footer d-flex align-items-center"><div id="page-count"></div></div>
</div>
</div>
</div>

View file

@ -62,6 +62,7 @@
<div class="table-responsive">
<div id="domainTable"></div>
</div>
<div class="card-footer d-flex align-items-center"><div id="page-count"></div></div>
</div>
</div>
</div>

View file

@ -44,6 +44,7 @@
<div class="table-responsive">
<div id="overviewTable"></div>
</div>
<div class="card-footer d-flex align-items-center"><div id="page-count"></div></div>
</div>
</div>
</div>

View file

@ -44,6 +44,7 @@
<div class="table-responsive">
<div id="transactionTable"></div>
</div>
<div class="card-footer d-flex align-items-center"><div id="page-count"></div></div>
</div>
</div>
</div>

View file

@ -93,6 +93,11 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
paginationCounter:"rows",
paginationCounterElement:"#page-count",
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/dapi/applications",
ajaxURLGenerator: function(url, config, params) {
@ -130,21 +135,22 @@
var lastPage = Math.ceil(response.results / this.options.paginationSize);
return {
last_page: lastPage, // Calculated total number of pages
last_row: response.results, // Total number of rows
data: response.records, // Data for the current page
};
} else {
console.error('Unexpected response format', response);
return { last_page: 1, data: [] };
return { last_page: 1, last_row: 0, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:150, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0},
{title:"{{ __('Applicant') }}", width:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Creation Date') }}", width:250, minWidth:150, field:"crdate", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Phase') }}", width:150, minWidth:100, field:"phase_type", formatter: phaseFormatter, resizable:false, headerSort:true, responsive:2},
@ -178,22 +184,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "applications.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "applications.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Applications"});
table.download("xlsx", "applications.xlsx", {sheetName:"My Applications"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "applications.pdf", {
orientation:"portrait",
title:"My Applications",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Applications"
});
}
</script>

View file

@ -32,6 +32,9 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/api/records/contact",
ajaxURLGenerator: function(url, config, params) {
@ -75,14 +78,14 @@
return { last_page: 1, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Identifier') }}", field:"identifier", width:250, resizable:false, headerSort:true, formatter: contactLinkFormatter, responsive:0},
{title:"{{ __('Identifier') }}", field:"identifier", width:200, resizable:false, headerSort:true, formatter: contactLinkFormatter, responsive:0},
{title:"{{ __('Email') }}", field:"email", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Phone') }}", field:"voice", width:200, minWidth:100, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Creation Date') }}", field:"crdate", width:280, minWidth:100, resizable:true, headerSort:true, responsive:2},
@ -115,22 +118,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "contacts.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "contacts.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Contacts"});
table.download("xlsx", "contacts.xlsx", {sheetName:"My Contacts"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "contacts.pdf", {
orientation:"portrait",
title:"My Contacts",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Contacts"
});
}
</script>

View file

@ -68,6 +68,11 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
paginationCounter:"rows",
paginationCounterElement:"#page-count",
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/dapi/domains",
ajaxURLGenerator: function(url, config, params) {
@ -105,22 +110,23 @@
var lastPage = Math.ceil(response.results / this.options.paginationSize);
return {
last_page: lastPage, // Calculated total number of pages
last_row: response.results, // Total number of rows
data: response.records, // Data for the current page
};
} else {
console.error('Unexpected response format', response);
return { last_page: 1, data: [] };
return { last_page: 1, last_row: 0, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0},
{title:"{{ __('Registrant') }}", width:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Name') }}", field:"name", minWidth:180, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0},
{title:"{{ __('Registrant') }}", minWidth:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Creation Date') }}", width:250, minWidth:150, field:"crdate", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Expiration Date') }}", width:250, minWidth:150, field:"exdate", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Status') }}", width:150, field:"domain_status", formatter: statusFormatter, resizable:false, headerSort:true, download:false, responsive:2},
@ -177,22 +183,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "domains.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "domains.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Domains"});
table.download("xlsx", "domains.xlsx", {sheetName:"My Domains"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "domains.pdf", {
orientation:"portrait",
title:"My Domains",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Domains"
});
}
</script>

View file

@ -32,6 +32,9 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/api/records/host",
ajaxURLGenerator: function(url, config, params) {
@ -74,14 +77,14 @@
return { last_page: 1, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Host Name') }}", field:"name", width:300, minWidth:150, resizable:false, headerSort:true, formatter: hostLinkFormatter, responsive:0},
{title:"{{ __('Host Name') }}", field:"name", minWidth:150, resizable:false, headerSort:true, formatter: hostLinkFormatter, responsive:0},
{title:"{{ __('Creation Date') }}", field:"crdate", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Last Updated') }}", field:"lastupdate", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort:false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){
@ -114,22 +117,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "hosts.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "hosts.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Hosts"});
table.download("xlsx", "hosts.xlsx", {sheetName:"My Hosts"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "hosts.pdf", {
orientation:"portrait",
title:"My Hosts",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Hosts"
});
}
</script>

View file

@ -22,11 +22,14 @@
ajaxURL:"/api/records/invoices?join=registrar", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -36,10 +39,10 @@
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Number') }}", field:"invoice_number", width:200, resizable:false, headerSort:true, formatter: invoiceLinkFormatter, responsive:0},
{title:"{{ __('Registrar') }}", field:"registrar_id.name", width:300, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Date') }}", field:"issue_date", width:300, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Amount') }}", field:"total_amount", width:200, resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){
{title:"{{ __('Number') }}", field:"invoice_number", minWidth:200, resizable:false, headerSort:true, formatter: invoiceLinkFormatter, responsive:0},
{title:"{{ __('Registrar') }}", field:"registrar_id.name", minWidth:300, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Date') }}", field:"issue_date", minWidth:300, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Amount') }}", field:"total_amount", minWidth:200, resizable:false, headerSort:true, responsive:2, formatter:"money", formatterParams:function(cell){
return {
decimal: ".",
thousand: " ",
@ -71,22 +74,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "invoices.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "invoices.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Invoices"});
table.download("xlsx", "invoices.xlsx", {sheetName:"My Invoices"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "invoices.pdf", {
orientation:"portrait",
title:"My Invoices",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Invoices"
});
}
</script>

View file

@ -11,11 +11,14 @@
ajaxURL:"/api/records/error_log", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -25,8 +28,8 @@
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Channel') }}", field:"channel", minWidth:200, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Level') }}", field:"level_name", resizable:false, minWidth:200, headerSort:true, responsive:0},
{title:"{{ __('Channel') }}", field:"channel", minWidth:180, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Level') }}", field:"level_name", resizable:false, minWidth:150, headerSort:true, responsive:0},
{title:"{{ __('Log') }}", field:"message", resizable:false, minWidth:550, headerSort:true, responsive:2},
{title:"{{ __('Date') }}", field:"created_at", resizable:false, minWidth:250, headerSort:true, responsive:2},
]
@ -52,22 +55,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "log.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "log.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Logs"});
table.download("xlsx", "log.xlsx", {sheetName:"My Logs"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "log.pdf", {
orientation:"portrait",
title:"My Logs",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Logs"
});
}
</script>

View file

@ -41,6 +41,9 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxURL: "/log-api/records/transaction_identifier",
ajaxURLGenerator: function(url, config, params) {
var queryParts = [];
@ -78,28 +81,29 @@
dataReceiveParams: {
"last_page": "results", // Mapping 'results' to 'last_page'
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Date') }}", field:"cldate", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Date') }}", field:"cldate", minWidth:200, resizable:false, headerSort:false, responsive:0},
{
title: "{{ __('Registrar') }}",
field: "registrar_id",
resizable:false,
headerSort: false,
responsive: 2,
responsive: 0,
minWidth:120,
formatter: function(cell, formatterParams, onRendered) {
const registrarId = cell.getValue();
const name = getRegistrarNameById(registrarId);
return name; // Return the name directly, as it is synchronously obtained from cache
}
},
{title:"{{ __('Command') }}", field:"cmd", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Object Type') }}", field:"obj_type", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Command') }}", field:"cmd", resizable:false, headerSort:false, responsive:2},
{title:"{{ __('Object Type') }}", field:"obj_type", resizable:false, headerSort:false, responsive:2},
{title:"{{ __('Object') }}", field:"obj_id", resizable:false, headerSort:false, responsive:2},
{title:"{{ __('Result') }}", field:"code", resizable:false, headerSort:false, responsive:2},
{title:"{{ __('Message') }}", field:"msg", resizable:false, headerSort:false, responsive:2, download:false},
@ -114,22 +118,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "logs.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "logs.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My EPP Log"});
table.download("xlsx", "logs.xlsx", {sheetName:"My EPP Log"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "logs.pdf", {
orientation:"portrait",
title:"My EPP Log",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My EPP Log"
});
}
</script>

View file

@ -18,6 +18,11 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
paginationCounter:"rows",
paginationCounterElement:"#page-count",
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/dapi/payments",
ajaxURLGenerator: function(url, config, params) {
@ -54,24 +59,25 @@
var lastPage = Math.ceil(response.results / this.options.paginationSize);
return {
last_page: lastPage, // Calculated total number of pages
last_row: response.results, // Total number of rows
data: response.records, // Data for the current page
};
} else {
console.error('Unexpected response format', response);
return { last_page: 1, data: [] };
return { last_page: 1, last_row: 0, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Registrar') }}", field:"registrar_name", minWidth:150, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Description') }}", field:"description", resizable:false, headerSort:true, responsive:2, formatter:cell => (cell.getElement().setAttribute("title", cell.getValue() || ""), cell.getValue()?.length > 80 ? cell.getValue().substring(0, 80) + "..." : cell.getValue())},
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, width:200, minWidth:100, responsive:0, formatter:"money", formatterParams:function(cell){
{title:"{{ __('Amount') }}", field:"amount", minWidth:150, resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){
return {
decimal: ".",
thousand: " ",
@ -93,22 +99,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "overview.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "overview.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Overview"});
table.download("xlsx", "overview.xlsx", {sheetName:"My Overview"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "overview.pdf", {
orientation:"portrait",
title:"My Overview",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Overview"
});
}
</script>

View file

@ -11,11 +11,14 @@
ajaxURL:"/api/records/poll?join=registrar", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -27,9 +30,9 @@
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('ID') }}", field:"id", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Registrar') }}", field:"registrar_id.name", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Date') }}", field:"qdate", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Message') }}", field:"msg", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Message Type') }}", field:"msg_type", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Date') }}", field:"qdate", minWidth:120, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Message') }}", field:"msg", minWidth:200, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Message Type') }}", field:"msg_type", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Object') }}", field:"obj_name_or_id", resizable:false, headerSort:true, responsive:2},
]
});
@ -55,22 +58,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "poll.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "poll.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Contacts"});
table.download("xlsx", "poll.xlsx", {sheetName:"My Poll Data"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "poll.pdf", {
orientation:"portrait",
title:"My Contacts",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Poll Data"
});
}
</script>

View file

@ -129,11 +129,14 @@
ajaxURL:"/api/records/users_audit", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -146,8 +149,7 @@
{
title: "{{ __('Event') }}",
field: "user_event",
minWidth: 30,
width: 120,
minWidth: 120,
resizable: false,
headerSort: false,
responsive: 0,
@ -159,8 +161,6 @@
{
title: "{{ __('User Agent') }}",
field: "user_agent",
minWidth: 30,
width: 300,
resizable: false,
headerSort: false,
responsive: 2,
@ -173,18 +173,18 @@
{
title: "{{ __('Location') }}",
field: "user_location",
minWidth: 30,
width: 100,
resizable: false,
headerSort: false,
responsive: 0,
minWidth: 30,
width: 100,
responsive: 2,
formatter: function(cell) {
const countryCode = cell.getValue(); // Get the location code, e.g., "UA"
return `<span class="flag flag-country-${countryCode.toLowerCase()}" title="${countryCode}"></span>`;
},
},
{title: "{{ __('Timestamp') }}", field: "event_time", minWidth:30, width:250, resizable:false, headerSort:false, responsive:2},
{title: "{{ __('User Log') }}", field: "user_data", minWidth:30, width:300, resizable:false, headerSort:false, responsive:0},
{title: "{{ __('Timestamp') }}", field: "event_time", minWidth:250, resizable:false, headerSort:false, responsive:2},
{title: "{{ __('User Log') }}", field: "user_data", minWidth:170, resizable:false, headerSort:false, responsive:0},
]
});
});

View file

@ -37,6 +37,9 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL:"/api/records/registrar",
ajaxURLGenerator: function(url, config, params) {
@ -80,14 +83,14 @@
return { last_page: 1, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: registrarLinkFormatter, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:180, resizable:false, headerSort:true, formatter: registrarLinkFormatter, responsive:0},
{title:"IANA ID", field:"iana_id", width:300, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Email') }}", field:"email", width:300, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Balance') }}", field:"accountBalance", width:300, resizable:false, headerSort:true, responsive:2, formatter:"money", formatterParams:function(cell){
@ -113,22 +116,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "registrars.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "registrars.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Registrars"});
table.download("xlsx", "registrars.xlsx", {sheetName:"My Registrars"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "registrars.pdf", {
orientation:"portrait",
title:"My Registrars",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Registrars"
});
}
</script>

View file

@ -11,11 +11,14 @@
ajaxURL:"/api/records/statistics", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -25,8 +28,8 @@
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Total Domains') }}", field:"total_domains", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Date') }}", field:"date", minWidth:150, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Total Domains') }}", minWidth:150, field:"total_domains", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Created Domains') }}", field:"created_domains", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Renewed Domains') }}", field:"renewed_domains", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Transferred Domains') }}", field:"transfered_domains", resizable:false, headerSort:true, responsive:2},
@ -58,22 +61,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "reports.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "reports.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Reports"});
table.download("xlsx", "reports.xlsx", {sheetName:"My Reports"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "reports.pdf", {
orientation:"portrait",
title:"My Reports",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Reports"
});
}
</script>

View file

@ -77,11 +77,14 @@
ajaxURL:"/api/records/support_tickets?join=ticket_categories", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
@ -91,8 +94,8 @@
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Subject') }}", field:"subject", width:350, minWidth:100, resizable:false, headerSort:true, formatter: ticketLinkFormatter, responsive:0},
{title:"{{ __('Category') }}", field:"category_id.name", width:250, minWidth:80, formatter: catFormatter, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Subject') }}", field:"subject", minWidth:220, resizable:false, headerSort:true, formatter: ticketLinkFormatter, responsive:0},
{title:"{{ __('Category') }}", field:"category_id.name", minWidth:80, formatter: catFormatter, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Status') }}", field:"status", resizable:false, headerSort:true, width:250, minWidth:100, formatter: statusFormatter, responsive:2},
{title:"{{ __('Priority') }}", field:"priority", resizable:false, headerSort:true, width:250, minWidth:100, formatter: priorityFormatter, responsive:2},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }},
@ -119,22 +122,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "support.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "support.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Support Tickets"});
table.download("xlsx", "support.xlsx", {sheetName:"My Support Tickets"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "support.pdf", {
orientation:"portrait",
title:"My Support Tickets",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Support Tickets"
});
}
</script>

View file

@ -59,18 +59,21 @@
ajaxURL:"/api/records/domain_tld", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"TLD", field:"tld", width:400, minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0},
{title:"TLD", field:"tld", minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0},
{ title: "{{ __('Script') }}", field: "idn_table", width:300, minWidth:80, headerSort:true, resizable:false, formatter: scriptNameFormatter, responsive:2},
{title:"DNSSEC", field:"secure", width:250, minWidth:80, headerSort:true, resizable:false, formatter: secureFormatter, responsive:2},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, headerSort: false, resizable:false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }},
@ -95,22 +98,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "tlds.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "tlds.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My TLDs"});
table.download("xlsx", "tlds.xlsx", {sheetName:"My TLDs"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "tlds.pdf", {
orientation:"portrait",
title:"My TLDs",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My TLDs"
});
}
</script>

View file

@ -18,6 +18,11 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
paginationCounter:"rows",
paginationCounterElement:"#page-count",
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/dapi/statements",
ajaxURLGenerator: function(url, config, params) {
@ -58,28 +63,29 @@
var lastPage = Math.ceil(response.results / this.options.paginationSize);
return {
last_page: lastPage, // Calculated total number of pages
last_row: response.results, // Total number of rows
data: response.records, // Data for the current page
};
} else {
console.error('Unexpected response format', response);
return { last_page: 1, data: [] };
return { last_page: 1, last_row: 0, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Registrar') }}", field:"registrar_name", minWidth:150, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Command') }}", field:"command", resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Domain') }}", field:"domain_name", resizable:false, headerSort:true, download:false, responsive:0},
{title:"{{ __('Domain') }}", field:"domain_name", resizable:false, headerSort:true, download:false, responsive:2},
{title:"{{ __('Length') }}", field:"length_in_months", resizable:false, download:false, headerSort:true, responsive:2},
{title:"{{ __('From') }}", field:"fromS", resizable:false, headerSort:true, download:false, responsive:2},
{title:"{{ __('To') }}", field:"toS", resizable:false, headerSort:true, download:false, responsive:2},
{title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){
{title:"{{ __('Amount') }}", field:"amount", resizable:false, minWidth:150, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){
return {
decimal: ".",
thousand: " ",
@ -101,22 +107,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "transactions.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "transactions.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Transactions"});
table.download("xlsx", "transactions.xlsx", {sheetName:"My Transactions"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "transactions.pdf", {
orientation:"portrait",
title:"My Transactions",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Transactions"
});
}
</script>

View file

@ -69,22 +69,25 @@
ajaxURL:"/api/records/domain?filter=trstatus,nis", // Set the URL for your JSON data
ajaxConfig:"GET",
pagination:"local",
paginationSize:10,
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
ajaxResponse:function(url, params, response){
return response.records;
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:300, minWidth:200, formatter: domainLinkFormatter, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Name') }}", field:"name", width:200, minWidth:50, formatter: domainLinkFormatter, resizable:false, headerSort:true, responsive:0},
{title:"{{ __('Initiated Date') }}", field:"redate", width:250, minWidth:150, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Expiry Date') }}", field:"acdate", width:250, minWidth:150, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Status') }}", field:"trstatus", width:200, minWidth:150, resizable:false, headerSort:false, download:false, formatter: statusFormatter, responsive:0},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){
{title:"{{ __('Status') }}", field:"trstatus", width:200, minWidth:150, resizable:false, headerSort:false, download:false, formatter: statusFormatter, responsive:2},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, minWidth:100, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){
if (e.target.closest('.approve-btn')) {
e.preventDefault(); // Prevent the default link behavior
Swal.fire({
@ -146,22 +149,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "transfers.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "transfers.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Transfers"});
table.download("xlsx", "transfers.xlsx", {sheetName:"My Transfers"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "transfers.pdf", {
orientation:"portrait",
title:"My Transfers",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Transfers"
});
}
</script>

View file

@ -114,6 +114,9 @@
pagination: true,
paginationMode: "remote",
paginationSize: 10,
paginationSizeSelector:[10, 25, 50, 100],
clipboard:true,
clipboardPasteAction:"replace",
sortMode: "remote",
ajaxURL: "/api/records/users",
ajaxURLGenerator: function(url, config, params) {
@ -156,14 +159,14 @@
return { last_page: 1, data: [] };
}
},
layout:"fitDataFill",
layout:"fitColumns",
responsiveLayout: "collapse",
responsiveLayoutCollapseStartOpen:false,
resizableColumns:false,
placeholder: "{{ __('No Data') }}",
columns:[
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
{title:"{{ __('Email') }}", field:"email", width:300, resizable:false, headerSort:true, formatter: emailLinkFormatter, responsive:0},
{title:"{{ __('Email') }}", field:"email", width:270, resizable:false, headerSort:true, formatter: emailLinkFormatter, responsive:0},
{title:"{{ __('User Name') }}", field:"username", width:200, resizable:false, headerSort:true, responsive:2},
{title:"{{ __('Roles') }}", field:"roles_mask", width:300, resizable:false, headerSort:true, formatter: roleLabelFormatter, responsive:2},
{title:"{{ __('Verified') }}", field:"verified", width:150, resizable:false, headerSort:true, formatter: verifiedFormatter, responsive:2},
@ -183,22 +186,21 @@
});
function downloadCSV() {
table.download("csv", "data.csv");
table.download("csv", "users.csv");
}
function downloadJSON() {
table.download("json", "data.json");
table.download("json", "users.json");
}
function downloadXLSX() {
table.download("xlsx", "data.xlsx", {sheetName:"My Users"});
table.download("xlsx", "users.xlsx", {sheetName:"My Users"});
}
function downloadPDF() {
table.download("pdf", "data.pdf", {
table.download("pdf", "users.pdf", {
orientation:"portrait",
title:"My Users",
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
title:"My Users"
});
}
</script>