Added routing and bootstrap
This commit is contained in:
Vendored
+3
@@ -8,6 +8,9 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.bundle.min.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.bundle.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+144
-108
@@ -1,14 +1,44 @@
|
|||||||
webpackJsonp([1,4],{
|
webpackJsonp([1,4],{
|
||||||
|
|
||||||
/***/ 302:
|
/***/ 358:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_add_operator_map__ = __webpack_require__(617);
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DashboardComponent; });
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_add_operator_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_add_operator_map__);
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_http__ = __webpack_require__(284);
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__line_data__ = __webpack_require__(455);
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||||
|
};
|
||||||
|
|
||||||
|
var DashboardComponent = (function () {
|
||||||
|
function DashboardComponent() {
|
||||||
|
}
|
||||||
|
DashboardComponent = __decorate([
|
||||||
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
||||||
|
selector: 'dashboard',
|
||||||
|
template: __webpack_require__(709)
|
||||||
|
}),
|
||||||
|
__metadata('design:paramtypes', [])
|
||||||
|
], DashboardComponent);
|
||||||
|
return DashboardComponent;
|
||||||
|
}());
|
||||||
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/dashboard.component.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 359:
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__ = __webpack_require__(711);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DataService; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DataService; });
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
@@ -21,53 +51,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var DataService = (function () {
|
var DataService = (function () {
|
||||||
function DataService(http) {
|
function DataService() {
|
||||||
this.http = http;
|
|
||||||
this.baseUrl = 'http://localhost:3000/webapi/data';
|
|
||||||
}
|
}
|
||||||
DataService.prototype.get = function () {
|
DataService.prototype.get = function () {
|
||||||
console.log('Getting data');
|
var lineChartData$ = ({ data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A' });
|
||||||
var lineChartData$ =
|
return __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__["Observable"].create(function (observer) {
|
||||||
//<LineData>( {data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'} );
|
observer.next(lineChartData$);
|
||||||
this.http
|
observer.complete();
|
||||||
.get(("" + this.baseUrl), { headers: this.getHeaders() })
|
});
|
||||||
.map(mapData);
|
|
||||||
console.log(lineChartData$);
|
|
||||||
return lineChartData$;
|
|
||||||
};
|
|
||||||
DataService.prototype.getHeaders = function () {
|
|
||||||
var headers = new __WEBPACK_IMPORTED_MODULE_2__angular_http__["b" /* Headers */]();
|
|
||||||
headers.append('Accept', 'application/json');
|
|
||||||
return headers;
|
|
||||||
};
|
};
|
||||||
DataService = __decorate([
|
DataService = __decorate([
|
||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
|
||||||
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_2__angular_http__["c" /* Http */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_2__angular_http__["c" /* Http */]) === 'function' && _a) || Object])
|
__metadata('design:paramtypes', [])
|
||||||
], DataService);
|
], DataService);
|
||||||
return DataService;
|
return DataService;
|
||||||
var _a;
|
|
||||||
}());
|
}());
|
||||||
function mapData(response) {
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/data.service.js.map
|
||||||
console.log('Mapping data', __WEBPACK_IMPORTED_MODULE_3__line_data__["a" /* LineData */]);
|
|
||||||
var nums = response.json().map(toData);
|
|
||||||
console.log(nums);
|
|
||||||
var line = ({ data: nums, label: "Series A" });
|
|
||||||
console.log(line);
|
|
||||||
return line;
|
|
||||||
}
|
|
||||||
function toData(r) {
|
|
||||||
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
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 344:
|
/***/ 425:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
function webpackEmptyContext(req) {
|
function webpackEmptyContext(req) {
|
||||||
@@ -76,20 +80,20 @@ function webpackEmptyContext(req) {
|
|||||||
webpackEmptyContext.keys = function() { return []; };
|
webpackEmptyContext.keys = function() { return []; };
|
||||||
webpackEmptyContext.resolve = webpackEmptyContext;
|
webpackEmptyContext.resolve = webpackEmptyContext;
|
||||||
module.exports = webpackEmptyContext;
|
module.exports = webpackEmptyContext;
|
||||||
webpackEmptyContext.id = 344;
|
webpackEmptyContext.id = 425;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 345:
|
/***/ 426:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(432);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(514);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__environments_environment__ = __webpack_require__(456);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__environments_environment__ = __webpack_require__(549);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_app_module__ = __webpack_require__(453);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_app_module__ = __webpack_require__(547);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -98,15 +102,55 @@ if (__WEBPACK_IMPORTED_MODULE_2__environments_environment__["a" /* environment *
|
|||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__angular_core__["enableProdMode"])();
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__angular_core__["enableProdMode"])();
|
||||||
}
|
}
|
||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_3__app_app_module__["a" /* AppModule */]);
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_3__app_app_module__["a" /* AppModule */]);
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/main.js.map
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/main.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 452:
|
/***/ 545:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__(534);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dashboard_component__ = __webpack_require__(358);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppRoutingModule; });
|
||||||
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var routes = [
|
||||||
|
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
|
||||||
|
{ path: 'dashboard', component: __WEBPACK_IMPORTED_MODULE_2__dashboard_component__["a" /* DashboardComponent */] },
|
||||||
|
];
|
||||||
|
var AppRoutingModule = (function () {
|
||||||
|
function AppRoutingModule() {
|
||||||
|
}
|
||||||
|
AppRoutingModule = __decorate([
|
||||||
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
|
||||||
|
imports: [__WEBPACK_IMPORTED_MODULE_1__angular_router__["a" /* RouterModule */].forRoot(routes)],
|
||||||
|
exports: [__WEBPACK_IMPORTED_MODULE_1__angular_router__["a" /* RouterModule */]]
|
||||||
|
}),
|
||||||
|
__metadata('design:paramtypes', [])
|
||||||
|
], AppRoutingModule);
|
||||||
|
return AppRoutingModule;
|
||||||
|
}());
|
||||||
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/app-routing.module.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 546:
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; });
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
@@ -120,35 +164,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|||||||
|
|
||||||
var AppComponent = (function () {
|
var AppComponent = (function () {
|
||||||
function AppComponent() {
|
function AppComponent() {
|
||||||
this.title = 'app works!';
|
this.title = 'Energie';
|
||||||
}
|
}
|
||||||
AppComponent = __decorate([
|
AppComponent = __decorate([
|
||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
template: __webpack_require__(614),
|
template: __webpack_require__(707),
|
||||||
styles: [__webpack_require__(613)]
|
styles: [__webpack_require__(706)]
|
||||||
}),
|
}),
|
||||||
__metadata('design:paramtypes', [])
|
__metadata('design:paramtypes', [])
|
||||||
], AppComponent);
|
], AppComponent);
|
||||||
return AppComponent;
|
return AppComponent;
|
||||||
}());
|
}());
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/app.component.js.map
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/app.component.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 453:
|
/***/ 547:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(191);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(167);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(423);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(504);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_http__ = __webpack_require__(284);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_http__ = __webpack_require__(510);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__ = __webpack_require__(611);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__ = __webpack_require__(704);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__(452);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_routing_module__ = __webpack_require__(545);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__chart_component__ = __webpack_require__(454);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_component__ = __webpack_require__(546);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__data_service__ = __webpack_require__(302);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__chart_component__ = __webpack_require__(548);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__dashboard_component__ = __webpack_require__(358);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__data_service__ = __webpack_require__(359);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
@@ -167,38 +213,42 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var AppModule = (function () {
|
var AppModule = (function () {
|
||||||
function AppModule() {
|
function AppModule() {
|
||||||
}
|
}
|
||||||
AppModule = __decorate([
|
AppModule = __decorate([
|
||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
|
||||||
declarations: [
|
declarations: [
|
||||||
__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* AppComponent */],
|
__WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* AppComponent */],
|
||||||
__WEBPACK_IMPORTED_MODULE_6__chart_component__["a" /* LineChartComponent */]
|
__WEBPACK_IMPORTED_MODULE_7__chart_component__["a" /* LineChartComponent */],
|
||||||
|
__WEBPACK_IMPORTED_MODULE_8__dashboard_component__["a" /* DashboardComponent */]
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
|
__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
|
||||||
__WEBPACK_IMPORTED_MODULE_2__angular_forms__["a" /* FormsModule */],
|
__WEBPACK_IMPORTED_MODULE_2__angular_forms__["a" /* FormsModule */],
|
||||||
__WEBPACK_IMPORTED_MODULE_3__angular_http__["a" /* HttpModule */],
|
__WEBPACK_IMPORTED_MODULE_3__angular_http__["a" /* HttpModule */],
|
||||||
__WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__["ChartsModule"]
|
__WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__["ChartsModule"],
|
||||||
|
__WEBPACK_IMPORTED_MODULE_5__app_routing_module__["a" /* AppRoutingModule */]
|
||||||
],
|
],
|
||||||
providers: [__WEBPACK_IMPORTED_MODULE_7__data_service__["a" /* DataService */]],
|
providers: [__WEBPACK_IMPORTED_MODULE_9__data_service__["a" /* DataService */]],
|
||||||
bootstrap: [__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* AppComponent */]]
|
bootstrap: [__WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* AppComponent */]]
|
||||||
}),
|
}),
|
||||||
__metadata('design:paramtypes', [])
|
__metadata('design:paramtypes', [])
|
||||||
], AppModule);
|
], AppModule);
|
||||||
return AppModule;
|
return AppModule;
|
||||||
}());
|
}());
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/app.module.js.map
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/app.module.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 454:
|
/***/ 548:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__data_service__ = __webpack_require__(302);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__data_service__ = __webpack_require__(359);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LineChartComponent; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LineChartComponent; });
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
@@ -216,7 +266,7 @@ var LineChartComponent = (function () {
|
|||||||
this.dataService = dataService;
|
this.dataService = dataService;
|
||||||
// lineChart
|
// lineChart
|
||||||
this.lineChartData = [
|
this.lineChartData = [
|
||||||
{ data: [1, 0, 0, 0, 0, 0, 1], label: 'Series A' }
|
{ data: [0, 0, 0, 0, 0, 0, 0], label: 'Series A' }
|
||||||
];
|
];
|
||||||
this.lineChartLabels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
|
this.lineChartLabels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
|
||||||
this.lineChartOptions = {
|
this.lineChartOptions = {
|
||||||
@@ -237,53 +287,32 @@ var LineChartComponent = (function () {
|
|||||||
}
|
}
|
||||||
// events
|
// events
|
||||||
LineChartComponent.prototype.chartClicked = function (e) {
|
LineChartComponent.prototype.chartClicked = function (e) {
|
||||||
//console.log(e);
|
console.log(e);
|
||||||
};
|
};
|
||||||
LineChartComponent.prototype.chartHovered = function (e) {
|
LineChartComponent.prototype.chartHovered = function (e) {
|
||||||
//console.log(e);
|
console.log(e);
|
||||||
};
|
};
|
||||||
LineChartComponent.prototype.ngOnInit = function () {
|
LineChartComponent.prototype.ngOnInit = function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
this.dataService
|
this.dataService
|
||||||
.get()
|
.get()
|
||||||
.subscribe(function (res) {
|
.subscribe(function (res) { return _this.lineChartData[0].data = res.data; });
|
||||||
console.log(res);
|
|
||||||
var newDataSet = [];
|
|
||||||
var newLine = { data: res.data, label: res.label };
|
|
||||||
newDataSet.push(newLine);
|
|
||||||
_this.lineChartData = newDataSet;
|
|
||||||
});
|
|
||||||
console.log("Init");
|
|
||||||
};
|
};
|
||||||
LineChartComponent = __decorate([
|
LineChartComponent = __decorate([
|
||||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
||||||
selector: 'line-chart',
|
selector: 'line-chart',
|
||||||
template: __webpack_require__(615)
|
template: __webpack_require__(708)
|
||||||
}),
|
}),
|
||||||
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */]) === 'function' && _a) || Object])
|
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */]) === 'function' && _a) || Object])
|
||||||
], LineChartComponent);
|
], LineChartComponent);
|
||||||
return LineChartComponent;
|
return LineChartComponent;
|
||||||
var _a;
|
var _a;
|
||||||
}());
|
}());
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/chart.component.js.map
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/chart.component.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 455:
|
/***/ 549:
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LineData; });
|
|
||||||
var LineData = (function () {
|
|
||||||
function LineData() {
|
|
||||||
}
|
|
||||||
return LineData;
|
|
||||||
}());
|
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/line-data.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 456:
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -295,38 +324,45 @@ var LineData = (function () {
|
|||||||
var environment = {
|
var environment = {
|
||||||
production: false
|
production: false
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/environment.js.map
|
//# sourceMappingURL=C:/Users/avans/Documents/Angular/Smarthome-local/mean-app/src/environment.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 613:
|
/***/ 706:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
module.exports = "h1 {\r\n\tcolor: blue;\r\n}"
|
module.exports = "h1 {\r\n\tcolor: blue;\r\n}"
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 614:
|
/***/ 707:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
module.exports = "<h1>\r\n {{title}}\r\n\r\n <line-chart></line-chart>\r\n</h1>"
|
module.exports = "<div class=\"container\">\r\n\r\n <nav class=\"navbar navbar-default\">\r\n <div class=\"container-fluid\">\r\n <div class=\"navbar-header\">\r\n <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">\r\n <span class=\"sr-only\">Toggle navigation</span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n </button>\r\n <a class=\"navbar-brand\">Energiemeter</a>\r\n </div>\r\n <div id=\"navbar\" class=\"navbar-collapse collapse\">\r\n <ul class=\"nav navbar-nav\">\r\n <li routerLink=\"/dashboard\" routerLinkActive=\"active\"><a routerLink=\"/dashboard\" routerLinkActive=\"active\">Dashboard</a></li>\r\n </ul>\r\n </div><!--/.nav-collapse -->\r\n </div><!--/.container-fluid -->\r\n </nav>\r\n\r\n <div class=\"row\">\r\n\r\n <div class=\"col-md-12\">\r\n <div class=\"page-header\">\r\n <h1>{{title}} <small>Avans</small></h1>\r\n </div>\r\n </div>\r\n\r\n <router-outlet></router-outlet>\r\n\r\n </div>\r\n</div>\r\n"
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 615:
|
/***/ 708:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
module.exports = "<div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div style=\"display: block;\">\r\n <canvas baseChart width=\"400\" height=\"400\"\r\n [datasets]=\"lineChartData\"\r\n [labels]=\"lineChartLabels\"\r\n [options]=\"lineChartOptions\"\r\n [colors]=\"lineChartColors\"\r\n [legend]=\"lineChartLegend\"\r\n [chartType]=\"lineChartType\"\r\n (chartHover)=\"chartHovered($event)\"\r\n (chartClick)=\"chartClicked($event)\"></canvas>\r\n </div>\r\n </div>\r\n</div>"
|
module.exports = "<div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div style=\"display: block;\">\r\n <canvas baseChart width=\"400\" height=\"400\"\r\n [datasets]=\"lineChartData\"\r\n [labels]=\"lineChartLabels\"\r\n [options]=\"lineChartOptions\"\r\n [colors]=\"lineChartColors\"\r\n [legend]=\"lineChartLegend\"\r\n [chartType]=\"lineChartType\"\r\n (chartHover)=\"chartHovered($event)\"\r\n (chartClick)=\"chartClicked($event)\"></canvas>\r\n </div>\r\n </div>\r\n</div>"
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 630:
|
/***/ 709:
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
module.exports = "<div>\r\n\t<line-chart></line-chart>\r\n</div>"
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 977:
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(345);
|
module.exports = __webpack_require__(426);
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
},[630]);
|
},[977]);
|
||||||
//# sourceMappingURL=main.bundle.map
|
//# sourceMappingURL=main.bundle.map
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1755
-1408
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+10
-10
@@ -1,15 +1,15 @@
|
|||||||
webpackJsonp([2,4],{
|
webpackJsonp([2,4],{
|
||||||
|
|
||||||
/***/ 347:
|
/***/ 428:
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||||
|
|
||||||
// load the styles
|
// load the styles
|
||||||
var content = __webpack_require__(607);
|
var content = __webpack_require__(700);
|
||||||
if(typeof content === 'string') content = [[module.i, content, '']];
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
||||||
// add the styles to the DOM
|
// add the styles to the DOM
|
||||||
var update = __webpack_require__(628)(content, {});
|
var update = __webpack_require__(975)(content, {});
|
||||||
if(content.locals) module.exports = content.locals;
|
if(content.locals) module.exports = content.locals;
|
||||||
// Hot Module Replacement
|
// Hot Module Replacement
|
||||||
if(false) {
|
if(false) {
|
||||||
@@ -27,10 +27,10 @@ if(false) {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 607:
|
/***/ 700:
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
exports = module.exports = __webpack_require__(608)();
|
exports = module.exports = __webpack_require__(701)();
|
||||||
// imports
|
// imports
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ exports.push([module.i, "/* You can add global styles to this file, and also imp
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 608:
|
/***/ 701:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -99,7 +99,7 @@ module.exports = function() {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 628:
|
/***/ 975:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -352,13 +352,13 @@ function updateLink(linkElement, obj) {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 632:
|
/***/ 979:
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(347);
|
module.exports = __webpack_require__(428);
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
},[632]);
|
},[979]);
|
||||||
//# sourceMappingURL=styles.bundle.map
|
//# sourceMappingURL=styles.bundle.map
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+28311
-3260
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@ var connection = mysql.createConnection({
|
|||||||
});
|
});
|
||||||
|
|
||||||
connection.connect(function(err) {
|
connection.connect(function(err) {
|
||||||
if (err) throw err;
|
//if (err) throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = connection;
|
module.exports = connection;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { DashboardComponent } from './dashboard.component';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
|
||||||
|
{ path: 'dashboard', component: DashboardComponent },
|
||||||
|
];
|
||||||
|
@NgModule({
|
||||||
|
imports: [ RouterModule.forRoot(routes) ],
|
||||||
|
exports: [ RouterModule ]
|
||||||
|
})
|
||||||
|
export class AppRoutingModule {}
|
||||||
@@ -1,5 +1,33 @@
|
|||||||
<h1>
|
<div class="container">
|
||||||
{{title}}
|
|
||||||
|
|
||||||
<line-chart></line-chart>
|
<nav class="navbar navbar-default">
|
||||||
</h1>
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand">Energiemeter</a>
|
||||||
|
</div>
|
||||||
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li routerLink="/dashboard" routerLinkActive="active"><a routerLink="/dashboard" routerLinkActive="active">Dashboard</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div><!--/.container-fluid -->
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>{{title}} <small>Avans</small></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
|
|||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'app works!';
|
title = 'Energie';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,26 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { HttpModule } from '@angular/http';
|
import { HttpModule } from '@angular/http';
|
||||||
import { ChartsModule } from 'ng2-charts/ng2-charts';
|
import { ChartsModule } from 'ng2-charts/ng2-charts';
|
||||||
|
|
||||||
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { LineChartComponent } from './chart.component';
|
import { LineChartComponent } from './chart.component';
|
||||||
|
import { DashboardComponent } from './dashboard.component';
|
||||||
|
|
||||||
import { DataService } from './data.service';
|
import { DataService } from './data.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
LineChartComponent
|
LineChartComponent,
|
||||||
|
DashboardComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule,
|
HttpModule,
|
||||||
ChartsModule
|
ChartsModule,
|
||||||
|
AppRoutingModule
|
||||||
],
|
],
|
||||||
providers: [DataService],
|
providers: [DataService],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div>
|
||||||
|
<line-chart></line-chart>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'dashboard',
|
||||||
|
templateUrl: './dashboard.component.html'
|
||||||
|
})
|
||||||
|
|
||||||
|
export class DashboardComponent {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,6 +8,9 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.bundle.min.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.bundle.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user