This commit is contained in:
Joel Wetzell
2026-05-17 16:40:37 -05:00
parent ea46dbc3dd
commit 03cd2173f5
8 changed files with 29 additions and 20 deletions
+9 -1
View File
@@ -2,7 +2,15 @@
<div class="w-full">
<mat-toolbar color="primary">
@if (eventsService.status() === 'open') {
<div [matTooltip]="'Connected' + (eventsService.socketRoundTripLatency() !== null ? ' (' + eventsService.socketRoundTripLatency() + ' ms)' : '')" class="h-3 w-3 rounded-full bg-green-400 mr-2"></div>
<div
[matTooltip]="
'Connected' +
(eventsService.socketRoundTripLatency() !== null
? ' (' + eventsService.socketRoundTripLatency() + ' ms)'
: '')
"
class="h-3 w-3 rounded-full bg-green-400 mr-2"
></div>
} @else if (eventsService.status() === 'closed') {
<div matTooltip="Disconnected" class="h-3 w-3 rounded-full bg-orange-400 mr-2"></div>
} @else if (eventsService.status() === 'error') {
+1 -1
View File
@@ -60,7 +60,7 @@
</div>
<div *cdkDragPlaceholder class="flex items-start m-2 w-fit">
<div
<div
class="flex flex-col bg-gray-800 border-2 {{
isInError() ? 'border-red-500' : 'border-gray-600'
}} border-dotted w-fit h-full"
+5 -4
View File
@@ -63,10 +63,11 @@
<div class="text-md text-white text-center">Processors</div>
</div>
@if (processors() !== undefined && processors()!.length > 0) {
<div class="border-2 border-gray-500 m-2"
cdkDropList
(cdkDropListDropped)="drop($event)"
[cdkDropListData]="route()?.processors"
<div
class="border-2 border-gray-500 m-2"
cdkDropList
(cdkDropListDropped)="drop($event)"
[cdkDropListData]="route()?.processors"
>
@for (processor of processors(); track $index; let i = $index) {
<div cdkDrag>
+1 -6
View File
@@ -1,9 +1,4 @@
import {
CdkDrag,
CdkDragDrop,
CdkDropList,
moveItemInArray
} from '@angular/cdk/drag-drop';
import { CdkDrag, CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';
import { JsonPipe } from '@angular/common';
import { Component, computed, inject, input, model, output, signal } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
-1
View File
@@ -1,4 +1,3 @@
export type RouterEvent<T, D> = {
type: T;
data?: D;
+9 -2
View File
@@ -1,7 +1,14 @@
import { HttpClient } from '@angular/common/http';
import { computed, effect, inject, Injectable, signal } from '@angular/core';
import { cloneDeep, isEqual } from 'lodash-es';
import { Config, ConfigError, ModuleConfig, ModuleError, RouteConfig, RouteError } from '../models/config';
import {
Config,
ConfigError,
ModuleConfig,
ModuleError,
RouteConfig,
RouteError,
} from '../models/config';
import { EventsService } from './events';
import { SchemaService } from './schema';
import { SettingsService } from './settings';
@@ -75,7 +82,7 @@ export class ConfigService {
}
uploadConfig(config: Config) {
if (this.schemaService.validate(this.schemaService.configSchemaId,config)) {
if (this.schemaService.validate(this.schemaService.configSchemaId, config)) {
this.updateCurrentlyShownConfig(config);
const configUrl = this.settingsService.configUrl();
if (!configUrl) {
+3 -1
View File
@@ -38,7 +38,9 @@ export class EventsService {
this.pingInterval = setInterval(() => {
if (this.socket && this.socket.readyState === WebSocket.OPEN) {
this.lastPingTimestamp = Date.now();
this.socket.send(JSON.stringify({ type: 'ping', data: {timestamp: this.lastPingTimestamp} }));
this.socket.send(
JSON.stringify({ type: 'ping', data: { timestamp: this.lastPingTimestamp } }),
);
}
}, 5000);
};
+1 -4
View File
@@ -1,9 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { computed, effect, inject, Injectable, signal } from '@angular/core';
import {
AbstractControl,
ValidationErrors
} from '@angular/forms';
import { AbstractControl, ValidationErrors } from '@angular/forms';
import { Ajv2020, JSONSchemaType } from 'ajv/dist/2020';
import { SomeJSONSchema } from 'ajv/dist/types/json-schema';
import { sortBy } from 'lodash-es';