Skip to content
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
19 changes: 12 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# UTMStack 10.5.18 Release Notes
## Bugfix
- Fixed unable to change status to complete if observations contains french characters
- Fixed Elastic filter time adds unnecessary /d to intervals in Log Explorer
- Fixed handle special characters in password query parameter
- Fixed filter duplication issue in Log Explorer when removing filters
- Fixed Cisco ASA and Cisco Firepower filters when the data coming without syslog date or host information
# UTMStack 10.5.19 Release Notes
## Bug Fixes
- Fixed issue where log fields in the table didn't match the data when adding filters.
- Fixed time filter updates not reflecting in the filter string.
- Fixed index pattern changes not updating the browser URL.
- Fixed container memory resource distribution
## New Features
- Restricted time filter to a maximum range of one month.
- Made the timestamp field mandatory and added a summary view when no fields are selected.
- Moved “Add Filter” button to the left and improved filter UI with better icons.
- Removed unnecessary header space to enhance table visibility.
- Added "contains one of" and "does not contain one of" operators to filters.
- Improved compliance report views with added functionalities, including status tracking and evidence attachments.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class UtmComplianceReportConfig implements Serializable {
@Column(name = "config_solution")
private String configSolution;

@Column(name = "config_report_remediation")
private String configRemediation;

@JsonIgnore
@Column(name = "config_report_columns")
private String configReportColumns;
Expand Down Expand Up @@ -325,4 +328,12 @@ public String getConfigReportName() {
public void setConfigReportName(String configReportName) {
this.configReportName = configReportName;
}

public String getConfigRemediation() {
return configRemediation;
}

public void setConfigRemediation(String configRemediation) {
this.configRemediation = configRemediation;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,22 @@
<sql dbms="postgresql" splitStatements="true" stripComments="true">
<![CDATA[
UPDATE utm_menu
SET url = 'compliance/report-viewer?standardId=100&standardName=Account Management',
menu_active = false
SET url = 'compliance/report-viewer?standardId=100&standardName=Account Management'
WHERE id = 502;

UPDATE utm_menu
SET url = 'compliance/report-viewer?standardId=200&standardName=Device Activity',
menu_active = false
SET url = 'compliance/report-viewer?standardId=200&standardName=Device Activity'
WHERE id = 503;

UPDATE utm_menu
SET url = 'compliance/report-viewer?standardId=300&standardName=Application Audit',
menu_active = false
SET url = 'compliance/report-viewer?standardId=300&standardName=Application Audit'
WHERE id = 504;

UPDATE utm_menu
SET url = 'compliance/report-viewer?standardId=400&standardName=Alerts and Incidents',
name = 'Alerts And Incidents',
menu_active = false
name = 'Alerts And Incidents'
WHERE id = 505;

INSERT INTO public.utm_menu (id, name, url, parent_id, type, dashboard_id, position, menu_active, menu_action, menu_icon, module_name_short)
VALUES (507, 'CMMC', 'compliance/report-viewer?standardId=1000000&standardName=CMMC', 500, 1, null, 6, true, false, null, null);

INSERT INTO utm_menu_authority (menu_id, authority_name) VALUES (507, 'ROLE_ADMIN');
INSERT INTO utm_menu_authority (menu_id, authority_name) VALUES (507, 'ROLE_USER');

ALTER TABLE utm_compliance_report_config
ADD COLUMN config_report_note TEXT;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

<changeSet id="20250121001" author="Manuel">
<sql dbms="postgresql" splitStatements="true" stripComments="true">
<![CDATA[


ALTER TABLE utm_compliance_report_config
ADD COLUMN config_report_remediation TEXT;

]]>
</sql>
</changeSet>
</databaseChangeLog>
2 changes: 2 additions & 0 deletions backend/src/main/resources/config/liquibase/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,7 @@

<include file="/config/liquibase/changelog/20241120001_update_compliance_menu.xml" relativeToChangelogFile="false"/>

<include file="/config/liquibase/changelog/20250121001_add_remediation_column_config_report.xml" relativeToChangelogFile="false"/>


</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.full-height {
height: 90vh;
overflow-y: auto;
.box-sizing{
box-sizing: border-box;
}
::ng-deep app-compliance-report-viewer gridster {
background-color: unset !important;
Expand Down Expand Up @@ -39,5 +38,14 @@
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.content-menu {
overflow: hidden;
}

.sidebar-section {
position: sticky;
align-self: start;
width: 350px;
}


Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container-fluid p-2" style="height: 90vh;">
<div class="container-fluid">
<!-- Title and action buttons -->
<div class="d-flex justify-content-between align-items-center mb-2 row no-gutters">
<div class="d-flex justify-content-between align-items-center my-2 row no-gutters box-sizing">
<div class="col-md-6">
<h5 class="card-title mb-0 text-uppercase label-header">
Reports Templates {{ standard ? ': ' + standard.standardName : '' }}
Expand All @@ -20,10 +20,10 @@ <h5 class="card-title mb-0 text-uppercase label-header">
</div>

<!-- Main content area -->
<div class="row m-0 h-100">
<div [ngStyle]="{'min-height': getMenuHeight(), 'height': getMenuHeight()}" class="row m-0 content-menu">
<!-- Left column -->
<div class="col-auto px-0 full-height" style="width: 300px;">
<div class="h-100 card m-0">
<div class="col-auto px-0 sidebar-section h-100">
<div class="card m-0 h-100">
<!-- Section navigation -->
<div class="card-header header-elements-sm-inline p-0 bg-white card-header-title">
<div class="d-flex justify-content-between w-100">
Expand All @@ -44,13 +44,15 @@ <h5 class="card-title mb-0 text-uppercase label-header">
</div>

<!-- List of sections -->
<div class="card-body p-0 m-0 bg-light">
<div *ngFor="let section of sections$ | async as sections; let index = index; trackBy: trackFn" class="d-flex flex-column">
<div class="card-body p-0 mb-4 overflow-auto">
<div *ngFor="let section of sections$ | async as sections; let index = index; trackBy: trackFn"
[ngClass]="{'mt-3': index === 0}"
class="d-flex flex-column mb-1 mx-2">
<app-utm-cp-section [section]="section"
[action]="action"
[loadFirst]="index === activeIndexSection"
[index]="index"
(isActive)="onChangeSectionActive($event, sections)"
(isActive)="onChangeSectionActive($event, section, sections)"
[expandable]="action==='reports'">
</app-utm-cp-section>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HttpErrorResponse} from '@angular/common/http';
import {AfterViewInit, Component, OnDestroy, OnInit} from '@angular/core';
import {AfterViewInit, Component, HostListener, OnDestroy, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
import {NgxSpinnerService} from 'ngx-spinner';
Expand Down Expand Up @@ -37,6 +37,7 @@ export class ComplianceReportViewerComponent implements OnInit, AfterViewInit, O
page: 0,
size: 15
};
viewportHeight: number;

constructor(private standardSectionService: CpStandardSectionService,
private toastService: UtmToastService,
Expand All @@ -50,6 +51,12 @@ export class ComplianceReportViewerComponent implements OnInit, AfterViewInit, O
private localStorage: LocalStorageService) {

this.standard = this.localStorage.retrieve('selectedStandard');
this.viewportHeight = window.innerHeight;
}

@HostListener('window:resize', ['$event'])
onResize(event: Event) {
this.viewportHeight = window.innerHeight;
}

ngOnInit() {
Expand Down Expand Up @@ -131,12 +138,17 @@ export class ComplianceReportViewerComponent implements OnInit, AfterViewInit, O
});
}

onChangeSectionActive(index: number, sections: ComplianceStandardType[]) {
console.log(index, sections);
onChangeSectionActive(index: number, section: ComplianceStandardSectionType, sections: ComplianceStandardSectionType[]) {
this.activeIndexSection = index;
this.standardSectionService.notifyRefresh({
loading: true,
activeSection: index
sections.forEach((sec, i) => {
if (i === index) {
sec.isCollapsed = true;
sec.isActive = true;
this.activeSection = section;
} else {
sec.isCollapsed = false;
sec.isActive = false;
}
});
}

Expand Down Expand Up @@ -184,6 +196,10 @@ export class ComplianceReportViewerComponent implements OnInit, AfterViewInit, O
this.pageable = $event;
}

getMenuHeight() {
return 100 - ((150 / this.viewportHeight) * 100) + 'vh';
}

ngOnDestroy(): void {
this.reportsService.loadReport(null);
this.destroy$.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="card bg-light border-0 m-0">
<div class="d-flex p-2 m-1 justify-content-between align-items-center">
<h5 class="card-title mb-0 text-uppercase label-header d-flex align-items-center">
Compliance assesment
Compliance assessment
</h5>
<app-utm-search-input (searchFor)="onSearch($event)"
[searching]="loading"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 class="standard-prev text-center mb-4">
<div class="compliance d-print-block border rounded p-4">

<div class="compliance-header mb-3">
<h4 class="text-dark">{{ report.associatedDashboard.name }}</h4>
<h4 class="text-dark">{{ report.configReportName ? report.configReportName : report.associatedDashboard.name }}</h4>
<h6 class="text-muted">{{ report.associatedDashboard.description }}</h6>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
<app-utm-collapsible-text class="font-size-base" [maxLength]="200" [text]="report.configSolution"></app-utm-collapsible-text>
</div>

<ng-container *ngIf="report.status === 'non_complaint'">
<div class="alert-details w-100 d-flex justify-content-start align-items-center mt-3">
<span class="text-blue-800 font-weight-light mr-2">Compliance remediation:</span>
</div>

<div class="alert-details w-100 d-flex justify-content-start align-items-center mb-2">
<app-utm-collapsible-text class="font-size-base" [maxLength]="200" [text]="report.configRemediation"></app-utm-collapsible-text>
</div>
</ng-container>

<div *ngIf="compliance.rows.length > 0" class="alert-details w-100 d-flex justify-content-start align-items-center mb-2 mt-3">
<span class="text-blue-800 font-weight-light mr-2">Evidence:</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,9 @@ export class ComplianceResultViewComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.destroy$),
filter(params => !!params),
tap(() => this.loadingVisualizations = true),
map(params => ({
...params,
template: params.template.id
})))
)
.subscribe(params => {
this.initializeReportParams(params);
this.loadReport(params);
});

this.timeFilterBehavior.$time
Expand All @@ -116,7 +113,19 @@ export class ComplianceResultViewComponent implements OnInit, OnDestroy {
});
}

initializeReportParams(params) {
loadReport(params: any) {
this.reportId = params.template.id;
this.standardId = params[ComplianceParamsEnum.STANDARD_ID];
this.sectionId = params[ComplianceParamsEnum.SECTION_ID];

this.report = params.template;
this.dashboardId = this.report.dashboardId;
this.visualizationRender = this.report.dashboard;
this.loadingVisualizations = false;

}

initializeReportParams(params: any) {
this.reportId = params[ComplianceParamsEnum.TEMPLATE];
this.standardId = params[ComplianceParamsEnum.STANDARD_ID];
this.sectionId = params[ComplianceParamsEnum.SECTION_ID];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@
</div>

<div class="form-group">
<label for="reportDesc">Solution ({{ 2000 - solution.length }})</label>
<label for="reportDesc">Solution ({{ 2000 - complianceForm.get('solution').value.length }})</label>
<textarea formControlName="solution" class="form-control" id="reportDesc" rows="4" maxlength="2000"></textarea>
</div>

<div class="form-group">
<label for="reportDesc">Remediation ({{ 2000 - complianceForm.get('remediation').value.length }})</label>
<textarea formControlName="remediation" class="form-control" id="reportRemediation" rows="4" maxlength="2000"></textarea>
</div>
</form>
</div>
<div *ngIf="step===2" class="configure-step mt-3 mb-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {CpReportBehavior} from '../../behavior/cp-report.behavior';
import {ComplianceTypeEnum} from '../../enums/compliance-type.enum';
import {CpReportsService} from '../../services/cp-reports.service';
import {ComplianceReportType} from '../../type/compliance-report.type';
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {FormBuilder, FormGroup, Validators} from '@angular/forms';

@Component({
selector: 'app-utm-compliance-create',
Expand Down Expand Up @@ -44,7 +44,8 @@ export class UtmComplianceCreateComponent implements OnInit {
this.complianceForm = this.fb.group({
reportName: [this.report ? this.report.configReportName : '' ,
[Validators.required, Validators.minLength(10), Validators.maxLength(200)]],
solution: [this.report ? this.report.configSolution : '', [Validators.maxLength(2000)]]
solution: [this.report ? this.report.configSolution : '', [Validators.maxLength(2000)]],
remediation: [this.report && this.report.configRemediation ? this.report.configRemediation : '', [Validators.maxLength(2000)]]
});

if (this.report) {
Expand Down Expand Up @@ -102,6 +103,7 @@ export class UtmComplianceCreateComponent implements OnInit {
// configReportRequestType: ComplianceRequestTypeEnum.POST,
// configReportResourceUrl: ELASTIC_SEARCH_ENDPOINT,
configSolution: this.complianceForm.controls.solution.value.replace(/\r?\n/g, '<br/>'),
configRemediation: this.complianceForm.controls.remediation.value.replace(/\r?\n/g, '<br/>'),
// requestBodyFilters: this.filters,
// requestParamFilters: REQUEST_PARAMS_FILTER,
configType: ComplianceTypeEnum.TEMPLATE,
Expand Down
Loading
Loading