Developing lightweight computation at the DSG edge

Commit 36f68768 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[assign-view] Use local svg.js


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent b6613f9d
<div id="assign"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/svg.js/2.7.1/svg.min.js"></script>
<script src="./svg.min.js"></script>
<script src="/tmp/out.json"></script>
<script>
// data={"devices":["35578","35580","41236","52800","53410","55625","58266","66287","67954","69514","74780","74943","75036","75038","75651","92844"],"monitors":["1","2","3","444"],"assignations":[{"device":"35578","monitors":["2"]},{"device":"35580","monitors":["1"]},{"device":"41236","monitors":["1"]},{"device":"52800","monitors":["1","2"]},{"device":"53410","monitors":["2"]},{"device":"55625","monitors":["1","2"]},{"device":"58266","monitors":["2"]},{"device":"66287","monitors":null},{"device":"67954","monitors":["1","2"]},{"device":"69514","monitors":["1","2"]},{"device":"74780","monitors":["1"]},{"device":"74943","monitors":["1","2"]},{"device":"75036","monitors":["1","2"]},{"device":"75038","monitors":null},{"device":"75651","monitors":["2"]},{"device":"92844","monitors":["1"]}]}
//
//
// dsata={"devices":["35578","35580","41236","52800","53410","55625","58266","66287","67954","69514","74780","74943","75036","75038","75651","92844"],"monitors":["1","2"],"assignations":[{"device":"35578","monitors":["2"]},{"device":"35580","monitors":["1"]},{"device":"92844","monitors":["1"]}]}
function posItemInArray(theItem, theArray) {
console.log("theItem " + theItem)
console.log("theArray " + theArray)
if (theItem !== null && theArray !== null && theArray.length > 0) {
for (k=0; k<theArray.length; k++) {
......@@ -65,7 +65,7 @@ if (data.monitors !== null ) {
text.x(600)
text.y(10+50*i)
monsTexts.push(text)
monsTexts.push(text)
}
}
......@@ -91,8 +91,8 @@ if (data.assignations !== null) {
// //var line = drawing.line(200, 25+devPos*50, 500, 25+monPos*50).stroke({ width: 1 })
// }
// }
//
//
//
//
// // assignsLines.push(line)
</script>
\ No newline at end of file
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment