Commit 9e34de6e authored by Vivek's avatar Vivek

renderjs_interfaces: replaced absolute URLs to relative URLs.

parent 2e007394
...@@ -132,25 +132,25 @@ ...@@ -132,25 +132,25 @@
<div data-role="fieldcontain">\n <div data-role="fieldcontain">\n
<label for="gadget_selector" class="select">Select Gadget</label>\n <label for="gadget_selector" class="select">Select Gadget</label>\n
<select name="gadget_selector">\n <select name="gadget_selector">\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_correct_implemented_gadget.html">Gadget: Implements Interface 1 Correctly</option>\n <option value="./interface_test_correct_implemented_gadget.html">Gadget: Implements Interface 1 Correctly</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_missing_interface_declaration_gadget.html">Gadget: Missing Interface Declaration of Interface 1</option>\n <option value="./interface_test_missing_interface_declaration_gadget.html">Gadget: Missing Interface Declaration of Interface 1</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_missing_method_declaration_gadget.html">Gadget: Missing Method Declaration of Interface 1 </option>\n <option value="./interface_test_missing_method_declaration_gadget.html">Gadget: Missing Method Declaration of Interface 1 </option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_mismatched_argument_gadget.html">Gadget: Mismatched Method Argument of Interface 1 </option>\n <option value="./interface_test_mismatched_argument_gadget.html">Gadget: Mismatched Method Argument of Interface 1 </option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_multiple_interface_correct_gadget.html">Gadget: Multiple Interfaces Correctly Implements Interface 1 and 2</option>\n <option value="./interface_test_multiple_interface_correct_gadget.html">Gadget: Multiple Interfaces Correctly Implements Interface 1 and 2</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_multiple_interface_mismached_argument_gadget.html">Gadget: Multiple Interfaces Mismatched Argument of Interface 2 </option>\n <option value="./interface_test_multiple_interface_mismached_argument_gadget.html">Gadget: Multiple Interfaces Mismatched Argument of Interface 2 </option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_multiple_interface_missing_method_declaration_gadget.html">Gadget: Multiple Interfaces Missing Method Declaration of Interface 2</option>\n <option value="./interface_test_multiple_interface_missing_method_declaration_gadget.html">Gadget: Multiple Interfaces Missing Method Declaration of Interface 2</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/interface_test_invalid_interface_gadget.html">Gadget: Implements All Invalid Interfaces</option>\n <option value="./interface_test_invalid_interface_gadget.html">Gadget: Implements All Invalid Interfaces</option>\n
</select>\n </select>\n
</div>\n </div>\n
<div data-role="fieldcontain">\n <div data-role="fieldcontain">\n
<label for="interface_selector" class="select">Select Interface</label>\n <label for="interface_selector" class="select">Select Interface</label>\n
<select name="interface_selector">\n <select name="interface_selector">\n
<option value="">Default: Test all declared interfaces</option>\n <option value="">Default: Test all declared interfaces</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/demo_interface1.html">Demo Interface 1</option>\n <option value="./demo_interface1.html">Demo Interface 1</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/demo_interface2.html">Demo Interface 2</option>\n <option value="./demo_interface2.html">Demo Interface 2</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/demo_interface_invalid1.html">Demo Interface Invalid 1</option>\n <option value="./demo_interface_invalid1.html">Demo Interface Invalid 1</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/demo_interface_invalid2.html">Demo Interface Invalid 2</option>\n <option value="./demo_interface_invalid2.html">Demo Interface Invalid 2</option>\n
<option value="https://softinst60317.host.vifib.net/erp5/web_site_module/interface_demo/demo_interface_invalid3.html">Demo Interface Invalid 3</option>\n <option value="./demo_interface_invalid3.html">Demo Interface Invalid 3</option>\n
</select>\n </select>\n
</div>\n </div>\n
<input data-inline="true" type="submit" value="Submit" data-theme="b">\n <input data-inline="true" type="submit" value="Submit" data-theme="b">\n
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>944.43346.53030.10871</string> </value> <value> <string>944.57639.28561.28313</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1438073929.05</float> <float>1438864164.25</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -339,6 +339,16 @@ ...@@ -339,6 +339,16 @@
declared_method_list,\n declared_method_list,\n
gadget.getDeclaredMethodList()]); \n gadget.getDeclaredMethodList()]); \n
})\n })\n
\n
.declareMethod("getAbsoluteURL", function (gadget, url) {\n
return RSVP.Queue()\n
.push(function() {\n
return gadget.getPath(); \n
})\n
.push(function(base_url) {\n
return rJS.getAbsoluteURL(url, base_url);\n
});\n
})\n
\n \n
.declareMethod("getInterfaceData", function (interface_url) {\n .declareMethod("getInterfaceData", function (interface_url) {\n
var interface_data = {\n var interface_data = {\n
...@@ -395,7 +405,8 @@ ...@@ -395,7 +405,8 @@
})\n })\n
\n \n
.declareMethod("verifyGadgetInterfaceImplementation", function (gadget_url, interface_url) {\n .declareMethod("verifyGadgetInterfaceImplementation", function (gadget_url, interface_url) {\n
var interface_gadget = this;\n var interface_gadget = this,\n
absolute_interface_url;\n
return RSVP.Queue()\n return RSVP.Queue()\n
.push(function () {\n .push(function () {\n
if(!gadget_url || !interface_url) {\n if(!gadget_url || !interface_url) {\n
...@@ -404,20 +415,25 @@ ...@@ -404,20 +415,25 @@
return getVerifyGadget(gadget_url, interface_gadget);\n return getVerifyGadget(gadget_url, interface_gadget);\n
})\n })\n
.push(function (gadget) {\n .push(function (gadget) {\n
return interface_gadget.getDeclaredGadgetInterfaceList(gadget);\n return RSVP.all([ \n
interface_gadget.getDeclaredGadgetInterfaceList(gadget),\n
interface_gadget.getAbsoluteURL(gadget, interface_url)\n
]);\n
})\n })\n
.push(function (declared_interface_list) {\n .push(function (interface_detail) {\n
return verifyInterfaceDeclaration(interface_url, declared_interface_list);\n var declared_interface_list = interface_detail[0];\n
absolute_interface_url = interface_detail[1];\n
return verifyInterfaceDeclaration(absolute_interface_url, declared_interface_list);\n
})\n })\n
.push(function () {\n .push(function () {\n
return verifyInterfaceDefinition(interface_url);\n return verifyInterfaceDefinition(absolute_interface_url);\n
})\n })\n
.push(function () {\n .push(function () {\n
return interface_gadget.getDeclaredGadget(VERIFY_GADGET_SCOPE);\n return interface_gadget.getDeclaredGadget(VERIFY_GADGET_SCOPE);\n
})\n })\n
.push(function (gadget) {\n .push(function (gadget) {\n
return RSVP.all([\n return RSVP.all([\n
interface_gadget.getDefinedInterfaceMethodList(interface_url),\n interface_gadget.getDefinedInterfaceMethodList(absolute_interface_url),\n
interface_gadget.getDeclaredGadgetMethodList(gadget)\n interface_gadget.getDeclaredGadgetMethodList(gadget)\n
]);\n ]);\n
})\n })\n
...@@ -606,7 +622,7 @@ ...@@ -606,7 +622,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>944.46238.52656.22988</string> </value> <value> <string>944.57659.15074.42513</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -624,7 +640,7 @@ ...@@ -624,7 +640,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1438180072.6</float> <float>1438865256.18</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -339,6 +339,16 @@ ...@@ -339,6 +339,16 @@
declared_method_list,\n declared_method_list,\n
gadget.getDeclaredMethodList()]); \n gadget.getDeclaredMethodList()]); \n
})\n })\n
\n
.declareMethod("getAbsoluteURL", function (gadget, url) {\n
return RSVP.Queue()\n
.push(function() {\n
return gadget.getPath(); \n
})\n
.push(function(base_url) {\n
return rJS.getAbsoluteURL(url, base_url);\n
});\n
})\n
\n \n
.declareMethod("getInterfaceData", function (interface_url) {\n .declareMethod("getInterfaceData", function (interface_url) {\n
var interface_data = {\n var interface_data = {\n
...@@ -395,7 +405,8 @@ ...@@ -395,7 +405,8 @@
})\n })\n
\n \n
.declareMethod("verifyGadgetInterfaceImplementation", function (gadget_url, interface_url) {\n .declareMethod("verifyGadgetInterfaceImplementation", function (gadget_url, interface_url) {\n
var interface_gadget = this;\n var interface_gadget = this,\n
absolute_interface_url;\n
return RSVP.Queue()\n return RSVP.Queue()\n
.push(function () {\n .push(function () {\n
if(!gadget_url || !interface_url) {\n if(!gadget_url || !interface_url) {\n
...@@ -404,20 +415,25 @@ ...@@ -404,20 +415,25 @@
return getVerifyGadget(gadget_url, interface_gadget);\n return getVerifyGadget(gadget_url, interface_gadget);\n
})\n })\n
.push(function (gadget) {\n .push(function (gadget) {\n
return interface_gadget.getDeclaredGadgetInterfaceList(gadget);\n return RSVP.all([ \n
interface_gadget.getDeclaredGadgetInterfaceList(gadget),\n
interface_gadget.getAbsoluteURL(gadget, interface_url)\n
]);\n
})\n })\n
.push(function (declared_interface_list) {\n .push(function (interface_detail) {\n
return verifyInterfaceDeclaration(interface_url, declared_interface_list);\n var declared_interface_list = interface_detail[0];\n
absolute_interface_url = interface_detail[1];\n
return verifyInterfaceDeclaration(absolute_interface_url, declared_interface_list);\n
})\n })\n
.push(function () {\n .push(function () {\n
return verifyInterfaceDefinition(interface_url);\n return verifyInterfaceDefinition(absolute_interface_url);\n
})\n })\n
.push(function () {\n .push(function () {\n
return interface_gadget.getDeclaredGadget(VERIFY_GADGET_SCOPE);\n return interface_gadget.getDeclaredGadget(VERIFY_GADGET_SCOPE);\n
})\n })\n
.push(function (gadget) {\n .push(function (gadget) {\n
return RSVP.all([\n return RSVP.all([\n
interface_gadget.getDefinedInterfaceMethodList(interface_url),\n interface_gadget.getDefinedInterfaceMethodList(absolute_interface_url),\n
interface_gadget.getDeclaredGadgetMethodList(gadget)\n interface_gadget.getDeclaredGadgetMethodList(gadget)\n
]);\n ]);\n
})\n })\n
...@@ -606,7 +622,7 @@ ...@@ -606,7 +622,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>944.46238.52656.22988</string> </value> <value> <string>944.57659.15074.42513</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -624,7 +640,7 @@ ...@@ -624,7 +640,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1438180072.6</float> <float>1438865256.18</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
\n \n
test("verify correctly implemented gadget test", function() {\n test("verify correctly implemented gadget test", function() {\n
var gadget_url = "./interface_test_correct_implemented_gadget.html",\n var gadget_url = "./interface_test_correct_implemented_gadget.html",\n
interface_url = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface1.html";\n interface_url = "./demo_interface1.html";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function() {\n
return root_gadget_defer.promise;\n return root_gadget_defer.promise;\n
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
\n \n
test("verify missing interface declaration gadget test", function() {\n test("verify missing interface declaration gadget test", function() {\n
var gadget_url = "./interface_test_missing_interface_declaration_gadget.html",\n var gadget_url = "./interface_test_missing_interface_declaration_gadget.html",\n
interface_url = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface1.html";\n interface_url = "./demo_interface1.html";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function() {\n
return root_gadget_defer.promise;\n return root_gadget_defer.promise;\n
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
\n \n
test("verify missing method declaration gadget test", function() {\n test("verify missing method declaration gadget test", function() {\n
var gadget_url = "./interface_test_missing_method_declaration_gadget.html",\n var gadget_url = "./interface_test_missing_method_declaration_gadget.html",\n
interface_url = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface1.html";\n interface_url = "./demo_interface1.html";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function() {\n
return root_gadget_defer.promise;\n return root_gadget_defer.promise;\n
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
\n \n
test("verify mismatched method argument gadget test", function() {\n test("verify mismatched method argument gadget test", function() {\n
var gadget_url = "./interface_test_mismatched_argument_gadget.html",\n var gadget_url = "./interface_test_mismatched_argument_gadget.html",\n
interface_url = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface1.html";\n interface_url = "./demo_interface1.html";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function() {\n
return root_gadget_defer.promise;\n return root_gadget_defer.promise;\n
...@@ -243,9 +243,9 @@ ...@@ -243,9 +243,9 @@
\n \n
test("verify invalid interface definition gadget test", function() {\n test("verify invalid interface definition gadget test", function() {\n
var gadget_url = "./interface_test_missing_interface_declaration_gadget.html",\n var gadget_url = "./interface_test_missing_interface_declaration_gadget.html",\n
interface_url1 = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface_invalid1.html",\n interface_url1 = "./demo_interface_invalid1.html",\n
interface_url2 = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface_invalid2.html",\n interface_url2 = "./demo_interface_invalid2.html",\n
interface_url3 = "https://softinst60317.host.vifib.net/erp5/web_site_module/interface_test/demo_interface_invalid3.html";\n interface_url3 = "./demo_interface_invalid3.html";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function() {\n
return root_gadget_defer.promise;\n return root_gadget_defer.promise;\n
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>944.43375.6436.61201</string> </value> <value> <string>944.57664.29654.42888</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -418,7 +418,7 @@ ...@@ -418,7 +418,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1438008031.04</float> <float>1438865358.09</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