@xh/hoist 63.0.0 → 63.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 63.0.1 - 2024-04-05
4
+
5
+ ### 🐞 Bug Fixes
6
+
7
+ * New filterable fields exposed in the Admin Console for `ActivityTracking` and `ClientErrors` modules.
8
+ * `url`, `appEnvironment`, `appVersion` in `ActivityTracking`
9
+ * `impersonating` in `ClientErrors`
10
+
3
11
  ## 63.0.0 - 2024-04-04
4
12
 
5
13
  ### 💥 Breaking Changes (upgrade difficulty: 🟠 MEDIUM - for apps with styling overrides or direct use of Blueprint components)
@@ -35,12 +35,32 @@ export const clientErrorDetail = hoistCmp.factory<ClientErrorsModel>(({model}) =
35
35
  style: {width: '400px'},
36
36
  items: [
37
37
  h3(Icon.info(), 'Error Info'),
38
- formField({field: 'username'}),
38
+ formField({
39
+ field: 'username',
40
+ readonlyRenderer: username => {
41
+ if (!username) return naSpan();
42
+ const {impersonating} = formModel.values,
43
+ impSpan = impersonating
44
+ ? span({
45
+ className: 'xh-text-color-accent',
46
+ item: ` (impersonating ${impersonating})`
47
+ })
48
+ : null;
49
+ return span(username, impSpan);
50
+ }
51
+ }),
39
52
  formField({
40
53
  field: 'dateCreated',
41
54
  readonlyRenderer: v => fmtDateTimeSec(v)
42
55
  }),
43
- formField({field: 'appVersion'}),
56
+ formField({
57
+ field: 'appVersion',
58
+ readonlyRenderer: appVersion => {
59
+ if (!appVersion) return naSpan();
60
+ const {appEnvironment} = formModel.values;
61
+ return `${appVersion} (${appEnvironment})`;
62
+ }
63
+ }),
44
64
  formField({
45
65
  field: 'userAlerted',
46
66
  label: 'User Alerted?'
@@ -53,6 +53,7 @@ export class ClientErrorsModel extends HoistModel {
53
53
  {...Col.userMessageFlag},
54
54
  {...Col.userAlertedFlag},
55
55
  {...Col.entryId, hidden},
56
+ {...Col.impersonatingFlag},
56
57
  {...Col.username},
57
58
  {...Col.browser},
58
59
  {...Col.device},
@@ -63,7 +64,8 @@ export class ClientErrorsModel extends HoistModel {
63
64
  {...Col.error, hidden},
64
65
  {...Col.url},
65
66
  {...Col.day},
66
- {...Col.dateCreatedWithSec, displayName: 'Timestamp'}
67
+ {...Col.dateCreatedWithSec, displayName: 'Timestamp'},
68
+ {...Col.impersonating, hidden}
67
69
  ]
68
70
  });
69
71
 
@@ -102,6 +104,9 @@ export class ClientErrorsModel extends HoistModel {
102
104
  },
103
105
  {
104
106
  field: 'url'
107
+ },
108
+ {
109
+ field: 'impersonating'
105
110
  }
106
111
  ]
107
112
  });
@@ -99,7 +99,10 @@ export class ActivityTrackingModel extends HoistModel {
99
99
  Col.userAgent.field,
100
100
  Col.username.field,
101
101
  {name: 'count', type: 'int', aggregator: 'CHILD_COUNT'},
102
- {name: 'month', type: 'string', isDimension: true, aggregator: 'UNIQUE'}
102
+ {name: 'month', type: 'string', isDimension: true, aggregator: 'UNIQUE'},
103
+ Col.url.field,
104
+ Col.appVersion.field,
105
+ Col.appEnvironment.field
103
106
  ] as CubeFieldSpec[]
104
107
  });
105
108
 
@@ -131,20 +134,17 @@ export class ActivityTrackingModel extends HoistModel {
131
134
  },
132
135
  fieldType: 'number'
133
136
  },
134
- {
135
- field: 'msg'
136
- },
137
- {
138
- field: 'data'
139
- },
140
- {
141
- field: 'userAgent'
142
- }
137
+ {field: 'msg'},
138
+ {field: 'data'},
139
+ {field: 'userAgent'},
140
+ {field: 'url'},
141
+ {field: 'appVersion'},
142
+ {field: 'appEnvironment'}
143
143
  ]
144
144
  });
145
145
 
146
146
  this.loadLookupsAsync();
147
-
147
+
148
148
  this.groupingChooserModel = new GroupingChooserModel({
149
149
  dimensions: this.cube.dimensions,
150
150
  persistWith: this.persistWith,
@@ -186,7 +186,10 @@ export class ActivityTrackingModel extends HoistModel {
186
186
  {...Col.elapsed, headerName: 'Elapsed (avg)', hidden},
187
187
  {...Col.dayRange, hidden},
188
188
  {...Col.entryCount},
189
- {field: 'count', hidden}
189
+ {field: 'count', hidden},
190
+ {...Col.appEnvironment, hidden},
191
+ {...Col.appVersion, hidden},
192
+ {...Col.url, hidden}
190
193
  ]
191
194
  });
192
195
 
@@ -30,8 +30,7 @@ export class ActivityDetailModel extends HoistModel {
30
30
  }
31
31
 
32
32
  override onLinked() {
33
- const hidden = true,
34
- filterable = true;
33
+ const hidden = true;
35
34
 
36
35
  this.gridModel = new GridModel({
37
36
  sortBy: 'dateCreated|desc',
@@ -46,16 +45,19 @@ export class ActivityDetailModel extends HoistModel {
46
45
  columns: [
47
46
  {...Col.impersonatingFlag},
48
47
  {...Col.entryId, hidden},
49
- {...Col.username, filterable},
48
+ {...Col.username},
50
49
  {...Col.impersonating, hidden},
51
- {...Col.category, filterable},
52
- {...Col.msg, filterable},
50
+ {...Col.category},
51
+ {...Col.msg},
52
+ {...Col.url},
53
+ {...Col.appVersion},
54
+ {...Col.appEnvironment, hidden},
53
55
  {...Col.data, hidden},
54
- {...Col.device, filterable},
55
- {...Col.browser, filterable},
56
- {...Col.userAgent, hidden, filterable},
57
- {...Col.elapsed, filterable},
58
- {...Col.dateCreatedWithSec, displayName: 'Timestamp', filterable}
56
+ {...Col.device},
57
+ {...Col.browser},
58
+ {...Col.userAgent, hidden},
59
+ {...Col.elapsed},
60
+ {...Col.dateCreatedWithSec, displayName: 'Timestamp'}
59
61
  ]
60
62
  });
61
63
 
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import {form} from '@xh/hoist/cmp/form';
8
8
  import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
9
- import {div, filler, h3, hframe, placeholder, span} from '@xh/hoist/cmp/layout';
9
+ import {a, div, filler, h3, hframe, placeholder, span} from '@xh/hoist/cmp/layout';
10
10
  import {hoistCmp, creates} from '@xh/hoist/core';
11
11
  import {colChooserButton, exportButton} from '@xh/hoist/desktop/cmp/button';
12
12
  import {formField} from '@xh/hoist/desktop/cmp/form';
@@ -81,6 +81,14 @@ const detailRecForm = hoistCmp.factory<ActivityDetailModel>(({model}) => {
81
81
  }
82
82
  }),
83
83
  formField({field: 'category'}),
84
+ formField({
85
+ field: 'appVersion',
86
+ readonlyRenderer: appVersion => {
87
+ if (!appVersion) return naSpan();
88
+ const {appEnvironment} = formModel.values;
89
+ return `${appVersion} (${appEnvironment})`;
90
+ }
91
+ }),
84
92
  formField({field: 'msg'}),
85
93
  formField({
86
94
  field: 'dateCreated',
@@ -95,6 +103,10 @@ const detailRecForm = hoistCmp.factory<ActivityDetailModel>(({model}) => {
95
103
  })
96
104
  }),
97
105
  formField({field: 'id'}),
106
+ formField({
107
+ field: 'url',
108
+ readonlyRenderer: hyperlinkVal
109
+ }),
98
110
  h3(Icon.desktop(), 'Device / Browser'),
99
111
  formField({field: 'device'}),
100
112
  formField({field: 'browser'}),
@@ -123,3 +135,4 @@ const additionalDataJsonInput = hoistCmp.factory<ActivityDetailModel>(({model})
123
135
 
124
136
  const valOrNa = v => (v != null ? v : naSpan());
125
137
  const naSpan = () => span({item: 'N/A', className: 'xh-text-color-muted'});
138
+ const hyperlinkVal = v => a({href: v, item: v, target: '_blank'});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "63.0.0",
3
+ "version": "63.0.1",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",