From c77246f70095c64d1ef56f3f9656cea33f9a8f4b Mon Sep 17 00:00:00 2001
From: Davda James <151067328+Davda-James@users.noreply.github.com>
Date: Sat, 9 Aug 2025 20:49:31 +0530
Subject: [PATCH] Fixed the issue of select all profiles button (#1117)
* earlier selecting the select all profiles selects the all scan methods instead of profiles, fixed that now select all profiles works perfectly
* was taking all_profiles also its name, fixed that by adding condition
---
nettacker/web/static/index.html | 8 ++++----
nettacker/web/static/js/main.js | 10 ++++++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/nettacker/web/static/index.html b/nettacker/web/static/index.html
index b695320f..7205802f 100644
--- a/nettacker/web/static/index.html
+++ b/nettacker/web/static/index.html
@@ -172,9 +172,9 @@
Profiles
-
- {% autoescape off %}{{profile}}{% endautoescape %}
+
+ {% autoescape off %}{{profile}}{% endautoescape %}
Scan Methods
@@ -299,7 +299,7 @@
-
+
diff --git a/nettacker/web/static/js/main.js b/nettacker/web/static/js/main.js
index 0cdc3ff6..0ee398b3 100644
--- a/nettacker/web/static/js/main.js
+++ b/nettacker/web/static/js/main.js
@@ -351,8 +351,10 @@ $(document).ready(function () {
var p = [];
var n = 0;
$("#profiles input:checked").each(function () {
- p[n] = this.id;
- n += 1;
+ if (this.id !== "all_profiles") {
+ p[n] = this.id;
+ n += 1;
+ }
});
var profiles = p.join(",");
@@ -676,6 +678,10 @@ $(document).ready(function () {
$(".checkbox-vuln-module").prop("checked", $(this).prop("checked"));
});
+ $(".check-all-profiles").click(function () {
+ $("#profiles input[type='checkbox']").not(this).prop("checked", $(this).prop("checked"));
+ });
+
$(".check-all-scans").click(function () {
$(".checkbox-brute-module").prop("checked", $(this).prop("checked"));
$(".checkbox-scan-module").prop("checked", $(this).prop("checked"));