Commit 88d207e3 authored by Roque Porchetto's avatar Roque Porchetto

erp5_wendelin_telecom_UI: new page for downloads

parent 246539e8
...@@ -14,13 +14,9 @@ ...@@ -14,13 +14,9 @@
</head> </head>
<body> <body>
<form name='download'> <form name='download-tool'>
<input style="margin-top:10px" type="submit" value="Download for Linux/OSX" /> <input style="margin-top:10px" type="submit" value="Download tool" />
<span style="margin-left:10px" > and run command: <b style="margin-left:10px" > bash ebulk <span id="dataset_reference"/>push <i>my-data-set</i></b> </span> <span style="margin-left:10px" > and run command: <b style="margin-left:10px" > ebulk <span id="dataset_reference"/>push <i>my-data-set</i></b> </span>
</form>
<form name='download-win'>
<input style="margin-top:10px" type="submit" value="Download for Windows" />
<span style="margin-left:10px" > and run command: <b style="margin-left:10px" > ebulk.bat <span id="dataset_reference_win"/>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>969.10372.38821.30208</string> </value> <value> <string>970.10968.21423.477</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>1533648505.3</float> <float>1536571774.05</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,16 +3,9 @@ ...@@ -3,16 +3,9 @@
(function (window, document, RSVP, rJS, (function (window, document, RSVP, rJS,
XMLHttpRequest, location, console) { XMLHttpRequest, location, console) {
"use strict"; "use strict";
function download(context, evt) { function download_tool(context, evt) {
var link = document.createElement('a'); var link = document.createElement('a');
link.download = "ebulk_tool_unix.zip"; link.href = window.location.origin + "/erp5/web_site_module/fif_data_runner/#/?page=download";
link.href = window.location.origin + "/erp5/data_stream_module/embulk_download_script/getData";
link.click();
}
function download_win(context, evt) {
var link = document.createElement('a');
link.download = "ebulk_tool_win.zip";
link.href = window.location.origin + "/erp5/data_stream_module/embulk_download_script_win/getData";
link.click(); link.click();
} }
...@@ -23,11 +16,8 @@ ...@@ -23,11 +16,8 @@
width: '100%' width: '100%'
}; };
}) })
.declareJob('download', function (evt) { .declareJob('download_tool', function (evt) {
return download(this, evt); return download_tool(this, evt);
})
.declareJob('download_win', function (evt) {
return download_win(this, evt);
}) })
.declareMethod("render", function (reference) { .declareMethod("render", function (reference) {
var html = "pull <i>" + reference + "</i>"; var html = "pull <i>" + reference + "</i>";
...@@ -37,13 +27,10 @@ ...@@ -37,13 +27,10 @@
}) })
.declareService(function () { .declareService(function () {
document.getElementById("dataset_reference").innerHTML = this.state.dataset_reference; document.getElementById("dataset_reference").innerHTML = this.state.dataset_reference;
document.getElementById("dataset_reference_win").innerHTML = this.state.dataset_reference;
}) })
.onEvent('submit', function (evt) { .onEvent('submit', function (evt) {
if (evt.target.name === 'download') { if (evt.target.name === 'download-tool') {
return this.download(evt); return this.download_tool(evt);
} else if (evt.target.name === 'download-win') {
return this.download_win(evt);
} else { } else {
throw new Error('Unknown form'); throw new Error('Unknown form');
} }
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.31506.21659.1382</string> </value> <value> <string>970.10968.63773.24814</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>1530026061.85</float> <float>1536571801.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>DOWNLOAD</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_download.js" type="text/javascript"></script>
</head>
<body>
<div style="max-width: 550px;">
<div class="document_table">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 class="ui-title ui-override-theme">Mac OS X</h1>
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead">
<tr>
<th class="">Mac OS X</th>
</tr>
</thead>
<tbody>
<tr>
<td>
brew install https://github.com/roquegit/homebrew-ebulk/raw/master/ebulk.rb
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div style="margin-top:30px" />
<div class="document_table">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 class="ui-title ui-override-theme">Linux</h1>
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead">
<tr>
<th class="">Linux</th>
</tr>
</thead>
<tbody>
<tr>
<td>
sudo add-apt-repository ppa:rporchetto/ebulk-ppa
</td>
</tr>
<tr>
<td>
sudo apt-get update
</td>
</tr>
<tr>
<td>
sudo apt-get install ebulk
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div style="margin-top:30px" />
<div class="document_table">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 class="ui-title ui-override-theme">Linux RPM</h1>
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead">
<tr>
<th class="">Linux RPM</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<form name='download-rpm'>
<input style="margin-top:10px" type="submit" value="Download .rpm" />
</form>
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div style="margin-top:30px" />
<div class="document_table">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 class="ui-title ui-override-theme">Linux Source</h1>
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead">
<tr>
<th class="">Linux Source</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<form name='download-linux'>
<input style="margin-top:10px" type="submit" value="Download .tar.gz" />
</form>
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div style="margin-top:30px" />
<div class="document_table">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 class="ui-title ui-override-theme">Windows</h1>
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead">
<tr>
<th class="">Windows</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Ebulk tool for windows will be available soon
<!--<form name='download-win'>
<input style="margin-top:10px" type="submit" value="Download .zip" />
</form>-->
</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<div style="margin-top:30px" />
</div>
</body>
</html>
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>969.16321.4013.58965</string> </value> <value> <string>969.59527.36796.52394</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>1532962084.26</float> <float>1536569733.07</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<div class="ui-content"> <div class="ui-content">
<ul data-role="listview" class="ui-listview" data-enhanced="true"> <ul data-role="listview" class="ui-listview" data-enhanced="true">
<li class="ui-first-child"><a href="#" class="ui-btn ui-btn-icon-left ui-icon-home" data-i18n="Home">Home</a></li> <li class="ui-first-child"><a href="#" class="ui-btn ui-btn-icon-left ui-icon-home" data-i18n="Home">Home</a></li>
<li><a href="{{preference_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Preferences">Preferences</a></li> <li><a href="{{download_href}}" class="ui-btn ui-btn-icon-left ui-icon-download" data-i18n="Download">Download</a></li>
<!-- <li><a href="{{preference_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Preferences">Preferences</a></li> -->
<li><a href="{{about_info_href}}" class="ui-btn ui-btn-icon-left ui-icon-user" data-i18n="About us">About us</a></li> <li><a href="{{about_info_href}}" class="ui-btn ui-btn-icon-left ui-icon-user" data-i18n="About us">About us</a></li>
<li class="ui-last-child"><a href="{{logout_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Logout">Logout</a></li> <li class="ui-last-child"><a href="{{logout_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Logout">Logout</a></li>
</ul> </ul>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.15507.37024.58521</string> </value> <value> <string>970.10939.52629.39901</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>1529066187.06</float> <float>1536570297.59</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
//return g.getUrlFor({command: 'display', options: {page: "logout"}}); //return g.getUrlFor({command: 'display', options: {page: "logout"}});
return RSVP.all([ return RSVP.all([
g.getUrlFor({command: 'display', options: {page: "preference"}}), g.getUrlFor({command: 'display', options: {page: "preference"}}),
g.getUrlFor({command: 'display', options: {page: "download"}}),
g.getUrlFor({command: 'display', options: {page: "about"}}), g.getUrlFor({command: 'display', options: {page: "about"}}),
g.getUrlFor({command: 'display', options: {page: "logout"}}) g.getUrlFor({command: 'display', options: {page: "logout"}})
]); ]);
...@@ -57,8 +58,9 @@ ...@@ -57,8 +58,9 @@
panel_template_header() + panel_template_header() +
panel_template_body({ panel_template_body({
"preference_href": all_result[0], "preference_href": all_result[0],
"about_info_href": all_result[1], "download_href": all_result[1],
"logout_href": all_result[2] "about_info_href": all_result[2],
"logout_href": all_result[3]
}) })
); );
}) })
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.15518.32472.22766</string> </value> <value> <string>970.10971.34786.14882</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>1529067619.87</float> <float>1536571985.93</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