@xh/hoist 67.0.0-SNAPSHOT.1725046027559 → 67.0.0-SNAPSHOT.1725048431197
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/admin/tabs/cluster/ClusterTabModel.ts +2 -4
- package/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts +1 -0
- package/admin/tabs/cluster/hzobject/HzObjectModel.ts +6 -4
- package/admin/tabs/cluster/hzobject/HzObjectPanel.ts +2 -1
- package/admin/tabs/cluster/memory/MemoryMonitorPanel.ts +2 -0
- package/admin/tabs/cluster/services/ServiceModel.ts +6 -5
- package/admin/tabs/cluster/websocket/WebSocketModel.ts +2 -2
- package/admin/tabs/general/alertBanner/AlertBannerModel.ts +2 -1
- package/admin/tabs/general/config/ConfigPanelModel.ts +1 -0
- package/admin/tabs/userData/prefs/editor/PrefEditorModel.ts +1 -0
- package/admin/tabs/userData/roles/RoleModel.ts +11 -6
- package/admin/tabs/userData/roles/RolePanel.ts +6 -1
- package/admin/tabs/userData/roles/graph/RoleGraph.ts +21 -20
- package/admin/tabs/userData/roles/recategorize/RecategorizeDialog.ts +2 -2
- package/build/types/desktop/cmp/rest/RestGridModel.d.ts +6 -6
- package/desktop/cmp/rest/RestGridModel.ts +8 -11
- package/desktop/cmp/rest/impl/RestFormModel.ts +2 -3
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -184,10 +184,8 @@ export class ClusterTabModel extends HoistModel {
|
|
|
184
184
|
confirmProps: {
|
|
185
185
|
icon: Icon.skull(),
|
|
186
186
|
text: 'Shutdown Now',
|
|
187
|
-
intent: 'danger'
|
|
188
|
-
|
|
189
|
-
cancelProps: {
|
|
190
|
-
autoFocus: true
|
|
187
|
+
intent: 'danger',
|
|
188
|
+
autoFocus: false
|
|
191
189
|
}
|
|
192
190
|
}))
|
|
193
191
|
)
|
|
@@ -18,9 +18,9 @@ import {isEmpty} from 'lodash';
|
|
|
18
18
|
|
|
19
19
|
export class HzObjectModel extends BaseInstanceModel {
|
|
20
20
|
clearAction: RecordActionSpec = {
|
|
21
|
-
icon: Icon.reset(),
|
|
22
21
|
text: 'Clear Objects',
|
|
23
|
-
|
|
22
|
+
icon: Icon.reset(),
|
|
23
|
+
intent: 'warning',
|
|
24
24
|
actionFn: () => this.clearAsync(),
|
|
25
25
|
displayFn: ({selectedRecords}) => ({
|
|
26
26
|
hidden: AppModel.readonly,
|
|
@@ -80,8 +80,9 @@ export class HzObjectModel extends BaseInstanceModel {
|
|
|
80
80
|
),
|
|
81
81
|
confirmProps: {
|
|
82
82
|
text: 'Clear Objects',
|
|
83
|
+
icon: Icon.reset(),
|
|
84
|
+
intent: 'warning',
|
|
83
85
|
outlined: true,
|
|
84
|
-
intent: 'danger',
|
|
85
86
|
autoFocus: false
|
|
86
87
|
}
|
|
87
88
|
}))
|
|
@@ -115,7 +116,8 @@ export class HzObjectModel extends BaseInstanceModel {
|
|
|
115
116
|
),
|
|
116
117
|
confirmProps: {
|
|
117
118
|
text: 'Clear Hibernate Caches',
|
|
118
|
-
|
|
119
|
+
icon: Icon.reset(),
|
|
120
|
+
intent: 'warning',
|
|
119
121
|
outlined: true,
|
|
120
122
|
autoFocus: false
|
|
121
123
|
}
|
|
@@ -25,10 +25,11 @@ export const hzObjectPanel = hoistCmp.factory({
|
|
|
25
25
|
selModel: model.gridModel.selModel,
|
|
26
26
|
actions: [model.clearAction]
|
|
27
27
|
}),
|
|
28
|
+
'-',
|
|
28
29
|
button({
|
|
29
30
|
text: 'Clear Hibernate Caches',
|
|
30
31
|
icon: Icon.reset(),
|
|
31
|
-
intent: '
|
|
32
|
+
intent: 'warning',
|
|
32
33
|
tooltip: 'Clear the Hibernate caches using the native Hibernate API',
|
|
33
34
|
onClick: () => model.clearHibernateCachesAsync()
|
|
34
35
|
}),
|
|
@@ -36,12 +36,14 @@ export const memoryMonitorPanel = hoistCmp.factory({
|
|
|
36
36
|
omit: readonly,
|
|
37
37
|
onClick: () => model.takeSnapshotAsync()
|
|
38
38
|
}),
|
|
39
|
+
'-',
|
|
39
40
|
button({
|
|
40
41
|
text: 'Request GC',
|
|
41
42
|
icon: Icon.trash(),
|
|
42
43
|
omit: readonly,
|
|
43
44
|
onClick: () => model.requestGcAsync()
|
|
44
45
|
}),
|
|
46
|
+
'-',
|
|
45
47
|
button({
|
|
46
48
|
text: 'Dump Heap',
|
|
47
49
|
icon: Icon.fileArchive(),
|
|
@@ -18,9 +18,9 @@ import {isEmpty, lowerFirst} from 'lodash';
|
|
|
18
18
|
|
|
19
19
|
export class ServiceModel extends BaseInstanceModel {
|
|
20
20
|
clearCachesAction: RecordActionSpec = {
|
|
21
|
-
icon: Icon.reset(),
|
|
22
21
|
text: 'Clear Caches',
|
|
23
|
-
|
|
22
|
+
icon: Icon.reset(),
|
|
23
|
+
intent: 'warning',
|
|
24
24
|
actionFn: () => this.clearCachesAsync(false),
|
|
25
25
|
displayFn: () => ({
|
|
26
26
|
hidden: AppModel.readonly,
|
|
@@ -30,9 +30,9 @@ export class ServiceModel extends BaseInstanceModel {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
clearClusterCachesAction: RecordActionSpec = {
|
|
33
|
-
icon: Icon.reset(),
|
|
34
33
|
text: 'Clear Caches (entire cluster)',
|
|
35
|
-
|
|
34
|
+
icon: Icon.reset(),
|
|
35
|
+
intent: 'warning',
|
|
36
36
|
actionFn: () => this.clearCachesAsync(true),
|
|
37
37
|
displayFn: () => ({
|
|
38
38
|
hidden: AppModel.readonly || !this.parent.isMultiInstance
|
|
@@ -91,8 +91,9 @@ export class ServiceModel extends BaseInstanceModel {
|
|
|
91
91
|
),
|
|
92
92
|
confirmProps: {
|
|
93
93
|
text: 'Clear Caches',
|
|
94
|
+
icon: Icon.reset(),
|
|
95
|
+
intent: 'warning',
|
|
94
96
|
outlined: true,
|
|
95
|
-
intent: 'danger',
|
|
96
97
|
autoFocus: false
|
|
97
98
|
}
|
|
98
99
|
});
|
|
@@ -117,8 +117,8 @@ export class WebSocketModel extends BaseInstanceModel {
|
|
|
117
117
|
if (isEmpty(selectedRecords)) return;
|
|
118
118
|
|
|
119
119
|
const message = await XH.prompt<string>({
|
|
120
|
-
title: '
|
|
121
|
-
icon: Icon.
|
|
120
|
+
title: 'Please confirm...',
|
|
121
|
+
icon: Icon.warning(),
|
|
122
122
|
confirmProps: {
|
|
123
123
|
text: 'Force Suspend',
|
|
124
124
|
icon: Icon.stopCircle(),
|
|
@@ -125,10 +125,12 @@ export class RoleModel extends HoistModel {
|
|
|
125
125
|
if (this.readonly) return false;
|
|
126
126
|
|
|
127
127
|
const confirm = await XH.confirm({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
message: `Are you sure you want to delete "${role.name}"? This may affect access to this application.`,
|
|
129
|
+
confirmProps: {
|
|
130
|
+
text: 'Yes, delete role',
|
|
131
|
+
intent: 'danger',
|
|
132
|
+
autoFocus: false
|
|
133
|
+
}
|
|
132
134
|
});
|
|
133
135
|
if (!confirm) return false;
|
|
134
136
|
|
|
@@ -197,8 +199,9 @@ export class RoleModel extends HoistModel {
|
|
|
197
199
|
private groupByAction(): RecordActionSpec {
|
|
198
200
|
return {
|
|
199
201
|
text: 'Group By Category',
|
|
202
|
+
icon: Icon.treeList(),
|
|
200
203
|
displayFn: () => ({
|
|
201
|
-
|
|
204
|
+
text: this.showInGroups ? 'Ungroup Grid' : 'Group by Category'
|
|
202
205
|
}),
|
|
203
206
|
actionFn: () => {
|
|
204
207
|
this.showInGroups = !this.showInGroups;
|
|
@@ -350,15 +353,17 @@ export class RoleModel extends HoistModel {
|
|
|
350
353
|
|
|
351
354
|
private getContextMenuItems() {
|
|
352
355
|
return this.readonly
|
|
353
|
-
? [this.groupByAction(), ...GridModel.defaultContextMenu]
|
|
356
|
+
? [this.groupByAction(), '-', ...GridModel.defaultContextMenu]
|
|
354
357
|
: [
|
|
355
358
|
this.addAction(),
|
|
356
359
|
this.editAction(),
|
|
357
360
|
this.cloneAction(),
|
|
358
361
|
this.deleteAction(),
|
|
362
|
+
'-',
|
|
359
363
|
this.recategorizeDialogModel.recategorizeAction(),
|
|
360
364
|
'-',
|
|
361
365
|
this.groupByAction(),
|
|
366
|
+
'-',
|
|
362
367
|
...GridModel.defaultContextMenu
|
|
363
368
|
];
|
|
364
369
|
}
|
|
@@ -45,7 +45,12 @@ export const rolePanel = hoistCmp.factory({
|
|
|
45
45
|
}),
|
|
46
46
|
'-',
|
|
47
47
|
filterChooser({flex: 1}),
|
|
48
|
-
|
|
48
|
+
'-',
|
|
49
|
+
switchInput({
|
|
50
|
+
bind: 'showInGroups',
|
|
51
|
+
label: 'Group by Category',
|
|
52
|
+
labelSide: 'left'
|
|
53
|
+
})
|
|
49
54
|
],
|
|
50
55
|
item: hframe(vframe(grid(), roleGraph()), detailsPanel())
|
|
51
56
|
}),
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import {chart} from '@xh/hoist/cmp/chart';
|
|
8
8
|
import {errorBoundary} from '@xh/hoist/cmp/error';
|
|
9
|
-
import {div,
|
|
9
|
+
import {div, filler, placeholder, span} from '@xh/hoist/cmp/layout';
|
|
10
10
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
11
11
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
12
12
|
import {buttonGroupInput, slider, switchInput} from '@xh/hoist/desktop/cmp/input';
|
|
@@ -29,7 +29,7 @@ export const roleGraph = hoistCmp.factory({
|
|
|
29
29
|
return panel({
|
|
30
30
|
compactHeader: true,
|
|
31
31
|
icon: Icon.treeGraph(),
|
|
32
|
-
title: role ?
|
|
32
|
+
title: role ? `${role.name} Relationships` : 'Relationships',
|
|
33
33
|
item: div({
|
|
34
34
|
item: div({
|
|
35
35
|
style: {margin: 'auto'},
|
|
@@ -48,15 +48,31 @@ export const roleGraph = hoistCmp.factory({
|
|
|
48
48
|
items: [
|
|
49
49
|
button({
|
|
50
50
|
value: 'effective',
|
|
51
|
-
text: `Granted to ${
|
|
51
|
+
text: `Granted to ${pluralize('role', role?.effectiveRoles.length, true)}`
|
|
52
52
|
}),
|
|
53
53
|
button({
|
|
54
54
|
value: 'inherited',
|
|
55
|
-
text: `Inheriting from ${
|
|
55
|
+
text: `Inheriting from ${pluralize('role', role?.inheritedRoles.length, true)}`
|
|
56
56
|
})
|
|
57
57
|
]
|
|
58
58
|
}),
|
|
59
|
-
|
|
59
|
+
filler(),
|
|
60
|
+
span('Limit to one level'),
|
|
61
|
+
switchInput({
|
|
62
|
+
bind: 'limitToOneLevel'
|
|
63
|
+
}),
|
|
64
|
+
'-',
|
|
65
|
+
span('Zoom'),
|
|
66
|
+
slider({
|
|
67
|
+
paddingLeft: 2,
|
|
68
|
+
overflow: 'visible',
|
|
69
|
+
bind: 'widthScale',
|
|
70
|
+
min: 0,
|
|
71
|
+
max: 2,
|
|
72
|
+
stepSize: 0.005,
|
|
73
|
+
labelRenderer: false
|
|
74
|
+
}),
|
|
75
|
+
'-',
|
|
60
76
|
buttonGroupInput({
|
|
61
77
|
bind: 'inverted',
|
|
62
78
|
items: [
|
|
@@ -69,21 +85,6 @@ export const roleGraph = hoistCmp.factory({
|
|
|
69
85
|
icon: Icon.treeGraph({rotation: 270})
|
|
70
86
|
})
|
|
71
87
|
]
|
|
72
|
-
}),
|
|
73
|
-
hspacer(10),
|
|
74
|
-
'Zoom',
|
|
75
|
-
slider({
|
|
76
|
-
paddingLeft: 2,
|
|
77
|
-
overflow: 'visible',
|
|
78
|
-
bind: 'widthScale',
|
|
79
|
-
min: 0,
|
|
80
|
-
max: 2,
|
|
81
|
-
stepSize: 0.005,
|
|
82
|
-
labelRenderer: false
|
|
83
|
-
}),
|
|
84
|
-
'Limit to one level',
|
|
85
|
-
switchInput({
|
|
86
|
-
bind: 'limitToOneLevel'
|
|
87
88
|
})
|
|
88
89
|
],
|
|
89
90
|
omit: !role
|
|
@@ -24,7 +24,7 @@ export const recategorizeDialog = hoistCmp.factory({
|
|
|
24
24
|
return dialog({
|
|
25
25
|
title: `Change Category (${model.selectedRecords.length} roles)`,
|
|
26
26
|
icon: Icon.folder(),
|
|
27
|
-
style: {width:
|
|
27
|
+
style: {width: 400},
|
|
28
28
|
isOpen: true,
|
|
29
29
|
isCloseButtonShown: false,
|
|
30
30
|
item: panel({
|
|
@@ -35,7 +35,7 @@ export const recategorizeDialog = hoistCmp.factory({
|
|
|
35
35
|
bind: 'categoryName',
|
|
36
36
|
enableCreate: true,
|
|
37
37
|
options: model.options,
|
|
38
|
-
width:
|
|
38
|
+
width: '100%'
|
|
39
39
|
})
|
|
40
40
|
),
|
|
41
41
|
bbar: bbar()
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { RowDoubleClickedEvent } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseFieldConfig } from '@xh/hoist/cmp/form';
|
|
3
3
|
import { GridConfig, GridModel } from '@xh/hoist/cmp/grid';
|
|
4
|
-
import { HoistModel, PlainObject
|
|
4
|
+
import { ElementSpec, HoistModel, PlainObject } from '@xh/hoist/core';
|
|
5
5
|
import '@xh/hoist/desktop/register';
|
|
6
6
|
import { RecordAction, RecordActionSpec, StoreRecord } from '@xh/hoist/data';
|
|
7
|
+
import { ExportOptions } from '@xh/hoist/svc';
|
|
8
|
+
import { FormFieldProps } from '../form';
|
|
7
9
|
import { RestStore, RestStoreConfig } from './data/RestStore';
|
|
8
10
|
import { RestFormModel } from './impl/RestFormModel';
|
|
9
|
-
import { FormFieldProps } from '../form';
|
|
10
|
-
import { ExportOptions } from '@xh/hoist/svc';
|
|
11
11
|
export interface RestGridConfig extends GridConfig {
|
|
12
12
|
store?: RestStore | RestStoreConfig;
|
|
13
13
|
/** Prevent users from creating, updating, or destroying a record. Defaults to false. */
|
|
14
14
|
readonly?: boolean;
|
|
15
15
|
/** Actions to display in the toolbar. Defaults to add, edit, delete. */
|
|
16
16
|
toolbarActions?: Array<RecordAction | RecordActionSpec>;
|
|
17
|
-
/**
|
|
18
|
-
menuActions?: Array<RecordAction | RecordActionSpec>;
|
|
17
|
+
/** Actions to display in the grid context menu. Defaults to add, edit, delete. */
|
|
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
|
/** Warning to display before actions on a selection of records. */
|
|
@@ -68,7 +68,7 @@ export declare class RestGridModel extends HoistModel {
|
|
|
68
68
|
readonly: boolean;
|
|
69
69
|
editors: RestGridEditor[];
|
|
70
70
|
toolbarActions: Array<RecordAction | RecordActionSpec>;
|
|
71
|
-
menuActions: Array<RecordAction | RecordActionSpec>;
|
|
71
|
+
menuActions: Array<RecordAction | RecordActionSpec | '-'>;
|
|
72
72
|
formActions: Array<RecordAction | RecordActionSpec>;
|
|
73
73
|
prepareCloneFn: (input: {
|
|
74
74
|
record: StoreRecord;
|
|
@@ -8,17 +8,16 @@
|
|
|
8
8
|
import {RowDoubleClickedEvent} from '@ag-grid-community/core';
|
|
9
9
|
import {BaseFieldConfig} from '@xh/hoist/cmp/form';
|
|
10
10
|
import {GridConfig, GridModel} from '@xh/hoist/cmp/grid';
|
|
11
|
-
import {HoistModel, managed, PlainObject,
|
|
11
|
+
import {ElementSpec, HoistModel, managed, PlainObject, XH} from '@xh/hoist/core';
|
|
12
12
|
import '@xh/hoist/desktop/register';
|
|
13
13
|
import {RecordAction, RecordActionSpec, StoreRecord} from '@xh/hoist/data';
|
|
14
|
-
import {
|
|
14
|
+
import {ExportOptions} from '@xh/hoist/svc';
|
|
15
15
|
import {pluralize, throwIf, withDefault} from '@xh/hoist/utils/js';
|
|
16
16
|
import {isFunction} from 'lodash';
|
|
17
|
-
import {RestStore, RestStoreConfig} from './data/RestStore';
|
|
18
|
-
import {RestFormModel} from './impl/RestFormModel';
|
|
19
17
|
import {FormFieldProps} from '../form';
|
|
20
18
|
import {addAction, deleteAction, editAction, viewAction} from './Actions';
|
|
21
|
-
import {
|
|
19
|
+
import {RestStore, RestStoreConfig} from './data/RestStore';
|
|
20
|
+
import {RestFormModel} from './impl/RestFormModel';
|
|
22
21
|
|
|
23
22
|
export interface RestGridConfig extends GridConfig {
|
|
24
23
|
store?: RestStore | RestStoreConfig;
|
|
@@ -29,8 +28,8 @@ export interface RestGridConfig extends GridConfig {
|
|
|
29
28
|
/** Actions to display in the toolbar. Defaults to add, edit, delete. */
|
|
30
29
|
toolbarActions?: Array<RecordAction | RecordActionSpec>;
|
|
31
30
|
|
|
32
|
-
/**
|
|
33
|
-
menuActions?: Array<RecordAction | RecordActionSpec>;
|
|
31
|
+
/** Actions to display in the grid context menu. Defaults to add, edit, delete. */
|
|
32
|
+
menuActions?: Array<RecordAction | RecordActionSpec | '-'>;
|
|
34
33
|
|
|
35
34
|
/** Actions to display in the form toolbar. Defaults to delete. */
|
|
36
35
|
formActions?: Array<RecordAction | RecordActionSpec>;
|
|
@@ -96,7 +95,7 @@ export class RestGridModel extends HoistModel {
|
|
|
96
95
|
readonly: boolean;
|
|
97
96
|
editors: RestGridEditor[];
|
|
98
97
|
toolbarActions: Array<RecordAction | RecordActionSpec>;
|
|
99
|
-
menuActions: Array<RecordAction | RecordActionSpec>;
|
|
98
|
+
menuActions: Array<RecordAction | RecordActionSpec | '-'>;
|
|
100
99
|
formActions: Array<RecordAction | RecordActionSpec>;
|
|
101
100
|
prepareCloneFn: (input: {record: StoreRecord; clone: PlainObject}) => void;
|
|
102
101
|
unit: string;
|
|
@@ -243,9 +242,7 @@ export class RestGridModel extends HoistModel {
|
|
|
243
242
|
warning = this.actionWarning.del,
|
|
244
243
|
message = isFunction(warning) ? warning(records) : warning;
|
|
245
244
|
|
|
246
|
-
message
|
|
247
|
-
? XH.confirm({message, title: 'Warning', icon: Icon.warning(), onConfirm: delFn})
|
|
248
|
-
: delFn();
|
|
245
|
+
message ? XH.confirm({message, title: 'Warning', onConfirm: delFn}) : delFn();
|
|
249
246
|
}
|
|
250
247
|
|
|
251
248
|
async exportAsync(options?: ExportOptions) {
|
|
@@ -8,9 +8,8 @@ import {FormModel} from '@xh/hoist/cmp/form';
|
|
|
8
8
|
import {HoistModel, managed, PlainObject, XH} from '@xh/hoist/core';
|
|
9
9
|
import {required} from '@xh/hoist/data';
|
|
10
10
|
import {RestGridEditor, RestGridModel} from '@xh/hoist/desktop/cmp/rest';
|
|
11
|
-
import {Icon} from '@xh/hoist/icon';
|
|
12
11
|
import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
13
|
-
import {
|
|
12
|
+
import {mergeDeep, throwIf} from '@xh/hoist/utils/js';
|
|
14
13
|
import {isFunction, isNil} from 'lodash';
|
|
15
14
|
import {createRef} from 'react';
|
|
16
15
|
import {RestField} from '../data/RestField';
|
|
@@ -119,7 +118,7 @@ export class RestFormModel extends HoistModel {
|
|
|
119
118
|
const warning = this.actionWarning[this.isAdd ? 'add' : 'edit'],
|
|
120
119
|
message = isFunction(warning) ? warning([this.currentRecord]) : warning;
|
|
121
120
|
if (message) {
|
|
122
|
-
if (!(await XH.confirm({message, title: 'Warning'
|
|
121
|
+
if (!(await XH.confirm({message, title: 'Warning'}))) {
|
|
123
122
|
return;
|
|
124
123
|
}
|
|
125
124
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "67.0.0-SNAPSHOT.
|
|
3
|
+
"version": "67.0.0-SNAPSHOT.1725048431197",
|
|
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",
|