mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-05 07:08:42 +00:00
refactor(recovery): canonicalize platform payload vocabulary
This commit is contained in:
parent
890fd1ef83
commit
8a57c7431b
23 changed files with 318 additions and 44 deletions
|
|
@ -40,6 +40,7 @@ import {
|
|||
normalizeRecoveryOutcome,
|
||||
} from '@/utils/recoveryOutcomePresentation';
|
||||
import { getRecoveryIssueRailClass, type RecoveryIssueTone } from '@/utils/recoveryIssuePresentation';
|
||||
import { getRecoveryRollupPlatforms } from '@/utils/recoveryPlatformModel';
|
||||
import { getRecoveryRollupSubjectLabel } from '@/utils/recoveryRecordPresentation';
|
||||
import { getSourcePlatformLabel, normalizeSourcePlatformQueryValue } from '@/utils/sourcePlatforms';
|
||||
import { titleCaseDelimitedLabel } from '@/utils/textPresentation';
|
||||
|
|
@ -132,11 +133,11 @@ export const RecoveryProtectedInventorySection: Component<
|
|||
return multiplier * (leftType || '').localeCompare(rightType || '');
|
||||
}
|
||||
case 'source': {
|
||||
const leftSource = (left.providers || [])
|
||||
const leftSource = getRecoveryRollupPlatforms(left)
|
||||
.map((provider) => getSourcePlatformLabel(String(provider)))
|
||||
.sort()
|
||||
.join(',');
|
||||
const rightSource = (right.providers || [])
|
||||
const rightSource = getRecoveryRollupPlatforms(right)
|
||||
.map((provider) => getSourcePlatformLabel(String(provider)))
|
||||
.sort()
|
||||
.join(',');
|
||||
|
|
@ -368,8 +369,7 @@ export const RecoveryProtectedInventorySection: Component<
|
|||
const attemptMs = rollup.lastAttemptAt ? Date.parse(rollup.lastAttemptAt) : 0;
|
||||
const successMs = rollup.lastSuccessAt ? Date.parse(rollup.lastSuccessAt) : 0;
|
||||
const outcome = normalizeRecoveryOutcome(rollup.lastOutcome);
|
||||
const providers = (rollup.providers || [])
|
||||
.slice()
|
||||
const providers = getRecoveryRollupPlatforms(rollup)
|
||||
.map((provider) => String(provider || '').trim())
|
||||
.filter(Boolean)
|
||||
.sort((left, right) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue