mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Remove backup
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
46
Display - Copy/.gitignore
vendored
46
Display - Copy/.gitignore
vendored
@@ -1,46 +0,0 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -1,27 +0,0 @@
|
||||
# Display
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.3.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
||||
@@ -1,132 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"Display": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/Display",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": false,
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "10kb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "Display:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "Display:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "Display:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "Display:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "Display:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "Display"
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
@@ -1,32 +0,0 @@
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {}
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json')
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('Display app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,11 +0,0 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('app-root .content span')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/Display'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
13249
Display - Copy/package-lock.json
generated
13249
Display - Copy/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"name": "display",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^8.2.8",
|
||||
"@angular/cdk": "~8.1.4",
|
||||
"@angular/common": "^8.2.8",
|
||||
"@angular/compiler": "^8.2.8",
|
||||
"@angular/core": "^8.2.8",
|
||||
"@angular/forms": "^8.2.8",
|
||||
"@angular/material": "^8.2.1",
|
||||
"@angular/platform-browser": "^8.2.8",
|
||||
"@angular/platform-browser-dynamic": "^8.2.8",
|
||||
"@angular/router": "^8.2.8",
|
||||
"@aspnet/signalr": "^1.1.4",
|
||||
"@webcomponents/custom-elements": "^1.3.0",
|
||||
"angular-highcharts": "^8.0.3",
|
||||
"hammerjs": "^2.0.8",
|
||||
"highcharts": "^7.2.0",
|
||||
"moment": "^2.24.0",
|
||||
"ngx-socket-io": "^3.0.1",
|
||||
"rxjs": "~6.4.0",
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.803.6",
|
||||
"@angular/cli": "^8.3.6",
|
||||
"@angular/compiler-cli": "^8.2.8",
|
||||
"@angular/language-service": "^8.2.8",
|
||||
"@types/jasmine": "~3.3.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "^5.1.1",
|
||||
"jasmine-core": "~3.4.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.1.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.15.0",
|
||||
"typescript": "~3.5.3"
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||
import { LaundryComponent } from './laundry/laundry.component';
|
||||
import { WeatherChartsComponent } from './weather/charts/weather-charts.component';
|
||||
import { WeatherCurrentComponent } from './weather/current/weather-current.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DashboardComponent
|
||||
},
|
||||
{
|
||||
path: 'weather',
|
||||
component: WeatherCurrentComponent
|
||||
},
|
||||
{
|
||||
path: 'weather-charts/:type',
|
||||
component: WeatherChartsComponent
|
||||
},
|
||||
{
|
||||
path: 'laundry',
|
||||
component: LaundryComponent
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
@@ -1,117 +0,0 @@
|
||||
<mat-sidenav-container>
|
||||
<mat-sidenav #sidenav role="navigation">
|
||||
<mat-nav-list>
|
||||
<a mat-list-item>
|
||||
<mat-icon class="icon">input</mat-icon>
|
||||
<span class="label">Login</span>
|
||||
</a>
|
||||
<a mat-list-item>
|
||||
<mat-icon class="icon">home</mat-icon>
|
||||
<span class="label">Home</span>
|
||||
</a>
|
||||
<a mat-list-item>
|
||||
<mat-icon class="icon">dashboard</mat-icon>
|
||||
<span class="label">Dashboard</span>
|
||||
</a>
|
||||
<a mat-list-item type="button">
|
||||
<mat-icon class="icon">input</mat-icon>
|
||||
<span class="label">LogOut</span>
|
||||
</a>
|
||||
</mat-nav-list>
|
||||
</mat-sidenav>
|
||||
<mat-sidenav-content>
|
||||
<mat-toolbar color="primary">
|
||||
<div fxHide.gt-xs>
|
||||
<button mat-icon-button>
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
Material Blog
|
||||
</a>
|
||||
</div>
|
||||
<div fxFlex fxLayout fxLayoutAlign="flex-end" fxHide.xs>
|
||||
<ul fxLayout fxLayoutGap="20px" class="navigation-items">
|
||||
<li>
|
||||
<a>
|
||||
<mat-icon class="icon">input</mat-icon>
|
||||
<span class="label">Login</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a >
|
||||
<mat-icon class="icon">home</mat-icon>
|
||||
<span class="label">Home</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>
|
||||
<mat-icon class="icon">dashboard</mat-icon>
|
||||
<span class="label">Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>
|
||||
<mat-icon class="icon">input</mat-icon>
|
||||
<span class="label">LogOut</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</mat-toolbar>
|
||||
<main>
|
||||
</main>
|
||||
</mat-sidenav-content>
|
||||
</mat-sidenav-container>
|
||||
<!-- <div class="main-container">
|
||||
<header class="header header-3">
|
||||
<div class="branding">
|
||||
<a [routerLink]="['/']">
|
||||
<clr-icon shape="home" class="app-logo"></clr-icon>
|
||||
<span class="title">
|
||||
Home Status
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-container">
|
||||
<nav class="sidenav">
|
||||
<section class="sidenav-content">
|
||||
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Dashboard
|
||||
</a>
|
||||
<a routerLink="/laundry" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Laundry
|
||||
</a>
|
||||
<a routerLink="/weather" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Weather
|
||||
</a>
|
||||
<section class="nav-group">
|
||||
<input id="nav-weather" type="checkbox">
|
||||
<label for="nav-weather">Weather Charts</label>
|
||||
<ul class="nav-list">
|
||||
<li>
|
||||
<a routerLink="/weather-charts/temperature" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Temperature
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a routerLink="/weather-charts/humidity" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Humidity
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a routerLink="/weather-charts/pressure" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" class="nav-link">
|
||||
Pressure
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</nav>
|
||||
<div class="content-area">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
@@ -1,11 +0,0 @@
|
||||
.app-logo {
|
||||
color: white;
|
||||
width: 1.2rem !important;
|
||||
height: 1.2rem !important;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: relative;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'Display'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('Display');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('.content span').textContent).toContain('Display app is running!');
|
||||
});
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'Home Status';
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ChartModule } from 'angular-highcharts';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
|
||||
|
||||
import { MatSidenavModule,MatToolbarModule,MatIconModule,MatListModule} from '@angular/material';
|
||||
|
||||
import { LaundryComponent } from './laundry/laundry.component';
|
||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||
import { WeatherChartsComponent } from './weather/charts/weather-charts.component';
|
||||
import { WeatherCurrentComponent } from './weather/current/weather-current.component';
|
||||
|
||||
const config: SocketIoConfig = { url: 'http://home.kaczorzoo.net:9091', options: {} };
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
LaundryComponent,
|
||||
DashboardComponent,
|
||||
WeatherChartsComponent,
|
||||
WeatherCurrentComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
BrowserAnimationsModule,
|
||||
SocketIoModule.forRoot(config),
|
||||
ChartModule,
|
||||
HttpClientModule,
|
||||
FormsModule,
|
||||
MatSidenavModule,MatToolbarModule,MatIconModule,MatListModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
@@ -1 +0,0 @@
|
||||
dashboard works!
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
|
||||
describe('DashboardComponent', () => {
|
||||
let component: DashboardComponent;
|
||||
let fixture: ComponentFixture<DashboardComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DashboardComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DashboardComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrls: ['./dashboard.component.scss']
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<div class="laundry-current">
|
||||
<div *ngIf="latestStatus === null">
|
||||
Loading...
|
||||
</div>
|
||||
<div *ngIf="latestStatus !== null">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="laundry-current-header">
|
||||
Washer
|
||||
</td>
|
||||
<td [ngClass]="latestStatus.washer.toString()">
|
||||
{{ latestStatus.washer ? 'On' : 'Off' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="laundry-current-header">
|
||||
Dryer
|
||||
</td>
|
||||
<td [ngClass]="latestStatus.dryer.toString()">
|
||||
{{ latestStatus.dryer ? 'On' : 'Off' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,17 +0,0 @@
|
||||
.laundry-current {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.laundry-current-header {
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.true {
|
||||
color: darkgoldenrod;
|
||||
}
|
||||
|
||||
.false {
|
||||
color: darkgreen;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LaundryComponent } from './laundry.component';
|
||||
|
||||
describe('LaundryComponent', () => {
|
||||
let component: LaundryComponent;
|
||||
let fixture: ComponentFixture<LaundryComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LaundryComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LaundryComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { LaundryService } from './service/laundry.service';
|
||||
import { LaundryStatus } from './service/laundry-status';
|
||||
|
||||
@Component({
|
||||
selector: 'app-laundry',
|
||||
templateUrl: './laundry.component.html',
|
||||
styleUrls: ['./laundry.component.scss']
|
||||
})
|
||||
export class LaundryComponent implements OnInit {
|
||||
public latestStatus: LaundryStatus;
|
||||
constructor(private laundryService: LaundryService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.laundryService.getLatestStatus().subscribe(s => this.latestStatus = s);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { LaundryStatus } from './laundry-status';
|
||||
|
||||
describe('LaundryStatus', () => {
|
||||
it('should create an instance', () => {
|
||||
expect(new LaundryStatus()).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
export class LaundryStatus {
|
||||
washer = false;
|
||||
dryer = false;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LaundryService } from './laundry.service';
|
||||
|
||||
describe('LaundryService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: LaundryService = TestBed.get(LaundryService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, BehaviorSubject } from 'rxjs';
|
||||
import { Socket } from 'ngx-socket-io';
|
||||
import { LaundryStatus } from './laundry-status';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class LaundryService {
|
||||
private latestStatus: BehaviorSubject<LaundryStatus> = new BehaviorSubject<LaundryStatus>(new LaundryStatus());
|
||||
|
||||
constructor(private socket: Socket) {
|
||||
this.socket.on('status', (statusString: string) => {
|
||||
const newStatus: LaundryStatus = JSON.parse(statusString);
|
||||
|
||||
if (newStatus.washer !== undefined) {
|
||||
this.latestStatus.value.washer = newStatus.washer;
|
||||
}
|
||||
|
||||
if (newStatus.dryer !== undefined) {
|
||||
this.latestStatus.value.dryer = newStatus.dryer;
|
||||
}
|
||||
});
|
||||
|
||||
this.socket.emit('getStatus');
|
||||
}
|
||||
|
||||
getLatestStatus(): Observable<LaundryStatus> {
|
||||
return this.latestStatus.asObservable();
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<!-- <div [hidden]="!loading" class="page-spinner">
|
||||
<span class="spinner"></span>
|
||||
</div>
|
||||
<div class="chart-content">
|
||||
<header class="chart-header">
|
||||
<clr-dropdown class="clr-dropdown">
|
||||
<button class="btn btn-outline-primary chart-button-spacer" clrDropdownTrigger>
|
||||
{{ timeSpanItems[selectedTimeSpan] }}
|
||||
<clr-icon shape="caret down"></clr-icon>
|
||||
</button>
|
||||
<clr-dropdown-menu clrPosition="bottom-left" *clrIfOpen>
|
||||
<div *ngFor="let item of timeSpanItems | keyvalue" clrDropdownItem [class.active]="+item.key === selectedTimeSpan" (click)="selectedTimeSpan = +item.key">
|
||||
{{ item.value }}
|
||||
</div>
|
||||
</clr-dropdown-menu>
|
||||
</clr-dropdown>
|
||||
<button class="btn btn-outline-primary" [hidden]="selectedTimeSpan !== timeSpans.Day" (click)="handleDateArrowClick(-1)">
|
||||
<clr-icon shape="caret left"></clr-icon>
|
||||
</button>
|
||||
<button class="btn btn-outline-primary chart-button-spacer" [hidden]="selectedTimeSpan !== timeSpans.Day || isSelectedDateToday()" (click)="handleDateArrowClick(1)">
|
||||
<clr-icon shape="caret right"></clr-icon>
|
||||
</button>
|
||||
<button class="btn btn-outline-primary" [hidden]="selectedTimeSpan !== timeSpans.Day || isSelectedDateToday()" (click)="resetToToday()">
|
||||
Today
|
||||
</button>
|
||||
</header>
|
||||
<div id="chart" [chart]="chart"></div>
|
||||
</div> -->
|
||||
@@ -1,24 +0,0 @@
|
||||
.chart-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#chart {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.chart-header {
|
||||
background-color: rgb(250, 250, 250);
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.chart-button-spacer {
|
||||
margin-right: 20px;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WeatherChartsComponent } from './weather-charts.component';
|
||||
|
||||
describe('WeatherChartsComponent', () => {
|
||||
let component: WeatherChartsComponent;
|
||||
let fixture: ComponentFixture<WeatherChartsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WeatherChartsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WeatherChartsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,152 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Chart } from 'angular-highcharts';
|
||||
import { SeriesLineOptions } from 'highcharts';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { WeatherValue } from 'src/app/weather/service/weather-value';
|
||||
import { ActivatedRoute, ParamMap } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
|
||||
enum TimeSpan {
|
||||
Last24Hours,
|
||||
Day,
|
||||
Custom
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-weather-charts',
|
||||
templateUrl: './weather-charts.component.html',
|
||||
styleUrls: ['./weather-charts.component.scss']
|
||||
})
|
||||
export class WeatherChartsComponent implements OnInit {
|
||||
|
||||
public chart: Chart;
|
||||
|
||||
private loading = true;
|
||||
private chartType: string;
|
||||
|
||||
public timeSpanItems: { [value: number]: string } = {};
|
||||
public selectedTimeSpan: TimeSpan = TimeSpan.Last24Hours;
|
||||
public selectedDate: Date = moment().startOf('day').toDate();
|
||||
public timeSpans: typeof TimeSpan = TimeSpan;
|
||||
|
||||
constructor(private route: ActivatedRoute, private httpClient: HttpClient) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.timeSpanItems[TimeSpan.Last24Hours] = 'Last 24 hours';
|
||||
this.timeSpanItems[TimeSpan.Day] = 'Day';
|
||||
|
||||
this.route.params.subscribe(params => {
|
||||
this.loading = true;
|
||||
|
||||
const chartType = params.type;
|
||||
|
||||
switch (chartType) {
|
||||
case 'temperature':
|
||||
this.chartType = 'PressureTemperature';
|
||||
break;
|
||||
|
||||
case 'humidity':
|
||||
this.chartType = 'Humidity';
|
||||
break;
|
||||
|
||||
case 'pressure':
|
||||
this.chartType = 'Pressure';
|
||||
break;
|
||||
}
|
||||
|
||||
this.loadChart();
|
||||
});
|
||||
}
|
||||
|
||||
public handleDateArrowClick(value: number) {
|
||||
this.selectedDate = moment(this.selectedDate).add(value, 'day').toDate();
|
||||
|
||||
this.loadChart();
|
||||
}
|
||||
|
||||
public isSelectedDateToday(): boolean {
|
||||
const isToday = moment(this.selectedDate).startOf('day').isSame(moment().startOf('day'));
|
||||
|
||||
return isToday;
|
||||
}
|
||||
|
||||
public resetToToday() {
|
||||
this.selectedDate = moment().startOf('day').toDate();
|
||||
|
||||
this.loadChart();
|
||||
}
|
||||
|
||||
public getSelectedDateDisplayString(): string {
|
||||
return moment(this.selectedDate).format('LL');
|
||||
}
|
||||
|
||||
private loadChart() {
|
||||
let start: Date;
|
||||
let end: Date;
|
||||
|
||||
switch (this.selectedTimeSpan) {
|
||||
case TimeSpan.Last24Hours: {
|
||||
start = moment().subtract(24, 'h').toDate();
|
||||
end = moment().toDate();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case TimeSpan.Day: {
|
||||
start = moment(this.selectedDate).startOf('d').toDate();
|
||||
end = moment(this.selectedDate).endOf('d').toDate();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const startString = moment(start).toISOString();
|
||||
const endString = moment(end).toISOString();
|
||||
|
||||
const request = this.httpClient.get<WeatherValue[]>(`http://172.23.10.3/api/weather/readings/value-history?weatherValueType=${this.chartType}&start=${startString}&end=${endString}&bucketMinutes=5`);
|
||||
|
||||
request.subscribe(data => {
|
||||
const array = [];
|
||||
|
||||
data.forEach(dataElement => array.push([Date.parse(dataElement.bucket), dataElement.averageValue / 100]));
|
||||
|
||||
this.chart = new Chart({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
title: {
|
||||
text: 'Linechart'
|
||||
},
|
||||
credits: {
|
||||
enabled: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
},
|
||||
yAxis: {
|
||||
labels: {
|
||||
format: '{value:.2f}'
|
||||
}
|
||||
},
|
||||
time: {
|
||||
useUTC: false
|
||||
},
|
||||
tooltip: {
|
||||
valueDecimals: 2
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Line 1',
|
||||
data: array
|
||||
} as SeriesLineOptions
|
||||
]
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
<div class="weather-current">
|
||||
<div *ngIf="latestReading === null">
|
||||
Loading...
|
||||
</div>
|
||||
|
||||
<div *ngIf="latestReading !== null">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Temperature
|
||||
</td>
|
||||
<td>
|
||||
{{ latestReading.HumidityTemperature.toFixed(2) }}°F
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Humidity
|
||||
</td>
|
||||
<td>
|
||||
{{ latestReading.Humidity.toFixed(2) }}%
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Pressure
|
||||
</td>
|
||||
<td>
|
||||
{{ (latestReading.Pressure / 100).toFixed(2) }} mbar
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Wind
|
||||
</td>
|
||||
<td>
|
||||
{{ latestReading.WindSpeed.toFixed(2) }} {{ latestReading.WindDirection }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Rain
|
||||
</td>
|
||||
<td>
|
||||
{{ latestReading.Rain.toFixed(2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="weather-current-header">
|
||||
Light
|
||||
</td>
|
||||
<td>
|
||||
{{ latestReading.LightLevel.toFixed(2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,9 +0,0 @@
|
||||
.weather-current {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.weather-current-header {
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WeatherCurrentComponent } from './weather-current.component';
|
||||
|
||||
describe('WeatherCurrentComponent', () => {
|
||||
let component: WeatherCurrentComponent;
|
||||
let fixture: ComponentFixture<WeatherCurrentComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WeatherCurrentComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WeatherCurrentComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WeatherReading } from 'src/app/weather/service/weather-reading';
|
||||
import { WeatherService } from 'src/app/weather/service/weather.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-weather-current',
|
||||
templateUrl: './weather-current.component.html',
|
||||
styleUrls: ['./weather-current.component.scss']
|
||||
})
|
||||
export class WeatherCurrentComponent implements OnInit {
|
||||
|
||||
public latestReading: WeatherReading;
|
||||
|
||||
constructor(private weatherService: WeatherService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.weatherService.getLatestReading().subscribe(r => this.latestReading = r);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 948 B |
@@ -1,18 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Home Status</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,13 +0,0 @@
|
||||
import 'hammerjs';
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags.ts';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
@@ -1,35 +0,0 @@
|
||||
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
.page-spinner {
|
||||
left: 50%;
|
||||
top: 25%;
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.spinner {
|
||||
height: 115px;
|
||||
width: 115px;
|
||||
}
|
||||
|
||||
.sidenav .nav-group .nav-list .nav-link {
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
.clr-dropdown {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
|
||||
@@ -1,20 +0,0 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"src/**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"deprecation": {
|
||||
"severity": "warning"
|
||||
},
|
||||
"component-class-suffix": true,
|
||||
"contextual-lifecycle": true,
|
||||
"directive-class-suffix": true,
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"app",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"app",
|
||||
"kebab-case"
|
||||
],
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"interface-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [
|
||||
false
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-empty": false,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"trailing-comma": false,
|
||||
"no-conflicting-lifecycle": true,
|
||||
"no-host-metadata-property": true,
|
||||
"no-input-rename": true,
|
||||
"no-inputs-metadata-property": true,
|
||||
"no-output-native": true,
|
||||
"no-output-on-prefix": true,
|
||||
"no-output-rename": true,
|
||||
"no-outputs-metadata-property": true,
|
||||
"template-banana-in-box": true,
|
||||
"template-no-negated-async": true,
|
||||
"use-lifecycle-interface": true,
|
||||
"use-pipe-transform-interface": true
|
||||
},
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user