Skip to content

Commit

Permalink
Enhanced DistributedObjectAdmin to compare for inconsistencies betwee…
Browse files Browse the repository at this point in the history
…n instances (#3851)

* Fixed grouping name for Hibernate Cache objs

* Renamed HzObjectAdminController to DistributedObjectAdminController

* WIP on admin tab

* WIP on admin tab

* WIP on admin tab

* WIP on admin tab

* WIP on admin tab

* Merged old distributed objects tab with new changes

* WIP work

* Bug fixes and name standardization

* UI/filtering enhancements

* UI/filtering enhancements

* UI/filtering enhancements

* Updated CHANGELOG.md

* Added error handling, comparing objects

* Moved DistributedObjects to a 2nd level tab

* Added non-comparison fields to detail grid

* Polish for the dist object page

* Code review changes

* NPE fix

* Fixed bug where check grid details were occasionally stale

* UI changes and fixes

- Moved and resized the details grid
- Renamed some UI elements
- Now uses diff icon
- Fixed TODO in tree grid contruction code

* Multi instance compare2 (#3886)

CR: Jakub

* Renames on FE

* Misc. UI/Code tweaks

* Further UI tweaks

* Further UI tweaks

* Further UI tweaks

---------

Co-authored-by: lbwexler <[email protected]>
Co-authored-by: Anselm McClain <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2025
1 parent 565aac8 commit ad6f08f
Show file tree
Hide file tree
Showing 33 changed files with 913 additions and 405 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v71.0.0-SNAPSHOT - unreleased

### 💥 Breaking Changes
### 💥 Breaking Changes (upgrade 🟢 Medium - Hoist core update, adjust imports)

* Requires `hoist-core >= 26.1` with new APIs to support `ViewManager`.
* `ErrorMessage` is now cross-platform - update imports from `@xh/hoist/desktop/cmp/error`
Expand Down
23 changes: 15 additions & 8 deletions admin/AppModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,21 @@ export class AppModel extends HoistAppModel {
name: 'cluster',
path: '/cluster',
children: [
{name: 'logs', path: '/logs'},
{name: 'memory', path: '/memory'},
{name: 'jdbcPool', path: '/jdbcPool'},
{name: 'environment', path: '/environment'},
{name: 'services', path: '/services'},
{name: 'objects', path: '/objects'},
{name: 'hibernate', path: '/hibernate'},
{name: 'webSockets', path: '/webSockets'}
{
name: 'instances',
path: '/instances',
children: [
{name: 'logs', path: '/logs'},
{name: 'memory', path: '/memory'},
{name: 'jdbcPool', path: '/jdbcPool'},
{name: 'environment', path: '/environment'},
{name: 'services', path: '/services'},
{name: 'hibernate', path: '/hibernate'},
{name: 'consistency', path: '/consistency'},
{name: 'webSockets', path: '/webSockets'}
]
},
{name: 'objects', path: '/objects'}
]
},
{
Expand Down
77 changes: 14 additions & 63 deletions admin/tabs/cluster/ClusterTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,21 @@
*
* Copyright © 2025 Extremely Heavy Industries Inc.
*/
import {grid} from '@xh/hoist/cmp/grid';
import {clusterObjectsPanel} from '@xh/hoist/admin/tabs/cluster/objects/ClusterObjectsPanel';
import {instancesTab} from '@xh/hoist/admin/tabs/cluster/instances/InstancesTab';
import {tabContainer} from '@xh/hoist/cmp/tab';
import {creates, hoistCmp} from '@xh/hoist/core';
import {mask} from '@xh/hoist/cmp/mask';
import {panel} from '@xh/hoist/desktop/cmp/panel';
import {tabSwitcher} from '@xh/hoist/desktop/cmp/tab';
import {box, div, hspacer, p, placeholder, vframe} from '@xh/hoist/cmp/layout';
import {ClusterTabModel} from './ClusterTabModel';
import {hoistCmp} from '@xh/hoist/core';
import {Icon} from '@xh/hoist/icon';

export const clusterTab = hoistCmp.factory({
model: creates(ClusterTabModel),
render({model}) {
return vframe(
panel({
modelConfig: {
side: 'top',
defaultSize: 105,
minSize: 75,
collapsible: false,
persistWith: model.persistWith
},
item: grid()
}),
detailPanel(),
failedConnectionMask()
);
}
});

export const detailPanel = hoistCmp.factory<ClusterTabModel>({
render({model}) {
const {instance, lastLoadException} = model;
if (!instance?.isReady) {
return placeholder({
items: [Icon.server(), 'Select a running instance above.'],
omit: lastLoadException
});
export const clusterTab = hoistCmp.factory(() =>
tabContainer({
modelConfig: {
route: 'default.cluster',
switcher: {orientation: 'left', testId: 'cluster-tab-switcher'},
tabs: [
{id: 'instances', icon: Icon.info(), content: instancesTab},
{id: 'objects', icon: Icon.diff(), content: clusterObjectsPanel}
]
}

return panel({
compactHeader: true,
tbar: [
Icon.server(),
box({width: 150, item: model.formatInstance(instance)}),
hspacer(25),
tabSwitcher()
],
flex: 1,
item: tabContainer()
});
}
});

export const failedConnectionMask = hoistCmp.factory<ClusterTabModel>({
render({model}) {
return mask({
message: div(
p('Attempting to connect to cluster.'),
p('Local instance may be unavailable, please wait.')
),
isDisplayed: true,
spinner: true,
omit: !model.lastLoadException
});
}
});
})
);
199 changes: 0 additions & 199 deletions admin/tabs/cluster/distobjects/DistributedObjectsModel.ts

This file was deleted.

Loading

0 comments on commit ad6f08f

Please sign in to comment.