Commit 17f60efd authored by Vivek's avatar Vivek

wip

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