From dc0300e411a9797c427c289c50884c4f9b87fed3 Mon Sep 17 00:00:00 2001 From: Date: Wed, 9 Nov 2016 10:17:00 -0500 Subject: [PATCH] Some JS for populating the devide list page *Needs reworking to be applicable to the current entry format --- html/deviceListing.html | 2 +- html/deviceListing.js | 31 +++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/html/deviceListing.html b/html/deviceListing.html index a6608b5..d224a68 100644 --- a/html/deviceListing.html +++ b/html/deviceListing.html @@ -14,7 +14,7 @@ - +
diff --git a/html/deviceListing.js b/html/deviceListing.js index 50e11b5..4cb042b 100644 --- a/html/deviceListing.js +++ b/html/deviceListing.js @@ -1,13 +1,36 @@ +var tableHtml = processDeviceData(harvestDevices); +alert(tableHtml); +document.getElementById("list").innerHTML = tableHtml; -console.log(harvestDevices()); - - +function processDeviceData(devices) { + // returns html table entries using data from harvestDevices() + // this is to be inserted into the table with the data-table attribut 'list', which can be found in deviceListing.html + var html=""; + for (var i = 0; i
Name Device Type