@mxtommy/kip 1.2.3 → 1.3.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/.angulardoc.json +3 -3
- package/CHANGELOG.md +145 -135
- package/CONTRIBUTORS.md +16 -16
- package/README.md +102 -102
- package/angular.json +162 -153
- package/karma.conf.js +31 -31
- package/package.json +87 -84
- package/public/3rdpartylicenses.txt +301 -21
- package/public/assets/NoSleep.min.js +1 -1
- package/public/assets/fontawesome6/css/all.min.css +6 -0
- package/public/assets/fontawesome6/webfonts/fa-brands-400.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-brands-400.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-regular-400.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-regular-400.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-solid-900.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-solid-900.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-v4compatibility.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-v4compatibility.woff2 +0 -0
- package/public/assets/icon-192x192.png +0 -0
- package/public/assets/icon-256x256.png +0 -0
- package/public/assets/icon-384x384.png +0 -0
- package/public/assets/icon-512x512.png +0 -0
- package/public/assets/steelseries-min.js +25 -25
- package/public/assets/steelseries-min.js.map +8 -8
- package/public/assets/steelseries.js +15834 -15834
- package/public/assets/svg-autopilot-inkscape-plain.svg +983 -983
- package/public/assets/svg-wind-inkscape.svg +1358 -1358
- package/public/assets/tween.js +381 -381
- package/public/index.html +19 -20
- package/public/main-es2018.98175eb4c61ccaf7eb17.js +1 -0
- package/public/main-es5.98175eb4c61ccaf7eb17.js +1 -0
- package/public/manifest.json +33 -0
- package/public/polyfills-es2018.3a61665863c173cd6ba3.js +1 -0
- package/public/polyfills-es5.44827ae4ff4e41de51fb.js +1 -0
- package/public/runtime-es2018.baedb88c6d2abacae2b8.js +1 -0
- package/public/runtime-es5.baedb88c6d2abacae2b8.js +1 -0
- package/public/styles.b92ae2c466c89712209d.css +5 -0
- package/src/app/alarm-menu/alarm-menu.component.html +55 -55
- package/src/app/alarm-menu/alarm-menu.component.scss +52 -53
- package/src/app/alarm-menu/alarm-menu.component.spec.ts +25 -25
- package/src/app/alarm-menu/alarm-menu.component.ts +186 -186
- package/src/app/app-help/app-help.component.css +4 -4
- package/src/app/app-help/app-help.component.html +135 -135
- package/src/app/app-help/app-help.component.ts +45 -45
- package/src/app/app.component.css +39 -39
- package/src/app/app.component.html +93 -93
- package/src/app/app.component.scss +79 -79
- package/src/app/app.component.spec.ts +32 -32
- package/src/app/app.component.ts +191 -192
- package/src/app/app.module.ts +200 -200
- package/src/app/config.blank.const.ts +51 -51
- package/src/app/config.blank.notification.const.ts +19 -19
- package/src/app/config.blank.units.const.ts +23 -23
- package/src/app/config.demo.const.ts +383 -383
- package/src/app/data-browser/data-browser.component.css +29 -29
- package/src/app/data-browser/data-browser.component.html +44 -44
- package/src/app/data-browser/data-browser.component.spec.ts +25 -25
- package/src/app/data-browser/data-browser.component.ts +91 -91
- package/src/app/data-browser-row/data-browser-row-unit-modal.html +17 -17
- package/src/app/data-browser-row/data-browser-row.component.css +9 -9
- package/src/app/data-browser-row/data-browser-row.component.html +4 -4
- package/src/app/data-browser-row/data-browser-row.component.ts +78 -78
- package/src/app/data-set.service.ts +273 -273
- package/src/app/dynamic-widget.directive.ts +11 -11
- package/src/app/gauge-steel/gauge-steel.component.css +4 -4
- package/src/app/gauge-steel/gauge-steel.component.html +4 -4
- package/src/app/gauge-steel/gauge-steel.component.spec.ts +25 -25
- package/src/app/gauge-steel/gauge-steel.component.ts +282 -282
- package/src/app/gauges-module/base-gauge.ts +300 -300
- package/src/app/gauges-module/linear-gauge.ts +49 -49
- package/src/app/gauges-module/radial-gauge.ts +47 -47
- package/src/app/layout-split/layout-split.component.html +30 -30
- package/src/app/layout-split/layout-split.component.scss +33 -33
- package/src/app/layout-split/layout-split.component.spec.ts +25 -25
- package/src/app/layout-split/layout-split.component.ts +59 -59
- package/src/app/layout-splits.service.ts +284 -284
- package/src/app/modal-path-selector/modal-path-selector.component.html +62 -62
- package/src/app/modal-path-selector/modal-path-selector.component.scss +39 -39
- package/src/app/modal-path-selector/modal-path-selector.component.spec.ts +25 -25
- package/src/app/modal-path-selector/modal-path-selector.component.ts +132 -132
- package/src/app/modal-widget/modal-widget.component.css +32 -32
- package/src/app/modal-widget/modal-widget.component.html +341 -341
- package/src/app/modal-widget/modal-widget.component.spec.ts +25 -25
- package/src/app/modal-widget/modal-widget.component.ts +84 -84
- package/src/app/notifications.service.ts +392 -392
- package/src/app/object-keys.pipe.spec.ts +8 -8
- package/src/app/object-keys.pipe.ts +13 -13
- package/src/app/reset-config/reset-config.component.html +3 -3
- package/src/app/reset-config/reset-config.component.spec.ts +25 -25
- package/src/app/reset-config/reset-config.component.ts +31 -31
- package/src/app/root-display/root-display.component.html +4 -4
- package/src/app/root-display/root-display.component.spec.ts +25 -25
- package/src/app/root-display/root-display.component.ts +57 -57
- package/src/app/safe.pipe.ts +15 -15
- package/src/app/settings/settings.component.css +9 -9
- package/src/app/settings/settings.component.html +25 -25
- package/src/app/settings/settings.component.spec.ts +25 -25
- package/src/app/settings/settings.component.ts +22 -22
- package/src/app/settings-config/settings-config.component.css +38 -38
- package/src/app/settings-config/settings-config.component.spec.ts +25 -25
- package/src/app/settings-config/settings-config.component.ts +161 -161
- package/src/app/settings-datasets/settings-datasets.component.html +43 -43
- package/src/app/settings-datasets/settings-datasets.component.scss +39 -39
- package/src/app/settings-datasets/settings-datasets.component.spec.ts +25 -25
- package/src/app/settings-datasets/settings-datasets.component.ts +98 -98
- package/src/app/settings-datasets/settings-datasets.modal.html +54 -54
- package/src/app/settings-notifications/settings-notifications.component.html +65 -65
- package/src/app/settings-notifications/settings-notifications.component.spec.ts +25 -25
- package/src/app/settings-notifications/settings-notifications.component.ts +29 -29
- package/src/app/settings-signalk/settings-signalk.component.html +8 -8
- package/src/app/settings-signalk/settings-signalk.component.spec.ts +25 -25
- package/src/app/settings-signalk/settings-signalk.component.ts +174 -174
- package/src/app/settings-units/settings-units.component.css +4 -4
- package/src/app/settings-units/settings-units.component.html +19 -19
- package/src/app/settings-units/settings-units.component.spec.ts +25 -25
- package/src/app/settings-units/settings-units.component.ts +62 -62
- package/src/app/settings-zones/settings-zones.component.css +21 -21
- package/src/app/settings-zones/settings-zones.component.html +70 -70
- package/src/app/settings-zones/settings-zones.modal.html +38 -38
- package/src/app/signalk-connection.service.ts +344 -344
- package/src/app/signalk-delta.service.spec.ts +15 -15
- package/src/app/signalk-delta.service.ts +97 -97
- package/src/app/signalk-full.service.ts +99 -99
- package/src/app/signalk-interfaces.ts +129 -129
- package/src/app/signalk-requests.service.spec.ts +12 -12
- package/src/app/signalk-requests.service.ts +180 -180
- package/src/app/svg-autopilot/svg-autopilot.component.html +1036 -1036
- package/src/app/svg-autopilot/svg-autopilot.component.spec.ts +25 -25
- package/src/app/svg-autopilot/svg-autopilot.component.ts +174 -174
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.html +119 -119
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.ts +25 -25
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.ts +49 -49
- package/src/app/svg-wind/svg-wind.component.html +969 -969
- package/src/app/svg-wind/svg-wind.component.scss +76 -76
- package/src/app/svg-wind/svg-wind.component.spec.ts +25 -25
- package/src/app/svg-wind/svg-wind.component.ts +280 -280
- package/src/app/unit-window/unit-window.component.css +37 -37
- package/src/app/unit-window/unit-window.component.html +8 -8
- package/src/app/unit-window/unit-window.component.spec.ts +25 -25
- package/src/app/unit-window/unit-window.component.ts +134 -134
- package/src/app/unit-window/unit-window.modal.html +24 -24
- package/src/app/units.service.ts +300 -300
- package/src/app/widget-autopilot/widget-autopilot.component.html +78 -85
- package/src/app/widget-autopilot/widget-autopilot.component.scss +191 -191
- package/src/app/widget-autopilot/widget-autopilot.component.spec.ts +25 -25
- package/src/app/widget-autopilot/widget-autopilot.component.ts +774 -781
- package/src/app/widget-blank/widget-blank.component.scss +21 -22
- package/src/app/widget-blank/widget-blank.component.spec.ts +25 -25
- package/src/app/widget-blank/widget-blank.component.ts +17 -17
- package/src/app/widget-gauge/widget-gauge.component.css +25 -25
- package/src/app/widget-gauge/widget-gauge.component.html +29 -29
- package/src/app/widget-gauge/widget-gauge.component.spec.ts +25 -25
- package/src/app/widget-gauge/widget-gauge.component.ts +120 -120
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.html +126 -126
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.scss +94 -93
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.ts +25 -25
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.ts +424 -424
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.html +1 -1
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.scss +69 -69
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.ts +25 -25
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts +553 -553
- package/src/app/widget-historical/widget-historical.component.html +14 -14
- package/src/app/widget-historical/widget-historical.component.spec.ts +25 -25
- package/src/app/widget-historical/widget-historical.component.ts +306 -306
- package/src/app/widget-iframe/widget-iframe.component.css +11 -11
- package/src/app/widget-iframe/widget-iframe.component.html +21 -21
- package/src/app/widget-iframe/widget-iframe.component.spec.ts +25 -25
- package/src/app/widget-iframe/widget-iframe.component.ts +63 -63
- package/src/app/widget-list.service.ts +135 -135
- package/src/app/widget-manager.service.ts +141 -141
- package/src/app/widget-numeric/widget-numeric.component.html +1 -1
- package/src/app/widget-numeric/widget-numeric.component.scss +3 -3
- package/src/app/widget-numeric/widget-numeric.component.spec.ts +25 -25
- package/src/app/widget-simple-linear/widget-simple-linear.component.html +28 -28
- package/src/app/widget-simple-linear/widget-simple-linear.component.scss +64 -64
- package/src/app/widget-simple-linear/widget-simple-linear.component.spec.ts +25 -25
- package/src/app/widget-simple-linear/widget-simple-linear.component.ts +199 -199
- package/src/app/widget-state/widget-state.component.html +27 -27
- package/src/app/widget-state/widget-state.component.scss +68 -68
- package/src/app/widget-state/widget-state.component.spec.ts +25 -25
- package/src/app/widget-state/widget-state.component.ts +178 -178
- package/src/app/widget-switch/widget-switch.component.css +69 -69
- package/src/app/widget-switch/widget-switch.component.html +17 -17
- package/src/app/widget-switch/widget-switch.component.spec.ts +25 -25
- package/src/app/widget-switch/widget-switch.component.ts +134 -134
- package/src/app/widget-text-generic/widget-text-generic.component.html +9 -9
- package/src/app/widget-text-generic/widget-text-generic.component.spec.ts +25 -25
- package/src/app/widget-tutorial/widget-tutorial.component.html +34 -34
- package/src/app/widget-tutorial/widget-tutorial.component.spec.ts +25 -25
- package/src/app/widget-tutorial/widget-tutorial.component.ts +18 -18
- package/src/app/widget-unknown/widget-unknown.component.spec.ts +25 -25
- package/src/app/widget-wind/widget-wind.component.css +23 -23
- package/src/app/widget-wind/widget-wind.component.html +20 -20
- package/src/app/widget-wind/widget-wind.component.spec.ts +25 -25
- package/src/app/widget-wind/widget-wind.component.ts +369 -369
- package/src/assets/NoSleep.min.js +1 -1
- package/src/assets/fontawesome6/css/all.min.css +6 -0
- package/src/assets/fontawesome6/webfonts/fa-brands-400.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-brands-400.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-regular-400.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-regular-400.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-solid-900.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-solid-900.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-v4compatibility.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-v4compatibility.woff2 +0 -0
- package/src/assets/icon-192x192.png +0 -0
- package/src/assets/icon-256x256.png +0 -0
- package/src/assets/icon-384x384.png +0 -0
- package/src/assets/icon-512x512.png +0 -0
- package/src/assets/steelseries-min.js +25 -25
- package/src/assets/steelseries-min.js.map +8 -8
- package/src/assets/steelseries.js +15834 -15834
- package/src/assets/svg-autopilot-inkscape-plain.svg +983 -983
- package/src/assets/svg-wind-inkscape.svg +1358 -1358
- package/src/assets/tween.js +381 -381
- package/src/index.html +20 -20
- package/src/main.ts +11 -11
- package/src/manifest.json +33 -0
- package/src/polyfills.ts +80 -76
- package/src/styles.scss +11 -11
- package/src/themes/darkBlueTheme.scss +117 -116
- package/src/themes/defaultTheme.scss +50 -49
- package/src/themes/highContrastTheme.scss +47 -46
- package/src/themes/modernTheme.scss +143 -142
- package/src/themes/nightMode.scss +185 -184
- package/src/themes/platypusTheme.scss +80 -79
- package/src/themes/signalkTheme.scss +112 -111
- package/src/tsconfig.app.json +15 -15
- package/src/tsconfig.spec.json +20 -20
- package/tsconfig.json +23 -23
- package/tslint.json +143 -143
- package/public/assets/font-awesome/HELP-US-OUT.txt +0 -7
- package/public/assets/font-awesome/css/font-awesome.css +0 -2337
- package/public/assets/font-awesome/css/font-awesome.min.css +0 -4
- package/public/assets/font-awesome/desktop.ini +0 -4
- package/public/assets/font-awesome/fonts/FontAwesome.otf +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/public/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/public/assets/font-awesome/less/animated.less +0 -34
- package/public/assets/font-awesome/less/bordered-pulled.less +0 -25
- package/public/assets/font-awesome/less/core.less +0 -12
- package/public/assets/font-awesome/less/fixed-width.less +0 -6
- package/public/assets/font-awesome/less/font-awesome.less +0 -18
- package/public/assets/font-awesome/less/icons.less +0 -789
- package/public/assets/font-awesome/less/larger.less +0 -13
- package/public/assets/font-awesome/less/list.less +0 -19
- package/public/assets/font-awesome/less/mixins.less +0 -60
- package/public/assets/font-awesome/less/path.less +0 -15
- package/public/assets/font-awesome/less/rotated-flipped.less +0 -20
- package/public/assets/font-awesome/less/screen-reader.less +0 -5
- package/public/assets/font-awesome/less/stacked.less +0 -20
- package/public/assets/font-awesome/less/variables.less +0 -800
- package/public/assets/font-awesome/scss/_animated.scss +0 -34
- package/public/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
- package/public/assets/font-awesome/scss/_core.scss +0 -12
- package/public/assets/font-awesome/scss/_fixed-width.scss +0 -6
- package/public/assets/font-awesome/scss/_icons.scss +0 -789
- package/public/assets/font-awesome/scss/_larger.scss +0 -13
- package/public/assets/font-awesome/scss/_list.scss +0 -19
- package/public/assets/font-awesome/scss/_mixins.scss +0 -60
- package/public/assets/font-awesome/scss/_path.scss +0 -15
- package/public/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
- package/public/assets/font-awesome/scss/_screen-reader.scss +0 -5
- package/public/assets/font-awesome/scss/_stacked.scss +0 -20
- package/public/assets/font-awesome/scss/_variables.scss +0 -800
- package/public/assets/font-awesome/scss/font-awesome.scss +0 -18
- package/public/main-es2018.ab0adc5af3ab3e70c849.js +0 -1
- package/public/main-es5.ab0adc5af3ab3e70c849.js +0 -1
- package/public/polyfills-es2018.713f95af1f028e444854.js +0 -1
- package/public/polyfills-es5.c78877945523541d2597.js +0 -1
- package/public/runtime-es2018.a4dadbc03350107420a4.js +0 -1
- package/public/runtime-es5.a4dadbc03350107420a4.js +0 -1
- package/public/styles.71bb0d04cad96b5efbe1.css +0 -19
- package/src/assets/font-awesome/HELP-US-OUT.txt +0 -7
- package/src/assets/font-awesome/css/font-awesome.css +0 -2337
- package/src/assets/font-awesome/css/font-awesome.min.css +0 -4
- package/src/assets/font-awesome/desktop.ini +0 -4
- package/src/assets/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/assets/font-awesome/less/animated.less +0 -34
- package/src/assets/font-awesome/less/bordered-pulled.less +0 -25
- package/src/assets/font-awesome/less/core.less +0 -12
- package/src/assets/font-awesome/less/fixed-width.less +0 -6
- package/src/assets/font-awesome/less/font-awesome.less +0 -18
- package/src/assets/font-awesome/less/icons.less +0 -789
- package/src/assets/font-awesome/less/larger.less +0 -13
- package/src/assets/font-awesome/less/list.less +0 -19
- package/src/assets/font-awesome/less/mixins.less +0 -60
- package/src/assets/font-awesome/less/path.less +0 -15
- package/src/assets/font-awesome/less/rotated-flipped.less +0 -20
- package/src/assets/font-awesome/less/screen-reader.less +0 -5
- package/src/assets/font-awesome/less/stacked.less +0 -20
- package/src/assets/font-awesome/less/variables.less +0 -800
- package/src/assets/font-awesome/scss/_animated.scss +0 -34
- package/src/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
- package/src/assets/font-awesome/scss/_core.scss +0 -12
- package/src/assets/font-awesome/scss/_fixed-width.scss +0 -6
- package/src/assets/font-awesome/scss/_icons.scss +0 -789
- package/src/assets/font-awesome/scss/_larger.scss +0 -13
- package/src/assets/font-awesome/scss/_list.scss +0 -19
- package/src/assets/font-awesome/scss/_mixins.scss +0 -60
- package/src/assets/font-awesome/scss/_path.scss +0 -15
- package/src/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
- package/src/assets/font-awesome/scss/_screen-reader.scss +0 -5
- package/src/assets/font-awesome/scss/_stacked.scss +0 -20
- package/src/assets/font-awesome/scss/_variables.scss +0 -800
- package/src/assets/font-awesome/scss/font-awesome.scss +0 -18
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
import { Component, Input, OnInit, OnDestroy, Inject } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
-
|
|
6
|
-
import { ModalWidgetComponent } from '../modal-widget/modal-widget.component';
|
|
7
|
-
import { SignalKService } from '../signalk.service';
|
|
8
|
-
import { SignalkRequestsService, skRequest } from '../signalk-requests.service';
|
|
9
|
-
import { WidgetManagerService, IWidget, IWidgetConfig } from '../widget-manager.service';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const defaultConfig: IWidgetConfig = {
|
|
13
|
-
displayName: null,
|
|
14
|
-
filterSelfPaths: true,
|
|
15
|
-
paths: {
|
|
16
|
-
"statePath": {
|
|
17
|
-
description: "State Data",
|
|
18
|
-
path: null,
|
|
19
|
-
source: null,
|
|
20
|
-
pathType: "boolean",
|
|
21
|
-
isPathConfigurable: true,
|
|
22
|
-
convertUnitTo: "unitless"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
@Component({
|
|
28
|
-
selector: 'app-widget-switch',
|
|
29
|
-
templateUrl: './widget-switch.component.html',
|
|
30
|
-
styleUrls: ['./widget-switch.component.css']
|
|
31
|
-
})
|
|
32
|
-
export class WidgetSwitchComponent implements OnInit, OnDestroy {
|
|
33
|
-
|
|
34
|
-
@Input('widgetUUID') widgetUUID: string;
|
|
35
|
-
@Input('unlockStatus') unlockStatus: boolean;
|
|
36
|
-
|
|
37
|
-
activeWidget: IWidget;
|
|
38
|
-
config: IWidgetConfig;
|
|
39
|
-
|
|
40
|
-
dataValue: number = null;
|
|
41
|
-
dataTimestamp: number = Date.now();
|
|
42
|
-
valueSub: Subscription = null;
|
|
43
|
-
|
|
44
|
-
skRequestSub: Subscription = null;
|
|
45
|
-
|
|
46
|
-
state: boolean = null;
|
|
47
|
-
|
|
48
|
-
constructor(
|
|
49
|
-
public dialog:MatDialog,
|
|
50
|
-
private SignalKService: SignalKService,
|
|
51
|
-
private SignalkRequestsService: SignalkRequestsService,
|
|
52
|
-
private WidgetManagerService: WidgetManagerService) {
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ngOnInit() {
|
|
56
|
-
this.activeWidget = this.WidgetManagerService.getWidget(this.widgetUUID);
|
|
57
|
-
if (this.activeWidget.config === null) {
|
|
58
|
-
// no data, let's set some!
|
|
59
|
-
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, defaultConfig);
|
|
60
|
-
this.config = defaultConfig; // load default config.
|
|
61
|
-
} else {
|
|
62
|
-
this.config = this.activeWidget.config;
|
|
63
|
-
}
|
|
64
|
-
this.subscribePath();
|
|
65
|
-
this.subscribeSKRequest();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
ngOnDestroy() {
|
|
69
|
-
this.unsubscribePath();
|
|
70
|
-
this.unsubscribeSKRequest();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
subscribePath() {
|
|
74
|
-
this.unsubscribePath();
|
|
75
|
-
if (typeof(this.config.paths['statePath'].path) != 'string') { return } // nothing to sub to...
|
|
76
|
-
|
|
77
|
-
this.valueSub = this.SignalKService.subscribePath(this.widgetUUID, this.config.paths['statePath'].path, this.config.paths['statePath'].source).subscribe(
|
|
78
|
-
newValue => {
|
|
79
|
-
this.state = newValue.value;
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
unsubscribePath() {
|
|
85
|
-
if (this.valueSub !== null) {
|
|
86
|
-
this.valueSub.unsubscribe();
|
|
87
|
-
this.valueSub = null;
|
|
88
|
-
this.SignalKService.unsubscribePath(this.widgetUUID, this.config.paths['statePath'].path);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
subscribeSKRequest() {
|
|
93
|
-
this.skRequestSub = this.SignalkRequestsService.subscribeRequest().subscribe(requestResult => {
|
|
94
|
-
if (requestResult.widgetUUID == this.widgetUUID) {
|
|
95
|
-
if (requestResult.statusCode != 200){
|
|
96
|
-
let errMsg = requestResult.statusCode + " - " +requestResult.statusCodeDescription;
|
|
97
|
-
if (requestResult.message){
|
|
98
|
-
errMsg = errMsg + " Server Message: " + requestResult.message;
|
|
99
|
-
}
|
|
100
|
-
alert('[Widget Name: ' + errMsg);
|
|
101
|
-
} else {
|
|
102
|
-
console.log("AP Received: \n" + JSON.stringify(requestResult));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
unsubscribeSKRequest() {
|
|
109
|
-
this.skRequestSub.unsubscribe();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
sendDelta(value: boolean) {
|
|
113
|
-
this.SignalkRequestsService.putRequest(this.config.paths['statePath'].path, value, this.widgetUUID);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
openWidgetSettings() {
|
|
117
|
-
let dialogRef = this.dialog.open(ModalWidgetComponent, {
|
|
118
|
-
width: '80%',
|
|
119
|
-
data: this.config
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
dialogRef.afterClosed().subscribe(result => {
|
|
123
|
-
// save new settings
|
|
124
|
-
if (result) {
|
|
125
|
-
console.log(result);
|
|
126
|
-
this.unsubscribePath();//unsub now as we will change variables so wont know what was subbed before...
|
|
127
|
-
this.config = result;
|
|
128
|
-
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, this.config);
|
|
129
|
-
this.subscribePath();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
}
|
|
1
|
+
import { Component, Input, OnInit, OnDestroy, Inject } from '@angular/core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
+
|
|
6
|
+
import { ModalWidgetComponent } from '../modal-widget/modal-widget.component';
|
|
7
|
+
import { SignalKService } from '../signalk.service';
|
|
8
|
+
import { SignalkRequestsService, skRequest } from '../signalk-requests.service';
|
|
9
|
+
import { WidgetManagerService, IWidget, IWidgetConfig } from '../widget-manager.service';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const defaultConfig: IWidgetConfig = {
|
|
13
|
+
displayName: null,
|
|
14
|
+
filterSelfPaths: true,
|
|
15
|
+
paths: {
|
|
16
|
+
"statePath": {
|
|
17
|
+
description: "State Data",
|
|
18
|
+
path: null,
|
|
19
|
+
source: null,
|
|
20
|
+
pathType: "boolean",
|
|
21
|
+
isPathConfigurable: true,
|
|
22
|
+
convertUnitTo: "unitless"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
selector: 'app-widget-switch',
|
|
29
|
+
templateUrl: './widget-switch.component.html',
|
|
30
|
+
styleUrls: ['./widget-switch.component.css']
|
|
31
|
+
})
|
|
32
|
+
export class WidgetSwitchComponent implements OnInit, OnDestroy {
|
|
33
|
+
|
|
34
|
+
@Input('widgetUUID') widgetUUID: string;
|
|
35
|
+
@Input('unlockStatus') unlockStatus: boolean;
|
|
36
|
+
|
|
37
|
+
activeWidget: IWidget;
|
|
38
|
+
config: IWidgetConfig;
|
|
39
|
+
|
|
40
|
+
dataValue: number = null;
|
|
41
|
+
dataTimestamp: number = Date.now();
|
|
42
|
+
valueSub: Subscription = null;
|
|
43
|
+
|
|
44
|
+
skRequestSub: Subscription = null;
|
|
45
|
+
|
|
46
|
+
state: boolean = null;
|
|
47
|
+
|
|
48
|
+
constructor(
|
|
49
|
+
public dialog:MatDialog,
|
|
50
|
+
private SignalKService: SignalKService,
|
|
51
|
+
private SignalkRequestsService: SignalkRequestsService,
|
|
52
|
+
private WidgetManagerService: WidgetManagerService) {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ngOnInit() {
|
|
56
|
+
this.activeWidget = this.WidgetManagerService.getWidget(this.widgetUUID);
|
|
57
|
+
if (this.activeWidget.config === null) {
|
|
58
|
+
// no data, let's set some!
|
|
59
|
+
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, defaultConfig);
|
|
60
|
+
this.config = defaultConfig; // load default config.
|
|
61
|
+
} else {
|
|
62
|
+
this.config = this.activeWidget.config;
|
|
63
|
+
}
|
|
64
|
+
this.subscribePath();
|
|
65
|
+
this.subscribeSKRequest();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
ngOnDestroy() {
|
|
69
|
+
this.unsubscribePath();
|
|
70
|
+
this.unsubscribeSKRequest();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
subscribePath() {
|
|
74
|
+
this.unsubscribePath();
|
|
75
|
+
if (typeof(this.config.paths['statePath'].path) != 'string') { return } // nothing to sub to...
|
|
76
|
+
|
|
77
|
+
this.valueSub = this.SignalKService.subscribePath(this.widgetUUID, this.config.paths['statePath'].path, this.config.paths['statePath'].source).subscribe(
|
|
78
|
+
newValue => {
|
|
79
|
+
this.state = newValue.value;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
unsubscribePath() {
|
|
85
|
+
if (this.valueSub !== null) {
|
|
86
|
+
this.valueSub.unsubscribe();
|
|
87
|
+
this.valueSub = null;
|
|
88
|
+
this.SignalKService.unsubscribePath(this.widgetUUID, this.config.paths['statePath'].path);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
subscribeSKRequest() {
|
|
93
|
+
this.skRequestSub = this.SignalkRequestsService.subscribeRequest().subscribe(requestResult => {
|
|
94
|
+
if (requestResult.widgetUUID == this.widgetUUID) {
|
|
95
|
+
if (requestResult.statusCode != 200){
|
|
96
|
+
let errMsg = requestResult.statusCode + " - " +requestResult.statusCodeDescription;
|
|
97
|
+
if (requestResult.message){
|
|
98
|
+
errMsg = errMsg + " Server Message: " + requestResult.message;
|
|
99
|
+
}
|
|
100
|
+
alert('[Widget Name: ' + errMsg);
|
|
101
|
+
} else {
|
|
102
|
+
console.log("AP Received: \n" + JSON.stringify(requestResult));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
unsubscribeSKRequest() {
|
|
109
|
+
this.skRequestSub.unsubscribe();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
sendDelta(value: boolean) {
|
|
113
|
+
this.SignalkRequestsService.putRequest(this.config.paths['statePath'].path, value, this.widgetUUID);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
openWidgetSettings() {
|
|
117
|
+
let dialogRef = this.dialog.open(ModalWidgetComponent, {
|
|
118
|
+
width: '80%',
|
|
119
|
+
data: this.config
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
dialogRef.afterClosed().subscribe(result => {
|
|
123
|
+
// save new settings
|
|
124
|
+
if (result) {
|
|
125
|
+
console.log(result);
|
|
126
|
+
this.unsubscribePath();//unsub now as we will change variables so wont know what was subbed before...
|
|
127
|
+
this.config = result;
|
|
128
|
+
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, this.config);
|
|
129
|
+
this.subscribePath();
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<div #wrapperDiv class="textGenericWrapper">
|
|
2
|
-
<canvas id="canvasValue" #canvasEl></canvas>
|
|
3
|
-
<canvas id="cancasBG" #canvasBG></canvas>
|
|
4
|
-
<div class="settingsButton" *ngIf="unlockStatus">
|
|
5
|
-
<button color="accent" mat-mini-fab class="selector-fab" (click)="openWidgetSettings()">
|
|
6
|
-
<span class="fa fa-cog"></span>
|
|
7
|
-
</button>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
1
|
+
<div #wrapperDiv class="textGenericWrapper">
|
|
2
|
+
<canvas id="canvasValue" #canvasEl></canvas>
|
|
3
|
+
<canvas id="cancasBG" #canvasBG></canvas>
|
|
4
|
+
<div class="settingsButton" *ngIf="unlockStatus">
|
|
5
|
+
<button color="accent" mat-mini-fab class="selector-fab" (click)="openWidgetSettings()">
|
|
6
|
+
<span class="fa-solid fa-cog"></span>
|
|
7
|
+
</button>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { WidgetTextGenericComponent } from './widget-text-generic.component';
|
|
4
|
-
|
|
5
|
-
describe('WidgetTextGenericComponent', () => {
|
|
6
|
-
let component: WidgetTextGenericComponent;
|
|
7
|
-
let fixture: ComponentFixture<WidgetTextGenericComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(waitForAsync(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ WidgetTextGenericComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(WidgetTextGenericComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should be created', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
1
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { WidgetTextGenericComponent } from './widget-text-generic.component';
|
|
4
|
+
|
|
5
|
+
describe('WidgetTextGenericComponent', () => {
|
|
6
|
+
let component: WidgetTextGenericComponent;
|
|
7
|
+
let fixture: ComponentFixture<WidgetTextGenericComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(waitForAsync(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ WidgetTextGenericComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(WidgetTextGenericComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should be created', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<h1>
|
|
2
|
-
Welcome to KIP!
|
|
3
|
-
</h1>
|
|
4
|
-
|
|
5
|
-
<p>NOTES: For complete functionality, certain SignalK plugin should be installed on the server you are connecting to.</p>
|
|
6
|
-
<ul>
|
|
7
|
-
<li>@signalk-alarm-silencer: To silence Notifications on the server. This enables Kip to instruct the SignalK server to silence said alarm for on all devices supporting SignalK Notifications, else Kip will be silenced.</li>
|
|
8
|
-
<li>@signalk/signalk-autopilot: required for the N2k Autopilot to function.<br/><b>Use the Kip N2k autopilot at your own risk. Use with caution and constant supervision.</b></li>
|
|
9
|
-
</ul>
|
|
10
|
-
|
|
11
|
-
<p>If you want to dive right in to see what KIP can do, you can use this button to load demo configuration:</p>
|
|
12
|
-
<button mat-raised-button routerLink="/demo">Load Demo</button>
|
|
13
|
-
|
|
14
|
-
<div *ngIf="!unlockStatus">
|
|
15
|
-
<h2>Unlocking</h2>
|
|
16
|
-
<p>
|
|
17
|
-
KIP is "Locked" by default. This is to prevent accidental interaction from touch screens from changing anything.
|
|
18
|
-
You can unlock KIP using the hamburger icon in the lower right corner and selecting "Configuration -> Edit Layout". Go Ahead try it now!
|
|
19
|
-
</p>
|
|
20
|
-
</div>
|
|
21
|
-
<div *ngIf="unlockStatus">
|
|
22
|
-
<h2>Configuring</h2>
|
|
23
|
-
<p>
|
|
24
|
-
Now that KIP is unlocked, you can do a few actions.
|
|
25
|
-
</p>
|
|
26
|
-
<ul>
|
|
27
|
-
<li>The icon in the lower right can be used to select the Widget you would like to display</li>
|
|
28
|
-
<li>The icon in the lower left can be used to "split" the existing area. You can use this to display multiple items on one page</li>
|
|
29
|
-
<li>The "X" in the upper right can be used to delete an area (basically undoing a split)</li>
|
|
30
|
-
<li>Once a widget is selected, there will be a gear in the lower middle. Clicking it will allow you to setup the widget parameters</li>
|
|
31
|
-
</ul>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</div>
|
|
1
|
+
<h1>
|
|
2
|
+
Welcome to KIP!
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
<p>NOTES: For complete functionality, certain SignalK plugin should be installed on the server you are connecting to.</p>
|
|
6
|
+
<ul>
|
|
7
|
+
<li>@signalk-alarm-silencer: To silence Notifications on the server. This enables Kip to instruct the SignalK server to silence said alarm for on all devices supporting SignalK Notifications, else Kip will be silenced.</li>
|
|
8
|
+
<li>@signalk/signalk-autopilot: required for the N2k Autopilot to function.<br/><b>Use the Kip N2k autopilot at your own risk. Use with caution and constant supervision.</b></li>
|
|
9
|
+
</ul>
|
|
10
|
+
|
|
11
|
+
<p>If you want to dive right in to see what KIP can do, you can use this button to load demo configuration:</p>
|
|
12
|
+
<button mat-raised-button routerLink="/demo">Load Demo</button>
|
|
13
|
+
|
|
14
|
+
<div *ngIf="!unlockStatus">
|
|
15
|
+
<h2>Unlocking</h2>
|
|
16
|
+
<p>
|
|
17
|
+
KIP is "Locked" by default. This is to prevent accidental interaction from touch screens from changing anything.
|
|
18
|
+
You can unlock KIP using the hamburger icon in the lower right corner and selecting "Configuration -> Edit Layout". Go Ahead try it now!
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div *ngIf="unlockStatus">
|
|
22
|
+
<h2>Configuring</h2>
|
|
23
|
+
<p>
|
|
24
|
+
Now that KIP is unlocked, you can do a few actions.
|
|
25
|
+
</p>
|
|
26
|
+
<ul>
|
|
27
|
+
<li>The icon in the lower right can be used to select the Widget you would like to display</li>
|
|
28
|
+
<li>The icon in the lower left can be used to "split" the existing area. You can use this to display multiple items on one page</li>
|
|
29
|
+
<li>The "X" in the upper right can be used to delete an area (basically undoing a split)</li>
|
|
30
|
+
<li>Once a widget is selected, there will be a gear in the lower middle. Clicking it will allow you to setup the widget parameters</li>
|
|
31
|
+
</ul>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</div>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { WidgetTutorialComponent } from './widget-tutorial.component';
|
|
4
|
-
|
|
5
|
-
describe('WidgetTutorialComponent', () => {
|
|
6
|
-
let component: WidgetTutorialComponent;
|
|
7
|
-
let fixture: ComponentFixture<WidgetTutorialComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(waitForAsync(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ WidgetTutorialComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(WidgetTutorialComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should be created', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
1
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { WidgetTutorialComponent } from './widget-tutorial.component';
|
|
4
|
+
|
|
5
|
+
describe('WidgetTutorialComponent', () => {
|
|
6
|
+
let component: WidgetTutorialComponent;
|
|
7
|
+
let fixture: ComponentFixture<WidgetTutorialComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(waitForAsync(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ WidgetTutorialComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(WidgetTutorialComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should be created', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-widget-tutorial',
|
|
5
|
-
templateUrl: './widget-tutorial.component.html',
|
|
6
|
-
styleUrls: ['./widget-tutorial.component.css']
|
|
7
|
-
})
|
|
8
|
-
export class WidgetTutorialComponent implements OnInit {
|
|
9
|
-
|
|
10
|
-
@Input('widgetUUID') widgetUUID: string;
|
|
11
|
-
@Input('unlockStatus') unlockStatus: boolean;
|
|
12
|
-
|
|
13
|
-
constructor() { }
|
|
14
|
-
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-widget-tutorial',
|
|
5
|
+
templateUrl: './widget-tutorial.component.html',
|
|
6
|
+
styleUrls: ['./widget-tutorial.component.css']
|
|
7
|
+
})
|
|
8
|
+
export class WidgetTutorialComponent implements OnInit {
|
|
9
|
+
|
|
10
|
+
@Input('widgetUUID') widgetUUID: string;
|
|
11
|
+
@Input('unlockStatus') unlockStatus: boolean;
|
|
12
|
+
|
|
13
|
+
constructor() { }
|
|
14
|
+
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { WidgetUnknownComponent } from './widget-unknown.component';
|
|
4
|
-
|
|
5
|
-
describe('WidgetUnknownComponent', () => {
|
|
6
|
-
let component: WidgetUnknownComponent;
|
|
7
|
-
let fixture: ComponentFixture<WidgetUnknownComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(waitForAsync(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ WidgetUnknownComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(WidgetUnknownComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should be created', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
1
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { WidgetUnknownComponent } from './widget-unknown.component';
|
|
4
|
+
|
|
5
|
+
describe('WidgetUnknownComponent', () => {
|
|
6
|
+
let component: WidgetUnknownComponent;
|
|
7
|
+
let fixture: ComponentFixture<WidgetUnknownComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(waitForAsync(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ WidgetUnknownComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(WidgetUnknownComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should be created', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.settingsButton {
|
|
8
|
-
position: absolute;
|
|
9
|
-
bottom: 5%;
|
|
10
|
-
left: 50%;
|
|
11
|
-
transform: translate(-50%);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tab-group {
|
|
15
|
-
border: 1px solid #e8e8e8;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tab-content {
|
|
19
|
-
padding: 16px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.full-width {
|
|
23
|
-
width: 100%;
|
|
1
|
+
.wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.settingsButton {
|
|
8
|
+
position: absolute;
|
|
9
|
+
bottom: 5%;
|
|
10
|
+
left: 50%;
|
|
11
|
+
transform: translate(-50%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tab-group {
|
|
15
|
+
border: 1px solid #e8e8e8;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tab-content {
|
|
19
|
+
padding: 16px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.full-width {
|
|
23
|
+
width: 100%;
|
|
24
24
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<div class="wrapper">
|
|
2
|
-
<app-svg-wind
|
|
3
|
-
[compassHeading]="currentHeading"
|
|
4
|
-
[trueWindAngle]="trueWindAngle"
|
|
5
|
-
[trueWindSpeed]="trueWindSpeed"
|
|
6
|
-
[appWindAngle]="appWindAngle"
|
|
7
|
-
[appWindSpeed]="appWindSpeed"
|
|
8
|
-
[laylineAngle]="config.laylineAngle"
|
|
9
|
-
[laylineEnable]="config.laylineEnable"
|
|
10
|
-
[windSectorEnable]="config.windSectorEnable"
|
|
11
|
-
[trueWindMinHistoric]="trueWindMinHistoric"
|
|
12
|
-
[trueWindMidHistoric]="trueWindMidHistoric"
|
|
13
|
-
[trueWindMaxHistoric]="trueWindMaxHistoric"
|
|
14
|
-
></app-svg-wind>
|
|
15
|
-
<div class="settingsButton" *ngIf="unlockStatus">
|
|
16
|
-
<button color="accent" mat-mini-fab class="selector-fab" (click)="openWidgetSettings()">
|
|
17
|
-
<span class="fa fa-cog"></span>
|
|
18
|
-
</button>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
1
|
+
<div class="wrapper">
|
|
2
|
+
<app-svg-wind
|
|
3
|
+
[compassHeading]="currentHeading"
|
|
4
|
+
[trueWindAngle]="trueWindAngle"
|
|
5
|
+
[trueWindSpeed]="trueWindSpeed"
|
|
6
|
+
[appWindAngle]="appWindAngle"
|
|
7
|
+
[appWindSpeed]="appWindSpeed"
|
|
8
|
+
[laylineAngle]="config.laylineAngle"
|
|
9
|
+
[laylineEnable]="config.laylineEnable"
|
|
10
|
+
[windSectorEnable]="config.windSectorEnable"
|
|
11
|
+
[trueWindMinHistoric]="trueWindMinHistoric"
|
|
12
|
+
[trueWindMidHistoric]="trueWindMidHistoric"
|
|
13
|
+
[trueWindMaxHistoric]="trueWindMaxHistoric"
|
|
14
|
+
></app-svg-wind>
|
|
15
|
+
<div class="settingsButton" *ngIf="unlockStatus">
|
|
16
|
+
<button color="accent" mat-mini-fab class="selector-fab" (click)="openWidgetSettings()">
|
|
17
|
+
<span class="fa-solid fa-cog"></span>
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|