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
16 changes: 11 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# UTMStack 10.7.1 Release Notes

### Bug Fixes
- Fixed responsive text alignment for action buttons in Log Explorer to enhance visual consistency.
-- Fixed responsive text alignment for action buttons in Log Explorer to enhance visual consistency.
-- Fixed issues with loading data from saved queries in Log Explorer, ensuring the correct filter values are applied.
-- Fixed issue where tabs remained open when navigating outside the Log Explorer scope to improve user experience.
-- Fixed time filter issue where the date range was not applied correctly.
-- Fixed incorrect query behavior when filtering incidents by ID.


## New Features and Improvements
- Added organization name in app settings to distinguish alert and notification emails for better clarity.
- Enhanced the email notification system by including the organization name to improve recipient identification.
- Introduced new compliance reports aligned with the PCI DSS standard to expand auditing capabilities.
- Resolves issues with malformed queries when filtering incidents by id.
-- Added organization name in app settings to distinguish alert and notification emails for better clarity.
-- Enhanced the email notification system by including the organization name to improve recipient identification.
-- Introduced new compliance reports aligned with the PCI DSS standard to expand auditing capabilities.
-- Added new menu item **New Dashboard**.
-- Added new menu item **New Visualization**.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public MailConfig getMailConfigFromParameters(List<UtmConfigurationParameter> pa
mailConfig.setUsername(getParamValue(parameters, Constants.PROP_MAIL_USERNAME));
mailConfig.setPassword(getParamValue(parameters, Constants.PROP_MAIL_PASSWORD));
mailConfig.setAuthType(getParamValue(parameters, Constants.PROP_MAIL_SMTP_AUTH));
mailConfig.setFrom(String.valueOf(new InternetAddress(Constants.CFG.get(Constants.PROP_MAIL_FROM), getParamValue(parameters, Constants.PROP_MAIL_ORGNAME))));
mailConfig.setFrom(String.valueOf(new InternetAddress(getParamValue(parameters, Constants.PROP_MAIL_FROM), getParamValue(parameters, Constants.PROP_MAIL_ORGNAME))));
mailConfig.setPort(Integer.parseInt(getParamValue(parameters, Constants.PROP_MAIL_PORT)));

return mailConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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="20250319001" author="Manuel">
<changeSet id="20250319002" author="Manuel">
<sql>
<![CDATA[
INSERT INTO utm_configuration_parameter (id, section_id, conf_param_short, conf_param_large, conf_param_description, conf_param_value, conf_param_required, conf_param_datatype, modification_time, modification_user, conf_param_option, conf_param_regexp)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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="20250325001" author="Manuel">
<sql>
<![CDATA[

INSERT INTO utm_menu (id, name, url, parent_id, type, dashboard_id, position, menu_active, menu_action, menu_icon, module_name_short)
VALUES (118, 'New Dashboard', '/creator/dashboard/builder', 100, 1, null, 2, true, true, null, null);

INSERT INTO utm_menu (id, name, url, parent_id, type, dashboard_id, position, menu_active, menu_action, menu_icon, module_name_short)
VALUES (119, 'New Visualization', '/creator/visualization/list?onInitAction=showCreateModal', 100, 1, null, 3, true, true, null, null);


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

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

]]>
</sql>
</changeSet>

</databaseChangeLog>
4 changes: 3 additions & 1 deletion backend/src/main/resources/config/liquibase/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@

<include file="/config/liquibase/changelog/20250303001_udpate_sophos_guide.xml" relativeToChangelogFile="false"/>

<include file="/config/liquibase/changelog/20250319001_add_organization_field_config_params.xml" relativeToChangelogFile="false"/>
<include file="/config/liquibase/changelog/20250319002_add_organization_field_config_params.xml" relativeToChangelogFile="false"/>

<include file="/config/liquibase/changelog/20250319001_add_compliance_report.xml" relativeToChangelogFile="false"/>

<include file="/config/liquibase/changelog/20250325001_add_create_dashboard_visualization_menu.xml" relativeToChangelogFile="false"/>

</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import {TabService} from '../../shared/services/tab.service';
import {LogAnalyzerQueryType} from '../../shared/type/log-analyzer-query.type';
import {TabType} from '../../shared/type/tab.type';
import {LogAnalyzerViewComponent} from '../log-analyzer-view/log-analyzer-view.component';
import {
ElasticFilterDefaultTime
} from "../../../shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component";

@Component({
selector: 'app-log-analyzer-tabs',
Expand All @@ -32,23 +35,6 @@ export class LogAnalyzerTabsComponent implements OnInit, OnDestroy {
private indexPatternBehavior: IndexPatternBehavior
) {}

/*ngOnInit() {
this.activatedRoute.queryParams.subscribe(params => {
this.queryId = params.queryId;
const tabName = params.active || null;
if (this.queryId) {
this.logAnalyzerQueryService.find(this.queryId).subscribe(vis => {
this.query = vis.body;
this.addNewTab(this.query.name, this.query, params);
});
} else {
if (tabName) {
this.tabService.deleteActiveTab();
}
this.addNewTab();
}
});*/

ngOnInit(): void {
this.activatedRoute.queryParams
.pipe(takeUntil(this.destroy$))
Expand Down Expand Up @@ -103,15 +89,31 @@ export class LogAnalyzerTabsComponent implements OnInit, OnDestroy {
new UtmIndexPattern(1, 'log-*', true);

this.tabService.addTab(
new TabType(LogAnalyzerViewComponent, (tabName ? tabName : 'New query ' + this.tabNumber),
query ? query : {pattern}, true, null, uuid)
new TabType(
LogAnalyzerViewComponent,
(tabName ? tabName : 'New query ' + this.tabNumber),
query ? query : {pattern},
true,
null,
uuid,
this.getDefaultTime(query))
);

if (tabName && pattern) {
this.indexPatternBehavior.changePattern({pattern, tabUUID: uuid});
}
}

getDefaultTime(query: LogAnalyzerQueryType): ElasticFilterDefaultTime {
if (query) {
const timestampFilter = query.filtersType.find(f => f.field === '@timestamp');
return timestampFilter ? new ElasticFilterDefaultTime(timestampFilter.value[0], timestampFilter.value[1]) :
new ElasticFilterDefaultTime('now-24h', 'now');
} else {
return new ElasticFilterDefaultTime('now-24h', 'now');
}
}

removeTab(index: number): void {
this.tabService.removeTab(index);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
(onSaveQuery)="saveQuery()"
[filters]="filters"
[template]="'log-explorer'"
*ngIf="defaultTime && pattern;else loadingPattern"
*ngIf="defaultTime && pattern; else loadingPattern"
[pattern]="pattern.pattern"
[defaultTime]="defaultTime"
class="flex-grow-1"></app-utm-elastic-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ app-log-analyzer-field {
}

.search-container {
flex-basis: 65%;
flex-basis: 50%;
}

@media screen and (min-width: 1550px) and (max-width: 1599px) {
.search-container {
flex-basis: 55%;
}
}

@media screen and (min-width: 1600px) {
.search-container {
flex-basis: 65%;
}
}

.btn-refresh {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {LogAnalyzerQueryType} from '../../shared/type/log-analyzer-query.type';
export class LogAnalyzerViewComponent implements OnInit, OnDestroy {
@Input() data: LogAnalyzerQueryType;
@Input() uuid: string;
@Input() defaultTime: ElasticFilterDefaultTime = new ElasticFilterDefaultTime('now-24h', 'now');
fields: UtmFieldType[] = [];
rows: any[] = [];
page = 1;
Expand Down Expand Up @@ -79,7 +80,6 @@ export class LogAnalyzerViewComponent implements OnInit, OnDestroy {
private sortBy = NatureDataPrefixEnum.TIMESTAMP + ',' + 'desc';
patterns: UtmIndexPattern[];
paramLoaded = false;
defaultTime: ElasticFilterDefaultTime = new ElasticFilterDefaultTime('now-24h', 'now');
dateFormat$: Observable<DatePipeDefaultOptions>;
destroy$ = new Subject<void>();
filterWidth: number;
Expand All @@ -96,8 +96,7 @@ export class LogAnalyzerViewComponent implements OnInit, OnDestroy {
private elasticDataExportService: ElasticDataExportService,
private timezoneFormatService: TimezoneFormatService,
private logFilterBehavior: LogFilterBehavior,
private router: Router,
private tabService: TabService) {
private router: Router) {

this.detailWidth = (this.pageWidth - 310);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
import {HttpResponse} from '@angular/common/http';
import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {Component, OnDestroy, OnInit} from '@angular/core';
import {NavigationStart, Router} from '@angular/router';
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {Subject} from 'rxjs';
import {filter, takeUntil, tap} from 'rxjs/operators';
import {ITEMS_PER_PAGE} from '../../../shared/constants/pagination.constants';
import {SortEvent} from '../../../shared/directives/sortable/type/sort-event';
import {SortByType} from '../../../shared/types/sort-by.type';
import {LogAnalyzerQueryService} from '../../shared/services/log-analyzer-query.service';
import {TabService} from '../../shared/services/tab.service';
import {LogAnalyzerQueryType} from '../../shared/type/log-analyzer-query.type';
import {LogAnalyzerQueryDeleteComponent} from '../log-analyzer-query-delete/log-analyzer-query-delete.component';
import {query} from "@angular/animations";
import {data} from "../../../active-directory/offline.data";

@Component({
selector: 'app-log-analyzer-query-list',
templateUrl: './log-analyzer-query-list.component.html',
styleUrls: ['./log-analyzer-query-list.component.scss']
})
export class LogAnalyzerQueryListComponent implements OnInit {
export class LogAnalyzerQueryListComponent implements OnInit, OnDestroy {
fields: SortByType[] = [
{
fieldName: 'Name',
Expand All @@ -34,10 +39,12 @@ export class LogAnalyzerQueryListComponent implements OnInit {
query: LogAnalyzerQueryType;
private requestParams: any;
private sortBy: SortEvent;
destroy$ = new Subject<void>();

constructor(private logAnalyzerQueryService: LogAnalyzerQueryService,
private router: Router,
private modalService: NgbModal) {
private modalService: NgbModal,
private tabService: TabService) {
}

ngOnInit() {
Expand All @@ -47,6 +54,16 @@ export class LogAnalyzerQueryListComponent implements OnInit {
sort: this.sortBy,
};
this.getQueryList();

this.router.events.pipe(
filter(event => event instanceof NavigationStart),
tap((event: NavigationStart) => {
if (event.url !== '/discover/log-analyzer-queries' && !event.url.includes('/discover/log-analyzer')) {
this.tabService.closeAllTabs();
}
}),
takeUntil(this.destroy$)
).subscribe();
}

onSearchQuery($event: string) {
Expand All @@ -65,7 +82,7 @@ export class LogAnalyzerQueryListComponent implements OnInit {
queryId: query.id,
queryName: query.name.toLowerCase().replace(' ', '_'),
patternId: query.pattern.id,
indexPattern: query.pattern.pattern
indexPattern: query.pattern.pattern,
}
});
}
Expand Down Expand Up @@ -98,4 +115,9 @@ export class LogAnalyzerQueryListComponent implements OnInit {

private onError(body: any) {
}

ngOnDestroy(): void {
this.destroy$.next();
this.destroy$.complete();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ export class TabContentComponent implements OnInit {
const componentRef = this.contentContainer.viewContainerRef.createComponent(componentFactory);
(componentRef.instance as SkeletonInterface).data = tab.tabData;
(componentRef.instance as SkeletonInterface).uuid = tab.uuid;
(componentRef.instance as SkeletonInterface).defaultTime = tab.defaultTime;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {
ElasticFilterDefaultTime
} from '../../../shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component';

export interface SkeletonInterface {
data: any;
uuid: string;
defaultTime: ElasticFilterDefaultTime;
}
7 changes: 6 additions & 1 deletion frontend/src/app/log-analyzer/shared/type/tab.type.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import {Type} from '@angular/core';
import {LogAnalyzerQueryType} from './log-analyzer-query.type';
import {
ElasticFilterDefaultTime
} from "../../../shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component";

export class TabType {
public id?: number;
Expand All @@ -8,14 +11,16 @@ export class TabType {
public active: boolean;
public component: Type<any>;
public uuid?: string;
public defaultTime?: ElasticFilterDefaultTime;

constructor(component: Type<any>, title: string, tabData: any, active: boolean, id?: number,
uuid?: string) {
uuid?: string, defaultTime?: ElasticFilterDefaultTime) {
this.id = id;
this.tabData = tabData;
this.component = component;
this.title = title;
this.active = active;
this.uuid = uuid;
this.defaultTime = defaultTime;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<div class="input-group">
<input #timeFromRange="ngModel" #ttf="ngbDatepicker"
[(ngModel)]="rangeTimeFrom"
[maxDate]="maxDateFrom"
[minDate]="maxDateFrom"
class="form-control " id="timeFrom"
name="d2"
ngbDatepicker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export class ElasticFilterTimeComponent implements OnInit, OnChanges, OnDestroy

constructor(public activeModal: NgbActiveModal,
private timeFilterBehavior: TimeFilterBehavior) {
this.maxDateFrom = this.maxDate;
this.maxDateTo = this.maxDate;
/*this.maxDateFrom = this.maxDate;
this.maxDateTo = this.maxDate;*/
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
<div *ngIf="agent && agent.status === 'OFFLINE'" class="alert alert-info alert-styled-right mt-3 info-dismissible">
<span class="font-weight-semibold">Info! </span>
<span>Offline agent, data based on the last sync.</span>
<span>The agent is offline. Data shown is from the last successful sync.</span>
</div>
<app-utm-agent-console *ngIf="agent && connectToAgent" [websocketCommand]="websocketCommand"
(close)="connectToAgent = false"
Expand Down
Loading