diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts index 174fdaea8..7ee016d00 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts @@ -17,7 +17,7 @@ interface SyntaxError { line: number; column: number; message: string; - warning: boolean; + warning?: boolean; } interface UploadResponse { @@ -43,6 +43,7 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate { automaticLayout: true, readOnly: !this.permissionsService.canEditRules(), glyphMargin: true, + fixedOverflowWidgets: true, }; initialLines: string[] = []; currentLines: string[] = []; @@ -151,10 +152,18 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate { } }, error => { - const errors = this.#mapErrors(error.error); + let errors: SyntaxError[]; + if (error.error?.syntaxErrorMessages) { + errors = this.#mapErrors(error.error); + } else { + const syntaxError: SyntaxError = { message: error.error.message, line: 1, column: 0 }; + errors = this.#mapErrors({ blacklistErrorMessages: [], syntaxErrorMessages: [syntaxError], deprecatedWarnings: [] }); + } this.#drawErrorMarkers(errors); this._loadingService.stop(); - this._toaster.error(rulesScreenTranslations[this.type]['error.generic']); + if (!dryRun) { + this._toaster.error(rulesScreenTranslations[this.type]['error.generic']); + } }, ); } @@ -252,6 +261,7 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate { }, }); }); + this.#errors.set(errors); this.#errorGlyphs.set(this.#codeEditor.deltaDecorations(this.#errorGlyphs(), glyphs)); (window as any).monaco.editor.setModelMarkers(model, model.id, markers); diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts index b714ee549..b3b385268 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts @@ -93,6 +93,11 @@ export class AnnotationDetailsComponent implements OnChanges { description: _('annotation-engines.imported'), show: isBasedOn(annotation, Engines.IMPORTED), }, + { + icon: 'red:redaction-changes', + description: _('annotation-engines.manual'), + show: isBasedOn(annotation, Engines.MANUAL), + }, ]; } } diff --git a/apps/red-ui/src/app/services/files/entity-log.service.ts b/apps/red-ui/src/app/services/files/entity-log.service.ts index d47244478..5bd4bce64 100644 --- a/apps/red-ui/src/app/services/files/entity-log.service.ts +++ b/apps/red-ui/src/app/services/files/entity-log.service.ts @@ -26,6 +26,7 @@ export class EntityLogService extends GenericService { #filterInvalidEntries(entityLogEntry: IEntityLogEntry[]) { return entityLogEntry.filter(entry => { + entry.positions = entry.positions.filter(p => !!p.rectangle?.length); const hasPositions = !!entry.positions?.length; const isRemoved = entry.state === EntryStates.REMOVED; if (!hasPositions) { diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 24c7eccde..86f27219b 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -355,6 +355,7 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Imported", + "manual": "", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index a373adab0..02a547611 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -355,6 +355,7 @@ "annotation-engines": { "dictionary": "Based on dictionary", "imported": "Imported", + "manual": "Manual", "ner": "Based on AI", "rule": "Based on rule" }, diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index 788537d84..ee3791c22 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -355,6 +355,7 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Annotation is imported", + "manual": "", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 96ba15b16..3f54ace5e 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -355,6 +355,7 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Annotation}} based on dictionary", "imported": "Annotation is imported", + "manual": "Manual", "ner": "Annotation based on AI", "rule": "Annotation based on rule {rule}" }, diff --git a/libs/common-ui b/libs/common-ui index 8a2033740..301ea99ab 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 8a2033740ec93fd8c91e80f94d67e1b662bff121 +Subproject commit 301ea99abe1be09687cdbe6d0fbae3bec7eefc23