@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,39 +0,0 @@
1
- .config-size {
2
- width: 100%;
3
- }
4
-
5
- .textheight {
6
- height: 120px;
7
- }
8
-
9
- .almost-full-width {
10
- width: 90%;
11
- }
12
- .server-form {
13
- min-width: 150px;
14
- max-width: 500px;
15
- width: 100%;
16
- }
17
-
18
- .warningText{
19
- padding-left: 15px;
20
- }
21
-
22
- .mat-radio-button ~ .mat-radio-button {
23
- margin-right: 16px;
24
- margin-left: 16px;
25
- }
26
-
27
- .config-row {
28
- display: flex;
29
- flex-direction: row;
30
- flex-wrap: wrap;
31
- width: 100%;
32
- }
33
- .config-column {
34
- display: flex;
35
- flex-direction: column;
36
- flex-basis: 100%;
37
- flex: 1;
38
- margin: 10px;
39
- }
@@ -1,118 +0,0 @@
1
- <mat-tab-group>
2
- <mat-tab label="Server">
3
- <p>Kip configuration can be stored and retrieved from the SignalK server. This enables configuration sharing (Kip Widgets and Kip general settings) with multiple devices. Note you require a token on the server in order to save config.</p>
4
- <div class="config-row">
5
- <div class="config-column">
6
- <mat-card>
7
- <form>
8
- Load Config from Server <div *ngIf="!supportApplicationData" class="warningText">Node Server version greater than 1.27.0 required</div>
9
- <mat-form-field class="almost-full-width">
10
- <mat-label>Config Name</mat-label>
11
- <mat-select required [formControl]="configLoad">
12
- <mat-option *ngFor="let config of possibleConfigs" [value]="config">
13
- {{config.scope}} / {{config.name}}
14
- </mat-option>
15
- </mat-select>
16
- </mat-form-field>
17
- <mat-card-actions align="end">
18
- <button mat-raised-button type="button" color="warn" [disabled]="!(configLoad.valid && configLoad.dirty)" (click)='loadServerSettings()'>Load</button>
19
- </mat-card-actions>
20
-
21
- </form>
22
- </mat-card>
23
- </div>
24
- <div class="config-column">
25
- <mat-card>
26
- <form>
27
- Save Config to Server<div *ngIf="!supportApplicationData" class="warningText">Node Server version greater than 1.27.0 required</div>
28
- <mat-form-field class="almost-full-width">
29
- <mat-label>Server Config Name</mat-label>
30
- <input matInput name="serverConfigName" placeholder="Config Name" [formControl]="configName">
31
- </mat-form-field>
32
- <mat-card-actions align="end">
33
- <div *ngIf="!hasToken">R/W token required for SignalK Server</div>
34
- <div *ngIf="hasToken">
35
- <mat-radio-group aria-label="Scope" [formControl]="configScope">
36
- <mat-radio-button value="global">Global (needs Admin priv)</mat-radio-button>
37
- <mat-radio-button value="user">User</mat-radio-button>
38
- </mat-radio-group>
39
- </div>
40
- <button mat-raised-button type="button" [disabled]="!hasToken" color="accent"(click)='saveServerSettings()'>Save</button>
41
- </mat-card-actions>
42
- </form>
43
- </mat-card>
44
- </div>
45
- </div>
46
- </mat-tab>
47
- <mat-tab label="Browser Config">
48
- <form name="appSettingsForm" (ngSubmit)="submitConfig('appConfig')">
49
- <mat-expansion-panel>
50
- <mat-expansion-panel-header>Application</mat-expansion-panel-header>
51
- <mat-form-field class="config-size">
52
- <textarea name="jsonConf" class="textheight" matInput placeholder="Raw Application JSON configuration" wrap="off" [(ngModel)]="appJSONConfig"></textarea>
53
- </mat-form-field>
54
- <mat-action-row>
55
- <button mat-raised-button type="submit" color="accent">Save Edits</button>
56
- </mat-action-row>
57
- </mat-expansion-panel>
58
- </form>
59
- <form name="widgetSettingsForm" (ngSubmit)="submitConfig('widgetConfig')">
60
- <mat-expansion-panel>
61
- <mat-expansion-panel-header>Widgets</mat-expansion-panel-header>
62
- <mat-form-field class="config-size">
63
- <textarea name="jsonConf" class="textheight" matInput placeholder="Raw Widget JSON configuration" wrap="off" [(ngModel)]="widgetJSONConfig"></textarea>
64
- </mat-form-field>
65
- <mat-action-row>
66
- <button mat-raised-button type="submit" color="accent">Save Edits</button>
67
- </mat-action-row>
68
- </mat-expansion-panel>
69
- </form>
70
- <form name="layoutSettingsForm" (ngSubmit)="submitConfig('layoutConfig')">
71
- <mat-expansion-panel>
72
- <mat-expansion-panel-header>Layouts</mat-expansion-panel-header>
73
- <mat-form-field class="config-size">
74
- <textarea name="jsonConf" class="textheight" matInput placeholder="Raw Layout JSON configuration" wrap="off" [(ngModel)]="layoutJSONConfig"></textarea>
75
- </mat-form-field>
76
- <mat-action-row>
77
- <button mat-raised-button type="submit" color="accent">Save Edits</button>
78
- </mat-action-row>
79
- </mat-expansion-panel>
80
- </form>
81
- <form name="themeSettingsForm" (ngSubmit)="submitConfig('themeConfig')">
82
- <mat-expansion-panel>
83
- <mat-expansion-panel-header>Theme</mat-expansion-panel-header>
84
- <mat-form-field class="config-size">
85
- <textarea name="jsonConf" class="textheight" matInput placeholder="Raw Theme JSON configuration" wrap="off" [(ngModel)]="themeJSONConfig"></textarea>
86
- </mat-form-field>
87
- <mat-action-row>
88
- <button mat-raised-button type="submit" color="accent">Save Edits</button>
89
- </mat-action-row>
90
- </mat-expansion-panel>
91
- </form>
92
- <form name="zoneSettingsForm" (ngSubmit)="submitConfig('zonesConfig')">
93
- <mat-expansion-panel>
94
- <mat-expansion-panel-header>Zones</mat-expansion-panel-header>
95
- <mat-form-field class="config-size">
96
- <textarea name="jsonConf" class="textheight" matInput placeholder="Raw Layout JSON configuration" wrap="off" [(ngModel)]="zonesJSONConfig"></textarea>
97
- </mat-form-field>
98
- <mat-action-row>
99
- <button mat-raised-button type="submit" color="accent">Save Edits</button>
100
- </mat-action-row>
101
- </mat-expansion-panel>
102
- </form>
103
- </mat-tab>
104
-
105
- <mat-tab label="Demo/Erase">
106
- <mat-card>
107
- <mat-card-actions align="end">
108
- <button mat-raised-button type="button" color="warn" (click)='loadDemoConfig()'>Load Demo Config</button>
109
- <button mat-raised-button type="button" color="warn" (click)='resetSettings()'>Erase Config</button>
110
- </mat-card-actions>
111
- </mat-card>
112
- </mat-tab>
113
-
114
- </mat-tab-group>
115
-
116
-
117
-
118
-
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
-
3
- import { SettingsConfigComponent } from './settings-config.component';
4
-
5
- describe('SettingsConfigComponent', () => {
6
- let component: SettingsConfigComponent;
7
- let fixture: ComponentFixture<SettingsConfigComponent>;
8
-
9
- beforeEach(waitForAsync(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ SettingsConfigComponent ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(SettingsConfigComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should be created', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,161 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { Subscription } from 'rxjs';
3
- import { FormControl, Validators } from '@angular/forms';
4
-
5
- import { AppSettingsService, IAppConfig, IWidgetConfig, ILayoutConfig, IThemeConfig, IZonesConfig } from '../app-settings.service';
6
- import { SignalKService } from '../signalk.service';
7
- import { SignalKConnectionService } from '../signalk-connection.service';
8
- import { NotificationsService } from '../notifications.service';
9
-
10
- interface possibleConfig {
11
- name: string
12
- scope: string
13
- }
14
-
15
- @Component({
16
- selector: 'app-settings-config',
17
- templateUrl: './settings-config.component.html',
18
- styleUrls: ['./settings-config.component.css']
19
- })
20
- export class SettingsConfigComponent implements OnInit {
21
-
22
- appJSONConfig: string = '';
23
- widgetJSONConfig: string = '';
24
- layoutJSONConfig: string = '';
25
- themeJSONConfig: string = '';
26
- zonesJSONConfig: string = '';
27
-
28
- hasToken: boolean = false;
29
- supportApplicationData: boolean = false;
30
- possibleConfigs: possibleConfig[] = [];
31
-
32
- configName = new FormControl("default", [ Validators.required, Validators.pattern("^[a-zA-Z0-9\-_]+$") ]);
33
- configScope = new FormControl("global", Validators.required);
34
- configLoad = new FormControl(Validators.required);
35
-
36
-
37
- authTokenSub: Subscription;
38
- serverSupportSaveSub: Subscription;
39
-
40
- constructor(
41
- private AppSettingsService: AppSettingsService,
42
- private SignalKService: SignalKService,
43
- private SignalKConnectionService: SignalKConnectionService,
44
- private NotificationsService: NotificationsService,
45
- ) { }
46
-
47
-
48
- ngOnInit() {
49
- this.serverSupportSaveSub = this.SignalKService.getServerSupportApplicationDataAsO().subscribe(supported => {
50
- this.supportApplicationData = supported;
51
- if (supported) {
52
- this.getPossibleConfigs();
53
- }
54
- });
55
-
56
- this.appJSONConfig = JSON.stringify(this.AppSettingsService.getAppConfig(), null, 2);
57
- this.widgetJSONConfig = JSON.stringify(this.AppSettingsService.getWidgetConfig(), null, 2);
58
- this.layoutJSONConfig = JSON.stringify(this.AppSettingsService.getLayoutConfig(), null, 2);
59
- this.themeJSONConfig = JSON.stringify(this.AppSettingsService.getThemeConfig(), null, 2);
60
- this.zonesJSONConfig = JSON.stringify(this.AppSettingsService.getZonesConfig(), null, 2);
61
-
62
-
63
- this.authTokenSub = this.AppSettingsService.getSignalKTokenAsO().subscribe(token => {
64
- if (token.token) {
65
- this.hasToken = true;
66
- } else {
67
- this.hasToken = false;
68
- }
69
- });
70
-
71
- }
72
-
73
- private getPossibleConfigs() {
74
- this.possibleConfigs = [];
75
- this.SignalKConnectionService.getApplicationDataKeys('global').subscribe(configNames => {
76
- for(let cname of configNames) {
77
- this.possibleConfigs.push({ scope: 'global', name: cname });
78
- }
79
- });
80
- this.SignalKConnectionService.getApplicationDataKeys('user').subscribe(configNames => {
81
- for(let cname of configNames) {
82
- this.possibleConfigs.push({ scope: 'user', name: cname });
83
- }
84
- });
85
- }
86
-
87
- saveServerSettings() {
88
- let allConfig = {};
89
- allConfig['app'] = this.AppSettingsService.getAppConfig();
90
- allConfig['widget'] = this.AppSettingsService.getWidgetConfig();
91
- allConfig['layout'] = this.AppSettingsService.getLayoutConfig();
92
- allConfig['theme'] = this.AppSettingsService.getThemeConfig();
93
- allConfig['zones'] = this.AppSettingsService.getZonesConfig();
94
-
95
-
96
- this.SignalKConnectionService.postApplicationData(this.configScope.value, this.configName.value, allConfig).subscribe(result => {
97
- this.NotificationsService.sendSnackbarNotification("Configuration saved to SignalK server", 3000);
98
- });
99
- }
100
-
101
- loadServerSettings() {
102
- this.SignalKConnectionService.getApplicationData(this.configLoad.value.scope, this.configLoad.value.name).subscribe(newConfig => {
103
- let app: IAppConfig = newConfig['app'];
104
- let widget: IWidgetConfig = newConfig['widget'];
105
- let layout: ILayoutConfig = newConfig['layout'];
106
- let theme: IThemeConfig = newConfig['theme'];
107
- let zones: IZonesConfig = newConfig['zones'] || [];
108
-
109
- // preserve kip uuid
110
- app.kipUUID = this.AppSettingsService.getKipUUID();
111
-
112
- this.AppSettingsService.replaceConfig("appConfig", JSON.stringify(app), false);
113
- this.AppSettingsService.replaceConfig("widgetConfig", JSON.stringify(widget), false);
114
- this.AppSettingsService.replaceConfig("layoutConfig", JSON.stringify(layout), false);
115
- this.AppSettingsService.replaceConfig("themeConfig", JSON.stringify(theme), false);
116
- this.AppSettingsService.replaceConfig("zonesConfig", JSON.stringify(zones), true);
117
-
118
- });
119
-
120
-
121
- }
122
-
123
- resetSettings() {
124
- this.AppSettingsService.resetSettings();
125
- }
126
-
127
- submitConfig(configType: string) {
128
- switch (configType) {
129
- case "appConfig":
130
- this.AppSettingsService.replaceConfig(configType, this.appJSONConfig, true);
131
- break;
132
-
133
- case "widgetConfig":
134
- this.AppSettingsService.replaceConfig(configType, this.widgetJSONConfig, true);
135
- break;
136
-
137
- case "layoutConfig":
138
- this.AppSettingsService.replaceConfig(configType, this.layoutJSONConfig, true);
139
- break;
140
-
141
- case "themeConfig":
142
- this.AppSettingsService.replaceConfig(configType, this.themeJSONConfig, true);
143
- break;
144
-
145
- case "zonesConfig":
146
- console.log(this.zonesJSONConfig);
147
- this.AppSettingsService.replaceConfig(configType, this.zonesJSONConfig, true);
148
- break;
149
- }
150
- }
151
-
152
- loadDemoConfig() {
153
- this.AppSettingsService.loadDemoConfig();
154
- }
155
-
156
- ngOnDestroy() {
157
- this.authTokenSub.unsubscribe();
158
- this.serverSupportSaveSub.unsubscribe();
159
- }
160
-
161
- }
@@ -1,43 +0,0 @@
1
- <form name="existingDataSet" #existingDataSet="ngForm">
2
- <mat-card>
3
- <mat-card-header>
4
- <mat-card-title>Datasets Configuration</mat-card-title>
5
- <mat-card-subtitle>Create recording datasets to be used with the Historical DataSet Widget.</mat-card-subtitle>
6
- </mat-card-header>
7
- <div style="overflow-x:auto;">
8
- <table style="width: 100%;">
9
- <tr>
10
- <th>
11
- Path
12
- </th>
13
- <th>
14
- Interval
15
- </th>
16
- <th>
17
- Data Points
18
- </th>
19
- <th>
20
-
21
- </th>
22
- </tr>
23
- <tr *ngFor="let ds of dataSets">
24
- <td>
25
- {{ ds.path }}
26
- </td>
27
- <td>
28
- {{ ds.updateTimer }} Sec
29
- </td>
30
- <td>
31
- {{ ds.dataPoints }}
32
- </td>
33
- <td>
34
- <button mat-raised-button color="accent" (click)="deleteDataSet(ds.uuid)">Delete</button>
35
- </td>
36
- </tr>
37
- </table>
38
- </div>
39
- <mat-card-actions align="end">
40
- <button mat-raised-button color="accent" (click)='openNewDataSetModal()'>Add New Dataset</button>
41
- </mat-card-actions>
42
- </mat-card>
43
- </form>
@@ -1,39 +0,0 @@
1
- @use '~@angular/material' as mat;
2
-
3
- @mixin theme-settings-data($theme) {
4
- $primary: map-get($theme, primary);
5
- $accent: map-get($theme, accent);
6
- $warn: map-get($theme, warn);
7
- $background: map-get($theme, background);
8
- $foreground: map-get($theme, foreground);
9
-
10
- table, th, td {
11
- border-bottom: 1px solid mat.get-color-from-palette($foreground, divider);
12
- }
13
-
14
- th {
15
- padding: 10px;
16
- text-align: left;
17
- background-color: mat.get-color-from-palette($accent, 300);
18
- color: mat.get-color-from-palette($foreground, text);
19
- }
20
-
21
- td {
22
- padding: 5px 5px 5px 10px;
23
- text-align: left;
24
- font-size: 14px;
25
- }
26
-
27
- tr:nth-child(even) {
28
- background-color: mat.get-color-from-palette($background, hover);
29
- }
30
-
31
- }
32
-
33
- .full-width {
34
- width: 100%;
35
- }
36
-
37
- table {
38
- border-collapse: collapse;
39
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
-
3
- import { SettingsDatasetsComponent } from './settings-datasets.component';
4
-
5
- describe('SettingsDatasetsComponent', () => {
6
- let component: SettingsDatasetsComponent;
7
- let fixture: ComponentFixture<SettingsDatasetsComponent>;
8
-
9
- beforeEach(waitForAsync(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ SettingsDatasetsComponent ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(SettingsDatasetsComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should be created', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,98 +0,0 @@
1
- import { Component, OnInit, Inject } from '@angular/core';
2
- import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
3
-
4
- import { SignalKService } from '../signalk.service';
5
- import { IPathObject } from "../signalk-interfaces";
6
- import { DataSetService, IDataSet } from '../data-set.service';
7
-
8
- interface settingsForm {
9
- selectedPath: string;
10
- selectedSource: string;
11
- interval: number;
12
- dataPoints: number;
13
- };
14
-
15
- @Component({
16
- selector: 'app-settings-datasets',
17
- templateUrl: './settings-datasets.component.html',
18
- styleUrls: ['./settings-datasets.component.scss']
19
- })
20
- export class SettingsDatasetsComponent implements OnInit {
21
-
22
- selectedDataSet: string;
23
- dataSets: IDataSet[];
24
-
25
- constructor(
26
- public dialog: MatDialog,
27
- private SignalKService: SignalKService,
28
- private DataSetService: DataSetService
29
- ) { }
30
-
31
- ngOnInit() {
32
- this.loadDataSets();
33
- }
34
-
35
- loadDataSets() {
36
- this.dataSets = this.DataSetService.getDataSets();
37
- }
38
-
39
- openNewDataSetModal() {
40
- let dialogRef = this.dialog.open(SettingsDatasetsModalComponent, {
41
- width: '600px'
42
- });
43
- dialogRef.afterClosed().subscribe(result => { this.loadDataSets() });
44
- }
45
-
46
-
47
- deleteDataSet(uuid:string) {
48
- this.DataSetService.deleteDataSet(uuid); //TODO, bit bruteforce, can cause errors cause dataset deleted before subscrioptions canceled
49
- this.loadDataSets();
50
- }
51
-
52
- }
53
-
54
- @Component({
55
- selector: 'app-settings-datasets-modal',
56
- templateUrl: './settings-datasets.modal.html',
57
- styleUrls: ['./settings-datasets.component.scss']
58
- })
59
- export class SettingsDatasetsModalComponent implements OnInit {
60
-
61
- settingsForm: settingsForm = {
62
- selectedPath: null,
63
- selectedSource: null,
64
- interval: 1,
65
- dataPoints: 30
66
- };
67
-
68
- availablePaths: string[] = [];
69
- availableSources: string[] = [];
70
- filterSelfPaths:boolean = true;
71
-
72
- constructor(
73
- private SignalKService: SignalKService,
74
- private DataSetService: DataSetService,
75
- public dialogRef:MatDialogRef<SettingsDatasetsModalComponent>,
76
- @Inject(MAT_DIALOG_DATA) public data: any
77
- ) { }
78
-
79
- ngOnInit() {
80
- this.availablePaths = this.SignalKService.getPathsByType('number').sort();
81
- }
82
-
83
- settingsFormUpdatePath() { // called when we choose a new path. resets the rest with default info of this path
84
- let pathObject = this.SignalKService.getPathObject(this.settingsForm.selectedPath);
85
- if (pathObject === null) { return; }
86
- this.availableSources = ['default'].concat(Object.keys(pathObject.sources));
87
- this.settingsForm.selectedSource = 'default';
88
- }
89
-
90
- addNewDataSet() {
91
- this.DataSetService.addDataSet(
92
- this.settingsForm.selectedPath,
93
- this.settingsForm.selectedSource,
94
- this.settingsForm.interval,
95
- this.settingsForm.dataPoints);
96
- this.dialogRef.close();
97
- }
98
- }
@@ -1,54 +0,0 @@
1
- <h2 mat-dialog-title>New Dataset:</h2>
2
- <mat-dialog-content>
3
- <form name="newDataSetForm" (ngSubmit)="addNewDataSet()" #newDataSetForm="ngForm">
4
- <mat-horizontal-stepper>
5
- <mat-step label="Source">
6
- <div class="tab-content">
7
- <mat-form-field class="full-width">
8
- <mat-select
9
- placeholder="SignalK Path"
10
- [(ngModel)]="settingsForm.selectedPath"
11
- name="selectedPath"
12
- (ngModelChange)="settingsFormUpdatePath()"
13
- required>
14
- <mat-option *ngFor="let path of (availablePaths | filterSelf: filterSelfPaths)" [value]="path">
15
- {{path}}
16
- </mat-option>
17
- </mat-select>
18
- </mat-form-field>
19
- <mat-checkbox
20
- [(ngModel)]="filterSelfPaths"
21
- name="filterSelfPaths"
22
- >
23
- Restric to own vessel
24
- </mat-checkbox>
25
- <mat-form-field class="full-width">
26
- <mat-select
27
- placeholder="Source"
28
- [(ngModel)]="settingsForm.selectedSource"
29
- name="selectedSource">
30
- <mat-option *ngFor="let source of availableSources" [value]="source">
31
- {{source}}
32
- </mat-option>
33
- </mat-select>
34
- </mat-form-field>
35
-
36
- </div>
37
- <button type="button" mat-raised-button color="accent" matStepperNext [disabled]="!settingsForm.selectedPath">Next</button>
38
- </mat-step>
39
- <mat-step label="Data Set">
40
- <div class="tab-content">
41
- <mat-form-field class="full-width">
42
- <input matInput placeholder="Interval(seconds)" type=number name="interval" [(ngModel)]="settingsForm.interval">
43
- </mat-form-field>
44
- <mat-form-field class="full-width">
45
- <input matInput placeholder="Data Points" type="number" name="decimals" [(ngModel)]="settingsForm.dataPoints">
46
- </mat-form-field>
47
- <br>
48
- <button type="button" mat-raised-button matStepperPrevious>Back</button>
49
- <button mat-raised-button color="accent" type="submit">Save</button>
50
- </div>
51
- </mat-step>
52
- </mat-horizontal-stepper>
53
- </form>
54
- </mat-dialog-content>
@@ -1,65 +0,0 @@
1
- <form name="notificationSetting">
2
- <mat-card>
3
- <mat-card-header>
4
- <mat-card-title>Server Notifications</mat-card-title>
5
- <mat-card-subtitle>Notifications are a special type of data sent from SignalK and displayed in the notification menu. They are meant to alert or inform operators. Set server notification preferences such as types of messages to display and audio prompts.</mat-card-subtitle>
6
- </mat-card-header>
7
- <mat-slide-toggle name="disableNotifications" [(ngModel)]="notificationConfig.disableNotifications" [ngModelOptions]="{standalone: true}">Disable All Notifications</mat-slide-toggle>
8
- <mat-accordion>
9
- <mat-expansion-panel expanded="true">
10
- <mat-expansion-panel-header>
11
- <mat-panel-title>
12
- Messages
13
- </mat-panel-title>
14
- <mat-panel-description>
15
- Control what messages the server will send
16
- </mat-panel-description>
17
- </mat-expansion-panel-header>
18
- <!-- <h4>Security</h4>
19
- <mat-checkbox [(ngModel)]="notificationConfig.security.disableSecurity" [ngModelOptions]="{standalone: true}">Disable all Security notifications</mat-checkbox> -->
20
- <!-- <h4>Devices</h4> -->
21
- <!-- <mat-checkbox [(ngModel)]="notificationConfig.devices.disableDevices" [ngModelOptions]="{standalone: true}">Disable all Devices notifications</mat-checkbox>
22
- <br/> -->
23
- <mat-checkbox [(ngModel)]="notificationConfig.devices.showNormalState" [ngModelOptions]="{standalone: true}">Show Devices Informational notifications</mat-checkbox>
24
- </mat-expansion-panel>
25
-
26
- <!-- <mat-expansion-panel expanded="false">
27
- <mat-expansion-panel-header>
28
- <mat-panel-title>
29
- Menu
30
- </mat-panel-title>
31
- <mat-panel-description>
32
- Configure notification menu display options
33
- </mat-panel-description>
34
- </mat-expansion-panel-header>
35
- <h3>Display</h3>
36
- <mat-checkbox [(ngModel)]="notificationConfig.menuGrouping" [ngModelOptions]="{standalone: true}">Groupe notifications by source types</mat-checkbox>
37
- </mat-expansion-panel> -->
38
-
39
- <mat-expansion-panel expanded="false">
40
- <mat-expansion-panel-header>
41
- <mat-panel-title>
42
- Audio
43
- </mat-panel-title>
44
- <mat-panel-description>
45
- Configure sound options
46
- </mat-panel-description>
47
- </mat-expansion-panel-header>
48
- <mat-checkbox [(ngModel)]="notificationConfig.sound.disableSound" [ngModelOptions]="{standalone: true}">Disable All Audio notification</mat-checkbox>
49
- <br/>
50
- <mat-checkbox [(ngModel)]="notificationConfig.sound.muteNormal" [ngModelOptions]="{standalone: true}">Disable <b>Information</b> notifications audio</mat-checkbox>
51
- <br/>
52
- <mat-checkbox [(ngModel)]="notificationConfig.sound.muteAlert" [ngModelOptions]="{standalone: true}">Disable <b>Alert Severity</b> notifications audio</mat-checkbox>
53
- <br/>
54
- <mat-checkbox [(ngModel)]="notificationConfig.sound.muteWarning" [ngModelOptions]="{standalone: true}">Disable <b>Warning</b> notifications audio</mat-checkbox>
55
- <br/>
56
- <mat-checkbox [(ngModel)]="notificationConfig.sound.muteAlarm" [ngModelOptions]="{standalone: true}">Disable <b>Alarm Severity</b> notifications audio</mat-checkbox>
57
- <br/>
58
- <mat-checkbox [(ngModel)]="notificationConfig.sound.muteEmergency" [ngModelOptions]="{standalone: true}">Disable <b>Emergency Severity</b> notifications audio</mat-checkbox>
59
- </mat-expansion-panel>
60
- </mat-accordion>
61
- <mat-card-actions align="end">
62
- <button mat-raised-button color="accent" (click)='saveNotificationsSettings()'>Save</button>
63
- </mat-card-actions>
64
- </mat-card>
65
- </form>