X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.graph.js;h=851fff2503ac0c9f8f4c6b55171d25d9fe5ad1e8;hb=84814a7d41c3e17aff69096fa00735d375367add;hp=57c884122718ba101d2843ef9b90452fb0f61f7a;hpb=8c9214a60db100a206496d1c417c08a20ea2693e;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/static/mctx.graph.js b/testing/MCTXWeb/public_html/static/mctx.graph.js index 57c8841..851fff2 100644 --- a/testing/MCTXWeb/public_html/static/mctx.graph.js +++ b/testing/MCTXWeb/public_html/static/mctx.graph.js @@ -11,6 +11,8 @@ mctx.graph.api.sensors = mctx.api + "sensors"; mctx.graph.api.actuators = mctx.api + "actuators"; mctx.sensors = {}; mctx.actuators = {}; + +mctx.graph.devices = {}; mctx.graph.dependent = null; mctx.graph.independent = null; mctx.graph.timer = null; @@ -64,13 +66,17 @@ $.fn.deployDevices = function(input_type, check_first, group) { var container = this; var apply = function(dict, prefix) { $.each(dict, function(key, val) { + //Unique id (name mangling) + var id = container.attr('id') + "_" + prefix + "_" + val.name; + var attributes = { - 'type' : input_type, 'value' : key, 'alt' : val, + 'type' : input_type, 'value' : key, 'alt' : val.name, 'class' : prefix, 'name' : group, - 'id' : prefix + '_' + val //Unique id (name mangling) + 'id' : id }; + var entry = $("", attributes); - var label = $("