8000 Add JS clickable tab link functionality by johnmhoran · Pull Request #1288 · aboutcode-org/vulnerablecode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add JS clickable tab link functionality #1288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ Release notes
=============


Next Release
------------

- We fixed a text-overflow issue in the Essentials tab of the Vulnerability details template.
- We added clickable links to the Essentials tab of the Vulnerability details template that enable
the user to navigate to the Fixed by packages tab and the Affected packages tab.


Version v33.4.0
----------------

Expand All @@ -12,21 +20,21 @@ Version v33.4.0
Version v33.3.0
----------------

- We filtered out the weakness that are not presented in the
cwe2.database before passing them into the vulnerability details view.
- We filtered out the weakness that are not presented in the
cwe2.database before passing them into the vulnerability details view.


Version v33.2.0
-----------------

- We fixed NVD importer to import the latest data by adding weakness
- We fixed NVD importer to import the latest data by adding weakness
in unique content ID for advisories.


Version v33.1.0
-----------------

- We have paginated the default improver and added keyboard interrupt support for import and improve processes.
- We have paginated the default improver and added keyboard interrupt support for import and improve processes.
- We bumped PyYaml to 6.0.1 and saneyaml to 0.6.0 and dropped docker-compose.


Expand Down Expand Up @@ -56,9 +64,9 @@ Version v32.0.0rc4
-------------------

- We added loading of env for GitHub datasource in vulntotal.
- We fixed import process in github importer in vulnerablecode reported here
- We fixed import process in github importer in vulnerablecode reported here
https://github.com/nexB/vulnerablecode/issues/1142.
- We added an improver to get all package versions
- We added an improver to get all package versions
of all ecosystems for a range of affected packages.
- We added documentation for configuring throttling rate for API endpoints.
- We fixed kbmsr2019 importer.
Expand Down
21 changes: 19 additions & 2 deletions vulnerabilities/templates/vulnerability_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{% if fixed_by_packages|length > 3 %}
<tr>
<td>
... see <i>Fixed by packages</i> tab for more
See <a href="#" ><i>Fixed by packages</i></a> tab for more
</td>
</tr>
{% endif %}
Expand Down Expand Up @@ -167,7 +167,7 @@
{% if affected_packages|length > 3 %}
<tr>
<td>
... see <i>Affected packages</i> tab for more
See <a href="#" ><i>Affected packages</i></a> tab for more
</td>
</tr>
{% endif %}
Expand Down Expand Up @@ -293,4 +293,21 @@

<script src="{% static 'js/main.js' %}" crossorigin="anonymous"></script>

<script>
function goToTab(tabName) {
const activeLink = document.querySelector('div.tabs.is-boxed li.is-active');
const activeTabContent = document.querySelector('div.tab-div.is-active');

activeLink.classList.remove('is-active');
activeTabContent.classList.remove('is-active');

const target_id = document.querySelector(`[data-tab='${tabName}']`);
const targetTabContent = document.querySelector(`[data-content='${tabName}']`);

target_id.classList.add('is-active');
targetTabContent.classList.add('is-active');
}
</script>


{% endblock %}
0