This commit is contained in:
Bluepr1nt
2017-04-04 14:39:42 +02:00
parent abd876ba32
commit 0161e9cb32
4 changed files with 16 additions and 19 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -8
View File
@@ -51,16 +51,14 @@ var DataService = (function () {
}());
function mapData(response) {
console.log('mapping data', __WEBPACK_IMPORTED_MODULE_3__line_data__["a" /* LineData */]);
return response.json().map(toData);
var nums = response.json().map(toData);
var line = ({ data: nums, label: "Line 1" });
return line;
}
function toData(r) {
var lineData = ({
data: r.TOE1,
label: r.time,
description: (r.description || "No description")
});
console.log('Parsed Data:', lineData);
return lineData;
var num = r.TOE1;
console.log('Parsed Data:', num);
return num;
}
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/data.service.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -9
View File
@@ -33,16 +33,15 @@ export class DataService {
function mapData(response:Response): LineData {
console.log('mapping data', LineData);
return response.json().map(toData)
let nums = response.json().map(toData);
let line = <LineData>({data: nums, label: "Line 1"});
return line;
}
function toData(r:any): LineData{
let lineData = <LineData>({
data: r.TOE1,
label: r.time,
description: (r.description || "No description")
});
console.log('Parsed Data:', lineData);
return lineData;
function toData(r:any){
let num = r.TOE1;
console.log('Parsed Data:', num);
return num;
}