-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(crons): new
mergeBuckets
timeline function without env (#82569)
new `mergeBuckets` function that merges new `monitorBucketWithStats` type since `checkinTimeline` doesn't need to know anything about environment, we want to replace `MonitorBucketEnvMapping` fields with `StatsBucket`
- Loading branch information
Showing
5 changed files
with
242 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
static/app/views/monitors/components/timeline/utils/isEnvMappingEmpty.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import type {MonitorBucketEnvMapping} from '../types'; | ||
import type {MonitorBucketEnvMapping, StatsBucket} from '../types'; | ||
|
||
/** | ||
* Determines if an environment mapping includes any job run data | ||
*/ | ||
export function isEnvMappingEmpty(envMapping: MonitorBucketEnvMapping) { | ||
return Object.keys(envMapping).length === 0; | ||
} | ||
|
||
export function isStatsBucketEmpty(stats: StatsBucket): boolean { | ||
return Object.values(stats).every(value => value === 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters