Skip to content

Commit 3646987

Browse files
authored
Merge pull request #1066 from utmstack/bugfix/10.6.1/improve-log-explorer-ui
Bugfix/10.6.1/improve log explorer UI
2 parents f248ae2 + 8e5142c commit 3646987

File tree

13 files changed

+136
-105
lines changed

13 files changed

+136
-105
lines changed

CHANGELOG.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
# UTMStack 10.6.1 Release Notes
1+
# UTMStack 10.6.2 Release Notes
22
## Bug Fixes
3-
- Fixed ISM policy to ensure snapshots include only indices older than 24 hours.
4-
5-
## Features
6-
- Additional Compliance Reports.
7-
- Updated Sophos Central Integration Guide: The guide was updated due to significant changes in Sophos’s API authentication process.
8-
9-
- Important Notice: Sophos Integration Update
10-
Sophos recently implemented a major change in how their APIs handle authentication for log retrieval. As a result, upgrading to UTMStack 10.6.1 will require reconfiguring the Sophos credentials to ensure continued functionality.
3+
- Enhanced the Log Explorer UI to improve usability by refining the display of Refresh, Save Query, Load Query, and Add Filter actions for a more intuitive user experience..
114

5+
- Updating installer to address missing GeoIP index
126

7+
- Retag docker images to github registry

correlation/system

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 58317e8e2665c7fc7609b7756870ae6f5d60f9aa

frontend/src/app/log-analyzer/explorer/log-analyzer-view/log-analyzer-view.component.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
1-
<div class="px-3 w-100 m-0 d-flex align-items-center justify-content-between">
2-
<div style="border-left: 1px #dee2e6 solid" class="d-flex p-2 bg-white w-100">
3-
<div class="d-flex align-items-center justify-content-start mr-1">
1+
<div class="px-3 w-100 m-0 d-flex">
2+
<div style="border-left: 1px #dee2e6 solid" class="d-flex flex-grow-1 p-2 bg-white gap-2">
3+
<div class="d-flex align-items-center justify-content-start">
44
<app-index-pattern-select
55
(indexPatternChange)="changeFields($event)"
66
[template]="'log-explorer'"
77
[pattern]="pattern">
88
</app-index-pattern-select>
99
</div>
10-
<div class="d-flex search-container flex-grow-1 mx-2 align-items-center">
10+
<div class="d-flex search-container flex-grow-5 align-items-center gap-1">
1111
<app-utm-search-input
1212
(searchFor)="onSearchInAll($event)"
1313
[placeholder]="'Search in ' + (pattern ? pattern.pattern : '...')"
1414
class="w-100">
1515
</app-utm-search-input>
16+
<button (click)="getData()" class="btn btn-primary btn-refresh" [ngbTooltip]="'Refresh'">
17+
<i class="icon-reload-alt"></i>
18+
</button>
1619
</div>
17-
<div class="log-analyzer-actions d-flex justify-content-end align-items-center flex-wrap ml-5">
18-
<div class="actions-log span-small-icon">
19-
<button (click)="getData()" class="btn btn-sm utm-button utm-button-primary mr-2 mb-1">
20-
<i class="icon-reload-alt"></i>&nbsp;Refresh data
20+
<div class="log-analyzer-actions d-flex flex-grow-1 justify-content-between align-items-center gap-2">
21+
<div class="d-flex justify-content-center gap-1 flex-grow-1">
22+
<button (click)="saveQuery()" [ngbTooltip]="'Save query'" class="btn utm-button utm-button-primary">
23+
<i class="icon-floppy-disk"></i>&nbsp;Save query
2124
</button>
22-
<!--<button (click)="saveQuery()" class="btn btn-sm utm-button utm-button-primary mr-2 mb-1">
23-
<i class="icon-floppy-disk"></i>&nbsp;Save
24-
</button>-->
25+
<button (click)="loadQuery()" [ngbTooltip]="'Load query'" class="btn utm-button utm-button-primary">
26+
<i class="icon-zoomin3"></i>&nbsp;Load query
27+
</button>
28+
</div>
29+
30+
<div class="d-flex justify-content-start">
2531
<button (click)="exportToCsv()"
2632
[disabled]="(fields && fields.length === 0) || !rows || csvExport"
27-
class="btn btn-sm utm-button utm-button-primary mb-1">
28-
<i [ngClass]="csvExport ? 'icon-download10' : 'icon-table2'" class="mr-1"></i>
33+
class="btn utm-button utm-button-primary">
34+
<i [ngClass]="csvExport ? 'icon-download10' : 'icon-table2'"></i>
2935
{{csvExport ? 'Generating...' : 'Export to CSV'}}
3036
</button>
3137
</div>
3238
</div>
33-
3439
</div>
3540
</div>
3641

frontend/src/app/log-analyzer/explorer/log-analyzer-view/log-analyzer-view.component.scss

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,21 @@ app-log-analyzer-field {
1212
}
1313

1414
.search-container {
15-
max-width: 60%;
16-
min-width: 40%;
17-
width: 100%;
15+
flex-basis: 65%;
16+
}
17+
18+
.btn-refresh {
19+
background-color: #d3dae696;
20+
color: #0277bd;
21+
height: 36px !important;
22+
border: 1px solid #d3dae696;
23+
}
24+
25+
.gap-1 {
26+
gap: .25rem;
27+
}
28+
29+
.gap-2 {
30+
gap: .5rem;
1831
}
1932

frontend/src/app/log-analyzer/explorer/log-analyzer-view/log-analyzer-view.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ export class LogAnalyzerViewComponent implements OnInit, OnDestroy {
381381
this.setInitialWidth();
382382
}
383383

384+
loadQuery() {
385+
this.router.navigate(['/discover/log-analyzer-queries']);
386+
}
387+
384388
ngOnDestroy(): void {
385389
this.filters = [];
386390
this.utmFilterBehavior.$filterChange.next(null);

frontend/src/app/shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
[container]="container?container:''"
2727
[ngbPopover]="popContent"
2828
autoClose="outside"
29-
class="d-flex justify-content-start align-items-center cursor-pointer pr-2 border-grey-100 border-1 border-radius-1"
29+
class="d-flex justify-content-start align-items-center cursor-pointer pr-2 border-grey-100 border-1 border-radius-1 flex-grow-1"
3030
placement="bottom-right"
3131
popoverClass="utm-popover-filter-time" style="white-space: nowrap">
3232
<span [ngClass]="invertContent?'ml-2':' p-2 mr-2 border-left-1 '"
3333
class="setting-filter cursor-pointer text-blue-800 border-grey-100 background-color-grey-100">
34-
<i class="icon-calendar52"></i>
35-
<i [ngClass]="popover.isOpen()?'icon-arrow-right32':'icon-arrow-down32'" class="ml-2"></i>
34+
<i class="icon-calendar52"></i>
35+
<i [ngClass]="popover.isOpen()?'icon-arrow-right32':'icon-arrow-down32'" class="ml-2"></i>
3636
</span>
3737
<div *ngIf="dateFrom && dateTo"
38-
class="d-flex justify-content-between align-items-center span-small-icon">
38+
class="d-flex justify-content-center flex-grow-1 span-small-icon">
3939
<span class="font-weight-semibold">{{dateFrom}}</span>
4040
<i class="icon-arrow-right8 mr-2 ml-2 mt-1"></i>
4141
<span class="font-weight-semibold">{{dateTo}}</span>

frontend/src/app/shared/components/utm/filters/utm-elastic-filter/elastic-filter.component.html

Lines changed: 28 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -63,55 +63,37 @@
6363
</ng-container>
6464

6565
<ng-container *ngIf="template === 'log-explorer'">
66-
<div class="d-flex px-3 m-0 align-items-stretch">
66+
<div class="flex-row mx-3 m-0 card">
6767
<!-- Main Filters Section -->
68-
<div class="flex-grow-1">
69-
<div class="card w-100 d-flex justify-content-start align-items-center flex-row m-0 p-2">
68+
<div class="filters-container">
69+
<div class="w-100 d-flex justify-content-start align-items-center flex-row m-0">
7070
<!-- Query Menu and Add Filter Buttons -->
71-
<div class="d-flex align-items-center justify-content-start mr-2 pl-2">
71+
<div class="d-flex align-items-center justify-content-start mr-2 pl-3">
7272
<div class="order-buttons-container">
7373
<button
74+
(click)="resetFilters()"
7475
type="button"
75-
class="order-button btn-left"
76-
[ngbTooltip]="'Query menu'"
77-
#popoverQuery="ngbPopover"
78-
[ngbPopover]="queryContent"
79-
ngbTooltip="Add filter"
76+
class="order-button"
77+
[ngbTooltip]="'Clear filters'"
8078
autoClose="true"
81-
placement="bottom-left"
82-
popoverClass="utm-popover-bottom">
79+
placement="bottom-left">
8380
<i class="icon-filter3 font-size-sm"></i>
8481
</button>
85-
<button
86-
type="button"
87-
class="order-button btn-right"
88-
[ngbTooltip]="'Add filter'"
89-
#popoverFilter="ngbPopover"
90-
(click)="resetFilterSelection()"
91-
[ngbPopover]="addContent"
92-
[popoverTitle]="addTitle"
93-
ngbTooltip="Add filter"
94-
autoClose="outside"
95-
placement="bottom-left"
96-
popoverClass="utm-popover-bottom">
97-
<i class="icon-plus-circle2 font-size-sm"></i>
98-
</button>
9982
</div>
10083
</div>
10184

10285
<!-- Filters List -->
103-
<div class="filters d-flex justify-content-start align-items-center flex-wrap">
86+
<div class="filters d-flex justify-content-start align-items-center flex-wrap gap-1 py-1">
10487
<div *ngFor="let filter of resolveFilters(); let index = index"
105-
class="dropdown cursor-pointer d-flex justify-content-center align-items-center border-1 mr-2 p-1 border-grey-100 border-radius-1"
88+
class="dropdown cursor-pointer d-flex justify-content-center align-items-center border-1 p-1 border-grey-100 border-radius-1"
10689
#popoverField="ngbPopover"
10790
(click)="selectFilter(filter, index)"
10891
[ngbPopover]="filter.field !== '@timestamp' ? popField : null"
10992
autoClose="true"
11093
placement="bottom"
11194
popoverClass="utm-popover-bottom">
11295
<div class="filter-label">
113-
<span
114-
class="text-center pt-1 pb-1 m-1"
96+
<span class="text-center m-1"
11597
[innerHTML]="getFilterLabel(filter)"
11698
[ngClass]="filter.operator.toLocaleLowerCase().includes('not')
11799
? 'border-danger-800 text-danger-800'
@@ -129,13 +111,27 @@
129111
</i>
130112
</span>
131113
</div>
114+
<div class="cursor-pointer d-flex justify-content-center align-items-center mr-2 p-1">
115+
<span class="btn-right py-1 m-1 border-radius-1 text-blue-800"
116+
[ngbTooltip]="'Add filter'"
117+
#popoverFilter="ngbPopover"
118+
[ngbPopover]="addContent"
119+
[popoverTitle]="addTitle"
120+
ngbTooltip="Add filter"
121+
autoClose="outside"
122+
placement="bottom-left"
123+
popoverClass="utm-popover-bottom">
124+
<i class="icon-plus-circle2 font-size-sm mr-2"></i>
125+
<span> Add filter</span>
126+
</span>
127+
</div>
132128
</div>
133129
</div>
134130
</div>
135131

136132
<!-- Time Filter Section -->
137-
<div class="filter-time-container d-flex">
138-
<div class="card px-2 pt-1 m-0 w-100">
133+
<div class="d-flex flex-column justify-content-center flex-grow-1 filter-time-container px-2">
134+
139135
<app-elastic-filter-time
140136
[template]="'log-explorer'"
141137
[changeOnInit]="'NO'"
@@ -144,7 +140,7 @@
144140
[invertContent]="false"
145141
(timeFilterChange)="onTimeFilterChange($event)">
146142
</app-elastic-filter-time>
147-
</div>
143+
148144
</div>
149145
</div>
150146
</ng-container>
@@ -191,39 +187,6 @@ <h6 class="font-weight-light m-0">
191187
</div>
192188
</ng-template>
193189

194-
<ng-template #queryContent>
195-
<div class="context-menu">
196-
<!-- Add Filter Item -->
197-
<div (click)="openFilterPopover()" class="d-flex justify-content-start align-items-center custom-list-item">
198-
<i class="icon-plus3 font-size-sm pt-1"></i>
199-
<span class="ml-2">Add filter</span>
200-
</div>
201-
202-
<!-- Clear All Item -->
203-
<div (click)="resetFilters()" class="d-flex justify-content-start align-items-center custom-list-item">
204-
<i class="icon-cross2 font-size-sm pt-1"></i>
205-
<span class="ml-2">Clear all</span>
206-
</div>
207-
208-
<!-- Divider -->
209-
<hr class="context-menu-divider">
210-
211-
<!-- Load Query Item -->
212-
<div routerLink="/discover/log-analyzer-queries" class="d-flex justify-content-start align-items-center custom-list-item">
213-
<i class="icon-reload-alt font-size-sm"></i>
214-
<span class="ml-2">Load query</span>
215-
<!--<i class="icon-arrow-right32 font-size-sm ml-auto pt-1"></i>-->
216-
</div>
217-
218-
<!-- Save Query Item -->
219-
<div (click)="saveQuery()" class="d-flex justify-content-start align-items-center custom-list-item">
220-
<i class="icon-floppy-disk font-size-sm"></i>
221-
<span class="ml-2">Save query</span>
222-
<!--<i class="icon-arrow-right32 font-size-sm ml-auto pt-1"></i>-->
223-
</div>
224-
</div>
225-
</ng-template>
226-
227190
<!--Field popup-->
228191
<ng-template #popField>
229192
<div (click)="popoverFilter.open();editMode=true" class="dropdown-item text-blue-800">

frontend/src/app/shared/components/utm/filters/utm-elastic-filter/elastic-filter.component.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212

1313
.filter-time-container {
14-
min-width: 300px;
14+
border-left: 1px solid #ddd;
1515
}
1616

1717
app-elastic-filter-add {
@@ -48,7 +48,7 @@ app-elastic-filter-add {
4848
color: #0277bd;
4949
}
5050

51-
.order-button:hover {
51+
.order-button:hover:not(.btn-right) {
5252
background-color: #d3dae6;
5353
}
5454

@@ -63,8 +63,10 @@ app-elastic-filter-add {
6363
}
6464

6565
.btn-right {
66-
border-top-left-radius: 0;
67-
border-bottom-left-radius: 0;
66+
border: 1px dashed #d3dae6;
67+
background-color: transparent;
68+
width: auto;
69+
padding: .25rem .5rem;
6870
}
6971

7072
.context-menu {
@@ -100,5 +102,13 @@ app-elastic-filter-add {
100102
margin-left: auto;
101103
}
102104

105+
.filters-container {
106+
flex-basis: 85%;
107+
}
108+
109+
.gap-1 {
110+
gap: .25rem;
111+
}
112+
103113

104114

installer/cloud.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,13 @@ func Cloud(c *types.Config, update bool) error {
212212
fmt.Println("Initializing User Auditor database [OK]")
213213
}
214214

215-
if utils.GetLock(7, stack.LocksDir) {
215+
indexURL := "http://localhost:9200/.utm-geoip?pretty"
216+
indexExists, err := utils.CheckIndexExists(indexURL)
217+
if err != nil {
218+
return err
219+
}
220+
221+
if !indexExists || utils.GetLock(7, stack.LocksDir) {
216222
fmt.Println("Initializing OpenSearch. This may take a while.")
217223
if err := InitOpenSearch(); err != nil {
218224
return err

installer/master.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,13 @@ func Master(c *types.Config) error {
200200
fmt.Println("Initializing User Auditor database [OK]")
201201
}
202202

203-
if utils.GetLock(7, stack.LocksDir) {
203+
indexURL := "http://localhost:9200/.utm-geoip?pretty"
204+
indexExists, err := utils.CheckIndexExists(indexURL)
205+
if err != nil {
206+
return err
207+
}
208+
209+
if !indexExists || utils.GetLock(7, stack.LocksDir) {
204210
fmt.Println("Initializing OpenSearch. This may take a while.")
205211
if err := InitOpenSearch(); err != nil {
206212
return err

0 commit comments

Comments
 (0)