Skip to content

Commit

Permalink
Backward-compatible tweaks relating to HoistCore update to Service Ad…
Browse files Browse the repository at this point in the history
…min (#3791)
  • Loading branch information
lbwexler authored Sep 16, 2024
1 parent 6828e87 commit 7d3d89f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 4 additions & 1 deletion admin/tabs/cluster/BaseInstanceModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export class BaseInstanceModel extends HoistModel {
forOwn(stats, (v, k) => {
// Convert numbers that look like recent timestamps to date values.
if (
(k.endsWith('Time') || k.endsWith('Date') || k == 'timestamp') &&
(k.endsWith('Time') ||
k.endsWith('Date') ||
k.endsWith('Timestamp') ||
k == 'timestamp') &&
isNumber(v) &&
v > Date.now() - 365 * DAYS
) {
Expand Down
8 changes: 0 additions & 8 deletions admin/tabs/cluster/services/DetailsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ export class DetailsModel extends HoistModel {
loadSpec
});
if (loadSpec.isStale) return;
this.preprocessRawData(resp);
this.stats = resp;
}

private preprocessRawData(resp) {
// Format distributed objects for readability
resp.distributedObjects?.forEach(obj => {
obj.name = obj.name.substring(obj.name.indexOf('_') + 1);
});
}
}

0 comments on commit 7d3d89f

Please sign in to comment.