Commit 789e00d1 authored by Roque Porchetto's avatar Roque Porchetto

Refactoring in download access gadget.

parent 25c164f5
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>959.57959.17962.36710</string> </value> <value> <string>960.14289.42730.50432</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1497882389.18</float> <float>1498141059.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -161,9 +161,9 @@ ...@@ -161,9 +161,9 @@
'gadget_erp5_page_data_set.html', 'gadget_erp5_page_data_set.html',
'gadget_erp5_page_data_set.js', 'gadget_erp5_page_data_set.js',
'gadget_erp5_download_access.html', 'gadget_erp5_download_access.html',
'gadget_erp5_download_access.js', 'gadget_erp5_download_access.js'
'gadget_erp5_ingestion_access.html', //'gadget_erp5_ingestion_access.html',
'gadget_erp5_ingestion_access.js' //'gadget_erp5_ingestion_access.js'
]; ];
self.addEventListener('install', function (event) { self.addEventListener('install', function (event) {
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>959.65437.37750.51</string> </value> <value> <string>960.12888.41295.22067</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1498056517.79</float> <float>1498721893.6</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<body> <body>
<form name='download'> <form name='download'>
<input type="submit" value="Download" /> <input type="submit" value="Download" />
<span style="margin-left:30px" > RUN COMMAND: <b style="margin-left:10px" > pull <span id="dataset_reference"/> </b> </span> <span style="margin-left:30px" > RUN COMMAND: <b style="margin-left:10px" > dataset-tool <span id="dataset_reference"/>push <i>my-data-set</i></b> </span>
</form> </form>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>959.65413.10439.13960</string> </value> <value> <string>960.23981.58926.53162</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1497276860.83</float> <float>1498722326.47</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
return download(this, evt); return download(this, evt);
}) })
.declareMethod("render", function (reference) { .declareMethod("render", function (reference) {
return this.changeState({"dataset_reference" : reference}); var html = "pull <i>" + reference + "</i>";
if (reference === undefined)
html = "push <i>my-data-set</i>";
return this.changeState({"dataset_reference" : html});
}) })
/*.onStateChange(function (modification_dict) { /*.onStateChange(function (modification_dict) {
console.log("STATUS CHANGED !!"); console.log("STATUS CHANGED !!");
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.12931.34980.3549</string> </value> <value> <string>960.23998.30923.34781</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1498059105.63</float> <float>1498723115.95</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</head> </head>
<body> <body>
<div style="margin-top:20px" data-gadget-url="gadget_erp5_ingestion_access.html" <div style="margin-top:20px" data-gadget-url="gadget_erp5_download_access.html"
data-gadget-scope="ingestion_access" data-gadget-scope="download_access"
data-gadget-sandbox="public"> data-gadget-sandbox="public">
</div> </div>
<div class="title-red" style="margin-top: 40px;"> </div> <div class="title-red" style="margin-top: 40px;"> </div>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.12819.551.50210</string> </value> <value> <string>960.12819.7431.26658</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1498052346.79</float> <float>1498722011.66</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
}); });
}) })
.push(function () { .push(function () {
return gadget.getDeclaredGadget("ingestion_access"); return gadget.getDeclaredGadget("download_access");
}) })
.push(function (my_gadget) { .push(function (my_gadget) {
return my_gadget.render(); return my_gadget.render();
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.12819.64721.34133</string> </value> <value> <string>960.23980.29750.19575</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1498052405.26</float> <float>1498722032.07</float>
<string>UTC</string> <string>UTC</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