@xh/hoist 71.0.0-SNAPSHOT.1735844948971 → 71.0.0-SNAPSHOT.1736119965537
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 -1
- package/admin/AppModel.ts +15 -8
- package/admin/tabs/cluster/ClusterTab.ts +14 -63
- package/admin/tabs/cluster/{BaseInstanceModel.ts → instances/BaseInstanceModel.ts} +2 -2
- package/admin/tabs/cluster/instances/InstancesTab.ts +73 -0
- package/admin/tabs/cluster/{ClusterTabModel.ts → instances/InstancesTabModel.ts} +16 -16
- package/admin/tabs/cluster/{connpool → instances/connpool}/ConnPoolMonitorModel.ts +1 -1
- package/admin/tabs/cluster/{connpool → instances/connpool}/ConnPoolMonitorPanel.ts +1 -1
- package/admin/tabs/cluster/{environment → instances/environment}/ServerEnvModel.ts +1 -1
- package/admin/tabs/cluster/{environment → instances/environment}/ServerEnvPanel.ts +1 -1
- package/admin/tabs/cluster/{logs → instances/logs}/LogViewer.ts +1 -1
- package/admin/tabs/cluster/{logs → instances/logs}/LogViewerModel.ts +1 -1
- package/admin/tabs/cluster/{logs → instances/logs}/levels/LogLevelDialog.ts +1 -1
- package/admin/tabs/cluster/{logs → instances/logs}/levels/LogLevelDialogModel.ts +1 -1
- package/admin/tabs/cluster/{memory → instances/memory}/MemoryMonitorModel.ts +1 -1
- package/admin/tabs/cluster/{memory → instances/memory}/MemoryMonitorPanel.ts +1 -1
- package/admin/tabs/cluster/{services → instances/services}/DetailsPanel.ts +1 -1
- package/admin/tabs/cluster/{services → instances/services}/ServiceModel.ts +3 -3
- package/admin/tabs/cluster/{services → instances/services}/ServicePanel.ts +1 -1
- package/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketModel.ts +1 -1
- package/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketPanel.ts +1 -1
- package/admin/tabs/cluster/objects/ClusterObjects.scss +25 -0
- package/admin/tabs/cluster/objects/ClusterObjectsModel.ts +427 -0
- package/admin/tabs/cluster/objects/ClusterObjectsPanel.ts +114 -0
- package/admin/tabs/cluster/objects/DetailModel.ts +158 -0
- package/admin/tabs/cluster/objects/DetailPanel.ts +51 -0
- package/build/types/admin/tabs/cluster/ClusterTab.d.ts +1 -4
- package/build/types/admin/tabs/cluster/{BaseInstanceModel.d.ts → instances/BaseInstanceModel.d.ts} +2 -2
- package/build/types/admin/tabs/cluster/instances/InstancesTab.d.ts +4 -0
- package/build/types/admin/tabs/cluster/{ClusterTabModel.d.ts → instances/InstancesTabModel.d.ts} +2 -1
- package/build/types/admin/tabs/cluster/{connpool → instances/connpool}/ConnPoolMonitorModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{connpool → instances/connpool}/ConnPoolMonitorPanel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{environment → instances/environment}/ServerEnvModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{environment → instances/environment}/ServerEnvPanel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{logs → instances/logs}/LogViewerModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{logs → instances/logs}/levels/LogLevelDialog.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{logs → instances/logs}/levels/LogLevelDialogModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{memory → instances/memory}/MemoryMonitorModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{memory → instances/memory}/MemoryMonitorPanel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{services → instances/services}/DetailsPanel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{services → instances/services}/ServiceModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketModel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketPanel.d.ts +1 -1
- package/build/types/admin/tabs/cluster/objects/ClusterObjectsModel.d.ts +30 -0
- package/build/types/admin/tabs/cluster/objects/ClusterObjectsPanel.d.ts +3 -0
- package/build/types/admin/tabs/cluster/objects/DetailModel.d.ts +19 -0
- package/build/types/admin/tabs/cluster/objects/DetailPanel.d.ts +3 -0
- package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +3 -3
- package/cmp/viewmanager/ViewManagerModel.ts +3 -3
- package/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts +5 -11
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts +0 -199
- package/admin/tabs/cluster/distobjects/DistributedObjectsPanel.ts +0 -99
- package/build/types/admin/tabs/cluster/distobjects/DistributedObjectsModel.d.ts +0 -16
- package/build/types/admin/tabs/cluster/distobjects/DistributedObjectsPanel.d.ts +0 -2
- /package/admin/tabs/cluster/{logs → instances/logs}/LogDisplay.ts +0 -0
- /package/admin/tabs/cluster/{logs → instances/logs}/LogDisplayModel.ts +0 -0
- /package/admin/tabs/cluster/{logs → instances/logs}/LogViewer.scss +0 -0
- /package/admin/tabs/cluster/{services → instances/services}/DetailsModel.ts +0 -0
- /package/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketColumns.ts +0 -0
- /package/build/types/admin/tabs/cluster/{logs → instances/logs}/LogDisplay.d.ts +0 -0
- /package/build/types/admin/tabs/cluster/{logs → instances/logs}/LogDisplayModel.d.ts +0 -0
- /package/build/types/admin/tabs/cluster/{logs → instances/logs}/LogViewer.d.ts +0 -0
- /package/build/types/admin/tabs/cluster/{services → instances/services}/DetailsModel.d.ts +0 -0
- /package/build/types/admin/tabs/cluster/{services → instances/services}/ServicePanel.d.ts +0 -0
- /package/build/types/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketColumns.d.ts +0 -0
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file belongs to Hoist, an application development toolkit
|
|
3
|
-
* developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
|
|
4
|
-
*
|
|
5
|
-
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
|
-
*/
|
|
7
|
-
import {exportFilenameWithDate} from '@xh/hoist/admin/AdminUtils';
|
|
8
|
-
import {AppModel} from '@xh/hoist/admin/AppModel';
|
|
9
|
-
import {timestampNoYear} from '@xh/hoist/admin/columns';
|
|
10
|
-
import {BaseInstanceModel} from '@xh/hoist/admin/tabs/cluster/BaseInstanceModel';
|
|
11
|
-
import {GridModel} from '@xh/hoist/cmp/grid';
|
|
12
|
-
import * as Col from '@xh/hoist/cmp/grid/columns';
|
|
13
|
-
import {br, fragment} from '@xh/hoist/cmp/layout';
|
|
14
|
-
import {LoadSpec, managed, PlainObject, XH} from '@xh/hoist/core';
|
|
15
|
-
import {RecordActionSpec} from '@xh/hoist/data';
|
|
16
|
-
import {PanelModel} from '@xh/hoist/desktop/cmp/panel';
|
|
17
|
-
import {Icon} from '@xh/hoist/icon';
|
|
18
|
-
import {bindable, makeObservable} from '@xh/hoist/mobx';
|
|
19
|
-
import {first, isEmpty, last} from 'lodash';
|
|
20
|
-
|
|
21
|
-
export class DistributedObjectsModel extends BaseInstanceModel {
|
|
22
|
-
@bindable groupBy: 'type' | 'owner' = 'owner';
|
|
23
|
-
|
|
24
|
-
@managed detailPanelModel = new PanelModel({
|
|
25
|
-
side: 'right',
|
|
26
|
-
defaultSize: 450
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
clearAction: RecordActionSpec = {
|
|
30
|
-
text: 'Clear Objects',
|
|
31
|
-
icon: Icon.reset(),
|
|
32
|
-
intent: 'warning',
|
|
33
|
-
actionFn: () => this.clearAsync(),
|
|
34
|
-
displayFn: ({selectedRecords}) => ({
|
|
35
|
-
hidden: AppModel.readonly,
|
|
36
|
-
disabled:
|
|
37
|
-
isEmpty(selectedRecords) || selectedRecords.every(r => r.data.objectType == 'Topic')
|
|
38
|
-
}),
|
|
39
|
-
recordsRequired: true
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
@managed
|
|
43
|
-
gridModel = new GridModel({
|
|
44
|
-
selModel: 'multiple',
|
|
45
|
-
enableExport: true,
|
|
46
|
-
autosizeOptions: {mode: 'managed', includeCollapsedChildren: true},
|
|
47
|
-
exportOptions: {filename: exportFilenameWithDate('distributed-objects'), columns: 'ALL'},
|
|
48
|
-
sortBy: 'displayName',
|
|
49
|
-
groupBy: this.groupBy,
|
|
50
|
-
store: {
|
|
51
|
-
fields: [
|
|
52
|
-
{name: 'name', type: 'string'},
|
|
53
|
-
{name: 'displayName', type: 'string'},
|
|
54
|
-
{name: 'owner', type: 'string'},
|
|
55
|
-
{name: 'type', type: 'string', displayName: 'Type'},
|
|
56
|
-
{name: 'size', type: 'int'},
|
|
57
|
-
{name: 'lastUpdateTime', type: 'date'},
|
|
58
|
-
{name: 'lastAccessTime', type: 'date'}
|
|
59
|
-
],
|
|
60
|
-
idSpec: 'name',
|
|
61
|
-
processRawData: o => this.processRawData(o)
|
|
62
|
-
},
|
|
63
|
-
columns: [
|
|
64
|
-
{field: 'displayName'},
|
|
65
|
-
{field: 'owner'},
|
|
66
|
-
{field: 'type'},
|
|
67
|
-
{field: 'size', displayName: 'Entries', ...Col.number},
|
|
68
|
-
{
|
|
69
|
-
...timestampNoYear,
|
|
70
|
-
field: 'lastUpdateTime',
|
|
71
|
-
displayName: 'Last Update'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
...timestampNoYear,
|
|
75
|
-
field: 'lastAccessTime',
|
|
76
|
-
displayName: 'Last Access'
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
contextMenu: [this.clearAction, '-', ...GridModel.defaultContextMenu]
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
constructor() {
|
|
83
|
-
super();
|
|
84
|
-
makeObservable(this);
|
|
85
|
-
this.addReaction({
|
|
86
|
-
track: () => this.groupBy,
|
|
87
|
-
run: v => this.gridModel.setGroupBy(v)
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async clearAsync() {
|
|
92
|
-
const {gridModel} = this;
|
|
93
|
-
if (
|
|
94
|
-
gridModel.selectedRecords.some(
|
|
95
|
-
it => it.data.type != 'Cache' && !it.data.name.startsWith('cache')
|
|
96
|
-
) &&
|
|
97
|
-
!(await XH.confirm({
|
|
98
|
-
message: fragment(
|
|
99
|
-
'Your selection contains objects that may not be caches and may not be designed to be cleared.',
|
|
100
|
-
br(),
|
|
101
|
-
br(),
|
|
102
|
-
`Please ensure you understand the impact of this operation on the running application before proceeding.`
|
|
103
|
-
),
|
|
104
|
-
confirmProps: {
|
|
105
|
-
text: 'Clear Objects',
|
|
106
|
-
icon: Icon.reset(),
|
|
107
|
-
intent: 'warning',
|
|
108
|
-
outlined: true,
|
|
109
|
-
autoFocus: false
|
|
110
|
-
}
|
|
111
|
-
}))
|
|
112
|
-
) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
try {
|
|
117
|
-
await XH.fetchJson({
|
|
118
|
-
url: 'hzObjectAdmin/clearObjects',
|
|
119
|
-
params: {
|
|
120
|
-
instance: this.instanceName,
|
|
121
|
-
names: this.gridModel.selectedIds
|
|
122
|
-
}
|
|
123
|
-
}).linkTo(this.loadModel);
|
|
124
|
-
|
|
125
|
-
await this.refreshAsync();
|
|
126
|
-
XH.successToast('Objects cleared.');
|
|
127
|
-
} catch (e) {
|
|
128
|
-
XH.handleException(e);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
async clearHibernateCachesAsync() {
|
|
133
|
-
const confirmed = await XH.confirm({
|
|
134
|
-
message: fragment(
|
|
135
|
-
'This will clear the second-level Hibernate caches for all domain objects, requiring the server to re-query the database for their latest state.',
|
|
136
|
-
br(),
|
|
137
|
-
br(),
|
|
138
|
-
`This can resolve issues with data modifications made directly to the database not appearing in a running application, but should be used with care as it can have a temporary performance impact.`
|
|
139
|
-
),
|
|
140
|
-
confirmProps: {
|
|
141
|
-
text: 'Clear Hibernate Caches',
|
|
142
|
-
icon: Icon.reset(),
|
|
143
|
-
intent: 'warning',
|
|
144
|
-
outlined: true,
|
|
145
|
-
autoFocus: false
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
if (!confirmed) return;
|
|
149
|
-
|
|
150
|
-
try {
|
|
151
|
-
await XH.fetchJson({
|
|
152
|
-
url: 'hzObjectAdmin/clearHibernateCaches',
|
|
153
|
-
params: {instance: this.instanceName}
|
|
154
|
-
}).linkTo(this.loadModel);
|
|
155
|
-
|
|
156
|
-
await this.refreshAsync();
|
|
157
|
-
XH.successToast('Hibernate Caches Cleared.');
|
|
158
|
-
} catch (e) {
|
|
159
|
-
XH.handleException(e);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
override async doLoadAsync(loadSpec: LoadSpec) {
|
|
164
|
-
try {
|
|
165
|
-
const response = await XH.fetchJson({
|
|
166
|
-
url: 'hzObjectAdmin/listObjects',
|
|
167
|
-
params: {
|
|
168
|
-
instance: this.instanceName
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
return this.gridModel.loadData(response);
|
|
173
|
-
} catch (e) {
|
|
174
|
-
this.handleLoadException(e, loadSpec);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
//----------------------
|
|
179
|
-
// Implementation
|
|
180
|
-
//----------------------
|
|
181
|
-
private processRawData(obj: PlainObject): PlainObject {
|
|
182
|
-
const tail: string = last(obj.name.split('.')),
|
|
183
|
-
className = first(tail.split('['));
|
|
184
|
-
|
|
185
|
-
const owner = className.endsWith('Service')
|
|
186
|
-
? className
|
|
187
|
-
: className.startsWith('xh')
|
|
188
|
-
? 'Hoist'
|
|
189
|
-
: obj.type == 'Hibernate Cache'
|
|
190
|
-
? 'Hibernate'
|
|
191
|
-
: 'Other';
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
displayName: tail,
|
|
195
|
-
owner: owner,
|
|
196
|
-
...obj
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file belongs to Hoist, an application development toolkit
|
|
3
|
-
* developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
|
|
4
|
-
*
|
|
5
|
-
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
|
-
*/
|
|
7
|
-
import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
|
|
8
|
-
import {filler, hframe, placeholder} from '@xh/hoist/cmp/layout';
|
|
9
|
-
import {storeFilterField} from '@xh/hoist/cmp/store';
|
|
10
|
-
import {creates, hoistCmp, uses} from '@xh/hoist/core';
|
|
11
|
-
import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
12
|
-
import {jsonInput, select} from '@xh/hoist/desktop/cmp/input';
|
|
13
|
-
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
14
|
-
import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
|
|
15
|
-
import {recordActionBar} from '@xh/hoist/desktop/cmp/record';
|
|
16
|
-
import {Icon} from '@xh/hoist/icon';
|
|
17
|
-
import {DistributedObjectsModel} from './DistributedObjectsModel';
|
|
18
|
-
|
|
19
|
-
export const distributedObjectsPanel = hoistCmp.factory({
|
|
20
|
-
displayName: 'DistributedObjectsPanel',
|
|
21
|
-
model: creates(DistributedObjectsModel),
|
|
22
|
-
|
|
23
|
-
render({model}) {
|
|
24
|
-
return panel({
|
|
25
|
-
item: hframe(
|
|
26
|
-
panel({
|
|
27
|
-
item: grid(),
|
|
28
|
-
bbar: bbar()
|
|
29
|
-
}),
|
|
30
|
-
detailsPanel()
|
|
31
|
-
),
|
|
32
|
-
mask: 'onLoad',
|
|
33
|
-
ref: model.viewRef
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const detailsPanel = hoistCmp.factory({
|
|
39
|
-
model: uses(DistributedObjectsModel),
|
|
40
|
-
render({model}) {
|
|
41
|
-
const record = model.gridModel.selectedRecord;
|
|
42
|
-
return panel({
|
|
43
|
-
title: record ? `Stats: ${record.data.displayName}` : 'Stats',
|
|
44
|
-
icon: Icon.info(),
|
|
45
|
-
compactHeader: true,
|
|
46
|
-
modelConfig: {
|
|
47
|
-
side: 'right',
|
|
48
|
-
defaultSize: 450
|
|
49
|
-
},
|
|
50
|
-
item: record
|
|
51
|
-
? panel({
|
|
52
|
-
item: jsonInput({
|
|
53
|
-
readonly: true,
|
|
54
|
-
width: '100%',
|
|
55
|
-
height: '100%',
|
|
56
|
-
showFullscreenButton: false,
|
|
57
|
-
editorProps: {lineNumbers: false},
|
|
58
|
-
value: model.fmtStats(record.raw)
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
: placeholder(Icon.grip(), 'Select an object')
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const bbar = hoistCmp.factory<DistributedObjectsModel>({
|
|
67
|
-
render({model}) {
|
|
68
|
-
return toolbar(
|
|
69
|
-
recordActionBar({
|
|
70
|
-
selModel: model.gridModel.selModel,
|
|
71
|
-
actions: [model.clearAction]
|
|
72
|
-
}),
|
|
73
|
-
'-',
|
|
74
|
-
button({
|
|
75
|
-
text: 'Clear Hibernate Caches',
|
|
76
|
-
icon: Icon.reset(),
|
|
77
|
-
intent: 'warning',
|
|
78
|
-
tooltip: 'Clear the Hibernate caches using the native Hibernate API',
|
|
79
|
-
onClick: () => model.clearHibernateCachesAsync()
|
|
80
|
-
}),
|
|
81
|
-
filler(),
|
|
82
|
-
gridCountLabel({unit: 'objects'}),
|
|
83
|
-
'-',
|
|
84
|
-
select({
|
|
85
|
-
options: [
|
|
86
|
-
{label: 'By Owner', value: 'owner'},
|
|
87
|
-
{label: 'By Type', value: 'type'},
|
|
88
|
-
{label: 'Ungrouped', value: null}
|
|
89
|
-
],
|
|
90
|
-
width: 125,
|
|
91
|
-
bind: 'groupBy',
|
|
92
|
-
hideDropdownIndicator: true,
|
|
93
|
-
enableFilter: false
|
|
94
|
-
}),
|
|
95
|
-
storeFilterField({matchMode: 'any'}),
|
|
96
|
-
exportButton()
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseInstanceModel } from '@xh/hoist/admin/tabs/cluster/BaseInstanceModel';
|
|
2
|
-
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
3
|
-
import { LoadSpec } from '@xh/hoist/core';
|
|
4
|
-
import { RecordActionSpec } from '@xh/hoist/data';
|
|
5
|
-
import { PanelModel } from '@xh/hoist/desktop/cmp/panel';
|
|
6
|
-
export declare class DistributedObjectsModel extends BaseInstanceModel {
|
|
7
|
-
groupBy: 'type' | 'owner';
|
|
8
|
-
detailPanelModel: PanelModel;
|
|
9
|
-
clearAction: RecordActionSpec;
|
|
10
|
-
gridModel: GridModel;
|
|
11
|
-
constructor();
|
|
12
|
-
clearAsync(): Promise<void>;
|
|
13
|
-
clearHibernateCachesAsync(): Promise<void>;
|
|
14
|
-
doLoadAsync(loadSpec: LoadSpec): Promise<void>;
|
|
15
|
-
private processRawData;
|
|
16
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/types/admin/tabs/cluster/{websocket → instances/websocket}/WebSocketColumns.d.ts
RENAMED
|
File without changes
|