T157 html and css modified for creating json based on table

This commit is contained in:
2021-02-02 13:03:57 +01:00
parent 3c72ddc63a
commit e3d5532397
4 changed files with 39 additions and 29 deletions

View File

@@ -15,7 +15,7 @@ function getData(uuid){
function clearMock(){
fillStaticFields('','','','');
$('#headerTable').html('');
$('#httpStatusValues').html('');
}
function initializeMock(index){
@@ -43,9 +43,9 @@ function createLink(uuid, id){
}
function fillHeaderTable(headers){
var innerHTML = $('#headerTable').html();
var innerHTML = $('#httpStatusValues').html();
innerHTML += generateHeaderTable(headers);
$('#headerTable').html(innerHTML);
$('#httpStatusValues').html(innerHTML);
}
function generateHeaderTable(headers){
@@ -67,8 +67,10 @@ function generateHeaderTable(headers){
for(let i=0; i<count; i++){
innerHTML+=
'<tr>' +
'<td class="headerName">' + keys[i] + '</td>' +
'<td class="headerField">' + values[i] + '</td>' +
'<td>' +
'<input type="text" name="headerKey" placeholder="key" class="tableField headerName httpStatusValue" value="' + keys[i] + '"/></td>' +
'<td>' +
'<input type="text" name="headerKey" placeholder="key" class="tableField" value="' + values[i] + '"/></td>' +
'</tr>';
}
return innerHTML;