@xh/hoist 72.2.0 → 72.4.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 (59) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/admin/tabs/activity/tracking/detail/ActivityDetailModel.ts +2 -2
  3. package/admin/tabs/cluster/instances/BaseInstanceModel.ts +1 -29
  4. package/admin/tabs/cluster/instances/InstancesTabModel.ts +4 -3
  5. package/admin/tabs/cluster/instances/logs/LogDisplay.ts +12 -14
  6. package/admin/tabs/cluster/instances/logs/LogDisplayModel.ts +0 -2
  7. package/admin/tabs/cluster/instances/logs/LogViewer.ts +6 -5
  8. package/admin/tabs/cluster/instances/logs/LogViewerModel.ts +8 -1
  9. package/admin/tabs/cluster/instances/memory/MemoryMonitorModel.ts +1 -0
  10. package/admin/tabs/cluster/instances/services/DetailsModel.ts +1 -2
  11. package/admin/tabs/cluster/instances/services/DetailsPanel.ts +20 -14
  12. package/admin/tabs/cluster/instances/services/ServiceModel.ts +14 -6
  13. package/admin/tabs/cluster/instances/services/ServicePanel.ts +9 -10
  14. package/admin/tabs/cluster/instances/websocket/WebSocketColumns.ts +9 -0
  15. package/admin/tabs/cluster/instances/websocket/WebSocketModel.ts +2 -1
  16. package/admin/tabs/cluster/objects/DetailModel.ts +4 -40
  17. package/admin/tabs/cluster/objects/DetailPanel.ts +2 -1
  18. package/admin/tabs/userData/roles/RoleModel.ts +1 -1
  19. package/appcontainer/AppContainerModel.ts +2 -0
  20. package/appcontainer/AppStateModel.ts +46 -9
  21. package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +4 -1
  22. package/build/types/admin/tabs/cluster/instances/BaseInstanceModel.d.ts +1 -3
  23. package/build/types/admin/tabs/cluster/instances/services/DetailsModel.d.ts +2 -3
  24. package/build/types/admin/tabs/cluster/instances/websocket/WebSocketColumns.d.ts +1 -0
  25. package/build/types/admin/tabs/cluster/objects/DetailModel.d.ts +1 -3
  26. package/build/types/appcontainer/AppStateModel.d.ts +7 -1
  27. package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +7 -0
  28. package/build/types/core/XH.d.ts +11 -1
  29. package/build/types/desktop/cmp/tab/TabSwitcher.d.ts +1 -1
  30. package/build/types/format/FormatDate.d.ts +22 -1
  31. package/build/types/format/FormatMisc.d.ts +3 -2
  32. package/build/types/security/BaseOAuthClient.d.ts +6 -7
  33. package/build/types/security/Types.d.ts +32 -5
  34. package/build/types/security/msal/MsalClient.d.ts +14 -1
  35. package/build/types/svc/ClientHealthService.d.ts +58 -0
  36. package/build/types/svc/TrackService.d.ts +19 -1
  37. package/build/types/svc/index.d.ts +1 -0
  38. package/build/types/utils/js/index.d.ts +0 -1
  39. package/cmp/viewmanager/ViewManagerModel.ts +10 -1
  40. package/core/XH.ts +26 -1
  41. package/data/Store.ts +3 -0
  42. package/desktop/cmp/grid/editors/BooleanEditor.ts +15 -3
  43. package/desktop/cmp/tab/TabSwitcher.ts +1 -1
  44. package/desktop/cmp/viewmanager/ViewMenu.ts +11 -9
  45. package/format/FormatDate.ts +45 -3
  46. package/format/FormatMisc.ts +6 -4
  47. package/package.json +2 -2
  48. package/security/BaseOAuthClient.ts +12 -10
  49. package/security/Types.ts +35 -6
  50. package/security/msal/MsalClient.ts +126 -21
  51. package/svc/ClientHealthService.ts +165 -0
  52. package/svc/FetchService.ts +3 -2
  53. package/svc/TrackService.ts +27 -5
  54. package/svc/WebSocketService.ts +1 -2
  55. package/svc/index.ts +1 -0
  56. package/tsconfig.tsbuildinfo +1 -1
  57. package/utils/js/index.ts +0 -1
  58. package/build/types/utils/js/BrowserUtils.d.ts +0 -4
  59. package/utils/js/BrowserUtils.ts +0 -52
@@ -25,16 +25,20 @@ export class TrackService extends HoistService {
25
25
  window.addEventListener('beforeunload', () => this.pushPendingAsync());
26
26
  }
27
27
 
28
- get conf() {
29
- return XH.getConf('xhActivityTrackingConfig', {
28
+ get conf(): ActivityTrackingConfig {
29
+ const appConfig = XH.getConf('xhActivityTrackingConfig', {});
30
+ return {
31
+ clientHealthReport: {intervalMins: -1},
30
32
  enabled: true,
33
+ logData: false,
31
34
  maxDataLength: 2000,
32
35
  maxRows: {
33
36
  default: 10000,
34
37
  options: [1000, 5000, 10000, 25000]
35
38
  },
36
- logData: false
37
- });
39
+ levels: [{username: '*', category: '*', severity: 'INFO'}],
40
+ ...appConfig
41
+ };
38
42
  }
39
43
 
40
44
  get enabled(): boolean {
@@ -79,7 +83,7 @@ export class TrackService extends HoistService {
79
83
  sent.set(key, true);
80
84
  }
81
85
 
82
- // Otherwise - log and for next batch,
86
+ // Otherwise - log and queue to send with next debounced push to server.
83
87
  this.logMessage(options);
84
88
 
85
89
  this.pending.push(this.toServerJson(options));
@@ -145,3 +149,21 @@ export class TrackService extends HoistService {
145
149
  this.logInfo(...consoleMsgs);
146
150
  }
147
151
  }
152
+
153
+ interface ActivityTrackingConfig {
154
+ clientHealthReport?: Partial<TrackOptions> & {
155
+ intervalMins: number;
156
+ };
157
+ enabled: boolean;
158
+ logData: boolean;
159
+ maxDataLength: number;
160
+ maxRows?: {
161
+ default: number;
162
+ options: number[];
163
+ };
164
+ levels?: Array<{
165
+ username: string | '*';
166
+ category: string | '*';
167
+ severity: 'DEBUG' | 'INFO' | 'WARN';
168
+ }>;
169
+ }
@@ -282,8 +282,7 @@ export class WebSocketService extends HoistService {
282
282
 
283
283
  buildWebSocketUrl() {
284
284
  const protocol = window.location.protocol == 'https:' ? 'wss:' : 'ws:',
285
- endpoint = 'xhWebSocket';
286
-
285
+ endpoint = 'xhWebSocket?clientAppVersion=' + XH.appVersion;
287
286
  return XH.isDevelopmentMode
288
287
  ? `${protocol}//${XH.baseUrl.split('//')[1]}${endpoint}`
289
288
  : `${protocol}//${window.location.host}${XH.baseUrl}${endpoint}`;
package/svc/index.ts CHANGED
@@ -19,5 +19,6 @@ export * from './JsonBlobService';
19
19
  export * from './PrefService';
20
20
  export * from './TrackService';
21
21
  export * from './WebSocketService';
22
+ export * from './ClientHealthService';
22
23
  export * from './storage/LocalStorageService';
23
24
  export * from './storage/SessionStorageService';