Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix opensearch-project#281
changes regex to allow additional customized ids instead of ids in uuid format only.
  • Loading branch information
inf17101 authored Feb 25, 2022
1 parent 3b03b70 commit 2c9271e
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 2c9271e

Please sign in to comment.