From e842f41e72fa31be9285b0943a3b73fedb3b504d Mon Sep 17 00:00:00 2001 From: Anselm McClain Date: Wed, 16 Oct 2024 07:45:49 -0700 Subject: [PATCH] Misc Admin Console tweaks + Better sizing defaults for memory/JDBC charts + Dist objects grid expanded by default --- admin/columns/Tracking.ts | 3 ++- admin/tabs/cluster/ClusterTab.ts | 1 + admin/tabs/cluster/ClusterTabModel.ts | 4 ++-- admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts | 2 +- .../DistributedObjectsModel.ts} | 2 +- .../DistributedObjectsPanel.ts} | 13 +++++++------ admin/tabs/cluster/logs/LogViewer.ts | 3 ++- admin/tabs/cluster/memory/MemoryMonitorPanel.ts | 2 +- 8 files changed, 17 insertions(+), 13 deletions(-) rename admin/tabs/cluster/{hzobject/HzObjectModel.ts => distobjects/DistributedObjectsModel.ts} (99%) rename admin/tabs/cluster/{hzobject/HzObjectPanel.ts => distobjects/DistributedObjectsPanel.ts} (89%) diff --git a/admin/columns/Tracking.ts b/admin/columns/Tracking.ts index 9ba53dc04..acde8f43c 100644 --- a/admin/columns/Tracking.ts +++ b/admin/columns/Tracking.ts @@ -238,7 +238,8 @@ function badgeRenderer(v) { return v ? badge({ item: v, - className: 'xh-font-family-mono xh-title-tip', + className: 'xh-font-family-mono', + style: {cursor: 'copy'}, title: 'Double-click to copy', onDoubleClick: () => { copy(v); diff --git a/admin/tabs/cluster/ClusterTab.ts b/admin/tabs/cluster/ClusterTab.ts index 4b03ecb08..3a40de644 100644 --- a/admin/tabs/cluster/ClusterTab.ts +++ b/admin/tabs/cluster/ClusterTab.ts @@ -47,6 +47,7 @@ export const detailPanel = hoistCmp.factory({ return panel({ compactHeader: true, tbar: [ + Icon.server(), box({width: 150, item: model.formatInstance(instance)}), hspacer(25), tabSwitcher() diff --git a/admin/tabs/cluster/ClusterTabModel.ts b/admin/tabs/cluster/ClusterTabModel.ts index 2a2ce77b3..df452a22b 100644 --- a/admin/tabs/cluster/ClusterTabModel.ts +++ b/admin/tabs/cluster/ClusterTabModel.ts @@ -7,8 +7,8 @@ import {AppModel} from '@xh/hoist/admin/AppModel'; import {timestampNoYear} from '@xh/hoist/admin/columns'; import {connPoolMonitorPanel} from '@xh/hoist/admin/tabs/cluster/connpool/ConnPoolMonitorPanel'; +import {distributedObjectsPanel} from '@xh/hoist/admin/tabs/cluster/distobjects/DistributedObjectsPanel'; import {serverEnvPanel} from '@xh/hoist/admin/tabs/cluster/environment/ServerEnvPanel'; -import {hzObjectPanel} from '@xh/hoist/admin/tabs/cluster/hzobject/HzObjectPanel'; import {logViewer} from '@xh/hoist/admin/tabs/cluster/logs/LogViewer'; import {usedHeapMb, usedPctMax} from '@xh/hoist/admin/tabs/cluster/memory/MemoryMonitorModel'; import {memoryMonitorPanel} from '@xh/hoist/admin/tabs/cluster/memory/MemoryMonitorPanel'; @@ -180,7 +180,7 @@ export class ClusterTabModel extends HoistModel { id: 'objects', title: 'Distributed Objects', icon: Icon.grip(), - content: hzObjectPanel + content: distributedObjectsPanel }, {id: 'webSockets', title: 'WebSockets', icon: Icon.bolt(), content: webSocketPanel} ] diff --git a/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts b/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts index 1d7c7f55e..251f46cba 100644 --- a/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts +++ b/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts @@ -34,7 +34,7 @@ export const connPoolMonitorPanel = hoistCmp.factory({ panel({ modelConfig: { side: 'bottom', - defaultSize: 400 + defaultSize: '50%' }, item: chart() }) diff --git a/admin/tabs/cluster/hzobject/HzObjectModel.ts b/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts similarity index 99% rename from admin/tabs/cluster/hzobject/HzObjectModel.ts rename to admin/tabs/cluster/distobjects/DistributedObjectsModel.ts index b279b30e4..425745e60 100644 --- a/admin/tabs/cluster/hzobject/HzObjectModel.ts +++ b/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts @@ -18,7 +18,7 @@ import {Icon} from '@xh/hoist/icon'; import {bindable, makeObservable} from '@xh/hoist/mobx'; import {first, isEmpty, last} from 'lodash'; -export class HzObjectModel extends BaseInstanceModel { +export class DistributedObjectsModel extends BaseInstanceModel { @bindable groupBy: 'type' | 'owner' = 'owner'; @managed detailPanelModel = new PanelModel({ diff --git a/admin/tabs/cluster/hzobject/HzObjectPanel.ts b/admin/tabs/cluster/distobjects/DistributedObjectsPanel.ts similarity index 89% rename from admin/tabs/cluster/hzobject/HzObjectPanel.ts rename to admin/tabs/cluster/distobjects/DistributedObjectsPanel.ts index 1b0801b0e..bed849e11 100644 --- a/admin/tabs/cluster/hzobject/HzObjectPanel.ts +++ b/admin/tabs/cluster/distobjects/DistributedObjectsPanel.ts @@ -14,16 +14,17 @@ import {panel} from '@xh/hoist/desktop/cmp/panel'; import {toolbar} from '@xh/hoist/desktop/cmp/toolbar'; import {recordActionBar} from '@xh/hoist/desktop/cmp/record'; import {Icon} from '@xh/hoist/icon'; -import {HzObjectModel} from './HzObjectModel'; +import {DistributedObjectsModel} from './DistributedObjectsModel'; -export const hzObjectPanel = hoistCmp.factory({ - model: creates(HzObjectModel), +export const distributedObjectsPanel = hoistCmp.factory({ + displayName: 'DistributedObjectsPanel', + model: creates(DistributedObjectsModel), render({model}) { return panel({ item: hframe( panel({ - item: grid({agOptions: {groupDefaultExpanded: 0}}), + item: grid(), bbar: bbar() }), detailsPanel() @@ -35,7 +36,7 @@ export const hzObjectPanel = hoistCmp.factory({ }); const detailsPanel = hoistCmp.factory({ - model: uses(HzObjectModel), + model: uses(DistributedObjectsModel), render({model}) { const record = model.gridModel.selectedRecord; return panel({ @@ -62,7 +63,7 @@ const detailsPanel = hoistCmp.factory({ } }); -const bbar = hoistCmp.factory({ +const bbar = hoistCmp.factory({ render({model}) { return toolbar( recordActionBar({ diff --git a/admin/tabs/cluster/logs/LogViewer.ts b/admin/tabs/cluster/logs/LogViewer.ts index dabc34130..d5a9fa28c 100644 --- a/admin/tabs/cluster/logs/LogViewer.ts +++ b/admin/tabs/cluster/logs/LogViewer.ts @@ -41,8 +41,9 @@ export const logViewer = hoistCmp.factory({ bbar: [ storeFilterField({flex: 1}), select({ + leftIcon: Icon.server(), bind: 'instanceOnly', - width: 90, + width: 110, enableFilter: false, hideDropdownIndicator: true, hideSelectedOptionCheck: true, diff --git a/admin/tabs/cluster/memory/MemoryMonitorPanel.ts b/admin/tabs/cluster/memory/MemoryMonitorPanel.ts index e6398883d..bb8c00cfd 100644 --- a/admin/tabs/cluster/memory/MemoryMonitorPanel.ts +++ b/admin/tabs/cluster/memory/MemoryMonitorPanel.ts @@ -35,7 +35,7 @@ export const memoryMonitorPanel = hoistCmp.factory({ panel({ modelConfig: { side: 'bottom', - defaultSize: 400 + defaultSize: '50%' }, item: chart() })