-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PM-13127]Breadcrumb event logs (#13386)
* Changes for the dummy event * Add the request UI changes * refactoring the code * swapping out the datasources * Put the changes behind a feature flag * Rename the Feature flag to lowercase * Rename the feature flag to epic * Changes to resolve the pr comments * Merge the two tables * commit changes * Remove unused code * Add the suggested of content projection * Resolve the failing ui issues * remove unused code * Resolve the repeated code
- Loading branch information
1 parent
c7315a0
commit 2bb8663
Showing
8 changed files
with
213 additions
and
17 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
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
63 changes: 63 additions & 0 deletions
63
apps/web/src/app/admin-console/organizations/manage/placeholder-events.ts
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
function getRandomDateTime() { | ||
const now = new Date(); | ||
const past24Hours = new Date(now.getTime() - 24 * 60 * 60 * 1000); | ||
const randomTime = | ||
past24Hours.getTime() + Math.random() * (now.getTime() - past24Hours.getTime()); | ||
const randomDate = new Date(randomTime); | ||
|
||
return randomDate.toLocaleString("en-US", { | ||
month: "short", | ||
day: "numeric", | ||
year: "numeric", | ||
hour: "2-digit", | ||
minute: "2-digit", | ||
second: "2-digit", | ||
hour12: true, | ||
}); | ||
} | ||
|
||
const asteriskPlaceholders = new Array(6).fill({ | ||
appName: "***", | ||
userName: "**********", | ||
userEmail: "**********", | ||
message: "**********", | ||
}); | ||
|
||
export const placeholderEvents = [ | ||
{ | ||
date: getRandomDateTime(), | ||
appName: "Extension - Firefox", | ||
userName: "Alice", | ||
userEmail: "[email protected]", | ||
message: "Logged in", | ||
}, | ||
{ | ||
date: getRandomDateTime(), | ||
appName: "Mobile - iOS", | ||
userName: "Bob", | ||
message: `Viewed item <span class="tw-text-code">000000</span>`, | ||
}, | ||
{ | ||
date: getRandomDateTime(), | ||
appName: "Desktop - Linux", | ||
userName: "Carlos", | ||
userEmail: "[email protected]", | ||
message: "Login attempt failed with incorrect password", | ||
}, | ||
{ | ||
date: getRandomDateTime(), | ||
appName: "Web vault - Chrome", | ||
userName: "Ivan", | ||
userEmail: "[email protected]", | ||
message: `Confirmed user <span class="tw-text-code">000000</span>`, | ||
}, | ||
{ | ||
date: getRandomDateTime(), | ||
appName: "Mobile - Android", | ||
userName: "Franz", | ||
userEmail: "[email protected]", | ||
message: `Sent item <span class="tw-text-code">000000</span> to trash`, | ||
}, | ||
] | ||
.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()) | ||
.concat(asteriskPlaceholders); |
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
Oops, something went wrong.