Skip to content

Commit 2acbb03

Browse files
Update inline documentation
1 parent 7e5fc50 commit 2acbb03

File tree

14 files changed

+549
-16
lines changed

14 files changed

+549
-16
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![](https://github.com/esrlabs/chipmunk/actions/workflows/release_next.yml/badge.svg)](https://github.com/esrlabs/chipmunk/actions/workflows/release_next.yml)
33
[![](https://github.com/esrlabs/chipmunk/actions/workflows/lint_master.yml/badge.svg)](https://github.com/esrlabs/chipmunk/actions/workflows/lint_master.yml)
44

5-
`chipmunk` is one of the fastest desktop applications for viewing log files, with no limitations on file size. 1 GB, 2 GB, 10 GB? `chipmunk` is limited only by your disk space nothing more. With no caching and no unnecessary copying, files of any size open with the same speed. But `chipmunk` goes beyond just working with files: it also allows you to create network connections to collect logs via TCP, UDP, Serial, or from the output of a running command.
5+
`chipmunk` is one of the fastest desktop applications for viewing log files, with no limitations on file size. 1 GB, 2 GB, 10 GB? `chipmunk` is limited only by your disk space - nothing more. With no caching and no unnecessary copying, files of any size open with the same speed. But `chipmunk` goes beyond just working with files: it also allows you to create network connections to collect logs via TCP, UDP, Serial, or from the output of a running command.
66

77
## Automotive and Network Traces
88

@@ -19,7 +19,7 @@ Additionally, `chipmunk` allows you to work with DLT traces both as standalone f
1919
- Serial Port
2020
- Output from a command or program
2121

22-
For each source, you can assign a parser for example, to collect DLT packets over a UDP connection for analysis or to save them as a standalone trace file.
22+
For each source, you can assign a parser - for example, to collect DLT packets over a UDP connection for analysis or to save them as a standalone trace file.
2323

2424
Another key feature is the ability to launch any command or program and collect its output, which can be analyzed in real time as it's generated.
2525

@@ -29,7 +29,7 @@ At its core, `chipmunk` is a log analysis tool. It goes beyond simple search que
2929

3030
![filters_create](./docs/assets/search/filters_create.gif)
3131

32-
The search engine works dynamically results are updated in real time as new data is added. If you're connected to a live data source, your active filters will continuously update the search results as new logs arrive.
32+
The search engine works dynamically - results are updated in real time as new data is added. If you're connected to a live data source, your active filters will continuously update the search results as new logs arrive.
3333

3434
## Metrics, Measurements, and Graphs
3535

@@ -47,6 +47,6 @@ See more details in the [documentation](https://esrlabs.github.io/chipmunk/) abo
4747

4848
## Contributing
4949

50-
We welcome contributions of all kinds bug reports, performance improvements, documentation fixes, or new features.
50+
We welcome contributions of all kinds - bug reports, performance improvements, documentation fixes, or new features.
5151

5252
[Click here to view it](https://esrlabs.github.io/chipmunk/contributing/welcome/)

application/client/src/app/register/services.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
import { v4 } from 'uuid';
22
import { Inputs } from '@platform/entity/service';
33

4+
/**
5+
* Central service registration table for the entire system.
6+
*
7+
* @remarks
8+
* Every service in the application **must** be registered in this table with a unique name and UUID.
9+
* The UUID serves as a persistent identity used by the dependency resolver to manage initialization
10+
* order and inter-service communication.
11+
*
12+
* This registry is **mandatory**: it ensures consistent identification of services across the
13+
* application lifecycle and guarantees correct dependency resolution.
14+
*
15+
* Developers must:
16+
* - Assign a **globally unique UUID** to each service (automatically generated here via `v4()`).
17+
* - Use the same registration entry when applying decorators like `@SetupService(...)` or `@DependOn(...)`.
18+
*
19+
* @example Dependency declaration
20+
* ```ts
21+
* @DependOn(api) // Ensures `MyNewService` is initialized after the `api` service
22+
* @SetupService(services['my_new_service'])
23+
* class MyNewService { ... }
24+
* ```
25+
*
26+
* @warning
27+
* Avoid reusing UUIDs or manually copying them between services.
28+
* UUIDs should remain stable for the life of the service type.
29+
*
30+
* @constant
31+
* @public
32+
*/
433
export const services: { [key: string]: Inputs } = {
534
system: {
635
name: 'System',

application/client/src/app/schema/content/row.ts

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,57 @@ import { Nature } from '@platform/types/content';
44
import { EAlias } from '@service/session/dependencies/search/highlights/modifier';
55
import { GrabbedElement } from '@platform/types/bindings/miscellaneous';
66

7+
/**
8+
* Declares the visual "owner" or container context in which a `Row` is rendered.
9+
*
10+
* @remarks
11+
* The `Owner` enum is used to distinguish between multiple visual log consumers,
12+
* such as the main output, search results, bookmarks, charts, and others.
13+
*
14+
* The concept of an "owner" is introduced to resolve event loop issues in UI logic:
15+
* for instance, a click on a log row in the main output window should not trigger
16+
* reactions within that same window. Instead, other views (like search results)
17+
* can react to such events and adjust their own state accordingly.
18+
*
19+
* This enables synchronized behavior between components while avoiding unintended recursive updates.
20+
*
21+
* @enum {string}
22+
* @public
23+
*/
724
export enum Owner {
25+
/**
26+
* Main log output window.
27+
*/
828
Output = 'Output',
29+
30+
/**
31+
* Search results view.
32+
*/
933
Search = 'Search',
34+
35+
/**
36+
* Bookmark view containing marked rows.
37+
*/
1038
Bookmark = 'Bookmark',
39+
40+
/**
41+
* Charting window or graph view.
42+
*/
1143
Chart = 'Chart',
44+
45+
/**
46+
* Attachment container (e.g., linked file or artifact).
47+
*/
1248
Attachment = 'Attachment',
49+
50+
/**
51+
* Comment container (e.g., user-annotated row or discussion thread).
52+
*/
1353
Comment = 'Comment',
54+
55+
/**
56+
* Result of a nested search operation.
57+
*/
1458
NestedSearch = 'NestedSearch',
1559
}
1660

@@ -39,26 +83,117 @@ export interface IRow {
3983
seporator: boolean;
4084
}
4185

86+
/**
87+
* Represents a single log entry (row) received from the backend and processed for rendering.
88+
*
89+
* @remarks
90+
* Every log line from the backend is transformed into an instance of `Row`.
91+
* This class acts as the fundamental unit for log rendering, encapsulating all required
92+
* metadata and visual formatting attributes. It includes a reference to the owning session,
93+
* original content, display state, highlighting, coloring, column values, and more.
94+
*
95+
* The renderer operates exclusively on instances of this class.
96+
*
97+
* @extends Subscriber
98+
*
99+
* @public
100+
*/
42101
export class Row extends Subscriber {
102+
/**
103+
* Removes special marker symbols (e.g., control characters) from the given string.
104+
*
105+
* @param str - A string potentially containing marker symbols.
106+
* @returns A string without marker symbols.
107+
*/
43108
static removeMarkerSymbols(str: string): string {
44109
return str.replaceAll(/\u0004/gi, '').replaceAll(/\u0005/gi, '');
45110
}
111+
112+
/**
113+
* Original raw log content.
114+
*/
46115
public content: string;
116+
117+
/**
118+
* Absolute position of the row within the session's data stream.
119+
*/
47120
public position: number;
121+
122+
/**
123+
* Identifies the visual container (e.g., output, search, chart) responsible for rendering this row.
124+
*/
48125
public owner: Owner;
126+
127+
/**
128+
* Numeric ID of the log source (e.g., channel, stream, or plugin source).
129+
*/
49130
public source: number;
131+
132+
/**
133+
* The session to which this row belongs.
134+
*/
50135
public session: Session;
136+
137+
/**
138+
* Indicates whether the row's content was cropped during parsing or rendering.
139+
*/
51140
public cropped: boolean;
141+
142+
/**
143+
* Emits when the row's rendering state is updated (e.g., bookmarked, highlighted).
144+
* Note: content mutations are not supported and do not trigger this event.
145+
*/
52146
public change: Subject<void> = new Subject();
147+
148+
/**
149+
* Parsed and HTML-ready version of the row content, used for direct insertion into DOM.
150+
*/
53151
public html!: string;
152+
153+
/**
154+
* Optional text color assigned to this row.
155+
*/
54156
public color: string | undefined;
157+
158+
/**
159+
* Optional background color assigned to this row.
160+
*/
55161
public background: string | undefined;
162+
163+
/**
164+
* Optional columnar view of the row, if the session content supports tabular formatting.
165+
*/
56166
public columns: string[] = [];
167+
168+
/**
169+
* Describes the nature or classification of the row:
170+
* e.g., search result, bookmark, or breadcrumb (non-matching row in mixed search output).
171+
*/
57172
public nature: Nature;
173+
174+
/**
175+
* When `true`, the row is rendered as a visual separator instead of a content line.
176+
* Used primarily in breadcrumb display modes.
177+
*/
58178
public seporator: boolean = false;
179+
180+
/**
181+
* Flags indicating various match states of the row in relation to active search or filters.
182+
*/
59183
public matches: {
184+
/**
185+
* `true` if the row matches the current active search query.
186+
*/
60187
active: boolean;
188+
189+
/**
190+
* `true` if the row matches current non-search filters.
191+
*/
61192
filter: boolean;
193+
194+
/**
195+
* `true` if the row matches filters relevant to chart or metrics views.
196+
*/
62197
chart: boolean;
63198
} = {
64199
active: false,

0 commit comments

Comments
 (0)