@xh/hoist 69.0.0-SNAPSHOT.1728424290087 → 69.0.0-SNAPSHOT.1728501806283
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 +1 -0
- package/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts +30 -23
- package/admin/tabs/cluster/hzobject/HzObjectModel.ts +9 -2
- package/admin/tabs/cluster/hzobject/HzObjectPanel.ts +3 -3
- package/admin/tabs/cluster/logs/levels/LogLevelDialogModel.ts +1 -0
- package/admin/tabs/cluster/memory/MemoryMonitorPanel.ts +45 -37
- package/admin/tabs/userData/prefs/editor/PrefEditorModel.ts +1 -0
- package/build/types/admin/tabs/cluster/hzobject/HzObjectModel.d.ts +2 -0
- package/build/types/desktop/cmp/rest/RestGridModel.d.ts +5 -2
- package/desktop/cmp/rest/RestGridModel.ts +7 -1
- package/desktop/cmp/rest/impl/RestGridToolbar.ts +4 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,7 @@ is not expected to affect any applications.
|
|
|
11
11
|
* Added new AppStates `AUTHENTICATING`, `INITIALIZING_HOIST`, and `INITIALIZING_APP` to support
|
|
12
12
|
more granular tracking and timing of app startup lifecycle.
|
|
13
13
|
* Improved the default "Loaded App" activity tracking entry with more granular data on load timing.
|
|
14
|
+
* `RestGrid` now displays an optional refresh button in its toolbar.
|
|
14
15
|
|
|
15
16
|
### ⚙️ Technical
|
|
16
17
|
|
|
@@ -14,6 +14,7 @@ import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
|
14
14
|
import {errorMessage} from '@xh/hoist/desktop/cmp/error';
|
|
15
15
|
import {jsonInput} from '@xh/hoist/desktop/cmp/input';
|
|
16
16
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
17
|
+
import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
|
|
17
18
|
import {Icon} from '@xh/hoist/icon';
|
|
18
19
|
|
|
19
20
|
export const connPoolMonitorPanel = hoistCmp.factory({
|
|
@@ -26,28 +27,8 @@ export const connPoolMonitorPanel = hoistCmp.factory({
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
const {readonly} = AppModel;
|
|
30
30
|
return panel({
|
|
31
|
-
|
|
32
|
-
button({
|
|
33
|
-
text: 'Take Snapshot',
|
|
34
|
-
icon: Icon.camera(),
|
|
35
|
-
omit: readonly,
|
|
36
|
-
onClick: () => model.takeSnapshotAsync()
|
|
37
|
-
}),
|
|
38
|
-
'-',
|
|
39
|
-
button({
|
|
40
|
-
text: 'Reset Stats',
|
|
41
|
-
icon: Icon.reset(),
|
|
42
|
-
omit: readonly,
|
|
43
|
-
onClick: () => model.resetStatsAsync()
|
|
44
|
-
}),
|
|
45
|
-
filler(),
|
|
46
|
-
gridCountLabel({unit: 'snapshot'}),
|
|
47
|
-
'-',
|
|
48
|
-
exportButton()
|
|
49
|
-
],
|
|
50
|
-
items: hframe(
|
|
31
|
+
item: hframe(
|
|
51
32
|
vframe(
|
|
52
33
|
grid(),
|
|
53
34
|
panel({
|
|
@@ -60,12 +41,38 @@ export const connPoolMonitorPanel = hoistCmp.factory({
|
|
|
60
41
|
),
|
|
61
42
|
poolConfigPanel()
|
|
62
43
|
),
|
|
63
|
-
|
|
64
|
-
ref: model.viewRef
|
|
44
|
+
bbar: bbar(),
|
|
45
|
+
ref: model.viewRef,
|
|
46
|
+
mask: 'onLoad'
|
|
65
47
|
});
|
|
66
48
|
}
|
|
67
49
|
});
|
|
68
50
|
|
|
51
|
+
const bbar = hoistCmp.factory<ConnPoolMonitorModel>({
|
|
52
|
+
render({model}) {
|
|
53
|
+
const {readonly} = AppModel;
|
|
54
|
+
return toolbar(
|
|
55
|
+
button({
|
|
56
|
+
text: 'Take Snapshot',
|
|
57
|
+
icon: Icon.camera(),
|
|
58
|
+
omit: readonly,
|
|
59
|
+
onClick: () => model.takeSnapshotAsync()
|
|
60
|
+
}),
|
|
61
|
+
'-',
|
|
62
|
+
button({
|
|
63
|
+
text: 'Reset Stats',
|
|
64
|
+
icon: Icon.reset(),
|
|
65
|
+
omit: readonly,
|
|
66
|
+
onClick: () => model.resetStatsAsync()
|
|
67
|
+
}),
|
|
68
|
+
filler(),
|
|
69
|
+
gridCountLabel({unit: 'snapshot'}),
|
|
70
|
+
'-',
|
|
71
|
+
exportButton()
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
69
76
|
const poolConfigPanel = hoistCmp.factory<ConnPoolMonitorModel>({
|
|
70
77
|
render({model}) {
|
|
71
78
|
return panel({
|
|
@@ -13,6 +13,7 @@ import * as Col from '@xh/hoist/cmp/grid/columns';
|
|
|
13
13
|
import {br, fragment} from '@xh/hoist/cmp/layout';
|
|
14
14
|
import {LoadSpec, managed, PlainObject, XH} from '@xh/hoist/core';
|
|
15
15
|
import {RecordActionSpec} from '@xh/hoist/data';
|
|
16
|
+
import {PanelModel} from '@xh/hoist/desktop/cmp/panel';
|
|
16
17
|
import {Icon} from '@xh/hoist/icon';
|
|
17
18
|
import {bindable, makeObservable} from '@xh/hoist/mobx';
|
|
18
19
|
import {first, isEmpty, last} from 'lodash';
|
|
@@ -20,6 +21,11 @@ import {first, isEmpty, last} from 'lodash';
|
|
|
20
21
|
export class HzObjectModel extends BaseInstanceModel {
|
|
21
22
|
@bindable groupBy: 'type' | 'owner' = 'owner';
|
|
22
23
|
|
|
24
|
+
@managed detailPanelModel = new PanelModel({
|
|
25
|
+
side: 'right',
|
|
26
|
+
defaultSize: 450
|
|
27
|
+
});
|
|
28
|
+
|
|
23
29
|
clearAction: RecordActionSpec = {
|
|
24
30
|
text: 'Clear Objects',
|
|
25
31
|
icon: Icon.reset(),
|
|
@@ -37,6 +43,7 @@ export class HzObjectModel extends BaseInstanceModel {
|
|
|
37
43
|
gridModel = new GridModel({
|
|
38
44
|
selModel: 'multiple',
|
|
39
45
|
enableExport: true,
|
|
46
|
+
autosizeOptions: {mode: 'managed', includeCollapsedChildren: true},
|
|
40
47
|
exportOptions: {filename: exportFilenameWithDate('distributed-objects'), columns: 'ALL'},
|
|
41
48
|
sortBy: 'displayName',
|
|
42
49
|
groupBy: this.groupBy,
|
|
@@ -54,10 +61,10 @@ export class HzObjectModel extends BaseInstanceModel {
|
|
|
54
61
|
processRawData: o => this.processRawData(o)
|
|
55
62
|
},
|
|
56
63
|
columns: [
|
|
57
|
-
{field: 'displayName'
|
|
64
|
+
{field: 'displayName'},
|
|
58
65
|
{field: 'owner'},
|
|
59
66
|
{field: 'type'},
|
|
60
|
-
{field: 'size', displayName: '
|
|
67
|
+
{field: 'size', displayName: 'Entries', ...Col.number},
|
|
61
68
|
{
|
|
62
69
|
...timestampNoYear,
|
|
63
70
|
field: 'lastUpdateTime',
|
|
@@ -62,8 +62,7 @@ const detailsPanel = hoistCmp.factory({
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
const bbar = hoistCmp.factory({
|
|
66
|
-
model: uses(HzObjectModel),
|
|
65
|
+
const bbar = hoistCmp.factory<HzObjectModel>({
|
|
67
66
|
render({model}) {
|
|
68
67
|
return toolbar(
|
|
69
68
|
recordActionBar({
|
|
@@ -89,7 +88,8 @@ const bbar = hoistCmp.factory({
|
|
|
89
88
|
],
|
|
90
89
|
width: 125,
|
|
91
90
|
bind: 'groupBy',
|
|
92
|
-
hideDropdownIndicator: true
|
|
91
|
+
hideDropdownIndicator: true,
|
|
92
|
+
enableFilter: false
|
|
93
93
|
}),
|
|
94
94
|
storeFilterField({matchMode: 'any'}),
|
|
95
95
|
exportButton()
|
|
@@ -48,6 +48,7 @@ export class LogLevelDialogModel extends HoistModel {
|
|
|
48
48
|
enableExport: true,
|
|
49
49
|
exportOptions: {filename: exportFilenameWithDate('log-levels')},
|
|
50
50
|
readonly: AppModel.readonly,
|
|
51
|
+
showRefreshButton: true,
|
|
51
52
|
store: {
|
|
52
53
|
url: 'rest/logLevelAdmin',
|
|
53
54
|
fieldDefaults: {disableXssProtection: true},
|
|
@@ -8,11 +8,12 @@ import {AppModel} from '@xh/hoist/admin/AppModel';
|
|
|
8
8
|
import {MemoryMonitorModel} from '@xh/hoist/admin/tabs/cluster/memory/MemoryMonitorModel';
|
|
9
9
|
import {chart} from '@xh/hoist/cmp/chart';
|
|
10
10
|
import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
|
|
11
|
-
import {filler} from '@xh/hoist/cmp/layout';
|
|
11
|
+
import {filler, vframe} from '@xh/hoist/cmp/layout';
|
|
12
12
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
13
13
|
import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
14
14
|
import {errorMessage} from '@xh/hoist/desktop/cmp/error';
|
|
15
15
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
16
|
+
import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
|
|
16
17
|
import {Icon} from '@xh/hoist/icon';
|
|
17
18
|
import {isNil} from 'lodash';
|
|
18
19
|
|
|
@@ -26,40 +27,8 @@ export const memoryMonitorPanel = hoistCmp.factory({
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
const {readonly} = AppModel,
|
|
30
|
-
dumpDisabled = isNil(model.heapDumpDir);
|
|
31
30
|
return panel({
|
|
32
|
-
|
|
33
|
-
button({
|
|
34
|
-
text: 'Take Snapshot',
|
|
35
|
-
icon: Icon.camera(),
|
|
36
|
-
omit: readonly,
|
|
37
|
-
onClick: () => model.takeSnapshotAsync()
|
|
38
|
-
}),
|
|
39
|
-
'-',
|
|
40
|
-
button({
|
|
41
|
-
text: 'Request GC',
|
|
42
|
-
icon: Icon.trash(),
|
|
43
|
-
omit: readonly,
|
|
44
|
-
onClick: () => model.requestGcAsync()
|
|
45
|
-
}),
|
|
46
|
-
'-',
|
|
47
|
-
button({
|
|
48
|
-
text: 'Dump Heap',
|
|
49
|
-
icon: Icon.fileArchive(),
|
|
50
|
-
omit: readonly,
|
|
51
|
-
disabled: dumpDisabled,
|
|
52
|
-
tooltip: dumpDisabled
|
|
53
|
-
? 'Missing required config xhMemoryMonitoringConfig.heapDumpDir'
|
|
54
|
-
: null,
|
|
55
|
-
onClick: () => model.dumpHeapAsync()
|
|
56
|
-
}),
|
|
57
|
-
filler(),
|
|
58
|
-
gridCountLabel({unit: 'snapshot'}),
|
|
59
|
-
'-',
|
|
60
|
-
exportButton()
|
|
61
|
-
],
|
|
62
|
-
items: [
|
|
31
|
+
item: vframe(
|
|
63
32
|
grid(),
|
|
64
33
|
panel({
|
|
65
34
|
modelConfig: {
|
|
@@ -68,9 +37,48 @@ export const memoryMonitorPanel = hoistCmp.factory({
|
|
|
68
37
|
},
|
|
69
38
|
item: chart()
|
|
70
39
|
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ref: model.viewRef
|
|
40
|
+
),
|
|
41
|
+
bbar: bbar(),
|
|
42
|
+
ref: model.viewRef,
|
|
43
|
+
mask: 'onLoad'
|
|
74
44
|
});
|
|
75
45
|
}
|
|
76
46
|
});
|
|
47
|
+
|
|
48
|
+
const bbar = hoistCmp.factory<MemoryMonitorModel>({
|
|
49
|
+
render({model}) {
|
|
50
|
+
const {readonly} = AppModel,
|
|
51
|
+
dumpDisabled = isNil(model.heapDumpDir);
|
|
52
|
+
|
|
53
|
+
return toolbar(
|
|
54
|
+
button({
|
|
55
|
+
text: 'Take Snapshot',
|
|
56
|
+
icon: Icon.camera(),
|
|
57
|
+
omit: readonly,
|
|
58
|
+
onClick: () => model.takeSnapshotAsync()
|
|
59
|
+
}),
|
|
60
|
+
'-',
|
|
61
|
+
button({
|
|
62
|
+
text: 'Request GC',
|
|
63
|
+
icon: Icon.trash(),
|
|
64
|
+
omit: readonly,
|
|
65
|
+
onClick: () => model.requestGcAsync()
|
|
66
|
+
}),
|
|
67
|
+
'-',
|
|
68
|
+
button({
|
|
69
|
+
text: 'Dump Heap',
|
|
70
|
+
icon: Icon.fileArchive(),
|
|
71
|
+
omit: readonly,
|
|
72
|
+
disabled: dumpDisabled,
|
|
73
|
+
tooltip: dumpDisabled
|
|
74
|
+
? 'Missing required config xhMemoryMonitoringConfig.heapDumpDir'
|
|
75
|
+
: null,
|
|
76
|
+
onClick: () => model.dumpHeapAsync()
|
|
77
|
+
}),
|
|
78
|
+
filler(),
|
|
79
|
+
gridCountLabel({unit: 'snapshot'}),
|
|
80
|
+
'-',
|
|
81
|
+
exportButton()
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
@@ -43,6 +43,7 @@ export class PrefEditorModel extends HoistModel {
|
|
|
43
43
|
enableExport: true,
|
|
44
44
|
exportOptions: {filename: exportFilenameWithDate('prefs')},
|
|
45
45
|
selModel: 'multiple',
|
|
46
|
+
showRefreshButton: true,
|
|
46
47
|
store: {
|
|
47
48
|
url: 'rest/preferenceAdmin',
|
|
48
49
|
reloadLookupsOnLoad: true,
|
|
@@ -2,8 +2,10 @@ import { BaseInstanceModel } from '@xh/hoist/admin/tabs/cluster/BaseInstanceMode
|
|
|
2
2
|
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
3
3
|
import { LoadSpec } from '@xh/hoist/core';
|
|
4
4
|
import { RecordActionSpec } from '@xh/hoist/data';
|
|
5
|
+
import { PanelModel } from '@xh/hoist/desktop/cmp/panel';
|
|
5
6
|
export declare class HzObjectModel extends BaseInstanceModel {
|
|
6
7
|
groupBy: 'type' | 'owner';
|
|
8
|
+
detailPanelModel: PanelModel;
|
|
7
9
|
clearAction: RecordActionSpec;
|
|
8
10
|
gridModel: GridModel;
|
|
9
11
|
constructor();
|
|
@@ -18,7 +18,9 @@ export interface RestGridConfig extends GridConfig {
|
|
|
18
18
|
menuActions?: Array<RecordAction | RecordActionSpec | '-'>;
|
|
19
19
|
/** Actions to display in the form toolbar. Defaults to delete. */
|
|
20
20
|
formActions?: Array<RecordAction | RecordActionSpec>;
|
|
21
|
-
/**
|
|
21
|
+
/** Show a refresh button in the toolbar. Defaults to false. **/
|
|
22
|
+
showRefreshButton?: boolean;
|
|
23
|
+
/** Warning to display before actions on a selection of records. */
|
|
22
24
|
actionWarning?: {
|
|
23
25
|
add?: string | ((recs: StoreRecord[]) => string);
|
|
24
26
|
del?: string | ((recs: StoreRecord[]) => string);
|
|
@@ -70,6 +72,7 @@ export declare class RestGridModel extends HoistModel {
|
|
|
70
72
|
toolbarActions: Array<RecordAction | RecordActionSpec>;
|
|
71
73
|
menuActions: Array<RecordAction | RecordActionSpec | '-'>;
|
|
72
74
|
formActions: Array<RecordAction | RecordActionSpec>;
|
|
75
|
+
showRefreshButton: boolean;
|
|
73
76
|
prepareCloneFn: (input: {
|
|
74
77
|
record: StoreRecord;
|
|
75
78
|
clone: PlainObject;
|
|
@@ -83,7 +86,7 @@ export declare class RestGridModel extends HoistModel {
|
|
|
83
86
|
get selModel(): import("@xh/hoist/data").StoreSelectionModel;
|
|
84
87
|
get selectedRecords(): StoreRecord[];
|
|
85
88
|
get selectedRecord(): StoreRecord;
|
|
86
|
-
constructor({ readonly, toolbarActions, menuActions, formActions, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, ...rest }: RestGridConfig);
|
|
89
|
+
constructor({ readonly, toolbarActions, menuActions, formActions, showRefreshButton, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, ...rest }: RestGridConfig);
|
|
87
90
|
/** Load the underlying store. */
|
|
88
91
|
doLoadAsync(loadSpec: any): Promise<void>;
|
|
89
92
|
/** Load the underlying store. */
|
|
@@ -34,7 +34,10 @@ export interface RestGridConfig extends GridConfig {
|
|
|
34
34
|
/** Actions to display in the form toolbar. Defaults to delete. */
|
|
35
35
|
formActions?: Array<RecordAction | RecordActionSpec>;
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/** Show a refresh button in the toolbar. Defaults to false. **/
|
|
38
|
+
showRefreshButton?: boolean;
|
|
39
|
+
|
|
40
|
+
/** Warning to display before actions on a selection of records. */
|
|
38
41
|
actionWarning?: {
|
|
39
42
|
add?: string | ((recs: StoreRecord[]) => string);
|
|
40
43
|
del?: string | ((recs: StoreRecord[]) => string);
|
|
@@ -97,6 +100,7 @@ export class RestGridModel extends HoistModel {
|
|
|
97
100
|
toolbarActions: Array<RecordAction | RecordActionSpec>;
|
|
98
101
|
menuActions: Array<RecordAction | RecordActionSpec | '-'>;
|
|
99
102
|
formActions: Array<RecordAction | RecordActionSpec>;
|
|
103
|
+
showRefreshButton: boolean;
|
|
100
104
|
prepareCloneFn: (input: {record: StoreRecord; clone: PlainObject}) => void;
|
|
101
105
|
unit: string;
|
|
102
106
|
filterFields: string[] = null;
|
|
@@ -133,6 +137,7 @@ export class RestGridModel extends HoistModel {
|
|
|
133
137
|
toolbarActions = !readonly ? [addAction, editAction, deleteAction] : [viewAction],
|
|
134
138
|
menuActions = !readonly ? [addAction, editAction, deleteAction] : [viewAction],
|
|
135
139
|
formActions = !readonly ? [deleteAction] : [],
|
|
140
|
+
showRefreshButton = false,
|
|
136
141
|
actionWarning,
|
|
137
142
|
prepareCloneFn,
|
|
138
143
|
unit = 'record',
|
|
@@ -149,6 +154,7 @@ export class RestGridModel extends HoistModel {
|
|
|
149
154
|
this.toolbarActions = toolbarActions;
|
|
150
155
|
this.menuActions = menuActions;
|
|
151
156
|
this.formActions = formActions;
|
|
157
|
+
this.showRefreshButton = showRefreshButton;
|
|
152
158
|
|
|
153
159
|
this.actionWarning = Object.assign(this.actionWarning, actionWarning);
|
|
154
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "69.0.0-SNAPSHOT.
|
|
3
|
+
"version": "69.0.0-SNAPSHOT.1728501806283",
|
|
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",
|