Skip to content

Commit

Permalink
Merge pull request #24 from rbt-mm/rbt-open-dependency-graph-from-com…
Browse files Browse the repository at this point in the history
…ponent-search

Add "Show in Dependency-Graph" Button in "Component Search"
  • Loading branch information
rbt-mm authored Aug 8, 2023
2 parents 86e9b39 + 2e5e894 commit 61ca7f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/portfolio/components/ComponentSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr("../components/" + row.uuid);
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
let dependencyGraphUrl = xssFilters.uriInUnQuotedAttr("../../../projects/" + row.project.uuid + "/dependencyGraph/" + row.uuid)
return row.project.directDependencies ? `<a href="${dependencyGraphUrl}"<i class="fa fa-sitemap" aria-hidden="true" style="float:right; padding-top: 4px; cursor:pointer" data-toggle="tooltip" data-placement="bottom" title="Show in dependency graph"></i></a> ` + `<a href="${url}">${xssFilters.inHTMLData(value)}</a>` : `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
}
},
{
Expand Down

0 comments on commit 61ca7f2

Please sign in to comment.