mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-14 05:19:32 +02:00
EPP History logs is now fully displayed in CP
This commit is contained in:
parent
fd871e9b8d
commit
367b9416eb
1 changed files with 49 additions and 9 deletions
|
@ -25,6 +25,25 @@
|
||||||
return registrarsCache[id] || 'Unknown';
|
return registrarsCache[id] || 'Unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function to format XML properly and force a new line before xsi:schemaLocation
|
||||||
|
function formatXmlWithLineBreaks(xml) {
|
||||||
|
if (!xml) return ""; // Handle empty values safely
|
||||||
|
|
||||||
|
// Ensure `xsi:schemaLocation` always starts on a new line
|
||||||
|
xml = xml.replace(/(xsi:schemaLocation="[^"]*")/g, "\n$1");
|
||||||
|
|
||||||
|
return `<pre class="xml-cell">${escapeHtml(xml)}</pre>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to escape special characters to prevent HTML interpretation
|
||||||
|
function escapeHtml(unsafe) {
|
||||||
|
return unsafe.replace(/&/g, "&")
|
||||||
|
.replace(/</g, "<")
|
||||||
|
.replace(/>/g, ">")
|
||||||
|
.replace(/"/g, """)
|
||||||
|
.replace(/'/g, "'");
|
||||||
|
}
|
||||||
|
|
||||||
var table;
|
var table;
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
@ -88,7 +107,6 @@
|
||||||
placeholder: "{{ __('No Data') }}",
|
placeholder: "{{ __('No Data') }}",
|
||||||
columns:[
|
columns:[
|
||||||
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
|
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('Date') }}", field:"cldate", minWidth:200, resizable:false, headerSort:false, responsive:0},
|
|
||||||
{
|
{
|
||||||
title: "{{ __('Registrar') }}",
|
title: "{{ __('Registrar') }}",
|
||||||
field: "registrar_id",
|
field: "registrar_id",
|
||||||
|
@ -102,13 +120,35 @@
|
||||||
return name; // Return the name directly, as it is synchronously obtained from cache
|
return name; // Return the name directly, as it is synchronously obtained from cache
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title:"{{ __('Command') }}", field:"cmd", resizable:false, headerSort:false, responsive:2},
|
{title:"{{ __('Command') }}", field:"cmd", width:100, resizable:false, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('Object Type') }}", field:"obj_type", resizable:false, headerSort:false, responsive:2},
|
{title:"{{ __('Object Type') }}", field:"obj_type", width:150, resizable:false, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('Object') }}", field:"obj_id", resizable:false, headerSort:false, responsive:2},
|
{title:"{{ __('Object') }}", field:"obj_id", resizable:false, minWidth:200, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('Result') }}", field:"code", resizable:false, headerSort:false, responsive:2},
|
{title:"{{ __('Result') }}", field:"code", resizable:false, width:100, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('Message') }}", field:"msg", resizable:false, headerSort:false, responsive:2, download:false},
|
{title:"{{ __('Message') }}", field:"msg", resizable:false, minWidth:350, headerSort:false, responsive:0},
|
||||||
{title:"{{ __('clTRID') }}", field:"clTRID", resizable:false, headerSort:false, responsive:2, download:false},
|
{title:"{{ __('clTRID') }}", field:"clTRID", resizable:false, headerSort:false, responsive:2},
|
||||||
{title:"{{ __('Milliseconds') }}", field:"svmicrosecond", resizable:false, headerSort:false, download:false, responsive:2},
|
{
|
||||||
|
title: "{{ __('clTRIDframe') }}",
|
||||||
|
field: "clTRIDframe",
|
||||||
|
resizable: false,
|
||||||
|
headerSort: false,
|
||||||
|
responsive: 2,
|
||||||
|
formatter: function(cell) {
|
||||||
|
return formatXmlWithLineBreaks(cell.getValue());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{title:"{{ __('Request Date') }}", field:"cldate", minWidth:220, resizable:false, headerSort:false, responsive:0},
|
||||||
|
{title:"{{ __('svTRID') }}", field:"svTRID", resizable:false, headerSort:false, responsive:2},
|
||||||
|
{
|
||||||
|
title: "{{ __('svTRIDframe') }}",
|
||||||
|
field: "svTRIDframe",
|
||||||
|
resizable: false,
|
||||||
|
headerSort: false,
|
||||||
|
responsive: 2,
|
||||||
|
formatter: function(cell) {
|
||||||
|
return formatXmlWithLineBreaks(cell.getValue());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{title:"{{ __('Response Date') }}", field:"svdate", resizable:false, headerSort:false, responsive:2},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
var searchInput = document.getElementById("search-input");
|
var searchInput = document.getElementById("search-input");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue