Skip to content

Commit

Permalink
Merge pull request #1510 from akto-api-security/hotfix/fix_jira_fr
Browse files Browse the repository at this point in the history
fix jira for hostname collections
  • Loading branch information
notshivansh authored Sep 18, 2024
2 parents ad18a0f + 6c79141 commit 83a9fe9
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function TestRunResultPage(props) {
const [infoState, setInfoState] = useState([])
const [loading, setLoading] = useState(true);
const [showDetails, setShowDetails] = useState(true)
const collectionsMap = PersistStore(state => state.collectionsMap)

const useFlyout = location.pathname.includes("test-editor") ? false : true

Expand Down Expand Up @@ -141,8 +142,26 @@ function TestRunResultPage(props) {
return
}
let url = issueDetails.id.apiInfoKey.url
let pathname = "Endpoint - " + new URL(url).pathname;
let host = "Host - " + new URL(url).host
let pathname = "Endpoint - ";
try {
if (url.startsWith("http")) {
pathname += new URL(url).pathname;
} else {
pathname += url;
}
} catch (err) {
pathname += url;
}
let host = "Host - ";
try {
if (url.startsWith("http")) {
host += new URL(url).host;
} else {
host += collectionsMap[issueDetails.id.apiInfoKey.apiCollectionId] !== null ? collectionsMap[issueDetails.id.apiInfoKey.apiCollectionId] : " ";
}
} catch (err) {
host += collectionsMap[issueDetails.id.apiInfoKey.apiCollectionId] !== null ? collectionsMap[issueDetails.id.apiInfoKey.apiCollectionId] : " ";
}
// break into host and path
let description = "Description - " + getDescriptionText(true)

Expand Down

0 comments on commit 83a9fe9

Please sign in to comment.