Commit 17f60efd authored by Vivek's avatar Vivek

wip

parent e8fec70b
......@@ -116,15 +116,15 @@
<dt>method1</dt>\n
<dd>description of method1</dd>\n
<dl>\n
<dt class="required" type="int">param1</dt>\n
<dt data-parameter-required="required" data-parameter-type="int">param1</dt>\n
<dd>description of param1</dd>\n
<dt class="optional">param2</dt>\n
<dt data-parameter-required="optional">param2</dt>\n
<dd>description of param2</dd>\n
</dl>\n
<dt>method2</dt>\n
<dd>description of method2</dd>\n
<dl>\n
<dt class="required" type="boolean">param1</dt>\n
<dt data-parameter-required="required" data-parameter-type="boolean">param1</dt>\n
<dd>description of param1</dd>\n
</dl>\n
</dd>\n
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>944.17297.14978.38758</string> </value>
<value> <string>944.23278.61726.21845</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1436545182.61</float>
<float>1436802186.14</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -113,6 +113,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />\n
\n
<link rel="http://www.renderjs.org/rel/interface" href="demo_interface1.html">\n
<link rel="http://www.renderjs.org/rel/interface" href="demo_interface2.html">\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
......@@ -130,6 +131,9 @@
{{#each interface_item}}\n
<li>\n
{{interface_name}}\n
<br>\n
Status: {{status}}\n
</br>\n
</li>\n
{{/each}}\n
</ul> \n
......@@ -287,7 +291,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>944.18548.40475.62395</string> </value>
<value> <string>944.23131.33514.5051</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -305,7 +309,7 @@
</tuple>
<state>
<tuple>
<float>1436518406.8</float>
<float>1436793348.9</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -134,18 +134,43 @@
.declareMethod("method3", function () {\n
return;\n
})\n
.declareMethod("testmethod1", function () {\n
return;\n
})\n
.declareMethod("testmethod2", function (param1) {\n
return;\n
})\n
.declareMethod("testmethod3", function (param1, param2) {\n
return;\n
})\n
\n
.declareMethod("interfaceGadgetTest", function (gadget, interface_gadget, interface_list) {\n
var interface_name = interface_list[0];\n
return new RSVP.Queue()\n
.push(function () {\n
return interface_gadget.getInterfaceData(interface_name);\n
})\n
.push(function (interface_data) {\n
console.log("interface_data", interface_data);\n
return interface_gadget.verifyInterfaceImplementation(gadget, interface_name);\n
var status_list = [],\n
key;\n
for (key in interface_list) {\n
status_list.push(interface_gadget.verifyInterfaceImplementation(gadget, interface_list[key]));\n
}\n
return RSVP.all(status_list);\n
})\n
.push(function (verification_status) {\n
console.log("Verification:", verification_status);\n
.push(function (result_list) {\n
var parameter = {interface_item: []},\n
key,\n
i = 0;\n
for (key in interface_list) {\n
parameter.interface_item.push({\n
interface_name: interface_list[key], \n
status: (result_list[i] ? "Verified Success":"Verified Failure")\n
});\n
i += 1;\n
}\n
gadget.props.header_element.innerHTML = gadget.props.header_template({\n
title: "Interface List"\n
});\n
gadget.props.content_element.innerHTML =\n
gadget.props.interface_list_template(parameter);\n
$(gadget.props.element).trigger("create");\n
});\n
})\n
\n
......@@ -159,31 +184,15 @@
});\n
})\n
.push(function () {\n
return gadget.getInterfaceList();\n
})\n
.push(function (interface_list) {\n
var parameter = {interface_item: []},\n
key;\n
for (key in interface_list) {\n
parameter.interface_item.push({\n
interface_name: interface_list[key]\n
});\n
}\n
gadget.props.header_element.innerHTML = gadget.props.header_template({\n
title: "Interface List"\n
});\n
gadget.props.content_element.innerHTML =\n
gadget.props.interface_list_template(parameter);\n
$(gadget.props.element).trigger("create");\n
return RSVP.all([\n
gadget.getDeclaredGadget(INTERFACE_GADGET_SCOPE),\n
interface_list\n
gadget.getInterfaceList()\n
]);\n
})\n
.push(function (interface_gadget_list) {\n
var interface_gadget = interface_gadget_list[0],\n
interface_list = interface_gadget_list[1];\n
return gadget.interfaceGadgetTest(gadget, interface_gadget, interface_list);\n
return gadget.interfaceGadgetTest(gadget, interface_gadget, interface_list);\n
});\n
});\n
\n
......@@ -322,7 +331,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>944.18996.27011.18756</string> </value>
<value> <string>944.23155.255.46643</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -340,7 +349,7 @@
</tuple>
<state>
<tuple>
<float>1436545240.66</float>
<float>1436795666.02</float>
<string>GMT</string>
</tuple>
</state>
......
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