testilo 33.1.0 → 33.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "33.1.0",
3
+ "version": "33.2.0",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "call.js",
6
6
  "scripts": {
@@ -33,7 +33,8 @@
33
33
  const graphData = [];
34
34
  summaryReport.summaries.forEach(result => {
35
35
  graphData.push({
36
- target: result.sources.target.what,
36
+ targetID: result.sources.target.id,
37
+ targetWhat: result.sources.target.what,
37
38
  time: new Date(`20${result.endTime}Z`),
38
39
  score: result.score
39
40
  });
@@ -46,17 +47,37 @@
46
47
  Plot.lineY(graphData, {
47
48
  x: 'time',
48
49
  y: 'score',
49
- stroke: 'target',
50
- marker: 'circle-stroke'
50
+ stroke: 'targetWhat'
51
+ }),
52
+ Plot.dot(graphData, {
53
+ x: 'time',
54
+ y: 'score',
55
+ z: 'targetID',
56
+ r: 9
51
57
  }),
52
58
  Plot.text(graphData, {
53
59
  x: 'time',
54
60
  y: 'score',
55
- z: 'target',
56
- text: 'target',
61
+ z: 'targetID',
62
+ text: 'targetID',
63
+ textAnchor: 'middle'
64
+ }),
65
+ Plot.text(graphData, Plot.selectFirst({
66
+ x: 'time',
67
+ y: 'score',
68
+ z: 'targetID',
69
+ text: 'targetWhat',
70
+ textAnchor: 'start',
71
+ dx: 15
72
+ })),
73
+ Plot.text(graphData, Plot.selectLast({
74
+ x: 'time',
75
+ y: 'score',
76
+ z: 'targetID',
77
+ text: 'targetWhat',
57
78
  textAnchor: 'start',
58
- dx: 3
59
- })
79
+ dx: 15
80
+ }))
60
81
  ]
61
82
  });
62
83
  document.getElementById('graph').insertAdjacentElement('beforeend', svg);
@@ -28,11 +28,8 @@ const populateQuery = async (id, what, summaryReport, query) => {
28
28
  query.tp = trackerID;
29
29
  query.dateISO = getNowDate();
30
30
  query.dateSlash = getNowDateSlash();
31
- // JSON of pruned summary report.
31
+ // JSON of summary report.
32
32
  const {summaries} = summaryReport;
33
- summaries.forEach(result => {
34
- delete result.sources.target.id;
35
- });
36
33
  query.summaryReportJSON = JSON.stringify(summaryReport);
37
34
  // For each score:
38
35
  const rows = [];