Skip to content

Commit d15574b

Browse files
committed
added headless firefox, removed use of promisemanager webdriver, bug fixes
1 parent 95e2cdd commit d15574b

26 files changed

Lines changed: 3899 additions & 4328 deletions

LICENSE

100644100755
Lines changed: 191 additions & 191 deletions
Large diffs are not rendered by default.

README.md

100644100755
Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
# RobotTool
2-
Tool for detecting (price) changes on webpages.
3-
4-
In this repo we maintain and publish an international version of the RobotTool.
5-
Other organisations are invited to experiment and use it.
6-
The tool is provided under an EUPL license on an ‘as is’ basis and without warranties of any kind (see license file).
7-
Feedback is appreciated (by email or by adding an issue ticket on this repo).
8-
9-
10-
## Prerequisites
11-
- Node.js (version >= 8)
12-
- Google Chrome (version >= 61)
13-
14-
## Installation
15-
16-
```bash
17-
$ npm install
18-
```
19-
20-
When you upgrade from a previous version of the RobotTool you have to upgrade the database.
21-
Copy the file observationDB.sqlite in map 'inst/server/db' from your previous version of the RobotTool to the same map in this version.
22-
23-
Run the command:
24-
```bash
25-
$ npm upgradeDB
26-
```
27-
28-
## Usage
29-
30-
Start application:
31-
```bash
32-
$ npm start
33-
```
34-
35-
See the user guide in the documentation map for detailed description of this application.
36-
37-
## Credits
38-
The development of this tool was partly subsidized by a Grant from Eurostat. Previous versions were published at our
39-
[research server](http://research.cbs.nl/Projects/RobotTool).
1+
# RobotTool
2+
Tool for detecting (price) changes on webpages.
3+
4+
In this repo we maintain and publish an international version of the RobotTool.
5+
Other organisations are invited to experiment and use it.
6+
The tool is provided under an EUPL license on an ‘as is’ basis and without warranties of any kind (see license file).
7+
Feedback is appreciated (by email or by adding an issue ticket on this repo).
8+
9+
10+
## Prerequisites
11+
- Google Chrome (version >= 61)
12+
13+
## Installation
14+
15+
```bash
16+
$ npm install
17+
```
18+
19+
When you upgrade from a previous version of the RobotTool you have to upgrade the database.
20+
Copy the file observationDB.sqlite in map 'inst/server/db' from your previous version of the RobotTool to the same map in this version.
21+
22+
Run the command:
23+
```bash
24+
$ npm upgradeDB
25+
```
26+
27+
## Usage
28+
29+
Start application:
30+
```bash
31+
$ npm start
32+
```
33+
34+
See the user guide in the documentation map for detailed description of this application.
35+
36+
## Credits
37+
The development of this tool was partly subsidized by a Grant from Eurostat. Previous versions were published at our
38+
[research server](http://research.cbs.nl/Projects/RobotTool).

inst/app/css/robottool.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,13 @@
324324
.grid path {
325325
stroke-width: 0;
326326
}
327+
328+
.ui-jqgrid .ui-jqgrid-htable th div {
329+
height:auto;
330+
overflow:hidden;
331+
padding-right:4px;
332+
padding-top:2px;
333+
position:relative;
334+
vertical-align:text-top;
335+
white-space:normal !important;
336+
}

inst/app/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ <h3 style="margin-top:5px;float: left" id="group"></h3>
7979
<div style="position:absolute;bottom:10px;height:10px;width:370px;" id="stepBar"></div>
8080
</div>
8181
<div class="chart" style="display:none;"></div>
82+
<div class="summary" style="display:none;">
83+
<table id="metrics"></table>
84+
</div>
8285

8386
<script data-main="app.js" src="js/require.js"></script>
8487
<footer>

inst/app/js/globalize.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,13 +1551,41 @@ Globalize.parseFloat = function( value, radix, cultureSelector ) {
15511551
fraction = intAndFraction.substr( decimalPos + decSep.length );
15521552
}
15531553
// handle groups (e.g. 1,000,000)
1554+
// var groupSep = nf[ "," ];
1555+
// integer = integer.split( groupSep ).join( "" );
15541556
var groupSep = nf[ "," ];
1555-
integer = integer.split( groupSep ).join( "" );
1557+
var groups = integer.split(groupSep);
1558+
if (groups.length > 1) {
1559+
// if the digits are grouped, check if the grouping is valid.
1560+
var i, groupLength, groupSize;
1561+
for (i = 0; i < groups.length; i++) {
1562+
groupLength = groups[groups.length - i - 1].length;
1563+
if (groupLength == 0) {
1564+
// empty groups are not allowed
1565+
return ret;
1566+
}
1567+
groupSize = nf.groupSizes[Math.min(i, nf.groupSizes.length - 1)];
1568+
if (i == groups.length - 1) {
1569+
// the last group should not be longer than the group size (unless its 0 meaning no more separators from here).
1570+
if (groupSize > 0 && groupLength > groupSize) {
1571+
return ret;
1572+
}
1573+
}
1574+
else {
1575+
if (groupLength != groupSize) {
1576+
// invalid when incorrect group size
1577+
return ret;
1578+
}
1579+
}
1580+
}
1581+
}
1582+
integer = groups.join("");
1583+
15561584
var altGroupSep = groupSep.replace( /\u00A0/g, " " );
15571585
if ( groupSep !== altGroupSep ) {
15581586
integer = integer.split( altGroupSep ).join( "" );
15591587
}
1560-
// build a natively parsable number string
1588+
//build a natively parsable number string
15611589
var p = sign + integer;
15621590
if ( fraction !== null ) {
15631591
p += "." + fraction;

inst/app/js/i18next.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/app/js/i18nextXHRBackend.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/app/locales/translation-en.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"Active" : "Active",
3131
"Comment" : "Comment",
3232
"Currency" : "Currency",
33+
"LastDate" : "Date",
3334
"LastValue" : "Last price",
3435
"NoValue" : "No price",
3536
"Action" : "Action",
@@ -88,6 +89,16 @@
8889
"Copy" : "Copy productgroup"
8990
},
9091

92+
"Summary": {
93+
"Label" : "Summary",
94+
"Productgroup" : "Product",
95+
"Source" : "Source",
96+
"HasPrice" : "Price",
97+
"NoPrice" : "No price",
98+
"NoObservation" : "No observation",
99+
"Total" : "Total"
100+
},
101+
91102
"Server": {
92103
"SuccessMessage" : "Data saved",
93104
"ErrorMessage" : "Error message server: ",
@@ -102,7 +113,8 @@
102113
"SaveObsError" : "Priceinformation not saved:",
103114
"PriceContextEmpty" : "PriceContext is empty",
104115
"NoData" : "no data",
105-
"NoObservation" : "No observation exists for this source."
116+
"NoObservation" : "No observation exists for this source.",
117+
"NoBrowser" : " Could not find browser: "
106118
}
107119

108120
}

inst/app/locales/translation-nl.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"OK" : "OK",
2020
"Process" : "Verwerking...",
2121
"Get" : "Ophalen data van: ",
22-
"AllRecords" : "Alle"
22+
"AllRecords" : "Alle"
2323

2424
},
2525

@@ -31,6 +31,7 @@
3131
"Active" : "Actief",
3232
"Comment" : "Opmerking",
3333
"Currency" : "Munteenheid",
34+
"LastDate" : "Datum",
3435
"LastValue" : "Laatste prijs",
3536
"NoValue" : "Geen prijs",
3637
"Action" : "Actie",
@@ -59,7 +60,7 @@
5960
"Date" : "Datum",
6061
"Action" : "Actie",
6162
"Value" : "Prijs",
62-
"Quantity" : "Hoeveelheid",
63+
"Quantity" : "Hoeveelheid",
6364
"Comment" : "Opmerking",
6465
"Context" : "PrijsContext",
6566
"CopyValue" : "Overnemen vorige waarneming",
@@ -80,7 +81,7 @@
8081
"Description" : "Naam",
8182
"Comment" : "Omschrijving",
8283
"Action" : "Actie",
83-
"MessageDelete" : "Let op: ook alle bijbehorende berichtgevers worden verwijderd!",
84+
"MessageDelete" : "Let op: ook alle bijbehorende berichtgevers worden verwijderd!",
8485
"ExportConfig" : "Exporteren configuratie",
8586
"ImportConfig" : "Importeren configuratie",
8687
"Browse" : "Bladeren...",
@@ -89,6 +90,17 @@
8990
"Copy" : "Kopieren artikel"
9091
},
9192

93+
"Summary": {
94+
"Label" : "Overzicht",
95+
"Productgroup" : "Artikel",
96+
"Source" : "Bron",
97+
"HasPrice" : "Prijs",
98+
"NoPrice" : "Geen prijs",
99+
"NoObservation" : "Geen waarneming",
100+
"Total" : "Totaal"
101+
102+
},
103+
92104
"Server": {
93105
"SuccessMessage" : "Gegevens opgeslagen",
94106
"ErrorMessage" : "Foutmelding server:",
@@ -103,7 +115,8 @@
103115
"SaveObsError" : "Prijsinformatie niet opgeslagen:",
104116
"PriceContextEmpty" : "PrijsContext is leeg",
105117
"NoData" : "geen data",
106-
"NoObservation" : "Er is nog geen waarneming voor deze berichtgever."
118+
"NoObservation" : "Er is nog geen waarneming voor deze berichtgever.",
119+
"NoBrowser" : "Kan browser niet vinden: "
107120
}
108121

109122
}

inst/app/ui/chart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ define(["d3.min"], function(d3) {
4949
.append("g")
5050
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
5151

52-
d3.json("data.html?action=chart&id=" + id + "&productgroup_id=" + productgroup_id,
52+
d3.json("data?action=chart&id=" + id + "&productgroup_id=" + productgroup_id,
5353
function(error, data) {
5454
var maxValue = data.maxValue;
5555
data = data.rows.filter(function(elt) {
@@ -144,7 +144,7 @@ define(["d3.min"], function(d3) {
144144
return d3.svg.axis().scale(y).orient("left").ticks(10);
145145
}
146146

147-
d3.json("data.html?action=chart&productgroup_id=" + productgroup_id,
147+
d3.json("data?action=chart&productgroup_id=" + productgroup_id,
148148
function(error, data) {
149149
var maxValue = data.maxValue;
150150

0 commit comments

Comments
 (0)