@xh/hoist 73.0.0-SNAPSHOT.1741882685374 → 73.0.0-SNAPSHOT.1741967769000

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.
@@ -149,7 +149,7 @@ export class InstancesTabModel extends HoistModel {
149
149
  },
150
150
  {
151
151
  ...usedHeapMb,
152
- headerName: 'Heap (MB)'
152
+ headerName: 'Heap (mb)'
153
153
  },
154
154
  {
155
155
  ...usedPctMax,
@@ -214,11 +214,12 @@ export class InstancesTabModel extends HoistModel {
214
214
  private async shutdownInstanceAsync(instance: PlainObject) {
215
215
  if (
216
216
  !(await XH.confirm({
217
- message: `Are you SURE you want to shutdown instance ${instance.name}?`,
217
+ message: `Are you sure you wish to immediately terminate instance ${instance.name}?`,
218
218
  confirmProps: {
219
219
  icon: Icon.skull(),
220
- text: 'Shutdown Now',
220
+ text: 'Yes, kill the instance',
221
221
  intent: 'danger',
222
+ outlined: true,
222
223
  autoFocus: false
223
224
  }
224
225
  }))
@@ -6,12 +6,12 @@
6
6
  */
7
7
  import {clock} from '@xh/hoist/cmp/clock';
8
8
  import {grid} from '@xh/hoist/cmp/grid';
9
- import {code, filler, fragment, hspacer, label, placeholder} from '@xh/hoist/cmp/layout';
9
+ import {filler, fragment, hspacer, label, placeholder} from '@xh/hoist/cmp/layout';
10
+ import {loadingIndicator} from '@xh/hoist/cmp/loadingindicator';
10
11
  import {hoistCmp, uses, XH} from '@xh/hoist/core';
11
12
  import {button, modalToggleButton} from '@xh/hoist/desktop/cmp/button';
12
13
  import {gridFindField} from '@xh/hoist/desktop/cmp/grid';
13
14
  import {numberInput, switchInput, textInput} from '@xh/hoist/desktop/cmp/input';
14
- import {loadingIndicator} from '@xh/hoist/cmp/loadingindicator';
15
15
  import {panel} from '@xh/hoist/desktop/cmp/panel';
16
16
  import {toolbar, toolbarSep} from '@xh/hoist/desktop/cmp/toolbar';
17
17
  import {Icon} from '@xh/hoist/icon';
@@ -48,7 +48,7 @@ const tbar = hoistCmp.factory<LogDisplayModel>(({model}) => {
48
48
  numberInput({
49
49
  bind: 'startLine',
50
50
  min: 1,
51
- width: 80,
51
+ width: 70,
52
52
  disabled: model.tail,
53
53
  displayWithCommas: true
54
54
  }),
@@ -57,13 +57,13 @@ const tbar = hoistCmp.factory<LogDisplayModel>(({model}) => {
57
57
  numberInput({
58
58
  bind: 'maxLines',
59
59
  min: 1,
60
- width: 80,
60
+ width: 70,
61
61
  displayWithCommas: true
62
62
  }),
63
63
  '-',
64
64
  textInput({
65
65
  bind: 'pattern',
66
- placeholder: 'Filter',
66
+ placeholder: 'Filter lines...',
67
67
  leftIcon: Icon.filter(),
68
68
  flex: 1,
69
69
  rightElement: fragment(
@@ -85,7 +85,7 @@ const tbar = hoistCmp.factory<LogDisplayModel>(({model}) => {
85
85
  })
86
86
  )
87
87
  }),
88
- gridFindField({flex: 1}),
88
+ gridFindField({flex: 1, placeholder: 'Find lines...'}),
89
89
  '-',
90
90
  switchInput({
91
91
  bind: 'tail',
@@ -123,16 +123,14 @@ const bbar = hoistCmp.factory<LogDisplayModel>({
123
123
  }),
124
124
  filler(),
125
125
  Icon.clock(),
126
- code(
127
- clock({
128
- timezone: zone,
129
- format: 'HH:mm',
130
- suffix: fmtTimeZone(zone, offset)
131
- })
132
- ),
126
+ clock({
127
+ timezone: zone,
128
+ format: 'HH:mm',
129
+ suffix: fmtTimeZone(zone, offset)
130
+ }),
133
131
  fragment({
134
132
  omit: !logRootPath,
135
- items: [toolbarSep(), Icon.folder(), code(logRootPath)]
133
+ items: [toolbarSep(), Icon.folder({className: 'xh-margin-right'}), logRootPath]
136
134
  })
137
135
  );
138
136
  }
@@ -5,8 +5,8 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
  import {logLevelDialog} from '@xh/hoist/admin/tabs/cluster/instances/logs/levels/LogLevelDialog';
8
- import {grid} from '@xh/hoist/cmp/grid';
9
- import {hframe} from '@xh/hoist/cmp/layout';
8
+ import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
9
+ import {filler, hframe} from '@xh/hoist/cmp/layout';
10
10
  import {storeFilterField} from '@xh/hoist/cmp/store';
11
11
  import {creates, hoistCmp} from '@xh/hoist/core';
12
12
  import {errorMessage} from '@xh/hoist/cmp/error';
@@ -37,9 +37,8 @@ export const logViewer = hoistCmp.factory({
37
37
  side: 'left',
38
38
  defaultSize: 380
39
39
  },
40
- item: grid(),
41
- bbar: [
42
- storeFilterField({flex: 1}),
40
+ tbar: [
41
+ storeFilterField({flex: 1, placeholder: 'Filter files...'}),
43
42
  select({
44
43
  leftIcon: Icon.server(),
45
44
  bind: 'instanceOnly',
@@ -53,6 +52,8 @@ export const logViewer = hoistCmp.factory({
53
52
  ]
54
53
  })
55
54
  ],
55
+ item: grid(),
56
+ bbar: [filler(), gridCountLabel({unit: 'log file'})],
56
57
  mask: 'onLoad'
57
58
  }),
58
59
  logDisplay(),
@@ -13,6 +13,7 @@ import {RecordActionSpec} from '@xh/hoist/data';
13
13
  import {compactDateRenderer, fmtNumber} from '@xh/hoist/format';
14
14
  import {Icon} from '@xh/hoist/icon';
15
15
  import {bindable, makeObservable, observable} from '@xh/hoist/mobx';
16
+ import {pluralize} from '@xh/hoist/utils/js';
16
17
  import download from 'downloadjs';
17
18
  import {LogDisplayModel} from './LogDisplayModel';
18
19
 
@@ -119,7 +120,13 @@ export class LogViewerModel extends BaseInstanceModel {
119
120
  if (!count) return;
120
121
 
121
122
  const confirmed = await XH.confirm({
122
- message: `Delete ${count} log files on the server? This cannot be undone.`
123
+ message: `Are you sure you want to delete ${pluralize('log file', count, true)}? This cannot be undone.`,
124
+ confirmProps: {
125
+ text: `Yes, delete the ${pluralize('file', count)}`,
126
+ intent: 'danger',
127
+ outlined: true,
128
+ autoFocus: false
129
+ }
123
130
  });
124
131
  if (!confirmed) return;
125
132
 
@@ -131,6 +131,7 @@ export class MemoryMonitorModel extends BaseInstanceModel {
131
131
  },
132
132
  {
133
133
  groupId: 'GC',
134
+ headerName: 'Garbage Collection',
134
135
  headerAlign: 'center',
135
136
  children: [collectionCount, avgCollectionTime, pctCollectionTime]
136
137
  }
@@ -5,7 +5,6 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
  import {HoistModel, LoadSpec, lookup, PlainObject, XH} from '@xh/hoist/core';
8
- import {StoreRecord} from '@xh/hoist/data';
9
8
  import {bindable} from '@xh/hoist/mobx';
10
9
  import {ServiceModel} from './ServiceModel';
11
10
 
@@ -14,7 +13,7 @@ export class DetailsModel extends HoistModel {
14
13
  parent: ServiceModel;
15
14
 
16
15
  @bindable.ref
17
- svcName: StoreRecord;
16
+ svcName: String;
18
17
 
19
18
  @bindable.ref
20
19
  stats: PlainObject;
@@ -11,6 +11,7 @@ import {errorMessage} from '@xh/hoist/cmp/error';
11
11
  import {panel} from '@xh/hoist/desktop/cmp/panel';
12
12
  import {jsonInput} from '@xh/hoist/desktop/cmp/input';
13
13
  import {Icon} from '@xh/hoist/icon';
14
+ import {isEmpty} from 'lodash';
14
15
 
15
16
  export const detailsPanel = hoistCmp.factory({
16
17
  model: creates(DetailsModel),
@@ -18,7 +19,7 @@ export const detailsPanel = hoistCmp.factory({
18
19
  render({model}) {
19
20
  const {svcName} = model;
20
21
  return panel({
21
- title: svcName ? `Stats: ${svcName}` : 'Stats',
22
+ title: svcName ?? 'Stats',
22
23
  mask: 'onLoad',
23
24
  icon: Icon.info(),
24
25
  compactHeader: true,
@@ -42,18 +43,22 @@ const stats = hoistCmp.factory<DetailsModel>({
42
43
  });
43
44
  }
44
45
 
45
- if (stats == null) return null;
46
-
47
- return panel(
48
- jsonInput({
49
- readonly: true,
50
- width: '100%',
51
- height: '100%',
52
- enableSearch: true,
53
- showFullscreenButton: false,
54
- editorProps: {lineNumbers: false},
55
- value: model.parent.fmtStats(stats)
56
- })
57
- );
46
+ return isEmpty(stats)
47
+ ? placeholder(
48
+ ...(loadModel.isPending
49
+ ? []
50
+ : [Icon.questionCircle(), 'This service does not report any admin stats.'])
51
+ )
52
+ : panel(
53
+ jsonInput({
54
+ readonly: true,
55
+ width: '100%',
56
+ height: '100%',
57
+ enableSearch: true,
58
+ showFullscreenButton: false,
59
+ editorProps: {lineNumbers: false},
60
+ value: model.parent.fmtStats(stats)
61
+ })
62
+ );
58
63
  }
59
64
  });
@@ -10,7 +10,7 @@ import {timestampNoYear} from '@xh/hoist/admin/columns';
10
10
  import {BaseInstanceModel} from '@xh/hoist/admin/tabs/cluster/instances/BaseInstanceModel';
11
11
  import {GridModel} from '@xh/hoist/cmp/grid';
12
12
  import {br, fragment} from '@xh/hoist/cmp/layout';
13
- import {LoadSpec, managed, XH} from '@xh/hoist/core';
13
+ import {LoadSpec, managed, PlainObject, XH} from '@xh/hoist/core';
14
14
  import {FilterLike, FilterTestFn, RecordActionSpec} from '@xh/hoist/data';
15
15
  import {Icon} from '@xh/hoist/icon';
16
16
  import {bindable, makeObservable} from '@xh/hoist/mobx';
@@ -52,15 +52,16 @@ export class ServiceModel extends BaseInstanceModel {
52
52
  selModel: 'multiple',
53
53
  enableExport: true,
54
54
  exportOptions: {filename: exportFilenameWithDate('services')},
55
+ groupBy: 'provider',
55
56
  store: {
56
57
  idSpec: 'name',
57
58
  processRawData: this.processRawData,
58
59
  fields: [
59
60
  {name: 'provider', type: 'string'},
60
61
  {name: 'name', type: 'string'},
61
- {name: 'displayName', type: 'string'},
62
+ {name: 'displayName', type: 'string', displayName: 'Service'},
62
63
  {name: 'initializedDate', type: 'date', displayName: 'Initialized'},
63
- {name: 'lastCachesCleared', type: 'date', displayName: 'Last Cleared'}
64
+ {name: 'lastCachesCleared', type: 'date', displayName: 'Caches Last Cleared'}
64
65
  ]
65
66
  },
66
67
  sortBy: ['provider', 'displayName'],
@@ -81,6 +82,7 @@ export class ServiceModel extends BaseInstanceModel {
81
82
  constructor() {
82
83
  super();
83
84
  makeObservable(this);
85
+
84
86
  this.addReaction({
85
87
  track: () => [this.textFilter, this.typeFilter],
86
88
  run: this.applyFilters,
@@ -91,6 +93,7 @@ export class ServiceModel extends BaseInstanceModel {
91
93
  async clearCachesAsync(entireCluster: boolean) {
92
94
  const {gridModel, instanceName, loadModel} = this,
93
95
  {selectedRecords} = gridModel;
96
+
94
97
  if (isEmpty(selectedRecords)) return;
95
98
 
96
99
  const cacheStr =
@@ -131,19 +134,24 @@ export class ServiceModel extends BaseInstanceModel {
131
134
  }
132
135
 
133
136
  override async doLoadAsync(loadSpec: LoadSpec) {
137
+ const {gridModel, instanceName: instance} = this;
134
138
  try {
135
139
  const data = await XH.fetchJson({
136
140
  url: 'serviceManagerAdmin/listServices',
137
- params: {instance: this.instanceName},
141
+ params: {instance},
138
142
  loadSpec
139
143
  });
140
- return this.gridModel.loadData(data);
144
+
145
+ if (!loadSpec.isStale) {
146
+ gridModel.loadData(data);
147
+ gridModel.preSelectFirstAsync();
148
+ }
141
149
  } catch (e) {
142
150
  this.handleLoadException(e, loadSpec);
143
151
  }
144
152
  }
145
153
 
146
- private processRawData(r) {
154
+ private processRawData(r: PlainObject) {
147
155
  const provider = r.name && r.name.startsWith('hoistCore') ? 'Hoist' : 'App';
148
156
  const displayName = lowerFirst(r.name.replace('hoistCore', ''));
149
157
  return {provider, displayName, ...r};
@@ -9,11 +9,11 @@ import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
9
9
  import {filler, hframe} from '@xh/hoist/cmp/layout';
10
10
  import {storeFilterField} from '@xh/hoist/cmp/store';
11
11
  import {creates, hoistCmp, uses} from '@xh/hoist/core';
12
- import {exportButton} from '@xh/hoist/desktop/cmp/button';
12
+ import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
13
+ import {buttonGroupInput} from '@xh/hoist/desktop/cmp/input';
13
14
  import {panel} from '@xh/hoist/desktop/cmp/panel';
14
15
  import {recordActionBar} from '@xh/hoist/desktop/cmp/record';
15
16
  import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
16
- import {select} from '@xh/hoist/desktop/cmp/input';
17
17
  import {ServiceModel} from './ServiceModel';
18
18
 
19
19
  export const servicePanel = hoistCmp.factory({
@@ -52,15 +52,14 @@ const bbar = hoistCmp.factory({
52
52
  filler(),
53
53
  gridCountLabel({unit: 'service'}),
54
54
  '-',
55
- select({
56
- options: [
57
- {value: 'all', label: 'All'},
58
- {value: 'app', label: 'App Only'},
59
- {value: 'hoist', label: 'Hoist Only'}
60
- ],
61
- width: 125,
55
+ buttonGroupInput({
62
56
  bind: 'typeFilter',
63
- hideDropdownIndicator: true
57
+ outlined: true,
58
+ items: [
59
+ button({value: 'all', text: 'All'}),
60
+ button({value: 'app', text: 'App'}),
61
+ button({value: 'hoist', text: 'Hoist'})
62
+ ]
64
63
  }),
65
64
  storeFilterField({
66
65
  matchMode: 'any',
@@ -1,11 +1,10 @@
1
1
  import { HoistModel, LoadSpec, PlainObject } from '@xh/hoist/core';
2
- import { StoreRecord } from '@xh/hoist/data';
3
2
  import { ServiceModel } from './ServiceModel';
4
3
  export declare class DetailsModel extends HoistModel {
5
4
  parent: ServiceModel;
6
- svcName: StoreRecord;
5
+ svcName: String;
7
6
  stats: PlainObject;
8
- get selectedRecord(): StoreRecord;
7
+ get selectedRecord(): import("../../../../../data").StoreRecord;
9
8
  onLinked(): void;
10
9
  doLoadAsync(loadSpec: LoadSpec): Promise<void>;
11
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1741882685374",
3
+ "version": "73.0.0-SNAPSHOT.1741967769000",
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",