Skip to content

Commit

Permalink
Merge pull request #420 from RedHatProductSecurity/fix/OSIDB-3440-wro…
Browse files Browse the repository at this point in the history
…ng-tracker-links

🐛 OSIDB-3440: Fix tracker links
  • Loading branch information
C-Valen committed Sep 16, 2024
1 parent acd850f commit a92475d
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 102 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# OSIM Changelog

## [Unreleased]
### Added
* Add query filter support on advance search (`OSIDB-3088`)
* Support saving query filter on default user search (`OSIDB-3387`)

### Fixed
* Fix wrong tracker links (`OSIDB-3443`)

## [2024.9.0]
### Added
* Allow using default ordering in flaw list page (`OSIDB-3187`)
Expand Down
12 changes: 10 additions & 2 deletions src/components/FlawTrackers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ascend, descend, sortWith } from 'ramda';
import TrackerManager from '@/components/TrackerManager.vue';
import { useSettingsStore } from '@/stores/SettingsStore';
import { usePagination } from '@/composables/usePagination';
import { trackerUrl } from '@/services/TrackerService';
type TrackerWithModule = ZodTrackerType & { ps_module: string };
Expand Down Expand Up @@ -298,9 +299,16 @@ function increaseItemsPerPage() {
:key="trackerIndex"
>
<td>
<RouterLink :to="{ path: `/tracker/${tracker.uuid}` }">
<a
v-if="tracker.external_system_id"
:href="trackerUrl(tracker.type, tracker.external_system_id)"
target="_blank"
>
{{ `${tracker.external_system_id} ` }}<i class="bi-box-arrow-up-right" />
</RouterLink>
</a>
<span v-else title="This tracker doesn't have External ID">
None
</span>
</td>
<td>{{ tracker.ps_update_stream }}</td>
<td>{{ tracker.ps_module }}</td>
Expand Down
1 change: 1 addition & 0 deletions src/components/__tests__/FlawForm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ vi.mock('vue-router', async () => {
vi.mock('@/services/TrackerService', () => {
return {
getSuggestedTrackers: vi.fn(() => Promise.resolve([])),
trackerUrl: vi.fn(),
};
});

Expand Down
72 changes: 18 additions & 54 deletions src/components/__tests__/__snapshots__/FlawAffects.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
</thead>
<tbody data-v-7006d35c="">
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0006" target="_blank">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-006</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -256,9 +254,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
<td data-v-7006d35c="">2024-07-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0005" target="_blank">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-005</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -267,9 +263,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
<td data-v-7006d35c="">2024-08-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0004" target="_blank">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-004</td>
<td data-v-7006d35c="">openshift-1</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -278,9 +272,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
<td data-v-7006d35c="">2024-09-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0003" target="_blank">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-003</td>
<td data-v-7006d35c="">openshift-1</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -289,9 +281,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
<td data-v-7006d35c="">2024-10-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0002" target="_blank">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-002</td>
<td data-v-7006d35c="">openshift-1</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -300,9 +290,7 @@ exports[`FlawAffects > Correctly renders the component when there are affects to
<td data-v-7006d35c="">2024-11-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0001" target="_blank">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-001</td>
<td data-v-7006d35c="">openshift-1</td>
<td data-v-7006d35c="">NEW</td>
Expand Down Expand Up @@ -691,9 +679,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
</thead>
<tbody data-v-7006d35c="">
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0006" target="_blank">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-006</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -702,9 +688,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
<td data-v-7006d35c="">2024-07-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0005" target="_blank">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-005</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -713,9 +697,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
<td data-v-7006d35c="">2024-08-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0004" target="_blank">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-004</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -724,9 +706,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
<td data-v-7006d35c="">2024-09-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0003" target="_blank">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-003</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -735,9 +715,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
<td data-v-7006d35c="">2024-10-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0002" target="_blank">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-002</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -746,9 +724,7 @@ exports[`FlawAffects > Displays tracker manager for a selection of affects 1`] =
<td data-v-7006d35c="">2024-11-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0001" target="_blank">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-001</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">NEW</td>
Expand Down Expand Up @@ -1073,9 +1049,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
</thead>
<tbody data-v-7006d35c="">
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0006" target="_blank">XXXX-0006 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-006</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -1084,9 +1058,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
<td data-v-7006d35c="">2024-07-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0005" target="_blank">XXXX-0005 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-005</td>
<td data-v-7006d35c="">openshift-5</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -1095,9 +1067,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
<td data-v-7006d35c="">2024-08-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0004" target="_blank">XXXX-0004 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-004</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -1106,9 +1076,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
<td data-v-7006d35c="">2024-09-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0003" target="_blank">XXXX-0003 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-003</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">NEW</td>
Expand All @@ -1117,9 +1085,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
<td data-v-7006d35c="">2024-10-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0002" target="_blank">XXXX-0002 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-002</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">CLOSED</td>
Expand All @@ -1128,9 +1094,7 @@ exports[`FlawAffects > Displays tracker manager for individual affect 1`] = `
<td data-v-7006d35c="">2024-11-01 13:06 UTC</td>
</tr>
<tr data-v-7006d35c="">
<td data-v-7006d35c="">
<routerlink data-v-7006d35c="" to="[object Object]">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></routerlink>
</td>
<td data-v-7006d35c=""><a data-v-7006d35c="" href="http://jira-service:8002/browse/XXXX-0001" target="_blank">XXXX-0001 <i data-v-7006d35c="" class="bi-box-arrow-up-right"></i></a></td>
<td data-v-7006d35c="">xxxx-0-001</td>
<td data-v-7006d35c="">-test</td>
<td data-v-7006d35c="">NEW</td>
Expand Down
Loading

0 comments on commit a92475d

Please sign in to comment.