Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
1.2 kB
7
Indexable
Never
fetch("../json/overview.json")
.then(function(response){
    return response.json();
})
.then(function(overviews){
    let placeholder = document.querySelector("#data-output");
    let overviewsout = "";
    for(let overview of overviews){
        overviewsout +=  `
            <tr>
            <td class="defaultrow machine">${overview.Machine}</td>
            <td class="defaultrow icmp">${overview.ICMP}</td>
            <td class="defaultrow cname">${overview.CNAME}</td>
            <td class="defaultrow cname">${overview.Loadbalancer}</td>
            <td class="defaultrow webbinding">${overview.WebBinding}</td>
            <td class="defaultrow iis">${overview.IISInstalled}</td>
            <td class="defaultrow net">${overview.NetIsInstalled}</td>
            <td class="defaultrow cert">${overview.NotBefore}</td>
            <td class="defaultrow certafter">${overview.NotAfter}</td>
            <td class="defaultrow lastUpdate">${overview.lastUpdate}</td>
            <td class="defaultrow error">${overview.ErrorMessage}</td>
            </tr


        `;
    }

placeholder.innerHTML = overviewsout;
})