diff --git a/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts b/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts index bdfdd1fa8..db7277356 100644 --- a/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts +++ b/admin/tabs/cluster/distobjects/DistributedObjectsModel.ts @@ -236,7 +236,7 @@ export class DistributedObjectsModel extends HoistModel { try { await XH.fetchJson({ - url: 'distributedObjectAdmin/clearAllHibernateCaches' + url: 'clusterObjectsAdmin/clearAllHibernateCaches' }).linkTo(this.loadModel); await this.refreshAsync(); @@ -249,9 +249,14 @@ export class DistributedObjectsModel extends HoistModel { override async doLoadAsync(loadSpec: LoadSpec) { try { const report = await XH.fetchJson({ - url: 'distributedObjectAdmin/getDistributedObjectsReport' + url: 'clusterObjectsAdmin/getClusterObjectsReport' }); + report.info = report.info.map(it => ({ + ...it, + comparableFields: it.comparableAdminStats + })); + this.gridModel.loadData(this.processReport(report)); runInAction(() => { this.startTimestamp = report.startTimestamp diff --git a/cmp/viewmanager/ViewManagerModel.ts b/cmp/viewmanager/ViewManagerModel.ts index 0227fe964..a6a656ac2 100644 --- a/cmp/viewmanager/ViewManagerModel.ts +++ b/cmp/viewmanager/ViewManagerModel.ts @@ -37,9 +37,9 @@ export interface ViewCreateSpec { } export interface ViewUpdateSpec { - name: string; - group: string; - description: string; + name?: string; + group?: string; + description?: string; isShared?: boolean; isDefaultPinned?: boolean; } diff --git a/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts b/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts index 2d0185834..cfde1e85f 100644 --- a/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts +++ b/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts @@ -8,7 +8,7 @@ import {FormModel} from '@xh/hoist/cmp/form'; import {fragment, p, strong} from '@xh/hoist/cmp/layout'; import {HoistModel, managed, TaskObserver, XH} from '@xh/hoist/core'; -import {capitalize} from 'lodash'; +import {capitalize, isUndefined} from 'lodash'; import {ManageDialogModel} from './ManageDialogModel'; import {makeObservable} from '@xh/hoist/mobx'; import {ViewInfo} from '@xh/hoist/cmp/viewmanager'; @@ -55,14 +55,14 @@ export class ViewPanelModel extends HoistModel { async saveAsync() { const {parent, view, formModel} = this, - {name, group, description, isDefaultPinned, isShared} = formModel.getData(), + updates = formModel.getData(true), isValid = await formModel.validateAsync(), isDirty = formModel.isDirty; if (!isValid || !isDirty) return; - if (view.isOwned && view.isShared != isShared) { - const msg: ReactNode = !isShared + if (view.isOwned && !isUndefined(updates.isShared)) { + const msg: ReactNode = !updates.isShared ? `Your ${view.typedName} will no longer be visible to all other ${XH.appName} users.` : `Your ${view.typedName} will become visible to all other ${XH.appName} users.`; const msgs = [msg, strong('Are you sure you want to proceed?')]; @@ -79,13 +79,7 @@ export class ViewPanelModel extends HoistModel { if (!confirmed) return; } - await parent.updateAsync(view, { - name, - group, - description, - isShared, - isDefaultPinned - }); + await parent.updateAsync(view, updates); } //------------------------