Skip to content
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

Minor tweaks #307

Merged
merged 7 commits into from
Sep 27, 2024
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
2 changes: 1 addition & 1 deletion backend/app/connectors/grafana/schema/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class WazuhDashboard(Enum):
EDR_COMPLIANCE = ("Wazuh", "edr_compliance.json")
EDR_AV_MALWARE_IOC = ("Wazuh", "edr_av_malware_ioc.json")
EDR_AGENT_INVENTORY = ("Wazuh", "edr_agent_inventory.json")
EDR_AD_INVENOTRY = ("Wazuh", "edr_ad_inventory.json")
EDR_AD_INVENTORY = ("Wazuh", "edr_ad_inventory.json")
EDR_SYSTEM_VULNERABILITIES_NEW = ("Wazuh", "edr_system_vulnerabilities_new.json")


Expand Down
6 changes: 4 additions & 2 deletions backend/copilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from app.middleware.exception_handlers import custom_http_exception_handler
from app.middleware.exception_handlers import validation_exception_handler
from app.middleware.exception_handlers import value_error_handler
from app.middleware.logger import log_requests

# from app.routers import ask_socfortress
from app.routers import active_response
Expand Down Expand Up @@ -75,6 +74,9 @@
from app.schedulers.scheduler import get_scheduler_instance
from app.schedulers.scheduler import init_scheduler

# from app.middleware.logger import log_requests


auth_handler = AuthHandler()
# Get the `SERVER_IP` from the `.env` file
load_dotenv()
Expand Down Expand Up @@ -103,7 +105,7 @@

################## ! Middleware LOGGING TO `log_entry` table ! ##################
# Comment out logging for now, not sure I want to use it
app.middleware("http")(log_requests) # using the imported middleware
# app.middleware("http")(log_requests) # using the imported middleware


################## ! Exception Handlers ! ##################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ import {
import isIP from "validator/es/lib/isIP"
import isPort from "validator/es/lib/isPort"
import isURL from "validator/es/lib/isURL"
import { computed, onBeforeMount, ref, toRefs } from "vue"
import { computed, onBeforeMount, ref, toRefs, watch } from "vue"

const props = defineProps<{
customerCode: string
Expand Down Expand Up @@ -560,7 +560,14 @@ function toggleDashboards() {
if (allDashboardsSelected.value) {
form.value.dashboards_to_include.dashboards = []
} else {
form.value.dashboards_to_include.dashboards = dashboardOptions.value.map(o => o.value)
form.value.dashboards_to_include.dashboards = dashboardOptions.value
.filter(
o =>
!["EDR_WAZUH_INVENOTRY", "EDR_WAZUH_INVENTORY", "EDR_AGENT_INVENTORY"]
.map(d => d.toLowerCase())
.includes(o.value.toLowerCase())
)
.map(o => o.value)
}
}

Expand Down Expand Up @@ -614,6 +621,20 @@ async function submit() {
})
}

function formPreset(step: number) {
switch (step) {
case 2:
if (!form.value.customer_index_name) {
form.value.customer_index_name = `wazuh-${form.value.customer_code}`
}
break
}
}

watch(current, val => {
formPreset(val)
})

onBeforeMount(() => {
getProvisioningDefaultSettings()
getSubscriptions()
Expand Down
17 changes: 9 additions & 8 deletions frontend/src/components/incidentManagement/alerts/AlertsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,15 @@ import { computed, nextTick, onBeforeMount, provide, ref, watch } from "vue"
import AlertItem from "./AlertItem.vue"
import AlertsFilters from "./AlertsFilters.vue"

const { highlight, preset, showFilters } = withDefaults(
defineProps<{
highlight?: string | null
preset?: AlertsListFilter[]
showFilters?: boolean
}>(),
{ showFilters: true }
)
const {
highlight,
preset,
showFilters = true
} = defineProps<{
highlight?: string | null
preset?: AlertsListFilter[]
showFilters?: boolean
}>()

const FilterIcon = "carbon:filter-edit"
const InfoIcon = "carbon:information"
Expand Down
Loading