feat: Logs filtering, and log queue with group concurrency

This commit is contained in:
jamesread 2026-06-16 14:30:39 +01:00
commit d9c8cfb573
3 changed files with 20 additions and 4382 deletions

View File

@ -194,11 +194,27 @@ async function handleConfigChangedEvent (j) {
window.dispatchEvent(j) window.dispatchEvent(j)
} }
const eventCaseToTypeName = {
entityChanged: 'EventEntityChanged',
configChanged: 'EventConfigChanged',
executionFinished: 'EventExecutionFinished',
executionStarted: 'EventExecutionStarted',
outputChunk: 'EventOutputChunk',
heartbeat: 'EventHeartbeat'
}
function handleEvent (msg) { function handleEvent (msg) {
const typeName = msg.event.value.$typeName.replace('olivetin.api.v1.', '') const eventCase = msg?.event?.case
const eventValue = msg?.event?.value
const typeName = eventCaseToTypeName[eventCase]
if (!typeName || !eventValue) {
console.warn('Skipping websocket event with no payload:', msg)
return
}
const j = new Event(typeName) const j = new Event(typeName)
j.payload = msg.event.value j.payload = eventValue
switch (typeName) { switch (typeName) {
case 'EventConfigChanged': case 'EventConfigChanged':

File diff suppressed because it is too large Load Diff

View File

@ -378,6 +378,8 @@ func (api *oliveTinAPI) internalLogEntryToPb(logEntry *executor.InternalLogEntry
Output: logEntry.Output, Output: logEntry.Output,
TimedOut: logEntry.TimedOut, TimedOut: logEntry.TimedOut,
Blocked: logEntry.Blocked, Blocked: logEntry.Blocked,
Queued: logEntry.Queued,
QueuedForGroup: logEntry.QueuedForGroup,
ExitCode: logEntry.ExitCode, ExitCode: logEntry.ExitCode,
Tags: logEntry.Tags, Tags: logEntry.Tags,
ExecutionTrackingId: logEntry.ExecutionTrackingID, ExecutionTrackingId: logEntry.ExecutionTrackingID,
@ -385,8 +387,6 @@ func (api *oliveTinAPI) internalLogEntryToPb(logEntry *executor.InternalLogEntry
ExecutionFinished: logEntry.ExecutionFinished, ExecutionFinished: logEntry.ExecutionFinished,
User: logEntry.Username, User: logEntry.Username,
BindingId: logEntry.GetBindingId(), BindingId: logEntry.GetBindingId(),
Queued: logEntry.Queued,
QueuedForGroup: logEntry.QueuedForGroup,
DatetimeRateLimitExpires: calculateRateLimitExpires(api, logEntry), DatetimeRateLimitExpires: calculateRateLimitExpires(api, logEntry),
} }