@mxtommy/kip 1.3.0 → 2.0.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.
Files changed (273) hide show
  1. package/CHANGELOG.md +38 -3
  2. package/CONTRIBUTORS.md +4 -4
  3. package/KipGaugeSample3-1024x508.png +0 -0
  4. package/LICENSE +21 -0
  5. package/README.md +80 -42
  6. package/package.json +52 -46
  7. package/public/3rdpartylicenses.txt +61 -412
  8. package/public/assets/NoSleep.min.js +2 -2
  9. package/public/assets/icon-64x64.png +0 -0
  10. package/public/index.html +3 -3
  11. package/public/main.9dba30de44eed02b.js +1 -0
  12. package/public/manifest.json +9 -4
  13. package/public/polyfills.d1da7d2e907c253a.js +1 -0
  14. package/public/runtime.e75056c32c37f59d.js +1 -0
  15. package/public/styles.6b1c2c92be18a2cc.css +1 -0
  16. package/.angulardoc.json +0 -4
  17. package/angular.json +0 -162
  18. package/e2e/app.e2e-spec.ts +0 -14
  19. package/e2e/app.po.ts +0 -11
  20. package/e2e/tsconfig.e2e.json +0 -14
  21. package/karma.conf.js +0 -31
  22. package/public/main-es2018.98175eb4c61ccaf7eb17.js +0 -1
  23. package/public/main-es5.98175eb4c61ccaf7eb17.js +0 -1
  24. package/public/polyfills-es2018.3a61665863c173cd6ba3.js +0 -1
  25. package/public/polyfills-es5.44827ae4ff4e41de51fb.js +0 -1
  26. package/public/runtime-es2018.baedb88c6d2abacae2b8.js +0 -1
  27. package/public/runtime-es5.baedb88c6d2abacae2b8.js +0 -1
  28. package/public/styles.b92ae2c466c89712209d.css +0 -5
  29. package/src/app/alarm-menu/alarm-menu.component.html +0 -55
  30. package/src/app/alarm-menu/alarm-menu.component.scss +0 -52
  31. package/src/app/alarm-menu/alarm-menu.component.spec.ts +0 -25
  32. package/src/app/alarm-menu/alarm-menu.component.ts +0 -186
  33. package/src/app/app-help/app-help.component.css +0 -4
  34. package/src/app/app-help/app-help.component.html +0 -135
  35. package/src/app/app-help/app-help.component.ts +0 -45
  36. package/src/app/app-settings.service.spec.ts +0 -15
  37. package/src/app/app-settings.service.ts +0 -478
  38. package/src/app/app.component.css +0 -39
  39. package/src/app/app.component.html +0 -93
  40. package/src/app/app.component.scss +0 -79
  41. package/src/app/app.component.spec.ts +0 -32
  42. package/src/app/app.component.ts +0 -191
  43. package/src/app/app.module.ts +0 -200
  44. package/src/app/config.blank.const.ts +0 -52
  45. package/src/app/config.blank.notification.const.ts +0 -19
  46. package/src/app/config.blank.units.const.ts +0 -23
  47. package/src/app/config.demo.const.ts +0 -384
  48. package/src/app/data-browser/data-browser.component.css +0 -29
  49. package/src/app/data-browser/data-browser.component.html +0 -44
  50. package/src/app/data-browser/data-browser.component.spec.ts +0 -25
  51. package/src/app/data-browser/data-browser.component.ts +0 -91
  52. package/src/app/data-browser-row/data-browser-row-unit-modal.html +0 -17
  53. package/src/app/data-browser-row/data-browser-row.component.css +0 -10
  54. package/src/app/data-browser-row/data-browser-row.component.html +0 -5
  55. package/src/app/data-browser-row/data-browser-row.component.ts +0 -79
  56. package/src/app/data-set.service.spec.ts +0 -15
  57. package/src/app/data-set.service.ts +0 -273
  58. package/src/app/dynamic-widget.directive.spec.ts +0 -8
  59. package/src/app/dynamic-widget.directive.ts +0 -11
  60. package/src/app/filter-self.pipe.spec.ts +0 -8
  61. package/src/app/filter-self.pipe.ts +0 -14
  62. package/src/app/fit-text.directive.spec.ts +0 -8
  63. package/src/app/fit-text.directive.ts +0 -61
  64. package/src/app/gauge-steel/gauge-steel.component.css +0 -5
  65. package/src/app/gauge-steel/gauge-steel.component.html +0 -4
  66. package/src/app/gauge-steel/gauge-steel.component.spec.ts +0 -25
  67. package/src/app/gauge-steel/gauge-steel.component.ts +0 -282
  68. package/src/app/gauges-module/base-gauge.ts +0 -301
  69. package/src/app/gauges-module/gauges.module.ts +0 -17
  70. package/src/app/gauges-module/linear-gauge.ts +0 -50
  71. package/src/app/gauges-module/radial-gauge.ts +0 -48
  72. package/src/app/layout-split/layout-split.component.html +0 -30
  73. package/src/app/layout-split/layout-split.component.scss +0 -33
  74. package/src/app/layout-split/layout-split.component.spec.ts +0 -25
  75. package/src/app/layout-split/layout-split.component.ts +0 -59
  76. package/src/app/layout-splits.service.spec.ts +0 -15
  77. package/src/app/layout-splits.service.ts +0 -284
  78. package/src/app/modal-path-selector/modal-path-selector.component.html +0 -62
  79. package/src/app/modal-path-selector/modal-path-selector.component.scss +0 -39
  80. package/src/app/modal-path-selector/modal-path-selector.component.spec.ts +0 -25
  81. package/src/app/modal-path-selector/modal-path-selector.component.ts +0 -132
  82. package/src/app/modal-widget/modal-widget.component.css +0 -33
  83. package/src/app/modal-widget/modal-widget.component.html +0 -341
  84. package/src/app/modal-widget/modal-widget.component.spec.ts +0 -25
  85. package/src/app/modal-widget/modal-widget.component.ts +0 -84
  86. package/src/app/notifications.service.spec.ts +0 -12
  87. package/src/app/notifications.service.ts +0 -392
  88. package/src/app/object-keys.pipe.spec.ts +0 -8
  89. package/src/app/object-keys.pipe.ts +0 -13
  90. package/src/app/reset-config/reset-config.component.css +0 -0
  91. package/src/app/reset-config/reset-config.component.html +0 -3
  92. package/src/app/reset-config/reset-config.component.spec.ts +0 -25
  93. package/src/app/reset-config/reset-config.component.ts +0 -31
  94. package/src/app/root-display/root-display.component.css +0 -0
  95. package/src/app/root-display/root-display.component.html +0 -4
  96. package/src/app/root-display/root-display.component.spec.ts +0 -25
  97. package/src/app/root-display/root-display.component.ts +0 -57
  98. package/src/app/safe.pipe.ts +0 -16
  99. package/src/app/settings/settings.component.css +0 -9
  100. package/src/app/settings/settings.component.html +0 -25
  101. package/src/app/settings/settings.component.spec.ts +0 -25
  102. package/src/app/settings/settings.component.ts +0 -22
  103. package/src/app/settings-config/settings-config.component.css +0 -39
  104. package/src/app/settings-config/settings-config.component.html +0 -118
  105. package/src/app/settings-config/settings-config.component.spec.ts +0 -25
  106. package/src/app/settings-config/settings-config.component.ts +0 -161
  107. package/src/app/settings-datasets/settings-datasets.component.html +0 -43
  108. package/src/app/settings-datasets/settings-datasets.component.scss +0 -39
  109. package/src/app/settings-datasets/settings-datasets.component.spec.ts +0 -25
  110. package/src/app/settings-datasets/settings-datasets.component.ts +0 -98
  111. package/src/app/settings-datasets/settings-datasets.modal.html +0 -54
  112. package/src/app/settings-notifications/settings-notifications.component.css +0 -0
  113. package/src/app/settings-notifications/settings-notifications.component.html +0 -65
  114. package/src/app/settings-notifications/settings-notifications.component.spec.ts +0 -25
  115. package/src/app/settings-notifications/settings-notifications.component.ts +0 -29
  116. package/src/app/settings-signalk/settings-signalk.component.css +0 -3
  117. package/src/app/settings-signalk/settings-signalk.component.html +0 -89
  118. package/src/app/settings-signalk/settings-signalk.component.spec.ts +0 -25
  119. package/src/app/settings-signalk/settings-signalk.component.ts +0 -174
  120. package/src/app/settings-units/settings-units.component.css +0 -4
  121. package/src/app/settings-units/settings-units.component.html +0 -19
  122. package/src/app/settings-units/settings-units.component.spec.ts +0 -25
  123. package/src/app/settings-units/settings-units.component.ts +0 -62
  124. package/src/app/settings-zones/settings-zones.component.css +0 -22
  125. package/src/app/settings-zones/settings-zones.component.html +0 -70
  126. package/src/app/settings-zones/settings-zones.component.ts +0 -154
  127. package/src/app/settings-zones/settings-zones.modal.css +0 -14
  128. package/src/app/settings-zones/settings-zones.modal.html +0 -39
  129. package/src/app/signalk-connection.service.ts +0 -344
  130. package/src/app/signalk-delta.service.spec.ts +0 -15
  131. package/src/app/signalk-delta.service.ts +0 -97
  132. package/src/app/signalk-full.service.spec.ts +0 -15
  133. package/src/app/signalk-full.service.ts +0 -99
  134. package/src/app/signalk-interfaces.ts +0 -129
  135. package/src/app/signalk-requests.service.spec.ts +0 -12
  136. package/src/app/signalk-requests.service.ts +0 -180
  137. package/src/app/signalk.service.spec.ts +0 -15
  138. package/src/app/signalk.service.ts +0 -428
  139. package/src/app/svg-autopilot/svg-autopilot.component.html +0 -1036
  140. package/src/app/svg-autopilot/svg-autopilot.component.spec.ts +0 -25
  141. package/src/app/svg-autopilot/svg-autopilot.component.ts +0 -174
  142. package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.html +0 -119
  143. package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.scss +0 -0
  144. package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.ts +0 -25
  145. package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.ts +0 -49
  146. package/src/app/svg-wind/svg-wind.component.css +0 -0
  147. package/src/app/svg-wind/svg-wind.component.html +0 -969
  148. package/src/app/svg-wind/svg-wind.component.scss +0 -76
  149. package/src/app/svg-wind/svg-wind.component.spec.ts +0 -25
  150. package/src/app/svg-wind/svg-wind.component.ts +0 -280
  151. package/src/app/unit-window/unit-window.component.css +0 -37
  152. package/src/app/unit-window/unit-window.component.html +0 -8
  153. package/src/app/unit-window/unit-window.component.spec.ts +0 -25
  154. package/src/app/unit-window/unit-window.component.ts +0 -134
  155. package/src/app/unit-window/unit-window.modal.html +0 -25
  156. package/src/app/units.service.ts +0 -300
  157. package/src/app/widget-autopilot/widget-autopilot.component.html +0 -78
  158. package/src/app/widget-autopilot/widget-autopilot.component.scss +0 -191
  159. package/src/app/widget-autopilot/widget-autopilot.component.spec.ts +0 -25
  160. package/src/app/widget-autopilot/widget-autopilot.component.ts +0 -774
  161. package/src/app/widget-blank/widget-blank.component.html +0 -5
  162. package/src/app/widget-blank/widget-blank.component.scss +0 -21
  163. package/src/app/widget-blank/widget-blank.component.spec.ts +0 -25
  164. package/src/app/widget-blank/widget-blank.component.ts +0 -17
  165. package/src/app/widget-gauge/widget-gauge.component.css +0 -26
  166. package/src/app/widget-gauge/widget-gauge.component.html +0 -29
  167. package/src/app/widget-gauge/widget-gauge.component.spec.ts +0 -25
  168. package/src/app/widget-gauge/widget-gauge.component.ts +0 -120
  169. package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.html +0 -126
  170. package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.scss +0 -94
  171. package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.ts +0 -25
  172. package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.ts +0 -424
  173. package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.html +0 -122
  174. package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.scss +0 -69
  175. package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.ts +0 -25
  176. package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts +0 -553
  177. package/src/app/widget-historical/widget-historical.component.css +0 -31
  178. package/src/app/widget-historical/widget-historical.component.html +0 -14
  179. package/src/app/widget-historical/widget-historical.component.scss +0 -0
  180. package/src/app/widget-historical/widget-historical.component.spec.ts +0 -25
  181. package/src/app/widget-historical/widget-historical.component.ts +0 -306
  182. package/src/app/widget-iframe/widget-iframe.component.css +0 -12
  183. package/src/app/widget-iframe/widget-iframe.component.html +0 -21
  184. package/src/app/widget-iframe/widget-iframe.component.spec.ts +0 -25
  185. package/src/app/widget-iframe/widget-iframe.component.ts +0 -63
  186. package/src/app/widget-list.service.spec.ts +0 -15
  187. package/src/app/widget-list.service.ts +0 -135
  188. package/src/app/widget-manager.service.spec.ts +0 -15
  189. package/src/app/widget-manager.service.ts +0 -141
  190. package/src/app/widget-numeric/widget-numeric.component.html +0 -13
  191. package/src/app/widget-numeric/widget-numeric.component.scss +0 -52
  192. package/src/app/widget-numeric/widget-numeric.component.spec.ts +0 -25
  193. package/src/app/widget-numeric/widget-numeric.component.ts +0 -457
  194. package/src/app/widget-simple-linear/widget-simple-linear.component.html +0 -28
  195. package/src/app/widget-simple-linear/widget-simple-linear.component.scss +0 -64
  196. package/src/app/widget-simple-linear/widget-simple-linear.component.spec.ts +0 -25
  197. package/src/app/widget-simple-linear/widget-simple-linear.component.ts +0 -199
  198. package/src/app/widget-state/widget-state.component.html +0 -27
  199. package/src/app/widget-state/widget-state.component.scss +0 -68
  200. package/src/app/widget-state/widget-state.component.spec.ts +0 -25
  201. package/src/app/widget-state/widget-state.component.ts +0 -178
  202. package/src/app/widget-switch/widget-switch.component.css +0 -70
  203. package/src/app/widget-switch/widget-switch.component.html +0 -17
  204. package/src/app/widget-switch/widget-switch.component.spec.ts +0 -25
  205. package/src/app/widget-switch/widget-switch.component.ts +0 -134
  206. package/src/app/widget-text-generic/widget-text-generic.component.css +0 -55
  207. package/src/app/widget-text-generic/widget-text-generic.component.html +0 -9
  208. package/src/app/widget-text-generic/widget-text-generic.component.spec.ts +0 -25
  209. package/src/app/widget-text-generic/widget-text-generic.component.ts +0 -253
  210. package/src/app/widget-tutorial/widget-tutorial.component.css +0 -0
  211. package/src/app/widget-tutorial/widget-tutorial.component.html +0 -34
  212. package/src/app/widget-tutorial/widget-tutorial.component.spec.ts +0 -25
  213. package/src/app/widget-tutorial/widget-tutorial.component.ts +0 -18
  214. package/src/app/widget-unknown/widget-unknown.component.css +0 -0
  215. package/src/app/widget-unknown/widget-unknown.component.html +0 -3
  216. package/src/app/widget-unknown/widget-unknown.component.spec.ts +0 -25
  217. package/src/app/widget-unknown/widget-unknown.component.ts +0 -15
  218. package/src/app/widget-wind/widget-wind.component.css +0 -24
  219. package/src/app/widget-wind/widget-wind.component.html +0 -20
  220. package/src/app/widget-wind/widget-wind.component.spec.ts +0 -25
  221. package/src/app/widget-wind/widget-wind.component.ts +0 -369
  222. package/src/assets/.gitkeep +0 -0
  223. package/src/assets/NoSleep.min.js +0 -2
  224. package/src/assets/alarm.mp3 +0 -0
  225. package/src/assets/alert.mp3 +0 -0
  226. package/src/assets/alertl.old.mp3 +0 -0
  227. package/src/assets/emergency.mp3 +0 -0
  228. package/src/assets/fontawesome6/css/all.min.css +0 -6
  229. package/src/assets/fontawesome6/webfonts/fa-brands-400.ttf +0 -0
  230. package/src/assets/fontawesome6/webfonts/fa-brands-400.woff2 +0 -0
  231. package/src/assets/fontawesome6/webfonts/fa-regular-400.ttf +0 -0
  232. package/src/assets/fontawesome6/webfonts/fa-regular-400.woff2 +0 -0
  233. package/src/assets/fontawesome6/webfonts/fa-solid-900.ttf +0 -0
  234. package/src/assets/fontawesome6/webfonts/fa-solid-900.woff2 +0 -0
  235. package/src/assets/fontawesome6/webfonts/fa-v4compatibility.ttf +0 -0
  236. package/src/assets/fontawesome6/webfonts/fa-v4compatibility.woff2 +0 -0
  237. package/src/assets/icon-192x192.png +0 -0
  238. package/src/assets/icon-256x256.png +0 -0
  239. package/src/assets/icon-384x384.png +0 -0
  240. package/src/assets/icon-512x512.png +0 -0
  241. package/src/assets/notification.mp3 +0 -0
  242. package/src/assets/steelseries-min.js +0 -25
  243. package/src/assets/steelseries-min.js.map +0 -8
  244. package/src/assets/steelseries.js +0 -15834
  245. package/src/assets/svg-autopilot-inkscape-plain.svg +0 -983
  246. package/src/assets/svg-wind-inkscape.svg +0 -1358
  247. package/src/assets/tween-min.js +0 -1
  248. package/src/assets/tween.js +0 -381
  249. package/src/assets/warn.mp3 +0 -0
  250. package/src/environments/environment.prod.ts +0 -3
  251. package/src/environments/environment.ts +0 -8
  252. package/src/favicon.ico +0 -0
  253. package/src/index.html +0 -20
  254. package/src/main.ts +0 -11
  255. package/src/manifest.json +0 -33
  256. package/src/polyfills.ts +0 -80
  257. package/src/styles.css +0 -47
  258. package/src/styles.scss +0 -157
  259. package/src/test.ts +0 -32
  260. package/src/themes/darkBlueTheme.scss +0 -117
  261. package/src/themes/defaultTheme.scss +0 -50
  262. package/src/themes/highContrastTheme.scss +0 -47
  263. package/src/themes/modernTheme.scss +0 -143
  264. package/src/themes/nightMode.scss +0 -185
  265. package/src/themes/platypusTheme.scss +0 -80
  266. package/src/themes/signalkTheme.scss +0 -112
  267. package/src/tsconfig.app.json +0 -15
  268. package/src/tsconfig.spec.json +0 -20
  269. package/src/typings.d.ts +0 -5
  270. package/tsconfig.json +0 -24
  271. package/tslint.json +0 -143
  272. /package/{KipGaugeSample-1-1024x545.png → KipGaugeSample1-1024x545.png} +0 -0
  273. /package/{KipMonitor-1024x488.png → KipGaugeSample2-1024x488.png} +0 -0
@@ -1,55 +0,0 @@
1
- <button [matMenuTriggerFor]="alarmMenu" color="accent" mat-flat-button class="menuBarAlarmsButton"
2
- [class.alarmCrit]="blinkCrit"
3
- [class.alarmWarning]="blinkWarn"
4
- [disabled]="alarmCount == 0 || notificationConfig.disableNotifications">
5
- <span *ngIf="!notificationConfig.disableNotifications" [matBadgeHidden]="!unAckAlarms"
6
- [matBadge]="unAckAlarms"
7
- matBadgeSize="medium"
8
- matBadgePosition="after"
9
- matBadgeOverlap="false"
10
- matBadgeColor="warn"
11
- class="fa-solid fa-envelope fa-2x matBadge">
12
- </span>
13
- <span *ngIf="notificationConfig.disableNotifications" class="fa-stack fa-lg">
14
- <i class="fa-solid fa-bell fa-1x" aria-hidden="true"></i>
15
- <i class="fa-solid fa-ban fa-stack-2x text-danger" aria-hidden="true"></i>
16
- </span>
17
- </button>
18
- <mat-menu #alarmMenu="matMenu" focusFirstItem>
19
- <div *ngFor="let alarm of alarms | keyvalue; index as i; trackBy:trackAlarmPath">
20
- <button mat-menu-item [matMenuTriggerFor]="actions" [matTooltip]="alarm.value.notification.message">
21
- <span *ngIf="alarm.value.isAck" class="fa-solid fa-lg fa-check"></span>
22
- <span *ngIf="!alarm.value.isAck" class="fa-solid fa-lg fa-exclamation"></span>
23
- {{ alarm.value.notification.message.replace("self.", "") }}
24
- </button>
25
- <mat-menu #actions="matMenu">
26
- <button
27
- mat-menu-item
28
- (click)="ackAlarm(alarm.key)"
29
-
30
- matTooltip="Silence Alarm (until state change)"
31
- >
32
- Acknowledge
33
- </button>
34
- <button
35
- mat-menu-item
36
- (click)="ackAlarm(alarm.key, 300000)"
37
-
38
- matTooltip="Silence Alarm for 5 minutes(state change can re-trigger)"
39
- >
40
- Acknowledge (5 Min)
41
- </button>
42
- </mat-menu>
43
- </div>
44
- <mat-action-list>
45
- <mat-divider></mat-divider>
46
- <button mat-list-item class="muteSoundButton" matTooltip="Mute notification sounds" (click)="mutePlayer(isMuted ? false : true)">
47
- <span *ngIf="!isMuted">
48
- <i class="fa-solid fa-bell" aria-hidden="true"></i> Mute Alarm Audio
49
- </span>
50
- <span *ngIf="isMuted">
51
- <i class="fa-solid fa-bell-slash" aria-hidden="true"></i> Unmute Alarm Audio
52
- </span>
53
- </button>
54
- </mat-action-list>
55
- </mat-menu>
@@ -1,52 +0,0 @@
1
- @use '~@angular/material' as mat;
2
-
3
- @mixin alarm-menu-theme($theme) {
4
-
5
- $primary: map-get($theme, primary);
6
- $warn: map-get($theme, warn);
7
- $background: map-get($theme, background);
8
- $foreground: map-get($theme, foreground);
9
-
10
- .matBadge {
11
- z-index: 1000;
12
- }
13
-
14
- // Alarm button when warning
15
- .alarmWarning {
16
- animation:blinkingAlarmWarning 1.5s infinite;
17
- background-color: #FFA500 !important
18
- }
19
- @keyframes blinkingAlarmWarning{
20
- 0%{ color: rgb(179, 0, 0); }
21
- 50%{ color: transparent; }
22
- 100%{ color: rgb(179, 0, 0); }
23
- }
24
- // Alarm button when crit
25
- .alarmCrit {
26
- animation:blinkingAlarmCrit 0.25s infinite;
27
-
28
- }
29
- @keyframes blinkingAlarmCrit{
30
- 0%{
31
- color: rgb(255, 232, 232);
32
- background-color: rgb(179, 0, 0);
33
- }
34
- 50%{
35
-
36
- color: rgb(179, 0, 0);
37
- background-color: rgb(255, 232, 232);
38
- }
39
- 100%{
40
- color: rgb(255, 232, 232);
41
- background-color: rgb(179, 0, 0);
42
- }
43
- }
44
- .muteSoundButton:hover {
45
- background: rgba(255, 255, 255, 0.04); // mat-list hover bug fixed in recent versions.
46
- }
47
-
48
- }
49
-
50
- ::ng-deep.mat-menu-panel {
51
- max-width:fit-content !important;
52
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
-
3
- import { AlarmMenuComponent } from './alarm-menu.component';
4
-
5
- describe('AlarmMenuComponent', () => {
6
- let component: AlarmMenuComponent;
7
- let fixture: ComponentFixture<AlarmMenuComponent>;
8
-
9
- beforeEach(waitForAsync(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ AlarmMenuComponent ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(AlarmMenuComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,186 +0,0 @@
1
- import { Component, OnInit, OnDestroy } from '@angular/core';
2
- import { NotificationsService, Alarm, IAlarmInfo } from '../notifications.service';
3
- import { AppSettingsService, INotificationConfig } from '../app-settings.service';
4
- import { Subscription } from 'rxjs';
5
-
6
-
7
-
8
- interface IMenuNode {
9
- [key: string]: any;
10
- label: string;
11
- childNode?: [IMenuItem | IMenuNode];
12
- }
13
- interface IMenuItem {
14
- [key: string]: any;
15
- label: string;
16
- Alarm?: Alarm;
17
- }
18
-
19
-
20
- @Component({
21
- selector: 'app-alarm-menu',
22
- templateUrl: './alarm-menu.component.html',
23
- styleUrls: ['./alarm-menu.component.scss']
24
- })
25
- export class AlarmMenuComponent implements OnInit, OnDestroy {
26
-
27
- private alarmSub: Subscription;
28
- private notificationServiceSettings: Subscription;
29
-
30
- alarms: { [path: string]: Alarm };
31
- notificationAlarms: { [path: string]: Alarm };
32
- alarmMenu: { [key: string]: string | IMenuItem | IMenuItem } = {}; // local menu array with string key
33
-
34
- // Menu properties
35
- alarmCount: number = 0;
36
- unAckAlarms: number = 0;
37
- blinkWarn: boolean = false;
38
- blinkCrit: boolean = false;
39
-
40
- isMuted: boolean = false;
41
-
42
- notificationConfig: INotificationConfig;
43
-
44
- constructor(
45
- private notificationsService: NotificationsService,
46
- private appSettingsService: AppSettingsService,
47
- ) {
48
- this.notificationServiceSettings = appSettingsService.getNotificationConfigService().subscribe(config => {
49
- this.notificationConfig = config;
50
- });
51
- }
52
-
53
- ngOnInit() {
54
- // init Alarm stream
55
- this.alarmSub = this.notificationsService.getAlarms().subscribe(
56
- message => {
57
- this.notificationAlarms = message;
58
- // Disabling notifications is done at the service level. No need to handle it here
59
- this.buildAlarmMenu();
60
- }
61
- );
62
-
63
- // init alarm info
64
- this.notificationsService.getAlarmInfoAsO().subscribe(info => {
65
- this.unAckAlarms = info.unackCount;
66
- this.isMuted = info.isMuted;
67
- this.alarmCount = info.alarmCount;
68
- switch(info.visualSev) {
69
- case 0:
70
- this.blinkWarn = false;
71
- this.blinkCrit = false;
72
- break;
73
- case 1:
74
- this.blinkWarn = true;
75
- this.blinkCrit = false;
76
- break;
77
- case 2:
78
- this.blinkCrit = true;
79
- this.blinkWarn = false;
80
- }
81
- });
82
- }
83
-
84
- mutePlayer(state) {
85
- this.notificationsService.mutePlayer(state);
86
- }
87
-
88
- // we use this as a staging area to limit menu update events we build the menu from Alarms record
89
- buildAlarmMenu() {
90
- // clean notificationAlarms based on App Notification settings
91
- if (!this.notificationConfig.devices.showNormalState) {
92
- for (const [path, thealarm] of Object.entries(this.notificationAlarms)) {
93
- let alarm = this.notificationAlarms[path];
94
-
95
- if (alarm.notification['state'] == 'normal' && alarm['type'] == 'device') {
96
- delete this.notificationAlarms[path];
97
- break;
98
- }
99
- }
100
- }
101
- this.alarms = this.notificationAlarms;
102
- }
103
-
104
- createMenuRootItem(itemLabel: string): IMenuNode | null {
105
- let item: IMenuNode = {
106
- label: itemLabel
107
- }
108
-
109
- if(Object.entries(this.alarmMenu).length) {
110
- let i = Object.keys(this.alarmMenu).indexOf(itemLabel);
111
- if(i == -1) {
112
- console.log("Root: " + itemLabel + " not found. Search index: " + i);
113
- return item;
114
- } else {
115
- console.log("Root: " + itemLabel + " found. Search index: " + i);
116
- console.log(JSON.stringify(Object.values(this.alarmMenu)));
117
- return null;
118
- }
119
- }
120
- console.log(JSON.stringify(Object.values(this.alarmMenu)));
121
- return item;
122
- }
123
-
124
- createMenuChildItem(itemLabel: string, pathPositionIndex: number, pathArray: string[], alarm: Alarm): IMenuItem | IMenuNode {
125
- let item;
126
-
127
- const lastPosition = pathArray.length - 1;
128
- let parentLabel = pathArray[pathPositionIndex - 1];
129
- let indexParentNode = Object.keys(this.alarmMenu).indexOf(pathArray[parentLabel]);
130
-
131
- if (pathPositionIndex != lastPosition) {
132
- item = {
133
- label: pathArray[pathPositionIndex],
134
- }
135
- } else {
136
- item = {
137
- label: pathArray[pathPositionIndex],
138
- Alarm: alarm,
139
- }
140
- }
141
-
142
- for (const [label, menuNode] of Object.entries(this.alarmMenu)) {
143
- if (label == parentLabel) {
144
- console.log(JSON.stringify(menuNode));
145
- menuNode['childNode'] = item;
146
-
147
- if (pathPositionIndex != lastPosition) {
148
- pathPositionIndex++;
149
- if (pathPositionIndex != (lastPosition)) {
150
- item = {
151
- label: pathArray[pathPositionIndex]
152
- }
153
- } else {
154
- item = {
155
- label: pathArray[pathPositionIndex],
156
- Alarm: alarm,
157
- }
158
- }
159
- menuNode['childNode'][0].childNode = item;
160
- }
161
- }
162
- }
163
-
164
- return null;
165
- }
166
-
167
-
168
- ackAlarm(path: string, timeout: number = 0) {
169
- this.notificationsService.acknowledgeAlarm(path, timeout);
170
- }
171
-
172
-
173
- /**
174
- * Used by ngFor to tracks alarm items by key for menu optimization
175
- * @param alarm object in question
176
- */
177
- trackAlarmPath(index, alarm) {
178
- return alarm ? alarm.value.path : undefined;
179
- }
180
-
181
- ngOnDestroy() {
182
- this.notificationServiceSettings.unsubscribe();
183
- this.alarmSub.unsubscribe();
184
- }
185
-
186
- }
@@ -1,4 +0,0 @@
1
- .tabGroup {
2
- display: block;
3
- padding: 3px;
4
- }
@@ -1,135 +0,0 @@
1
- <mat-tab-group class="tabGroup">
2
- <mat-tab label="Editing Layout">
3
-
4
- <div *ngIf="!unlockStatus">
5
- <h2>Unlocking</h2>
6
- <p>
7
- The layout is "Locked" by default. This is to prevent accidental interaction from touch screens from changing anything.
8
- You can unlock KIP using the hamburger icon in the lower right corner and selecting "Configuration -> Edit Layout". Go Ahead try it now!
9
- </p>
10
- </div>
11
- <div *ngIf="unlockStatus">
12
- <h2>Configuring Layout</h2>
13
- <p>
14
- Now that KIP is unlocked, you can do a few actions.
15
- </p>
16
- <ul>
17
- <li>The icon in the lower right can be used to select the Widget you would like to display</li>
18
- <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>
19
- <li>The "X" in the upper right can be used to delete an area (basically undoing a split)</li>
20
- <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>
21
- <li>You can drag the bars between widgits to resize them</li>
22
- </ul>
23
-
24
- </div>
25
-
26
- </mat-tab>
27
- <mat-tab label="Video Tutorials">
28
- <ng-template matTabContent>
29
- <mat-tab-group class="tabGroup">
30
-
31
- <mat-tab label="KIP">
32
- <mat-accordion>
33
- <mat-expansion-panel [expanded]="step === 0" (opened)="setStep(0)">
34
- <mat-expansion-panel-header>
35
- <mat-panel-title>
36
- 5 Minutes with Kip (by Boating with the Baileys)
37
- </mat-panel-title>
38
- <mat-panel-description>
39
- Introduction to using KIP
40
- </mat-panel-description>
41
- </mat-expansion-panel-header>
42
- <iframe width="560" height="315" src="https://www.youtube.com/embed/v6o4uK-Iq8s" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
43
- </mat-expansion-panel>
44
-
45
- <mat-expansion-panel [expanded]="step === 1" (opened)="setStep(1)">
46
- <mat-expansion-panel-header>
47
- <mat-panel-title>
48
- Graphana embeded in KIP (by Boating with the Baileys)
49
- </mat-panel-title>
50
- <mat-panel-description>
51
- Pretty graphs
52
- </mat-panel-description>
53
- </mat-expansion-panel-header>
54
- <iframe width="560" height="315" src="https://www.youtube.com/embed/S8FbtwBwW3w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
55
- </mat-expansion-panel>
56
-
57
- <mat-expansion-panel [expanded]="step === 2" (opened)="setStep(2)">
58
- <mat-expansion-panel-header>
59
- <mat-panel-title>
60
- Setting up zones in KIP (by Boating with the Baileys)
61
- </mat-panel-title>
62
- <mat-panel-description>
63
- Warnings/Alarms
64
- </mat-panel-description>
65
- </mat-expansion-panel-header>
66
- <iframe width="560" height="315" src="https://www.youtube.com/embed/BJFjLzjlpuY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
67
- </mat-expansion-panel>
68
-
69
- </mat-accordion>
70
-
71
- </mat-tab>
72
-
73
- <mat-tab label="Graphana">
74
- <mat-accordion>
75
- <mat-expansion-panel [expanded]="step === 2" (opened)="setStep(2)">
76
- <mat-expansion-panel-header>
77
- <mat-panel-title>
78
- 5 Minutes with Graphana (by Boating with the Baileys)
79
- </mat-panel-title>
80
- <mat-panel-description>
81
- Introduction to using Graphana
82
- </mat-panel-description>
83
- </mat-expansion-panel-header>
84
- <iframe width="560" height="315" src="https://www.youtube.com/embed/b3lHwLnYgx0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
85
- </mat-expansion-panel>
86
-
87
- <mat-expansion-panel [expanded]="step === 3" (opened)="setStep(3)">
88
- <mat-expansion-panel-header>
89
- <mat-panel-title>
90
- SignalK to InfluxDB (by Boating with the Baileys)
91
- </mat-panel-title>
92
- <mat-panel-description>
93
- Database to store historical data
94
- </mat-panel-description>
95
- </mat-expansion-panel-header>
96
- <iframe width="560" height="315" src="https://www.youtube.com/embed/ULnN-cByQXE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
97
- </mat-expansion-panel>
98
- </mat-accordion>
99
- </mat-tab>
100
-
101
- <mat-tab label="OpenPlotter">
102
- <mat-accordion>
103
- <mat-expansion-panel [expanded]="step === 4" (opened)="setStep(4)">
104
- <mat-expansion-panel-header>
105
- <mat-panel-title>
106
- OpenPlotter (by Boating with the Baileys)
107
- </mat-panel-title>
108
- <mat-panel-description>
109
- Installing OpenPlotter
110
- </mat-panel-description>
111
- </mat-expansion-panel-header>
112
- <iframe width="560" height="315" src="https://www.youtube.com/embed/Q0sEpgzhHTE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
113
- </mat-expansion-panel>
114
-
115
- <mat-expansion-panel [expanded]="step === 5" (opened)="setStep(5)">
116
- <mat-expansion-panel-header>
117
- <mat-panel-title>
118
- OpenPlotter instruction video (by Smart Sailing Boat)
119
- </mat-panel-title>
120
- <mat-panel-description>
121
- Installing OpenPlotter
122
- </mat-panel-description>
123
- </mat-expansion-panel-header>
124
- <iframe width="560" height="315" src="https://www.youtube.com/embed/r8CGixMl18k" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
125
- </mat-expansion-panel>
126
- </mat-accordion>
127
- </mat-tab>
128
-
129
- </mat-tab-group>
130
- </ng-template>
131
-
132
- </mat-tab>
133
- </mat-tab-group>
134
-
135
-
@@ -1,45 +0,0 @@
1
- import { Component, Input, OnInit, ViewEncapsulation, Inject } from '@angular/core';
2
- import { Subscription } from 'rxjs';
3
-
4
- import { AppSettingsService } from '../app-settings.service';
5
-
6
-
7
-
8
- @Component({
9
- selector: 'app-help',
10
- templateUrl: './app-help.component.html',
11
- styleUrls: ['./app-help.component.css'],
12
- encapsulation: ViewEncapsulation.None,
13
- })
14
- export class AppHelpComponent implements OnInit {
15
-
16
- unlockStatusSub: Subscription;
17
- unlockStatus: boolean;
18
-
19
- step = -1;
20
-
21
-
22
- constructor( private AppSettingsService: AppSettingsService,) {
23
-
24
- }
25
-
26
- ngOnInit() {
27
- // get Unlock Status
28
- this.unlockStatusSub = this.AppSettingsService.getUnlockStatusAsO().subscribe(
29
- unlockStatus => {
30
- this.unlockStatus = unlockStatus;
31
- }
32
- );
33
- }
34
-
35
- ngOnDestroy() {
36
- this.unlockStatusSub.unsubscribe();
37
- }
38
-
39
- setStep(index: number) {
40
- this.step = index;
41
- }
42
-
43
-
44
- }
45
-
@@ -1,15 +0,0 @@
1
- import { TestBed, inject } from '@angular/core/testing';
2
-
3
- import { AppSettingsService } from './app-settings.service';
4
-
5
- describe('AppSettingsService', () => {
6
- beforeEach(() => {
7
- TestBed.configureTestingModule({
8
- providers: [AppSettingsService]
9
- });
10
- });
11
-
12
- it('should be created', inject([AppSettingsService], (service: AppSettingsService) => {
13
- expect(service).toBeTruthy();
14
- }));
15
- });