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

erp5_wendelin_telecom_UI: new page for downloads

parent 246539e8
......@@ -14,13 +14,9 @@
</head>
<body>
<form name='download'>
<input style="margin-top:10px" type="submit" value="Download for Linux/OSX" />
<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>
</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 name='download-tool'>
<input style="margin-top:10px" type="submit" value="Download tool" />
<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>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.10372.38821.30208</string> </value>
<value> <string>970.10968.21423.477</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1533648505.3</float>
<float>1536571774.05</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,16 +3,9 @@
(function (window, document, RSVP, rJS,
XMLHttpRequest, location, console) {
"use strict";
function download(context, evt) {
function download_tool(context, evt) {
var link = document.createElement('a');
link.download = "ebulk_tool_unix.zip";
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.href = window.location.origin + "/erp5/web_site_module/fif_data_runner/#/?page=download";
link.click();
}
......@@ -23,11 +16,8 @@
width: '100%'
};
})
.declareJob('download', function (evt) {
return download(this, evt);
})
.declareJob('download_win', function (evt) {
return download_win(this, evt);
.declareJob('download_tool', function (evt) {
return download_tool(this, evt);
})
.declareMethod("render", function (reference) {
var html = "pull <i>" + reference + "</i>";
......@@ -37,13 +27,10 @@
})
.declareService(function () {
document.getElementById("dataset_reference").innerHTML = this.state.dataset_reference;
document.getElementById("dataset_reference_win").innerHTML = this.state.dataset_reference;
})
.onEvent('submit', function (evt) {
if (evt.target.name === 'download') {
return this.download(evt);
} else if (evt.target.name === 'download-win') {
return this.download_win(evt);
if (evt.target.name === 'download-tool') {
return this.download_tool(evt);
} else {
throw new Error('Unknown form');
}
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.31506.21659.1382</string> </value>
<value> <string>970.10968.63773.24814</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1530026061.85</float>
<float>1536571801.32</float>
<string>UTC</string>
</tuple>
</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 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.16321.4013.58965</string> </value>
<value> <string>969.59527.36796.52394</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1532962084.26</float>
<float>1536569733.07</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -28,7 +28,8 @@
<div class="ui-content">
<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><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 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>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.15507.37024.58521</string> </value>
<value> <string>970.10939.52629.39901</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1529066187.06</float>
<float>1536570297.59</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -47,6 +47,7 @@
//return g.getUrlFor({command: 'display', options: {page: "logout"}});
return RSVP.all([
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: "logout"}})
]);
......@@ -57,8 +58,9 @@
panel_template_header() +
panel_template_body({
"preference_href": all_result[0],
"about_info_href": all_result[1],
"logout_href": all_result[2]
"download_href": all_result[1],
"about_info_href": all_result[2],
"logout_href": all_result[3]
})
);
})
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.15518.32472.22766</string> </value>
<value> <string>970.10971.34786.14882</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1529067619.87</float>
<float>1536571985.93</float>
<string>UTC</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