Skip to content

Commit

Permalink
Update the saved object id matcher regex to match custom id
Browse files Browse the repository at this point in the history
Signed-off-by: Zhongnan Su <szhongna@amazon.com>
  • Loading branch information
zhongnansu committed Mar 4, 2022
1 parent d444010 commit 8902e89
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ const generateInContextReport = async (
});
};

// try to match uuid followed by '?' in URL, which would be the saved search id for discover URL
// try to match uuid and user entered custom-id followed by '?' in URL, which would be the saved search id for discover URL
// custom id example: v1s-f00-b4r1-01
const getUuidFromUrl = () =>
window.location.href.match(
/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)\?/
/([0-9a-z]+-[0-9a-z]+)+\?/
);
const isDiscover = () => window.location.href.includes('discover');

Expand Down

0 comments on commit 8902e89

Please sign in to comment.